MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / prime

Method prime

game/state/shared/aequipment.cpp:620–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618void AEquipment::updateTB(GameState &state) { updateInner(state, TICKS_PER_TURN); }
619
620void AEquipment::prime(bool onImpact, int triggerDelay, float triggerRange)
621{
622 if (type->type != AEquipmentType::Type::Grenade && type->type != AEquipmentType::Type::Ammo)
623 {
624 return;
625 }
626
627 if (onImpact)
628 {
629 triggerType = TriggerType::Contact;
630 }
631 else
632 {
633 triggerType = type->trigger_type;
634 }
635 this->triggerDelay = triggerDelay;
636 this->triggerRange = triggerRange;
637 this->primed = true;
638}
639
640void AEquipment::explode(GameState &state)
641{

Callers 4

fireMethod · 0.80
executeAIActionMethod · 0.80
BattleViewMethod · 0.80
orderUseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected