17 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" RemoveNewMagazineFromInventory m_newSrc=invalid, item not in bubble?");
22 m_newMagazine.GetInventory().GetCurrentInventoryLocation(curr);
37 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" RemoveNewMagazineFromInventory, error - cannot new remove mag from inv");
41 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" RemoveNewMagazineFromInventory, error - no magazines configured for replace (m_old=m_new=NULL)");
65 if (!super.SaveCurrentFSMState(ctx))
70 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" RemoveNewMagazineFromInventory.SaveCurrentFSMState: cannot write m_newMagazine for weapon=" +
m_weapon);
76 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" RemoveNewMagazineFromInventory.SaveCurrentFSMState: cannot write m_newSrc for weapon=" +
m_weapon);
84 if (!super.LoadCurrentFSMState(ctx, version))
89 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" RemoveNewMagazineFromInventory.LoadCurrentFSMState: cannot read m_newMagazine for weapon=" +
m_weapon);
95 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" RemoveNewMagazineFromInventory.LoadCurrentFSMState: cannot read m_newSrc for weapon=" +
m_weapon);
170 mag.GetInventory().GetCurrentInventoryLocation(newSrc);
180 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponAttachMagazine, error - cannot new remove mag from inv");
193 Magazine mag = Magazine.Cast(leftHandItem);
197 e.
m_player.GetInventory().ClearInventoryReservationEx( mag , null );
208 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponAttachMagazine, error - cannot drop magazine from left hand after not found inventory space for old magazine");
214 mag.GetInventory().GetCurrentInventoryLocation(oldSrc);
221 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponAttachMagazine, error - cannot remove old mag from wpn");
234 ref AttachNewMagazine m_attach;
287 mag.GetInventory().GetCurrentInventoryLocation(newSrc);
297 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponAttachMagazineOpenBoltCharged, error - cannot new remove mag from inv");
310 Magazine mag = Magazine.Cast(leftHandItem);
314 e.
m_player.GetInventory().ClearInventoryReservationEx( mag , null );
325 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponAttachMagazineOpenBoltCharged, error - cannot drop magazine from left hand after not found inventory space for old magazine");
331 mag.GetInventory().GetCurrentInventoryLocation(oldSrc);
338 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponAttachMagazineOpenBoltCharged, error - cannot remove old mag from wpn");
void wpnDebugPrint(string s)
script counterpart to engine's class Inventory
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
proto native int GetSlot()
returns slot id if current type is Attachment
proto native bool IsValid()
verify current set inventory location
proto native int GetType()
returns type of InventoryLocation
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
provides access to slot configuration
static bool IsWeaponLogEnable()
override void OnEntry(WeaponEventBase e)
proto bool Write(void value_out)
proto bool Read(void value_in)
signalize mechanism manipulation
weapon finite state machine
represent weapon state base
void WeaponStartAction(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
specific action sub-type
ref WeaponEjectCasing m_eject
ref WeaponStateBase m_start
source of the cartridge
override void OnEntry(WeaponEventBase e)
ref WeaponCharging_CK m_onCK
ref WeaponFSM m_fsm
hierarchical parent state of this state (or null)
ref WeaponStateBase m_attach_W
ref InventoryLocation m_newSrc
magazine that will be removed from inventory
override void OnAbort(WeaponEventBase e)
void WeaponStateBase(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
internal state id used for load/restore
void WeaponEjectCasing(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
override void OnExit(WeaponEventBase e)
override bool LoadCurrentFSMState(ParamsReadContext ctx, int version)
int m_actionType
action to be played
Magazine m_newMagazine
magazine that will be detached
ref AttachNewMagazine m_attach
void WeaponAttachMagazineOpenBoltCharged(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
ref WeaponChambering_Cartridge m_chamber
void WeaponAttachMagazine(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
void AttachNewMagazine(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
void RemoveNewMagazineFromInventory(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
override bool SaveCurrentFSMState(ParamsWriteContext ctx)
void DayZPlayerUtils()
cannot be instantiated
Serializer ParamsReadContext
Serializer ParamsWriteContext
void Error(string err)
Messagebox with error message.
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
void WeaponGuardHasAmmo(Weapon_Base w=NULL)
FindInventoryLocationType
flags for searching locations in inventory
bool OptionalLocationReadFromContext(out InventoryLocation loc, notnull ParamsReadContext ctx)
InventoryLocationType
types of Inventory Location
bool OptionalLocationWriteToContext(InventoryLocation loc, notnull ParamsWriteContext ctx)
enum FSMTransition WeaponTransition
ref WeaponStateBase m_start
class WeaponEndAction extends WeaponStartAction m_action