mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #7221 from VOREStation/aro-powersprites
Port some power sprites from Bay
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
/obj/machinery/atmospherics/binary/circulator
|
||||
name = "circulator"
|
||||
desc = "A gas circulator turbine and heat exchanger."
|
||||
icon = 'icons/obj/pipes.dmi'
|
||||
icon_state = "circ-off"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "circ-unassembled"
|
||||
anchored = 0
|
||||
pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
var/last_stored_energy_transferred = 0
|
||||
var/volume_capacity_used = 0
|
||||
var/stored_energy = 0
|
||||
var/temperature_overlay
|
||||
|
||||
density = 1
|
||||
|
||||
@@ -76,15 +77,19 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/update_icon()
|
||||
icon_state = anchored ? "circ-assembled" : "circ-unassembled"
|
||||
cut_overlays()
|
||||
if (stat & (BROKEN|NOPOWER) || !anchored)
|
||||
icon_state = "circ-p"
|
||||
else if(last_pressure_delta > 0 && recent_moles_transferred > 0)
|
||||
return 1
|
||||
if (last_pressure_delta > 0 && recent_moles_transferred > 0)
|
||||
if (temperature_overlay)
|
||||
add_overlay(temperature_overlay)
|
||||
if (last_pressure_delta > 5*ONE_ATMOSPHERE)
|
||||
icon_state = "circ-run"
|
||||
add_overlay("circ-run")
|
||||
else
|
||||
icon_state = "circ-slow"
|
||||
add_overlay("circ-slow")
|
||||
else
|
||||
icon_state = "circ-off"
|
||||
add_overlay("circ-off")
|
||||
|
||||
return 1
|
||||
|
||||
@@ -97,6 +102,7 @@
|
||||
"You hear a ratchet.")
|
||||
|
||||
if(anchored)
|
||||
temperature_overlay = null
|
||||
if(dir & (NORTH|SOUTH))
|
||||
initialize_directions = NORTH|SOUTH
|
||||
else if(dir & (EAST|WEST))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
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))
|
||||
overlays.Cut()
|
||||
return 1
|
||||
else
|
||||
overlays.Cut()
|
||||
|
||||
if (lastgenlev != 0)
|
||||
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
|
||||
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))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 85 KiB |
Reference in New Issue
Block a user