Skip to content

Commit

Permalink
Re-add event for PostUFOSetInterceptionTime
Browse files Browse the repository at this point in the history
refactor commit to pass NewGameState

revise docs
  • Loading branch information
Tedster59 authored and Iridar committed Mar 9, 2024
1 parent c5f2a50 commit dea97d9
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,29 @@ function SetInterceptionChance(XComGameState NewGameState, bool bGoldenPathSpawn
}

SetInterceptionTime();

// Start Issue #1316
/// HL-Docs: feature:PostUFOSetInterceptionTime; issue:1316; tags:strategy
/// This event allows mods to modify the state of a UFO
/// after it has been created but before the gamestate is submitted.
/// To use this event, listen to it with the `ELD_Immediate` deferral,
/// and make sure to get the latest version of the UFO state object from the NewGameState, for example:
///
/// ```unrealscript
/// local XComGameState_UFO UFOState;
///
/// UFOState = XComGameState_UFO(EventSource);
/// UFOState = XComGameState_UFO(NewGameState.GetGameStateForObjectID(UFOState.ObjectID));
/// ```
///
/// ```event
/// EventID: PostUFOSetInterceptionTime,
/// EventData: XComGameState_UFO,
/// EventSource: XComGameState_UFO,
/// NewGameState: yes
/// ```
`XEVENTMGR.TriggerEvent('PostUFOSetInterceptionTime', self, self, NewGameState);
// End Issue #1316
}

//---------------------------------------------------------------------------------------
Expand Down

0 comments on commit dea97d9

Please sign in to comment.