CovertAction_OverrideCostScalar
Tracking Issue: #807
Tags: events
Allows listeners to override the multiplier covert actions use to determine how many resources an optional cost requires. The game uses 0.5 by default, which means CAs need half the supplies/intel/etc. you would get from a POI as the cost to mitigate a risk.
CovertAction_OverrideCostScalar event
Param | Value |
---|---|
EventID | CovertAction_OverrideCostScalar |
EventData | XComLWTuple |
EventSource | XComGameState_CovertAction |
NewGameState | none |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | DefaultCostScalar | float | inout |
1 | RewardState | XComGameState_Reward | in |
Listener template
static function EventListenerReturn OnCovertAction_OverrideCostScalar(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComGameState_CovertAction ActionState;
local XComLWTuple Tuple;
local float DefaultCostScalar;
local XComGameState_Reward RewardState;
ActionState = XComGameState_CovertAction(EventSource);
Tuple = XComLWTuple(EventData);
DefaultCostScalar = Tuple.Data[0].f;
RewardState = XComGameState_Reward(Tuple.Data[1].o);
// Your code here
Tuple.Data[0].f = DefaultCostScalar;
return ELR_NoInterrupt;
}