SitRepCheckAdditionalRequirements
Tracking Issue: #561
Tags: events
The SitRepCheckAdditionalRequirements
event allows mods to subject sitreps
to additional checks for specific missions, and then either allow the sitrep
to be added to the particular mission (default behavior), or forbid it.
SitRepCheckAdditionalRequirements event
Param | Value |
---|---|
EventID | SitRepCheckAdditionalRequirements |
EventData | XComLWTuple |
EventSource | X2SitRepTemplate |
NewGameState | none |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | bMeetsRequirements | bool | inout |
1 | MissionState | XComGameState_MissionSite | in |
Listener template
static function EventListenerReturn OnSitRepCheckAdditionalRequirements(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local X2SitRepTemplate SitRepTemplate;
local XComLWTuple Tuple;
local bool bMeetsRequirements;
local XComGameState_MissionSite MissionState;
SitRepTemplate = X2SitRepTemplate(EventSource);
Tuple = XComLWTuple(EventData);
bMeetsRequirements = Tuple.Data[0].b;
MissionState = XComGameState_MissionSite(Tuple.Data[1].o);
// Your code here
Tuple.Data[0].b = bMeetsRequirements;
return ELR_NoInterrupt;
}