diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index be74bbb5e41..9a172195153 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -85,7 +85,10 @@ /obj/machinery/sleeper/update_icon() flick("[initial(icon_state)]-anim", src) if(occupant) - icon_state = "[initial(icon_state)]-closed" + if(stat & NOPOWER || stat & BROKEN) + icon_state = "[initial(icon_state)]-closed" + else + icon_state = "[initial(icon_state)]-working" return else icon_state = initial(icon_state) @@ -272,7 +275,7 @@ to_chat(user, "You [src.panel_open ? "open" : "close"] the maintenance panel.") ClearOverlays() if(src.panel_open) - AddOverlays("[initial(icon_state)]-o") + AddOverlays("[initial(icon_state)]-panel") return TRUE else if(default_part_replacement(user, attacking_item)) return TRUE diff --git a/code/game/machinery/body_scanner.dm b/code/game/machinery/body_scanner.dm index edfa5fd6802..8205e4155eb 100644 --- a/code/game/machinery/body_scanner.dm +++ b/code/game/machinery/body_scanner.dm @@ -7,7 +7,7 @@ Click your target with Grab intent, then click on the scanner to place them in it. Click the connected terminal to operate. \ Right-click the scanner and click 'Eject Occupant' to remove them. You can enter the scanner yourself in a similar way, using the 'Enter Body Scanner' \ verb." - icon = 'icons/obj/machinery/sleeper.dmi' + icon = 'icons/obj/machinery/bodyscanner.dmi' icon_state = "body_scanner" density = TRUE anchored = TRUE @@ -56,12 +56,15 @@ /obj/machinery/bodyscanner/Destroy() // So the GC can qdel this. if (connected) - connected.connected = null + connected.unlink_scanner() connected = null occupant = null return ..() /obj/machinery/bodyscanner/update_icon() + ClearOverlays() + if(panel_open) + AddOverlays("[icon_state]-panel") flick("[initial(icon_state)]-anim", src) if(occupant) name = "[name] ([occupant])" @@ -247,8 +250,8 @@ name = "body scanner console" var/tgui_name = "Zeng-Hu Pharmaceuticals Body Scanner" desc = "An advanced control panel that can be used to interface with a connected body scanner." - icon = 'icons/obj/machinery/sleeper.dmi' - icon_state = "body_scannerconsole" + icon = 'icons/obj/machinery/bodyscanner.dmi' + icon_state = "body_scanner_console" var/obj/machinery/bodyscanner/connected var/collapse_desc = "" var/broken_desc = "" @@ -262,7 +265,6 @@ /obj/item/stock_parts/scanning_module = 2, /obj/item/stock_parts/console_screen ) - var/global/image/console_overlay var/list/connected_displays = list() var/list/data = list() var/scan_data @@ -285,23 +287,36 @@ /obj/machinery/body_scanconsole/update_icon() ClearOverlays() + if(panel_open) + AddOverlays("[icon_state]_panel") if((stat & BROKEN) || (stat & NOPOWER)) return - else - if(!console_overlay) - console_overlay = image(icon, "body_scannerconsole-screen") - var/emissive_overlay = emissive_appearance(icon, "body_scannerconsole-screen") - AddOverlays(console_overlay) - AddOverlays(emissive_overlay) - set_light(1.4, 1, COLOR_PURPLE) + if(connected) + if(connected.stat & BROKEN || connected.stat & NOPOWER) + return + AddOverlays(emissive_appearance(icon, "[icon_state]_lights")) + AddOverlays("[icon_state]_lights") /obj/machinery/body_scanconsole/Initialize() . = ..() + FindScanner() + update_icon() + +/obj/machinery/body_scanconsole/proc/FindScanner() for(var/obj/machinery/bodyscanner/C in orange(1,src)) connected = C + RegisterSignal(connected, COMSIG_QDELETING, PROC_REF(on_linked_scanner_deletion)) break if(connected) connected.connected = src + +/obj/machinery/body_scanconsole/proc/on_linked_scanner_deletion() + SIGNAL_HANDLER + unlink_scanner() + +/obj/machinery/body_scanconsole/proc/unlink_scanner() + connected = null + UnregisterSignal(connected, COMSIG_QDELETING) update_icon() /obj/machinery/body_scanconsole/attack_ai(var/mob/user) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index bcd0b74cd23..e30a94382c7 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -166,7 +166,7 @@ /obj/structure/cryofeed name = "cryogenic feed" desc = "A bewildering tangle of machinery and pipes." - icon = 'icons/obj/machinery/sleeper.dmi' + icon = 'icons/obj/machinery/cryopod.dmi' icon_state = "cryo_rear" anchored = TRUE dir = WEST @@ -174,15 +174,15 @@ /obj/structure/cryofeed/pipes name = "cryogenic feed pipes" desc = "A bewildering tangle of pipes." - icon = 'icons/obj/machinery/sleeper.dmi' + icon = 'icons/obj/machinery/cryopod.dmi' icon_state = "cryo_rear_pipes" //Cryopods themselves. /obj/machinery/cryopod name = "cryogenic freezer" desc = "A man-sized pod for entering suspended animation." - icon = 'icons/obj/machinery/sleeper.dmi' - icon_state = "body_scanner" + icon = 'icons/obj/machinery/cryopod.dmi' + icon_state = "cryo_pod" density = TRUE anchored = TRUE dir = WEST diff --git a/html/changelogs/GeneralCamo - Scanner Sprites.yml b/html/changelogs/GeneralCamo - Scanner Sprites.yml new file mode 100644 index 00000000000..66a31a7cb7e --- /dev/null +++ b/html/changelogs/GeneralCamo - Scanner Sprites.yml @@ -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: GeneralCamo + +# 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: + - rscadd: "Split body scanner and cryopod sprites; body scanners have new sprites. New sprites by Remission on Baystation12, recolor and touchups by CormallenField/Steviii." + - rscadd: "Working sleepers now use their working sprite states." + - bugfix: "Sleepers now correctly show their panel sprites." diff --git a/icons/obj/machinery/bodyscanner.dmi b/icons/obj/machinery/bodyscanner.dmi new file mode 100644 index 00000000000..c46469ff491 Binary files /dev/null and b/icons/obj/machinery/bodyscanner.dmi differ diff --git a/icons/obj/machinery/cryopod.dmi b/icons/obj/machinery/cryopod.dmi new file mode 100644 index 00000000000..c708a685cd1 Binary files /dev/null and b/icons/obj/machinery/cryopod.dmi differ diff --git a/icons/obj/machinery/sleeper.dmi b/icons/obj/machinery/sleeper.dmi index 7291d385a4d..3ff4d10c9c4 100644 Binary files a/icons/obj/machinery/sleeper.dmi and b/icons/obj/machinery/sleeper.dmi differ