19 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag_Store, error - no magazine to load from (m_magazine=NULL)");
35 if (
m_magazine.GetInventory().GetCurrentInventoryLocation(il))
45 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag_Store, error - cannot store detached magazine!");
50 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag_Store, error - cannot get curr location");
60 if (!super.SaveCurrentFSMState(ctx))
65 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag_Store.SaveCurrentFSMState: cannot write m_magazine for weapon=" +
m_weapon);
71 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag_Store.SaveCurrentFSMState: cannot write m_st for weapon=" +
m_weapon);
79 if (!super.LoadCurrentFSMState(ctx, version))
84 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag_Store.LoadCurrentFSMState: cannot read m_magazine for weapon=" +
m_weapon);
89 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag_Store.LoadCurrentFSMState: cannot read m_dst for weapon=" +
m_weapon);
106 ref InventoryLocation
m_dst;
142 WeaponEventDetachMagazine de;
166 if (!super.SaveCurrentFSMState(ctx))
171 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag.SaveCurrentFSMState: cannot write m_magazine for weapon=" +
m_weapon);
177 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag.SaveCurrentFSMState: cannot write m_st for weapon=" +
m_weapon);
185 if (!super.LoadCurrentFSMState(ctx, version))
190 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag.LoadCurrentFSMState: cannot read m_magazine for weapon=" +
m_weapon);
195 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" WeaponDetachingMag.LoadCurrentFSMState: cannot read m_dst for weapon=" +
m_weapon);
void wpnDebugPrint(string s)
ref InventoryLocation m_dst
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
Super root of all classes in Enforce script.
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...
script counterpart to engine's class Inventory
static bool IsWeaponLogEnable()
proto bool Write(void value_out)
proto bool Read(void value_in)
signalize mechanism manipulation
weapon finite state machine
simple class starting animation action specified by m_action and m_actionType
int m_actionType
action to be played
void WeaponStateBase(Weapon_Base w=NULL, WeaponStateBase parent=NULL)
internal state id used for load/restore
ref WeaponDetachingMag_Store m_store
void WeaponDetachingMag(Weapon_Base w=NULL, WeaponStateBase parent=NULL, WeaponActions action=WeaponActions.NONE, int actionType=-1)
ref WeaponFSM m_fsm
hierarchical parent state of this state (or null)
override void OnEntry(WeaponEventBase e)
ref WeaponStateBase m_start
source of the cartridge
override bool LoadCurrentFSMState(ParamsReadContext ctx, int version)
ref InventoryLocation m_dst
magazine that will be detached
override void OnAbort(WeaponEventBase e)
ref MagazineHide_W4T m_hideM
override void OnExit(WeaponEventBase e)
override bool SaveCurrentFSMState(ParamsWriteContext ctx)
represent weapon state base
Serializer ParamsReadContext
Serializer ParamsWriteContext
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.