Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static function bool CanAddItemToInventory_CH_Improved(out int bCanAddItem, const EInventorySlot Slot, const X2ItemTemplate ItemTemplate, int Quantity, XComGameState_Unit UnitState, optional XComGameState CheckGameState, optional out string DisabledReason, optional XComGameState_Item ItemState)
- {
- local X2WeaponTemplate WeaponTemplate;
- local XGParamTag LocTag;
- local name ClassName;
- local X2SoldierClassTemplateManager Manager;
- local bool OverrideNormalBehavior;
- local bool DoNotOverrideNormalBehavior;
- OverrideNormalBehavior = CheckGameState != none;
- DoNotOverrideNormalBehavior = CheckGameState == none;
- if(DisabledReason != "")
- return DoNotOverrideNormalBehavior;
- WeaponTemplate = X2WeaponTemplate(ItemTemplate);
- if(WeaponTemplate != none && UnitState.GetSoldierClassTemplateName() == 'DRAKTEN_SkullRipper' && WeaponTemplate.WeaponCat == 'droneweapon' && Slot == eInvSlot_HeavyWeapon )
- return DoNotOverrideNormalBehavior;
- if(WeaponTemplate != none && UnitState.GetSoldierClassTemplateName() != 'DRAKTEN_SkullRipper' && WeaponTemplate.WeaponCat == 'droneweapon' && Slot == eInvSlot_HeavyWeapon || WeaponTemplate != none && UnitState.GetSoldierClassTemplateName() == 'DRAKTEN_SkullRipper' && WeaponTemplate.WeaponCat != 'droneweapon' && Slot == eInvSlot_HeavyWeapon )
- {
- Manager = class'X2SoldierClassTemplateManager'.static.GetSoldierClassTemplateManager();
- LocTag = XGParamTag(`XEXPANDCONTEXT.FindTag("XGParam"));
- LocTag.StrValue0 = Manager.FindSoldierClassTemplate(ClassName).DisplayName;
- DisabledReason = class'UIUtilities_Text'.static.CapsCheckForGermanScharfesS(`XEXPAND.ExpandString(class'UIArmory_Loadout'.default.m_strNeedsSoldierClass));
- bCanAddItem = 0;
- return OverrideNormalBehavior;
- }
- return DoNotOverrideNormalBehavior;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement