mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-20 11:31:12 +01:00
Reduces vision while in closet or trash pile and fixes closet teleporter camera update (#21154)
This started out as an update to reduce vision while inside closets. While I was testing that, I noticed closet teleporters weren't updating the camera properly, so I fixed that, as well as a bug with an early `return` causing closets to have 0 density while a closet teleporter was on cooldown. Reduce vision inside locker: <img width="1354" height="1345" alt="image" src="https://github.com/user-attachments/assets/5f581031-51c0-4502-bddd-21045329c754" />
This commit is contained in:
@@ -190,6 +190,7 @@
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
M.set_fullscreen(FALSE, "closet_impaired", /atom/movable/screen/fullscreen/closet_impaired)
|
||||
|
||||
/obj/structure/closet/proc/open()
|
||||
if(opened)
|
||||
@@ -232,9 +233,7 @@
|
||||
animate_door_alt(TRUE)
|
||||
update_icon()
|
||||
|
||||
if(linked_teleporter)
|
||||
if(linked_teleporter.last_use + 600 > world.time)
|
||||
return
|
||||
if(linked_teleporter && linked_teleporter.last_use + 600 < world.time)
|
||||
var/did_teleport = FALSE
|
||||
for(var/mob/M in contents)
|
||||
if(linked_teleporter.do_teleport(M))
|
||||
@@ -279,6 +278,7 @@
|
||||
if(M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.set_fullscreen(TRUE, "closet_impaired", /atom/movable/screen/fullscreen/closet_impaired)
|
||||
M.forceMove(src)
|
||||
added_units += M.mob_size
|
||||
if(mob_limit) //We only want to store one valid mob
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
if(do_after(user, 3 SECONDS, src, DO_UNIQUE))
|
||||
user.visible_message("<b>[user]</b> climbs into \the [src], disappearing from sight.", SPAN_NOTICE("You climb into \the [src], finally finding a good spot to hide."))
|
||||
user.forceMove(src)
|
||||
user.set_fullscreen(TRUE, "closet_impaired", /atom/movable/screen/fullscreen/closet_impaired)
|
||||
hider = user
|
||||
if(ishuman(user) && prob(5))
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -47,6 +48,7 @@
|
||||
if(user.stat || user.resting) // don't care too much about use_check here, checking these will suffice
|
||||
return
|
||||
user.forceMove(get_turf(src))
|
||||
user.set_fullscreen(FALSE, "closet_impaired", /atom/movable/screen/fullscreen/closet_impaired)
|
||||
if(user == hider)
|
||||
hider = null
|
||||
|
||||
@@ -93,6 +95,7 @@
|
||||
if(hider && prob(chance))
|
||||
to_chat(hider, SPAN_DANGER("You've been discovered!"))
|
||||
hider.forceMove(get_turf(src))
|
||||
hider.set_fullscreen(FALSE, "closet_impaired", /atom/movable/screen/fullscreen/closet_impaired)
|
||||
to_chat(user, SPAN_DANGER("You discover that \the [hider] was hiding inside \the [src]!"))
|
||||
hider = null
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user