mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
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:
@@ -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()
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
var/lastgenlev = -1
|
||||
var/lastcirc = "00"
|
||||
|
||||
var/light_range_on = 1
|
||||
var/light_power_on = 0.1 //just dont want it to be culled by byond.
|
||||
|
||||
/obj/machinery/power/generator/Initialize(mapload)
|
||||
. = ..()
|
||||
update_desc()
|
||||
@@ -36,6 +39,10 @@
|
||||
if(powernet)
|
||||
disconnect_from_network()
|
||||
|
||||
/obj/machinery/power/generator/Initialize()
|
||||
. = ..()
|
||||
connect()
|
||||
|
||||
/obj/machinery/power/generator/proc/connect()
|
||||
connect_to_network()
|
||||
|
||||
@@ -60,21 +67,29 @@
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/power/generator/power_change()
|
||||
. = ..()
|
||||
if(!anchored)
|
||||
stat |= NOPOWER
|
||||
if((stat & (BROKEN|NOPOWER)))
|
||||
set_light(0)
|
||||
else
|
||||
..()
|
||||
set_light(light_range_on, light_power_on)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/power/generator/update_icon()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
overlays.Cut()
|
||||
cut_overlays()
|
||||
underlays.Cut()
|
||||
return
|
||||
else
|
||||
overlays.Cut()
|
||||
|
||||
cut_overlays()
|
||||
if(lastgenlev != 0)
|
||||
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
|
||||
add_overlay(mutable_appearance('icons/obj/power.dmi', "teg-op[lastgenlev]"))
|
||||
underlays += emissive_appearance(icon, "teg-op[lastgenlev]")
|
||||
|
||||
overlays += image('icons/obj/power.dmi', "teg-oc[lastcirc]")
|
||||
add_overlay(mutable_appearance('icons/obj/power.dmi', "teg-oc[lastcirc]"))
|
||||
underlays += emissive_appearance(icon, "teg-oc[lastcirc]")
|
||||
|
||||
/obj/machinery/power/generator/process()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
@@ -230,7 +245,3 @@
|
||||
if(!powernet || !cold_circ || !hot_circ)
|
||||
connect()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/generator/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 34 KiB |
Reference in New Issue
Block a user