23 bool result = m_arg0.GuardCondition(e) && m_arg1.GuardCondition(e);
37 bool result = !m_arg0.GuardCondition(e);
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);
179 if (
m_weapon.IsChamberEmpty(m_muzzle))
196 int mi =
m_weapon.GetCurrentMuzzle();
215 for (
int i = 0; i <
m_weapon.GetMuzzleCount(); i++)
236 if (
m_weapon.IsChamberFull(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();
310 if (
m_weapon.IsChamberFiredOut(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)
439 int mi =
m_weapon.GetCurrentMuzzle();
440 if (
m_weapon.GetTotalMaxCartridgeCount(mi) -
m_weapon.GetTotalCartridgeCount(mi) == 1)
457 int i =
m_weapon.GetMuzzleCount() - 1;
460 if (
m_weapon.GetTotalMaxCartridgeCount(i) -
m_weapon.GetTotalCartridgeCount(i) >= 1)
471class WeaponGuardChamberMultiHasRoomBulltetIgnoreLast
extends WeaponGuardBase
478 int i =
m_weapon.GetMuzzleCount() - 1;
479 bool emty_one =
false;
482 if (
m_weapon.GetTotalMaxCartridgeCount(i) -
m_weapon.GetTotalCartridgeCount(i) >= 1)
508 Magazine mag = m_state.m_srcMagazine;
509 if (mag != NULL && mag.GetAmmoCount() > 0)
526 int mi =
m_weapon.GetCurrentMuzzle();
527 Magazine mag =
m_weapon.GetMagazine(mi);
529 if (mag != NULL && mag2 != NULL)
541 Error(
"[wpnfsm] " +
Object.GetDebugName(
m_weapon) +
" guard - mag == NULL or mag2 == NULL, cannot perform comparison");
551 return player.GetWeaponManager().WantContinue();
void wpnDebugPrint(string s)
void WeaponGuardHasAmmo(Weapon_Base w=NULL)
class WeaponGuardIsDestroyed extends WeaponGuardBase m_weapon
static bool IsWeaponLogEnable()
signalize mechanism manipulation
represents guard on a transition from state to state
void GuardNot(WeaponGuardBase arg0=NULL)
void WeaponGuardInnerMagazineFullShareChamber(Weapon_Base w=NULL)
void WeaponGuardHasAmmoInLoopedState(WeaponChambering_Base state)
void WeaponGuardCanAttachMag(Weapon_Base w=NULL)
override bool GuardCondition(WeaponEventBase e)
void WeaponGuardIsDestroyed(Weapon_Base w=NULL)
ref WeaponGuardBase m_arg1
void WeaponGuardChamberHasRoomForOne(Weapon_Base w=NULL)
void GuardOr(WeaponGuardBase arg0=NULL, WeaponGuardBase arg1=NULL)
void WeaponGuardChamberHasRoomForMoreThanOne(Weapon_Base w=NULL)
void WeaponGuardHasMag(Weapon_Base w=NULL)
void WeaponGuardHasAmmoInEvent(Weapon_Base w=NULL)
void WeaponGuardJammed(Weapon_Base w=NULL)
void WeaponGuardChamberFiredOut(Weapon_Base w=NULL, int muzzle_index=0)
bool GuardCondition(WeaponEventBase e)
void WeaponGuardCanSwapMag(Weapon_Base w=NULL)
void WeaponGuardChamberEmpty(Weapon_Base w=NULL, int muzzle_index=0)
void WeaponGuardCurrentChamberFiredOut(Weapon_Base w=NULL)
void WeaponGuardAnyChamberFiredOut(Weapon_Base w=NULL)
void WeaponGuardChamberFull(Weapon_Base w=NULL, int muzzle_index=0)
void WeaponGuardAnyChamberEmpty(Weapon_Base w=NULL, int muzzle_index=0)
void WeaponGuardCurrentChamberEmpty(Weapon_Base w=NULL)
void WeaponGuardHasAmmoInnerMagazine(Weapon_Base w=NULL)
WeaponChambering_Base m_state
void WeaponGuardInnerMagazineFull(Weapon_Base w=NULL)
ref WeaponGuardBase m_arg0
void WeaponGuardChamberMultiHasRoomBulltet(Weapon_Base w=NULL)
void GuardAnd(WeaponGuardBase arg0=NULL, WeaponGuardBase arg1=NULL)
protected Weapon_Base m_weapon
void WeaponGuardCurrentChamberFull(Weapon_Base w=NULL)
void WeaponGuardChamberMultiHasRoomBulltetIgnoreLast(Weapon_Base w=NULL)
void WeaponGuardMagazinesHaveEqualSizes(Weapon_Base w=NULL)
void WeaponGuardCanDetachMag(Weapon_Base w=NULL)
void Error(string err)
Messagebox with error message.
bool magazinesHaveEqualSizes(notnull Magazine mag, notnull Magazine mag2)