New TEG sprites (#18085)

* amogus

* Revert "amogus"

This reverts commit ebaa99c77b.

* T E Gee

:D

* adjusts sprites slightly

TEGs taller now, I though they looked too short b4

* makes pipe connection nicer

* Emissive Devices

yep

* suggested changes

Moved update_icon() call out of atmos/process, which was calling it multiple times a second, and into return_transfer_air() which is the only place where the critical variable is redefined.

* readds conflicted changes

* bruh

* SteelSlayer Suggestion

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>

* removes duplicate proc

Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
This commit is contained in:
Kugamo
2022-07-02 12:45:24 -05:00
committed by GitHub
co-authored by SteelSlayer
parent 8dc53fc65e
commit 9a8d6da7ab
5 changed files with 59 additions and 16 deletions
@@ -16,6 +16,9 @@
can_unwrench = 1
var/side_inverted = 0
var/light_range_on = 1
var/light_power_on = 0.1 //just dont want it to be culled by byond.
/obj/machinery/atmospherics/binary/circulator/detailed_examine()
return "This generates electricity, depending on the difference in temperature between each side of the machine. The meter in \
the center of the machine gives an indicator of how much electricity is being generated."
@@ -44,6 +47,7 @@
if(output_starting_pressure >= input_starting_pressure - 10)
//Need at least 10 KPa difference to overcome friction in the mechanism
last_pressure_delta = 0
update_icon()
return null
//Calculate necessary moles to transfer using PV = nRT
@@ -52,7 +56,9 @@
var/transfer_moles = pressure_delta * outlet.volume/(inlet.temperature * R_IDEAL_GAS_EQUATION)
last_pressure_delta = pressure_delta
if(last_pressure_delta != pressure_delta)
last_pressure_delta = pressure_delta
update_icon()
//log_debug("pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];")
@@ -66,10 +72,7 @@
else
last_pressure_delta = 0
/obj/machinery/atmospherics/binary/circulator/process_atmos()
..()
update_icon()
update_icon()
/obj/machinery/atmospherics/binary/circulator/proc/get_inlet_air()
if(side_inverted==0)
@@ -108,17 +111,46 @@
to_chat(user, "<span class='notice'>You reverse the circulator's valve settings. The inlet of the circulator is now on the [get_inlet_side(dir)] side.</span>")
desc = "A gas circulator pump and heat exchanger. Its input port is on the [get_inlet_side(dir)] side, and its output port is on the [get_outlet_side(dir)] side."
/obj/machinery/atmospherics/binary/circulator/update_icon()
/obj/machinery/atmospherics/binary/circulator/update_icon() //this gets called everytime atmos is updated in the circulator (alot)
..()
underlays.Cut()
cut_overlays()
if(stat & (BROKEN|NOPOWER))
icon_state = "circ[side]-p"
else if(last_pressure_delta > 0)
if(last_pressure_delta > ONE_ATMOSPHERE)
icon_state = "circ[side]-run"
underlays += emissive_appearance(icon,"emit[side]-run")
else
icon_state = "circ[side]-slow"
underlays += emissive_appearance(icon,"emit[side]-slow")
else
icon_state = "circ[side]-off"
underlays += emissive_appearance(icon,"emit[side]-off")
if(!side_inverted)
add_overlay(mutable_appearance(icon,"in_up"))
else
add_overlay(mutable_appearance(icon,"in_down"))
if(node2)
var/image/new_pipe_overlay = image(icon, "connected")
new_pipe_overlay.color = node2.pipe_color
add_overlay(new_pipe_overlay)
else
add_overlay(mutable_appearance(icon, "disconnected"))
return 1
/obj/machinery/atmospherics/binary/circulator/power_change()
. = ..()
if(stat & (BROKEN|NOPOWER))
set_light(0)
else
set_light(light_range_on, light_power_on)
update_icon()
/obj/machinery/atmospherics/binary/circulator/update_underlays()
. = ..()
update_icon()