Adding more animations and overheating effect to the sensors suite (#15252)

This commit is contained in:
Mykhailo Bykhovtsev
2022-12-10 12:05:32 +01:00
committed by GitHub
parent 27a98e9615
commit 2d559cd992
4 changed files with 72 additions and 4 deletions
@@ -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()
. = ..()
+41
View File
@@ -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%."
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 104 KiB