Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static function EquipCosmeticJetPacks(XComGameState_Item ItemState, XComGameState_Unit UnitState, XComGameState NewGameState)
- {
- local X2ArmorTemplate ArmorTemplate;
- local XComGameState_Item ArmorState;
- if(default.AUTO_EQUIP_COSMETICS)
- {
- ArmorState = UnitState.GetItemInSlot(eInvSlot_Armor, NewGameState);
- ArmorTemplate = X2ArmorTemplate(ArmorState.GetMyTemplate());
- if (ArmorTemplate != none)
- {
- if(ArmorTemplate.bHeavyWeapon)
- {
- if(UnitState.kAppearance.iGender == eGender_Male)
- {
- UnitState.kAppearance.nmRightForearm = 'IRI_JetPack_Forearm01';
- UnitState.kAppearance.nmShins = 'IRI_JetPack_Shins01';
- UnitState.kAppearance.nmThighs = 'IRI_JetPack_Pack05';
- }
- if(UnitState.kAppearance.iGender == eGender_Female)
- {
- UnitState.kAppearance.nmRightForearm = 'IRI_JetPack_Forearm01_F';
- UnitState.kAppearance.nmShins = 'IRI_JetPack_Shins01_F';
- UnitState.kAppearance.nmThighs = 'IRI_JetPack_Pack05_F';
- }
- }
- else
- {
- if(UnitState.kAppearance.iGender == eGender_Male)
- {
- UnitState.kAppearance.nmTorsoDeco = 'IRI_JetPack_Pack01';
- }
- if(UnitState.kAppearance.iGender == eGender_Female)
- {
- UnitState.kAppearance.nmTorsoDeco = 'IRI_JetPack_Pack01_F';
- }
- }
- // thanks to Mr. Nice for this!
- XComHumanPawn(XGUnit(UnitState.GetVisualizer()).GetPawn()).SetAppearance(UnitState.kAppearance); //refresh the pawn so that newly equipped cosmetic becomes visible right away
- UnitState.StoreAppearance(); //
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement