Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "FORTRESS" structure type (with fixes), and fix "GENERIC" structure type #3777

Conversation

past-due
Copy link
Member

Alternate approach to #3775
Fixes: #3773

The only 4 structures that were previously using "GENERIC" were the fortresses. Presumably this was to opt them out of certain behavior that "DEFENSE" structures get (such as allowing building on any slope, and struct packing, and foundation stretching), but it also had the side effect of not giving them the same targetAttackWeight bonus as other defensive structs and not treating them as threats in ThreatInRange.

So, instead of adding a new type for "generic" structures, this PR:

  • Adds a "FORTRESS" type that gives fortresses the same behavior as previous (plus addressing the two issues mentioned above regarding attack weight and threat level)
  • Fixes the "GENERIC" type to no longer be considered as a Wall (for upgrades)
  • Adds a STRUCT_GENERIC JS constant, and exposes this in the JS structure object stattype property for "GENERIC" structures (of which there are now none in the built-in stats files)

Potentially breaking change:

  • Any mods editing structure.json should probably update "type": "GENERIC" -> "type": "FORTRESS" for any true fortress structures (unless they want the fixed GENERIC struct behavior).

@past-due past-due added this to the 4.5.0-beta1 milestone Apr 29, 2024
@past-due past-due force-pushed the 2024_04_structure_types_generic_fortress_1 branch from 42071cd to 0003470 Compare April 29, 2024 16:48
@past-due past-due force-pushed the 2024_04_structure_types_generic_fortress_1 branch 2 times, most recently from 9fbc369 to eefdbae Compare April 29, 2024 21:02
@past-due past-due force-pushed the 2024_04_structure_types_generic_fortress_1 branch from eefdbae to bdeee12 Compare April 29, 2024 21:03
@past-due past-due merged commit 369b9cd into Warzone2100:master May 1, 2024
37 checks passed
@past-due past-due deleted the 2024_04_structure_types_generic_fortress_1 branch May 1, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Modding] Add GENERIC Structure types
1 participant