Port some power sprites from Bay

This commit is contained in:
Aronai Sieyes
2020-04-12 17:48:54 -04:00
parent 859036b7cd
commit 0ee956a2dc
5 changed files with 40 additions and 18 deletions
+5 -2
View File
@@ -582,9 +582,12 @@ obj/structure/cable/proc/cableColor(var/colorC)
else if(amount == 2)
icon_state = "coil2"
name = "cable piece"
else
else if(amount > 2 && amount != max_amount)
icon_state = "coil"
name = "cable coil"
name = initial(name)
else
icon_state = "coil-max"
name = initial(name)
/obj/item/stack/cable_coil/proc/set_cable_color(var/selected_color, var/user)
if(!selected_color)
+20 -7
View File
@@ -3,7 +3,7 @@ GLOBAL_LIST_EMPTY(all_turbines)
/obj/machinery/power/generator
name = "thermoelectric generator"
desc = "It's a high efficiency thermoelectric generator."
icon_state = "teg"
icon_state = "teg-unassembled"
density = 1
anchored = 0
@@ -68,13 +68,26 @@ GLOBAL_LIST_EMPTY(all_turbines)
circ2 = null
/obj/machinery/power/generator/proc/updateicon()
if(stat & (NOPOWER|BROKEN))
overlays.Cut()
icon_state = anchored ? "teg-assembled" : "teg-unassembled"
cut_overlays()
if (circ1)
circ1.temperature_overlay = null
if (circ2)
circ2.temperature_overlay = null
if (stat & (NOPOWER|BROKEN))
return 1
else
overlays.Cut()
if(lastgenlev != 0)
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
if (lastgenlev != 0)
add_overlay("teg-op[lastgenlev]")
if (circ1 && circ2)
var/extreme = (lastgenlev > 9) ? "ex" : ""
if (circ1.last_temperature < circ2.last_temperature)
circ1.temperature_overlay = "circ-[extreme]cold"
circ2.temperature_overlay = "circ-[extreme]hot"
else
circ1.temperature_overlay = "circ-[extreme]hot"
circ2.temperature_overlay = "circ-[extreme]cold"
return 1
/obj/machinery/power/generator/process()
if(!circ1 || !circ2 || !anchored || stat & (BROKEN|NOPOWER))