mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 07:22:42 +00:00
Merge pull request #8452 from Spookerton/spkrtn/fix/zap
machines don't try to electrocute ghosts
This commit is contained in:
@@ -737,7 +737,7 @@ 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)
|
||||
/obj/machinery/door/airlock/shock(mob/living/user, prb)
|
||||
if(!arePowerSystemsOn())
|
||||
return 0
|
||||
if(hasShocked)
|
||||
|
||||
@@ -271,11 +271,13 @@ Class Procs:
|
||||
state(text, "blue")
|
||||
playsound(src, 'sound/machines/ping.ogg', 50, 0)
|
||||
|
||||
/obj/machinery/proc/shock(mob/user, prb)
|
||||
/obj/machinery/proc/shock(mob/living/user, prb)
|
||||
if(inoperable())
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE
|
||||
if (!istype(user))
|
||||
return
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
|
||||
Reference in New Issue
Block a user