X2CommunityCore / X2WOTCCommunityHighlander

https://steamcommunity.com/workshop/filedetails/?id=1134256495
MIT License
60 stars 68 forks source link

Add event to allow mods to affect starting region elligiblity check #1309

Closed Tedster59 closed 8 months ago

Tedster59 commented 8 months ago

Fixed version of PR #1304 to address github commit issues. Fixes issue #1303

github-actions[bot] commented 8 months ago

Pull request modifies event listener templates

Difference (click to expand) ```diff diff --git a/target/CHL_Event_Compiletest.uc b/target/CHL_Event_Compiletest.uc index 119ff6b..03d8f1b 100644 --- a/target/CHL_Event_Compiletest.uc +++ b/target/CHL_Event_Compiletest.uc @@ -506,6 +506,24 @@ static function EventListenerReturn OnOverrideDisableReinforcementsFlare(Object return ELR_NoInterrupt; } +static function EventListenerReturn OnOverrideEligibleStartingRegion(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject) +{ + local XComGameState_WorldRegion PotentialStartRegion; + local XComLWTuple Tuple; + local bool ValidStartRegion; + + PotentialStartRegion = XComGameState_WorldRegion(EventSource); + Tuple = XComLWTuple(EventData); + + ValidStartRegion = Tuple.Data[0].b; + + // Your code here + + Tuple.Data[0].b = ValidStartRegion; + + return ELR_NoInterrupt; +} + static function EventListenerReturn OnOverrideEncounterZoneAnchorPoint(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject) { local XComGameState_AIGroup AIGroup; ```
What? (click to expand) The Highlander documentation tool generates event listener examples from event specifications. This comment contains the modifications that would be made to the copy-pasteable event listeners in documentation, for PR authors and reviewers to inspect for correctness, and will automatically be kept up-to-date whenever this PR is updated.