47 InitReliability(m_ChanceToJam);
51 if (!
GetGame().IsDedicatedServer())
169 override bool IsMagazine()
185 if (
GetGame().ConfigIsExisting(
"cfgMagazines " +
GetType() +
" Reliability ChanceToJam"))
193 float GetChanceToJam()
195 int level = GetHealthLevel();
197 if (
level >= 0 &&
level < m_ChanceToJam.Count())
198 return m_ChanceToJam[
level];
274 return GetConfigWeightModified() + (
GetAmmoCount() * ConfigGetFloat(
"weightPerQuantityUnit"));
321 override bool CanDetachAttachment(
EntityAI parent)
328 return player.GetWeaponManager().CanDetachMagazine(
wpn,
this);
330 return super.CanDetachAttachment(parent);
338 p.GetWeaponManager().OnMagazineInventoryEnter(
this);
346 p.GetWeaponManager().OnMagazineInventoryExit(
this);
356 player.GetWeaponManager().OnMagazineAttach(
this);
367 player.GetWeaponManager().OnMagazineDetach(
this);
412 override bool CanBeFSwaped()
Param4< int, int, string, int > TSelectableActionInfoWithColor
eBleedingSourceType GetType()
void AddAction(typename actionName)
const int ECE_IN_INVENTORY
void SplitItem(PlayerBase player)
void SplitItemToInventoryLocation(notnull InventoryLocation dst)
float GetWeightSpecialized(bool forceRecalc=false)
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
void CombineItems(ItemBase other_item, bool use_stack_max=true)
void OnInventoryEnter(Man player)
Event called on item when it is placed in the player(Man) inventory, passes the owner as a parameter.
void OnCombine(ItemBase other_item)
override bool CanBeCombined(EntityAI other_item, bool reservation_check=true, bool stack_max_limit=false)
override bool CanBeSplit()
bool IsCombineAll(ItemBase other_item, bool use_stack_max=false)
void OnInventoryExit(Man player)
Event called on item when it is removed from the player(Man) inventory, passes the old owner as a par...
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override void OnWasAttached(EntityAI parent, int slot_id)
enum CartridgeType Tracer
override void OnWasDetached(EntityAI parent, int slot_id)
Super root of all classes in Enforce script.
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
script counterpart to engine's class Inventory
static proto native EntityAI LocationCreateEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new item directly at location
Serialization general interface. Serializer API works with:
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Floor(float f)
Returns floor of value.
const int SAT_DEBUG_ACTION