123 override void InitStateMachine()
126 m_abilities.Insert(
new AbilityRecord(WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_BULLET)));
127 m_abilities.Insert(
new AbilityRecord(WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_BULLET)));
128 m_abilities.Insert(
new AbilityRecord(WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_MAGAZINE_NOBULLET)));
129 m_abilities.Insert(
new AbilityRecord(WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_NOBULLET)));
130 m_abilities.Insert(
new AbilityRecord(WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_DETACH)));
132 m_abilities.Insert(
new AbilityRecord(WeaponActions.CHAMBERING, GetWeaponSpecificCommand(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_CLOSED)));
134 m_abilities.Insert(
new AbilityRecord(WeaponActions.MECHANISM, GetWeaponSpecificCommand(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED)));
136 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, GetWeaponSpecificCommand(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_START)));
137 m_abilities.Insert(
new AbilityRecord(WeaponActions.UNJAMMING, GetWeaponSpecificCommand(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_END)));
139 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_JAM)));
140 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_NORMAL)));
141 m_abilities.Insert(
new AbilityRecord(WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY)));
158 WeaponStateBase Mech_C00 =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, GetWeaponSpecificCommand(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
159 WeaponStateBase Mech_C01 =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, GetWeaponSpecificCommand(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
160 WeaponStateBase Mech_C10 =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, GetWeaponSpecificCommand(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
161 WeaponStateBase Mech_C11 =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, GetWeaponSpecificCommand(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
162 WeaponStateBase Mech_CF0 =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, GetWeaponSpecificCommand(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
163 WeaponStateBase Mech_CF1 =
new WeaponCharging(
this, NULL, WeaponActions.MECHANISM, GetWeaponSpecificCommand(WeaponActions.MECHANISM, WeaponActionMechanismTypes.MECHANISM_CLOSED));
165 WeaponStateBase Trigger_C00 =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
166 WeaponStateBase Trigger_C10 =
new WeaponFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_NORMAL));
167 WeaponStateBase Trigger_C11 =
new WeaponFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_NORMAL));
168 WeaponStateBase Trigger_C01 =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
169 WeaponStateBase Trigger_CF0 =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
170 WeaponStateBase Trigger_CF1 =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
171 WeaponStateBase Trigger_JF0 =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
172 WeaponStateBase Trigger_JF1 =
new WeaponDryFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_DRY));
175 WeaponStateBase Trigger_C10J =
new WeaponFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_JAM));
176 WeaponStateBase Trigger_C11J =
new WeaponFire(
this, NULL, WeaponActions.FIRE, GetWeaponSpecificCommand(WeaponActions.FIRE, WeaponActionFireTypes.FIRE_JAM));
178 WeaponStateBase Unjam_JF0 =
new WeaponUnjamming(
this, NULL, WeaponActions.UNJAMMING, GetWeaponSpecificCommand(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_START));
179 WeaponStateBase Unjam_JF1 =
new WeaponUnjamming(
this, NULL, WeaponActions.UNJAMMING, GetWeaponSpecificCommand(WeaponActions.UNJAMMING, WeaponActionUnjammingTypes.UNJAMMING_START));
182 WeaponChambering Chamber_C00 =
new WeaponChambering(
this, NULL, WeaponActions.CHAMBERING, GetWeaponSpecificCommand(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_CLOSED));
183 WeaponChambering Chamber_C01 =
new WeaponChambering(
this, NULL, WeaponActions.CHAMBERING, GetWeaponSpecificCommand(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_CLOSED));
184 WeaponChambering Chamber_CF0 =
new WeaponChambering(
this, NULL, WeaponActions.CHAMBERING, GetWeaponSpecificCommand(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_CLOSED));
185 WeaponChambering Chamber_CF1 =
new WeaponChambering(
this, NULL, WeaponActions.CHAMBERING, GetWeaponSpecificCommand(WeaponActions.CHAMBERING, WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_CLOSED));
187 WeaponAttachMagazine Attach_C00 =
new WeaponAttachMagazine(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_NOBULLET));
188 WeaponAttachMagazine Attach_CF0 =
new WeaponAttachMagazine(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_NOBULLET));
189 WeaponAttachMagazine Attach_C10 =
new WeaponAttachMagazine(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_BULLET));
190 WeaponAttachMagazine Attach_JF0 =
new WeaponAttachMagazine(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADSRIFLE_NOMAGAZINE_BULLET));
197 WeaponDetachingMag Detach_C11 =
new WeaponDetachingMag(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_DETACH));
198 WeaponDetachingMag Detach_C01 =
new WeaponDetachingMag(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_DETACH));
199 WeaponDetachingMag Detach_CF1 =
new WeaponDetachingMag(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_DETACH));
200 WeaponDetachingMag Detach_JF1 =
new WeaponDetachingMag(
this, NULL, WeaponActions.RELOAD, GetWeaponSpecificCommand(WeaponActions.RELOAD, WeaponActionReloadTypes.RELOADRIFLE_MAGAZINE_DETACH));
227 m_fsm.AddTransition(
new WeaponTransition( Mech_C10, _fin_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
229 m_fsm.AddTransition(
new WeaponTransition( Mech_C10, _abt_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
233 m_fsm.AddTransition(
new WeaponTransition( Mech_CF0, _fin_, CF0, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
235 m_fsm.AddTransition(
new WeaponTransition( Mech_CF0, _abt_, CF0, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
239 m_fsm.AddTransition(
new WeaponTransition( Mech_C11, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
241 m_fsm.AddTransition(
new WeaponTransition( Mech_C11, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
245 m_fsm.AddTransition(
new WeaponTransition( Mech_C01, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
247 m_fsm.AddTransition(
new WeaponTransition( Mech_C01, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
251 m_fsm.AddTransition(
new WeaponTransition( Mech_CF1, _fin_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
252 m_fsm.AddTransition(
new WeaponTransition( Mech_CF1, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
254 m_fsm.AddTransition(
new WeaponTransition( Mech_CF1, _abt_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
255 m_fsm.AddTransition(
new WeaponTransition( Mech_CF1, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
312 m_fsm.AddTransition(
new WeaponTransition( Chamber_C00, _fin_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
314 m_fsm.AddTransition(
new WeaponTransition( Chamber_C00, _abt_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
318 m_fsm.AddTransition(
new WeaponTransition( Chamber_C01, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
320 m_fsm.AddTransition(
new WeaponTransition( Chamber_C01, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
324 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF0, _fin_, CF0, NULL,
new WeaponGuardCurrentChamberFiredOut(
this) ));
325 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF0, _fin_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
327 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF0, _abt_, CF0, NULL,
new WeaponGuardCurrentChamberFiredOut(
this) ));
328 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF0, _abt_, C00, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
332 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF1, _fin_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this) ));
333 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF1, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
335 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF1, _abt_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this) ));
336 m_fsm.AddTransition(
new WeaponTransition( Chamber_CF1, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this) ));
340 m_fsm.AddTransition(
new WeaponTransition( C00, __A__, Attach_C00, NULL,
new WeaponGuardCanAttachMag(
this)));
341 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _fin_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
342 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
344 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _abt_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
345 m_fsm.AddTransition(
new WeaponTransition( Attach_C00, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
348 m_fsm.AddTransition(
new WeaponTransition( C10, __A__, Attach_C10, NULL,
new WeaponGuardCanAttachMag(
this)));
349 m_fsm.AddTransition(
new WeaponTransition( Attach_C10, _fin_, C11, NULL,
new WeaponGuardHasMag(
this)));
351 m_fsm.AddTransition(
new WeaponTransition( Attach_C10, _abt_, C11, NULL,
new WeaponGuardHasMag(
this)));
355 m_fsm.AddTransition(
new WeaponTransition( CF0, __A__, Attach_CF0, NULL,
new WeaponGuardCanAttachMag(
this)));
356 m_fsm.AddTransition(
new WeaponTransition( Attach_CF0, _fin_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
357 m_fsm.AddTransition(
new WeaponTransition( Attach_CF0, _fin_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
358 m_fsm.AddTransition(
new WeaponTransition( Attach_CF0, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
360 m_fsm.AddTransition(
new WeaponTransition( Attach_CF0, _abt_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
361 m_fsm.AddTransition(
new WeaponTransition( Attach_CF0, _abt_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
362 m_fsm.AddTransition(
new WeaponTransition( Attach_CF0, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
366 m_fsm.AddTransition(
new WeaponTransition( JF0, __A__, Attach_JF0, NULL,
new WeaponGuardCanAttachMag(
this)));
367 m_fsm.AddTransition(
new WeaponTransition( Attach_JF0, _fin_, JF1, NULL,
new WeaponGuardHasMag(
this)));
369 m_fsm.AddTransition(
new WeaponTransition( Attach_JF0, _abt_, JF1, NULL,
new WeaponGuardHasMag(
this)));
373 m_fsm.AddTransition(
new WeaponTransition( C11, __S__, Reload_C11, NULL,
new WeaponGuardCanSwapMag(
this)));
374 m_fsm.AddTransition(
new WeaponTransition( Reload_C11, _fin_, C11, NULL,
new WeaponGuardHasMag(
this)));
376 m_fsm.AddTransition(
new WeaponTransition( Reload_C11, _abt_, C11, NULL,
new WeaponGuardHasMag(
this)));
379 m_fsm.AddTransition(
new WeaponTransition( C01, __S__, Reload_C01, NULL,
new WeaponGuardCanSwapMag(
this)));
380 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _fin_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
381 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
383 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _abt_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
384 m_fsm.AddTransition(
new WeaponTransition( Reload_C01, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
387 m_fsm.AddTransition(
new WeaponTransition( CF1, __S__, Reload_CF1, NULL,
new WeaponGuardCanSwapMag(
this)));
388 m_fsm.AddTransition(
new WeaponTransition( Reload_CF1, _fin_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
389 m_fsm.AddTransition(
new WeaponTransition( Reload_CF1, _fin_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
390 m_fsm.AddTransition(
new WeaponTransition( Reload_CF1, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
392 m_fsm.AddTransition(
new WeaponTransition( Reload_CF1, _abt_, CF1, NULL,
new WeaponGuardCurrentChamberFiredOut(
this)));
393 m_fsm.AddTransition(
new WeaponTransition( Reload_CF1, _abt_, C11, NULL,
new WeaponGuardCurrentChamberFull(
this)));
394 m_fsm.AddTransition(
new WeaponTransition( Reload_CF1, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
397 m_fsm.AddTransition(
new WeaponTransition( JF1, __S__, Reload_JF1, NULL,
new WeaponGuardCanSwapMag(
this)));
398 m_fsm.AddTransition(
new WeaponTransition( Reload_JF1, _fin_, JF1, NULL,
new WeaponGuardHasMag(
this)));
400 m_fsm.AddTransition(
new WeaponTransition( Reload_JF1, _abt_, JF1, NULL,
new WeaponGuardHasMag(
this)));
405 m_fsm.AddTransition(
new WeaponTransition( C11, __D__, Detach_C11, NULL,
new WeaponGuardCanDetachMag(
this)));
407 m_fsm.AddTransition(
new WeaponTransition( Detach_C11, _abt_, C11, NULL,
new WeaponGuardHasMag(
this)));
411 m_fsm.AddTransition(
new WeaponTransition( C01, __D__, Detach_C01, NULL,
new WeaponGuardCanDetachMag(
this)));
412 m_fsm.AddTransition(
new WeaponTransition( Detach_C01, _fin_, C01, NULL,
new WeaponGuardHasMag(
this)));
414 m_fsm.AddTransition(
new WeaponTransition( Detach_C01, _abt_, C01, NULL,
new WeaponGuardHasMag(
this)));
417 m_fsm.AddTransition(
new WeaponTransition( CF1, __D__, Detach_CF1, NULL,
new WeaponGuardCanDetachMag(
this)));
418 m_fsm.AddTransition(
new WeaponTransition( Detach_CF1, _fin_, CF1, NULL,
new WeaponGuardHasMag(
this)));
420 m_fsm.AddTransition(
new WeaponTransition( Detach_CF1, _abt_, CF1, NULL,
new WeaponGuardHasMag(
this)));
423 m_fsm.AddTransition(
new WeaponTransition( JF1, __D__, Detach_JF1, NULL,
new WeaponGuardCanDetachMag(
this)));
424 m_fsm.AddTransition(
new WeaponTransition( Detach_JF1, _fin_, JF1, NULL,
new WeaponGuardHasMag(
this)));
426 m_fsm.AddTransition(
new WeaponTransition( Detach_JF1, _abt_, JF1, NULL,
new WeaponGuardHasMag(
this)));
431 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF0, _fin_, JF0, NULL,
new WeaponGuardJammed(
this)));
433 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF0, _abt_, JF0, NULL,
new WeaponGuardJammed(
this)));
437 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _fin_, JF1, NULL,
new WeaponGuardJammed(
this)));
438 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _fin_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
440 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _abt_, JF1, NULL,
new WeaponGuardJammed(
this)));
441 m_fsm.AddTransition(
new WeaponTransition( Unjam_JF1, _abt_, C01, NULL,
new WeaponGuardCurrentChamberEmpty(
this)));
444 SetInitialState(C00);
446 SelectionBulletHide();
453 override void SetActions()