321 {
324
325 string secondPart =
" - ENTITY IN HANDS IS NOT A WEAPON: " +
Object.GetDebugName(GetEntityInHands());
326
327 string firstPart =
"[wpnfsm] " +
Object.GetDebugName(GetInventoryOwner()) +
" failed to perform weaponevent " +
m_DeferredWeaponEvent.DumpToString();
328 if (weapon)
329 {
330 secondPart =
" on " +
Object.GetDebugName(GetEntityInHands()) +
" which is in state " + weapon.GetCurrentState();
331 secondPart += " with physical state: J: " + weapon.IsJammed() + " | ";
332 for (int i = 0; i < weapon.GetMuzzleCount(); ++i)
333 {
334 secondPart += "Chamber_" + i + ": B(" + weapon.IsChamberFull(i) + ") F(" + weapon.IsChamberFiredOut(i) + ") E(" + weapon.IsChamberEmpty(i) + ") | ";
335 secondPart += "Magazine_" + i + ": " + weapon.GetMagazine(i);
336 if (i < weapon.GetMuzzleCount() - 1)
337 secondPart += " | ";
338 }
339 }
340
341 Error(firstPart + secondPart);
343 }
ref WeaponEventBase m_DeferredWeaponEvent
deferred hand event
Super root of all classes in Enforce script.
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.