mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
Enhance:ini registry sequence (#121)
* '+=' supported . * introduced registry list value deduplication . * TechnoType listing now parse data both from ini and map . * added UT case .
This commit is contained in:
parent
3e90dca667
commit
93e956e7ac
8 changed files with 164 additions and 50 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "mapdata.h"
|
||||
#include "variables.h"
|
||||
#include "inlines.h"
|
||||
#include "IniMega.h"
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
@ -157,7 +158,8 @@ BOOL CBuilding::OnInitDialog()
|
|||
|
||||
if (upgradecount > 0) {
|
||||
auto updatePowerupItems = [=](const CIniFile& ini) {
|
||||
for (auto const& [seq, unitname] : ini["BuildingTypes"]) {
|
||||
auto const& rules = IniMegaFile::GetRules();
|
||||
for (auto const& [seq, unitname] : rules.GetSection("BuildingTypes")) {
|
||||
auto const& targetBldID = ini.GetString(unitname, "PowersUpBuilding");
|
||||
if (targetBldID == m_type) {
|
||||
auto const desc = unitname + " (" + GetName(unitname) + ")";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue