Skip to content

Commit

Permalink
Hallucinations Don't Fake Doorshock (vgstation-coders#35745)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurfursten committed Jan 11, 2024
1 parent 3a92922 commit 0e09570
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,17 @@ About the new airlock wires panel:
user.delayNextMove(10)
spawn (10)
src.justzap = 0
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
to_chat(user, "<span class='danger'>You feel a powerful shock course through your body!</span>")
user.adjustHalLoss(10)
user.AdjustStunned(10)
else if(user.client && user.hallucination > 50 && prob(10) && !operating)
//access denied
user << 'sound/machines/denied.ogg'
var/image/haldoor = image(icon,loc,"door_deny",ABOVE_DOOR_LAYER)
haldoor.plane = relative_plane(OBJ_PLANE)
user.client.images += haldoor
user.delayNextMove(3) //Stop for 3 frames, same as the hallucination
user.ear_deaf += 1 //Deafen them just for one tick so they don't hear the door open for real
spawn(6)
user.client.images -= haldoor
QDEL_NULL(haldoor)
..(user)

/obj/machinery/door/airlock/proc/isElectrified()
Expand Down

0 comments on commit 0e09570

Please sign in to comment.