mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 08:56:49 +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:
@@ -101,6 +101,9 @@
|
||||
/atom/movable/screen/fullscreen/impaired
|
||||
icon_state = "impairedoverlay"
|
||||
|
||||
/atom/movable/screen/fullscreen/closet_impaired
|
||||
icon_state = "impairedoverlay2"
|
||||
|
||||
/atom/movable/screen/fullscreen/blurry
|
||||
icon = 'icons/mob/screen/effects.dmi'
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
|
||||
@@ -308,8 +308,14 @@ Frequency:
|
||||
var/obj/structure/closet/target_closet = linked_teleporter.attached_closet
|
||||
user.forceMove(target_closet.opened ? get_turf(target_closet) : target_closet)
|
||||
if(target_closet.opened)
|
||||
if(user.client)
|
||||
user.client.eye = user.client.mob
|
||||
user.client.perspective = MOB_PERSPECTIVE
|
||||
user.visible_message(SPAN_NOTICE("\The [user] steps out of the back of \the [target_closet]."), SPAN_NOTICE("You teleport into the linked closet, stepping out of it."))
|
||||
user.set_fullscreen(FALSE, "closet_impaired", /atom/movable/screen/fullscreen/closet_impaired)
|
||||
else
|
||||
if(user.client)
|
||||
user.client.eye = target_closet
|
||||
target_closet.visible_message(SPAN_WARNING("\The [target_closet] rattles."))
|
||||
to_chat(user, SPAN_NOTICE("You teleport into the target closet, bumping into the closed door."))
|
||||
target_closet.shake_animation()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# - (fixes bugs)
|
||||
# wip
|
||||
# - (work in progress)
|
||||
# qol
|
||||
# - (quality of life)
|
||||
# soundadd
|
||||
# - (adds a sound)
|
||||
# sounddel
|
||||
# - (removes a sound)
|
||||
# rscadd
|
||||
# - (adds a feature)
|
||||
# rscdel
|
||||
# - (removes a feature)
|
||||
# imageadd
|
||||
# - (adds an image or sprite)
|
||||
# imagedel
|
||||
# - (removes an image or sprite)
|
||||
# spellcheck
|
||||
# - (fixes spelling or grammar)
|
||||
# experiment
|
||||
# - (experimental change)
|
||||
# balance
|
||||
# - (balance changes)
|
||||
# code_imp
|
||||
# - (misc internal code change)
|
||||
# refactor
|
||||
# - (refactors code)
|
||||
# config
|
||||
# - (makes a change to the config files)
|
||||
# admin
|
||||
# - (makes changes to administrator tools)
|
||||
# server
|
||||
# - (miscellaneous changes to server)
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: AlaunusLux
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
|
||||
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- balance: "Adds an overlay to reduce vision while in a trash pile or closed locker."
|
||||
- bugfix: "Fixed vision not updating when using closet teleporters."
|
||||
- bugfix: "Fixed closet density and closet closing sound being lost while closets with teleporters were on cooldown."
|
||||
Reference in New Issue
Block a user