Skip to content

Commit 82e9c9b

Browse files
authored
[GEN][ZH] Add support for selecting structures in teams in World Builder (#1316)
1 parent 94b99a7 commit 82e9c9b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Generals/Code/Tools/WorldBuilder/src/TeamIdentity.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ void TeamIdentity::loadUnitsInfo(int idcMinUnit, NameKeyType keyMinUnit,
253253

254254
// next tier uses the editor sorting bits that design can specify in the INI
255255
EditorSortingType sort = tTemplate->getEditorSorting();
256-
if (( sort != ES_VEHICLE ) && (sort != ES_INFANTRY)) continue;
256+
// TheSuperHackers @tweak DayV 20/07/2025 Allow structures in teams.
257+
if (sort != ES_VEHICLE && sort != ES_INFANTRY && sort != ES_STRUCTURE) {
258+
continue;
259+
}
257260

258261
Int ndx = pCombo->AddString(tTemplate->getName().str());
259262
if (type == tTemplate->getName()) {
@@ -437,6 +440,8 @@ void TeamIdentity::OnUnitTypeButton(Int idcUnitType)
437440
PickUnitDialog dlg;
438441
dlg.SetAllowableType(ES_VEHICLE);
439442
dlg.SetAllowableType(ES_INFANTRY);
443+
// TheSuperHackers @tweak DayV 20/07/2025 Allow structures in teams.
444+
dlg.SetAllowableType(ES_STRUCTURE);
440445
if (dlg.DoModal() == IDOK) {
441446
AsciiString unit = dlg.getPickedUnit();
442447
NameKeyType keyUnitType;

GeneralsMD/Code/Tools/WorldBuilder/src/TeamIdentity.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ void TeamIdentity::loadUnitsInfo(int idcMinUnit, NameKeyType keyMinUnit,
253253

254254
// next tier uses the editor sorting bits that design can specify in the INI
255255
EditorSortingType sort = tTemplate->getEditorSorting();
256-
if (( sort != ES_VEHICLE ) && (sort != ES_INFANTRY)) continue;
256+
// TheSuperHackers @tweak DayV 20/07/2025 Allow structures in teams.
257+
if (sort != ES_VEHICLE && sort != ES_INFANTRY && sort != ES_STRUCTURE) {
258+
continue;
259+
}
257260

258261
Int ndx = pCombo->AddString(tTemplate->getName().str());
259262
if (type == tTemplate->getName()) {
@@ -437,6 +440,8 @@ void TeamIdentity::OnUnitTypeButton(Int idcUnitType)
437440
PickUnitDialog dlg;
438441
dlg.SetAllowableType(ES_VEHICLE);
439442
dlg.SetAllowableType(ES_INFANTRY);
443+
// TheSuperHackers @tweak DayV 20/07/2025 Allow structures in teams.
444+
dlg.SetAllowableType(ES_STRUCTURE);
440445
if (dlg.DoModal() == IDOK) {
441446
AsciiString unit = dlg.getPickedUnit();
442447
NameKeyType keyUnitType;

0 commit comments

Comments
 (0)