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 a new event trigger after Mission Intro kismet has completed #1407

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

furudee
Copy link
Contributor

@furudee furudee commented Nov 12, 2024

Fixes issue #1406

@@ -4245,6 +4259,11 @@ Begin:
sleep(0.0);
}

// Start Issue #1406
/// HL-Docs: ref:PostMissionIntroKismet
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need a HL-Docs entry here, just the standard issue tags are enough. Could even do // Single Line for Issue #1406.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I figured that the reference would be useful, since there are two different places where the trigger is placed and both will show the location on the documentation

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fair. Good work.

/// As such, you don't have a handle for anything the mission kismet causes before your first XCOM turn.
/// This event can be considered a later alternative to `'OnBeginTacticalPlay'` event.
///
/// ```unrealscript
Copy link
Contributor

Choose a reason for hiding this comment

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

HL-Docs for events have a different style, here's an example:

/// ```event
/// EventID: AllowOnCovertActionCompleteAnalytics,
/// EventData: [
///   inout bool bAllow,
///   in Object OriginalEventData,
///   in Object OriginalEventSource,
///   in XComGameState OriginalGameState,
///   in name OriginalEvent,
///   in Object OriginalCallbackData
/// ],
/// EventSource: none,
/// NewGameState: none

Also, are you sure there's no useful stuff you could pass along with the event trigger?

Copy link
Contributor Author

@furudee furudee Dec 3, 2024

Choose a reason for hiding this comment

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

I'm not sure there is anything special to pass with the trigger, since there is no pending gamestate and you can access the ruleset normally when the event trigger is called

Also, I squashed the commits into one and revised the doc block

@Iridar Iridar added the waiting-on-author A pull request is waiting on changes from the author label Dec 2, 2024
@Iridar Iridar added this to the 1.30.0 milestone Dec 2, 2024
@furudee furudee force-pushed the master branch 4 times, most recently from 0f1fb33 to dcb4997 Compare December 3, 2024 03:26
@@ -4245,6 +4259,11 @@ Begin:
sleep(0.0);
}

// Start Issue #1406
/// HL-Docs: ref:PostMissionIntroKismet
Copy link
Contributor

Choose a reason for hiding this comment

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

That's fair. Good work.

@Iridar Iridar added ready-for-merge the pull request was reviewed and is ready to be merged. and removed waiting-on-author A pull request is waiting on changes from the author labels Dec 4, 2024
Copy link
Contributor

github-actions bot commented Dec 4, 2024

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 02ed7bd..3298ada 100644
--- a/target/CHL_Event_Compiletest.uc
+++ b/target/CHL_Event_Compiletest.uc
@@ -1178,6 +1178,13 @@ static function EventListenerReturn OnPostInventoryLoadoutApplied(Object EventDa
 	return ELR_NoInterrupt;
 }
 
+static function EventListenerReturn OnPostMissionIntroKismet(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
+{
+	// Your code here
+
+	return ELR_NoInterrupt;
+}
+
 static function EventListenerReturn OnPostSquaddieLoadoutApplied(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
 {
 	local XComGameState_Unit UnitState;
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
Copy link
Contributor

Iridar commented Dec 4, 2024

This is ready to go. I'll merge it when the work on 1.30 starts in earnest. Thanks for your contribution.

@Iridar
Copy link
Contributor

Iridar commented Dec 4, 2024

Btw it wasn't mandatory to squash the commits, when you're not adding new files, all commits can be squashed automatically during the merging process, we require exactly two commits only when new files are added to CHL.

@Iridar Iridar merged commit 09afff8 into X2CommunityCore:master Dec 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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