Skip to content

style: Apply consistent field order to CommandSetUpgrade Behavior modules#55

Merged
Stubbjax merged 1 commit into
TheSuperHackers:mainfrom
Stubbjax:apply-consistent-field-orders-command-set-upgrade
May 30, 2026
Merged

style: Apply consistent field order to CommandSetUpgrade Behavior modules#55
Stubbjax merged 1 commit into
TheSuperHackers:mainfrom
Stubbjax:apply-consistent-field-orders-command-set-upgrade

Conversation

@Stubbjax
Copy link
Copy Markdown
Contributor

This change applies a consistent field order to all CommandSetUpgrade Behavior modules across all INI files. Fields are ordered based on the most common order patterns and their code declaration/parse orders.

Note: The invalid modules, ModuleTag_18 and ModuleTag_19, in Demo_GLABarracks will be removed in a future change.

Order

Below is the order applied to the respective module.

Behavior CommandSetUpgrade
  CommandSet
  TriggeredBy
  ConflictsWith
  RemovesUpgrades
  FXListUpgrade
  RequiresAllTriggers
  CommandSetAlt
  TriggerAlt

@Stubbjax Stubbjax self-assigned this May 29, 2026
@Stubbjax Stubbjax added Gen Relates to Generals ZH Relates to Zero Hour labels May 29, 2026
Copy link
Copy Markdown

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull is labeled for Gen but only contains ZH edits.

@Stubbjax Stubbjax removed the Gen Relates to Generals label May 29, 2026
@xezon
Copy link
Copy Markdown

xezon commented May 29, 2026

Would have been nice if TriggeredBy, ConflictsWith, RequiresAllTriggers sat together

Although, I see it matches Code definition now.

Behavior CommandSetUpgrade
  CommandSet
  TriggeredBy <-----------
  ConflictsWith <-----------
  RemovesUpgrades
  FXListUpgrade
  RequiresAllTriggers <-----------
  CommandSetAlt
  TriggerAlt
{ "TriggeredBy",		INI::parseAsciiStringVector, nullptr, offsetof( UpgradeMuxData, m_activationUpgradeNames ) },
{ "ConflictsWith",	INI::parseAsciiStringVector, nullptr, offsetof( UpgradeMuxData, m_conflictingUpgradeNames ) },
{ "RemovesUpgrades",INI::parseAsciiStringVector, nullptr, offsetof( UpgradeMuxData, m_removalUpgradeNames ) },
{ "FXListUpgrade",	INI::parseFXList, nullptr, offsetof( UpgradeMuxData, m_fxListUpgrade ) },
{ "RequiresAllTriggers", INI::parseBool, nullptr, offsetof( UpgradeMuxData, m_requiresAllTriggers ) },

@Stubbjax
Copy link
Copy Markdown
Contributor Author

Would have been nice if TriggeredBy, ConflictsWith, RequiresAllTriggers sat together

Although, I see it matches Code definition now.

We could reorder UpgradeMuxData? For example:

TriggeredBy
RequiresAllTriggers
ConflictsWith
RemovesUpgrades
FXListUpgrade

@xezon
Copy link
Copy Markdown

xezon commented May 30, 2026

Keeping it in sync with the Code definition order also makes sense. No strong preference.

@Stubbjax Stubbjax merged commit 2475306 into TheSuperHackers:main May 30, 2026
@Stubbjax Stubbjax deleted the apply-consistent-field-orders-command-set-upgrade branch May 30, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants