Porting tesla/electrocute code updates. (#12280)
* Porting tesla/electrocute code updates. * Why is the dominator being insta-deleted by zaps a good idea? * Yikes. * ah
This commit is contained in:
@@ -232,15 +232,16 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
cut_overlay(GLOB.fire_overlay, TRUE)
|
||||
SSfire_burning.processing -= src
|
||||
|
||||
/obj/proc/tesla_act(power, tesla_flags, shocked_targets)
|
||||
/obj/zap_act(power, zap_flags, shocked_targets)
|
||||
if(QDELETED(src))
|
||||
return 0
|
||||
obj_flags |= BEING_SHOCKED
|
||||
var/power_bounced = power / 2
|
||||
tesla_zap(src, 3, power_bounced, tesla_flags, shocked_targets)
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
|
||||
return power / 2
|
||||
|
||||
//The surgeon general warns that being buckled to certain objects receiving powerful shocks is greatly hazardous to your health
|
||||
//Only tesla coils and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later.
|
||||
/obj/proc/tesla_buckle_check(var/strength)
|
||||
//Only tesla coils, vehicles, and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later.
|
||||
/obj/proc/zap_buckle_check(var/strength)
|
||||
if(has_buckled_mobs())
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
|
||||
Reference in New Issue
Block a user