mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Prevents Shocking non-living Mobs (#13422)
This commit is contained in:
@@ -289,8 +289,8 @@ About the new airlock wires panel:
|
||||
// shock user with probability prb (if all connections & power are working)
|
||||
// returns 1 if shocked, 0 otherwise
|
||||
// The preceding comment was borrowed from the grille's shock script
|
||||
/obj/machinery/door/airlock/shock(mob/user, prb)
|
||||
if(!arePowerSystemsOn())
|
||||
/obj/machinery/door/airlock/shock(mob/living/user, prb)
|
||||
if(!istype(user) || !arePowerSystemsOn())
|
||||
return FALSE
|
||||
if(shockCooldown > world.time)
|
||||
return FALSE //Already shocked someone recently?
|
||||
|
||||
@@ -558,13 +558,12 @@ Class Procs:
|
||||
return threatcount
|
||||
|
||||
|
||||
/obj/machinery/proc/shock(mob/user, prb)
|
||||
if(inoperable())
|
||||
/obj/machinery/proc/shock(mob/living/user, prb)
|
||||
if(!istype(user) || inoperable())
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE
|
||||
if(!isobserver(user))//if they are a ghost do not shock. Why do need cheesie honkers? You ded.
|
||||
do_sparks(5, 1, src)
|
||||
do_sparks(5, 1, src)
|
||||
if(electrocute_mob(user, get_area(src), src, siemens_strength, TRUE))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user