Add ModifyMaxSquadSize DLC hook#954
Add ModifyMaxSquadSize DLC hook#954robojumper wants to merge 4 commits intoX2CommunityCore:masterfrom
Conversation
|
Why a DLCInfo hook and not an event? |
Iridar
left a comment
There was a problem hiding this comment.
I don't have strong objections to anything in this PR, and a hook like that is no doubt gonna come in handy on many occasions, although same as Xymanek, I wonder if perhaps making this a delegate method (like the one Xym and I made for #889) would have been better.
Although on second thought, delegates have more cumbersome setup, while mission squad size is not particularly hot code, so it's probably okay to have it as a DLC hook.
| /// | ||
| /// The final max squad size will be calculated with the expression `Min(Max(1, MaxBaseSize + SquadSizeUpgradeMod + SituationMod), SitRepMax)`. | ||
| /// | ||
| /// This hook is best combined with `GetValidFloorSpawnLocations` or `SPAWN_EXTRA_TILE` (TODO: Docs for these) in order to support |
There was a problem hiding this comment.
I'm not sure we'd want to ship a "TODO", but I assume this is here just because it's a Draft PR? It is marked as "ready for review", so I'm getting some mixed signals here.
| /// | ||
| /// if (MissionSite != none && MissionSite.GeneratedMission.Mission.MissionName == 'AssaultFortressLeadup') | ||
| /// { | ||
| /// // Leviathan gets four more soldiers because reasons |
There was a problem hiding this comment.
Personally I had no trouble following these docs and I find the provided explanations perfectly sufficient, but perhaps they should be a bit lighter on the joke-ish wordings like "cargo cult" and "because reasons".
I personally don't plan to publish any mod depending on this, but I think this could come in helpful for a mod that gives more control over squad size overall (base size, squad size upgrades, special missions).
396b40b...e33a82f