OverrideStrategyCostString
Tracking Issue: #1218
Fires an event that allows mods to override the strategy layer cost strings. Default: Vanilla behavior will be used.
OverrideStrategyCostString event
Param | Value |
---|---|
EventID | OverrideStrategyCostString |
EventData | XComLWTuple |
EventSource | none |
NewGameState | none |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | ItemTemplateName | name | in |
1 | Quantity | int | in |
2 | IsResourceCost | bool | in |
3 | CostString | string | inout |
Listener template
static function EventListenerReturn OnOverrideStrategyCostString(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComLWTuple Tuple;
local name ItemTemplateName;
local int Quantity;
local bool IsResourceCost;
local string CostString;
Tuple = XComLWTuple(EventData);
ItemTemplateName = Tuple.Data[0].n;
Quantity = Tuple.Data[1].i;
IsResourceCost = Tuple.Data[2].b;
CostString = Tuple.Data[3].s;
// Your code here
Tuple.Data[3].s = CostString;
return ELR_NoInterrupt;
}