Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class X2AbilityTag_IRI_RocketLaunchers extends X2AbilityTag;
- // Modified and Implemented from Xylith's XModBase
- // The previous X2AbilityTag. We save it so we can just call it to handle any tag we don't
- // recognize, so we don't have to include a copy of the regular X2AbilityTag code. This also
- // makes it so we will play well with any other mods that replace X2AbilityTag this way.
- var X2AbilityTag WrappedTag;
- var localized string strGenericClassName;
- event ExpandHandler(string InString, out string OutString)
- {
- local name Type, nName;
- local XComGameStateHistory History;
- local XComGameState_Unit TargetUnitState;
- //local X2SoldierClassTemplate ClassTemplate;
- local XComGameState_Ability AbilityState;
- local XComGameState_Effect EffectState;
- local UITacticalHUD TacticalHUD;
- local int iVal;
- local string sStr;
- Type = name(InString);
- History = `XCOMHISTORY;
- `LOG("Expand Handler",,'IRIDAR');
- switch (Type)
- {
- case 'IRI_ROCKETSCATTER':
- `LOG("Case IRI ROCKETSCATTER",,'IRIDAR');
- TacticalHUD = UITacticalHUD(`SCREENSTACK.GetScreen(class'UITacticalHUD'));
- AbilityState = XComGameState_Ability(ParseObj);
- EffectState = XComGameState_Effect(ParseObj);
- if (AbilityState != none)
- TargetUnitState = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(AbilityState.OwnerStateObject.ObjectID));
- else if (EffectState != none)
- TargetUnitState = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(EffectState.ApplyEffectParameters.TargetStateObjectRef.ObjectID));
- if (TacticalHUD != none && TacticalHUD.GetTargetingMethod() != none && TargetUnitState != none)
- {
- iVal = class'X2TargetingMethod_IRI_LWRocketLauncher'.static.GetNumAimRolls(TargetUnitState);
- Outstring = class'X2TargetingMethod_IRI_LWRocketLauncher'.default.strMaxScatter $ string(iVal);
- }
- else
- {
- Outstring = "";
- }
- break;
- // We don't handle this tag, check the wrapped tag.
- default:
- WrappedTag.ParseObj = ParseObj;
- WrappedTag.StrategyParseObj = StrategyParseObj;
- WrappedTag.GameState = GameState;
- WrappedTag.ExpandHandler(InString, OutString);
- // clear them out again
- WrappedTag.ParseObj = none;
- WrappedTag.StrategyParseObj = none;
- WrappedTag.GameState = none;
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement