Bright Canisters (#8784)

Canisters now properly emit the light their icons portray them having.
    Canisters now eject tanks into any of your hands, dropping them to your feet if your hands aren't free.
This commit is contained in:
Geeves
2020-05-04 18:57:44 +03:00
committed by GitHub
parent 541a1b493c
commit c8f0d2ab86
2 changed files with 21 additions and 5 deletions
+14 -5
View File
@@ -144,19 +144,28 @@ update_flag
return
cut_overlays()
set_light(FALSE)
if(update_flag & 1)
add_overlay("can-open")
if(update_flag & 2)
add_overlay("can-connector")
if(update_flag & 4)
add_overlay("can-o0")
var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o0", EFFECTS_ABOVE_LIGHTING_LAYER)
add_overlay(indicator_overlay)
set_light(1.4, 1, COLOR_RED_LIGHT)
if(update_flag & 8)
add_overlay("can-o1")
var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o1", EFFECTS_ABOVE_LIGHTING_LAYER)
add_overlay(indicator_overlay)
set_light(1.4, 1, COLOR_RED_LIGHT)
else if(update_flag & 16)
add_overlay("can-o2")
var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o2", EFFECTS_ABOVE_LIGHTING_LAYER)
add_overlay(indicator_overlay)
set_light(1.4, 1, COLOR_YELLOW)
else if(update_flag & 32)
add_overlay("can-o3")
var/mutable_appearance/indicator_overlay = mutable_appearance(icon, "can-o3", EFFECTS_ABOVE_LIGHTING_LAYER)
add_overlay(indicator_overlay)
set_light(1.4, 1, COLOR_BRIGHT_GREEN)
return
/obj/machinery/portable_atmospherics/canister/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
@@ -355,7 +364,7 @@ update_flag
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
if(istype(holding, /obj/item/tank))
holding.manipulated_by = usr.real_name
holding.forceMove(loc)
usr.put_in_hands(holding)
holding = null
if (href_list["pressure_adj"])
@@ -0,0 +1,7 @@
author: Geeves
delete-after: True
changes:
- rscadd: "Canisters now properly emit the light their icons portray them having."
- tweak: "Canisters now eject tanks into any of your hands, dropping them to your feet if your hands aren't free."