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 event to allow mods to affect starting region elligiblity check #1309

Merged

Conversation

Tedster59
Copy link
Contributor

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

Copy link
Contributor

Pull request modifies event listener templates

Difference (click to expand)
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.

@Iridar Iridar added enhancement ready-for-merge the pull request was reviewed and is ready to be merged. labels Feb 27, 2024
@Iridar Iridar added this to the 1.28.0 milestone Feb 27, 2024
@Iridar Iridar merged commit e917b9b into X2CommunityCore:master Feb 27, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ready-for-merge the pull request was reviewed and is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants