Skip to content

Conversation

4z0t
Copy link
Member

@4z0t 4z0t commented Jul 25, 2025

Description of the proposed changes

Reduces number of required selections down to 2 (was 7) that were resolving available support factories for construction during ACU enhancement to higher teches.

Testing done on the proposed changes

  1. spawn all factions ACUs;
  2. start upgrading them to t2 - no support factories are available;
  3. spawn hqs for each factions of each type one by one checking that they appear in building list of ACUs;
  4. repeat for t3 enhancement.

Additional context.

In perfect world we'd like to report from sim that we have hq of certain category and thus have available categories for support factories.

Checklist

@4z0t 4z0t requested review from Hdt80bro, clyfordv and lL1l1 July 25, 2025 10:19
@4z0t 4z0t added area: ui Anything to do with the User Interface of the Game ui: construction related to construction ui labels Jul 25, 2025
Copy link
Contributor

@lL1l1 lL1l1 left a comment

Choose a reason for hiding this comment

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

Nothing is super broken but I caught an edge case and there's code at the end to clean up.

Spawn all ACUs command:

   CreateUnitAtMouse('ual0001', 0,   -2.00,    0.00, -0.00000)
   CreateUnitAtMouse('xsl0001', 0,    2.00,    0.00, -0.00000)
   CreateUnitAtMouse('url0001', 0,    7.00,    0.00, -0.00000)
   CreateUnitAtMouse('uel0001', 0,   -7.00,    0.00, -0.00000)

@4z0t
Copy link
Member Author

4z0t commented Jul 31, 2025

These AI extensions sometime replace what I didn't want to replace 🤕

supportFactories = supportFactories + supportCategory
end
newBuildableCategories = supportFactories * supportFactories
newBuildableCategories = newBuildableCategories * supportFactories
Copy link
Contributor

Choose a reason for hiding this comment

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

The function says it returns a modified list of buildables, not just the valid support factories. Idk why the UI works when you return only support factories.

Suggested change
newBuildableCategories = newBuildableCategories * supportFactories
newBuildableCategories = newBuildableCategories - categories.SUPPORTFACTORY + supportFactories

Copy link
Member Author

Choose a reason for hiding this comment

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

Your suggestion is invalid because It makes all faction HQs to be buildable by any other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Anything to do with the User Interface of the Game ui: construction related to construction ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants