23 bool result =
m_arg0.GuardCondition(e) &&
m_arg1.GuardCondition(e);
31 ref WeaponGuardBase m_arg0;
37 bool result = !
m_arg0.GuardCondition(e);
45 ref WeaponGuardBase m_arg0;
46 ref WeaponGuardBase m_arg1;
52 bool result =
m_arg0.GuardCondition(e) ||
m_arg1.GuardCondition(e);
103 int mi =
m_weapon.GetCurrentMuzzle();
104 Magazine mag =
m_weapon.GetMagazine(mi);
105 if (mag != NULL && mag.GetAmmoCount() > 0)
122 int mi =
m_weapon.GetCurrentMuzzle();
123 if (
m_weapon.GetInternalMagazineCartridgeCount(mi) >= 1)
141 if (mag != NULL && mag.GetAmmoCount() > 0)
159 int mi =
m_weapon.GetCurrentMuzzle();
160 Magazine mag =
m_weapon.GetMagazine(mi);
196 int mi =
m_weapon.GetCurrentMuzzle();
210 protected int m_muzzle;
215 for (
int i = 0; i <
m_weapon.GetMuzzleCount(); i++)
231 protected int m_muzzle;
253 int mi =
m_weapon.GetCurrentMuzzle();
272 int mi =
m_weapon.GetCurrentMuzzle();
273 if (
m_weapon.IsInternalMagazineFull(mi))
290 int mi =
m_weapon.GetCurrentMuzzle();
305 protected int m_muzzle;
327 int mi =
m_weapon.GetCurrentMuzzle();
345 for (
int i = 0; i <
m_weapon.GetMuzzleCount(); i++)
366 int mi =
m_weapon.GetCurrentMuzzle();
384 int mi =
m_weapon.GetCurrentMuzzle();
385 Magazine attached_mag =
m_weapon.GetMagazine(mi);
403 int mi =
m_weapon.GetCurrentMuzzle();
421 int mi =
m_weapon.GetCurrentMuzzle();
422 if (
m_weapon.GetInternalMagazineMaxCartridgeCount(mi) -
m_weapon.GetInternalMagazineCartridgeCount(mi) > 1)
432class WeaponGuardInternalMagazineHasRoomForBullet
extends WeaponGuardBase
439 int mi =
m_weapon.GetCurrentMuzzle();
440 if (
m_weapon.GetInternalMagazineMaxCartridgeCount(mi) -
m_weapon.GetInternalMagazineCartridgeCount(mi) >= 1)
457 int mi =
m_weapon.GetCurrentMuzzle();
458 if (
m_weapon.GetTotalMaxCartridgeCount(mi) -
m_weapon.GetTotalCartridgeCount(mi) == 1)
475 int i =
m_weapon.GetMuzzleCount() - 1;
478 if (
m_weapon.GetTotalMaxCartridgeCount(i) -
m_weapon.GetTotalCartridgeCount(i) >= 1)
489class WeaponGuardChamberMultiHasRoomBulltetIgnoreLast
extends WeaponGuardBase
496 int i =
m_weapon.GetMuzzleCount() - 1;
497 bool emty_one =
false;
500 if (
m_weapon.GetTotalMaxCartridgeCount(i) -
m_weapon.GetTotalCartridgeCount(i) >= 1)
526 Magazine mag =
m_state.m_srcMagazine;
527 if (mag != NULL && mag.GetAmmoCount() > 0)
544 int mi =
m_weapon.GetCurrentMuzzle();
545 Magazine mag =
m_weapon.GetMagazine(mi);
547 if (mag != NULL && mag2 != NULL)
559 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" guard - mag == NULL or mag2 == NULL, cannot perform comparison");
606 return player.GetWeaponManager().WantContinue();
void wpnDebugPrint(string s)
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
void WeaponGuardHasAmmo(Weapon_Base w=NULL)
void WeaponGuardWeaponDischarged(Weapon_Base w=NULL)
void WeaponGuardWeaponOpen(Weapon_Base w=NULL)
enum FSMTransition WeaponEventBase
static bool IsWeaponLogEnable()
signalize mechanism manipulation
void WeaponGuardWeaponCharged(Weapon_Base w=NULL)
void WeaponGuardWeaponOpen(Weapon_Base w=NULL)
void WeaponGuardJammed(Weapon_Base w=NULL)
override bool GuardCondition(WeaponEventBase e)
void WeaponGuardInnerMagazineFull(Weapon_Base w=NULL)
WeaponChambering_Base m_state
ref WeaponGuardBase m_arg1
void WeaponGuardCurrentChamberFiredOut(Weapon_Base w=NULL)
void WeaponGuardHasAmmoInLoopedState(WeaponChambering_Base state)
void WeaponGuardCanAttachMag(Weapon_Base w=NULL)
void WeaponGuardHasAmmoInnerMagazine(Weapon_Base w=NULL)
void WeaponGuardCanSwapMag(Weapon_Base w=NULL)
void WeaponGuardHasMag(Weapon_Base w=NULL)
void WeaponGuardInternalMagazineHasRoomForBullet(Weapon_Base w=NULL)
void GuardNot(WeaponGuardBase arg0=NULL)
void WeaponGuardAnyChamberFiredOut(Weapon_Base w=NULL)
void WeaponGuardChamberHasRoomForMoreThanOne(Weapon_Base w=NULL)
void WeaponGuardInnerMagazineFullShareChamber(Weapon_Base w=NULL)
void WeaponGuardIsDestroyed(Weapon_Base w=NULL)
void WeaponGuardChamberFull(Weapon_Base w=NULL, int muzzle_index=0)
void WeaponGuardChamberMultiHasRoomBulltet(Weapon_Base w=NULL)
void WeaponGuardChamberFiredOut(Weapon_Base w=NULL, int muzzle_index=0)
void WeaponGuardChamberEmpty(Weapon_Base w=NULL, int muzzle_index=0)
void WeaponGuardCurrentChamberEmpty(Weapon_Base w=NULL)
void WeaponGuardChamberMultiHasRoomBulltetIgnoreLast(Weapon_Base w=NULL)
bool GuardCondition(WeaponEventBase e)
void GuardAnd(WeaponGuardBase arg0=NULL, WeaponGuardBase arg1=NULL)
void WeaponGuardCanDetachMag(Weapon_Base w=NULL)
void GuardOr(WeaponGuardBase arg0=NULL, WeaponGuardBase arg1=NULL)
void WeaponGuardAnyChamberEmpty(Weapon_Base w=NULL, int muzzle_index=0)
void WeaponGuardCurrentChamberFull(Weapon_Base w=NULL)
void WeaponGuardHasAmmoInEvent(Weapon_Base w=NULL)
void WeaponGuardChamberHasRoomForOne(Weapon_Base w=NULL)
ref WeaponGuardBase m_arg0
void WeaponGuardMagazinesHaveEqualSizes(Weapon_Base w=NULL)
represents guard on a transition from state to state
void Error(string err)
Messagebox with error message.
bool magazinesHaveEqualSizes(notnull Magazine mag, notnull Magazine mag2)