diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index acfbe724f9b..81f11c71b50 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -196,7 +196,7 @@ /obj/machinery/shipsensors name = "sensors suite" desc = "Long range gravity scanner with various other sensors, used to detect irregularities in surrounding space. Can only run in vacuum to protect delicate quantum BS elements." - icon = 'icons/obj/stationobjs.dmi' + icon = 'icons/obj/machines/sensors.dmi' icon_state = "sensors" anchored = 1 var/max_health = 200 @@ -237,10 +237,35 @@ return 1 /obj/machinery/shipsensors/update_icon() - if(use_power) - icon_state = "sensors" + icon_state = "sensors_off" + if(!use_power) + cut_overlays() + return + + var/overlay = "sensors-effect" + + var/range_percentage = range / world.view * 100 + + if(range_percentage < 20) + overlay = "[overlay]1" + else if(range_percentage < 40) + overlay = "[overlay]2" + else if(range_percentage < 60) + overlay = "[overlay]3" + else if(range_percentage < 80) + overlay = "[overlay]4" else - icon_state = "sensors_off" + overlay = "[overlay]5" + + // Check if we are already using this overlay. Since updating is expensive. + if(!(overlay in our_overlays)) + cut_overlays() + add_overlay(overlay) + + var/heat_percentage = heat / critical_heat * 100 + + if(heat_percentage > 85) + add_overlay("sensors-effect-hot") /obj/machinery/shipsensors/examine(mob/user) . = ..() @@ -280,6 +305,8 @@ if (heat > 0) heat = max(0, heat - heat_reduction) + + update_icon() /obj/machinery/shipsensors/power_change() . = ..() diff --git a/html/changelogs/Sindorman-sensors.yml b/html/changelogs/Sindorman-sensors.yml new file mode 100644 index 00000000000..9327d6f2351 --- /dev/null +++ b/html/changelogs/Sindorman-sensors.yml @@ -0,0 +1,41 @@ +################################ +# 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 +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: PoZe + +# 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, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - imageadd: "Sensor suit will now have 5 different icon states depending on range it is set to (Since our range is not a constant and could change in code, I did not make it 7 but rather precentage of max view range). It also has another icon effect if heat is above 85%." diff --git a/icons/obj/machines/sensors.dmi b/icons/obj/machines/sensors.dmi new file mode 100644 index 00000000000..faaa3fe7361 Binary files /dev/null and b/icons/obj/machines/sensors.dmi differ diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi index 35010b8ebed..997c544efcc 100644 Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ