Gives the gravitational catapult a 3 second cooldown per use

This commit is contained in:
joep van der velden
2020-09-26 23:37:48 +02:00
parent 7e8d9ad51e
commit 1ee8d6c4d5
@@ -87,11 +87,15 @@
energy_drain = 100
range = MECHA_MELEE | MECHA_RANGED
var/atom/movable/locked
var/cooldown_timer = 0
var/mode = 1 //1 - gravsling 2 - gravpush
/obj/item/mecha_parts/mecha_equipment/gravcatapult/action(atom/movable/target)
if(!action_checks(target))
return
if(cooldown_timer > world.time)
occupant_message("<span class='warning'>[src] is still recharging.</span>")
return
switch(mode)
if(1)
if(!locked)
@@ -106,6 +110,7 @@
locked.throw_at(target, 14, 1.5)
locked = null
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info())
cooldown_timer = world.time + 3 SECONDS
return 1
else
locked = null
@@ -125,6 +130,7 @@
step_away(A,target)
sleep(2)
var/turf/T = get_turf(target)
cooldown_timer = world.time + 3 SECONDS
log_game("[key_name(chassis.occupant)] used a Gravitational Catapult in ([T.x],[T.y],[T.z])")
return 1