mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
Atmos Pipe Improvements (#19478)
* pumps use their layer to connect pipes visually * connectors for supply and scrubbers * pump dmi stuff * fixed volume pump dmi * Vents support multiple connection types * prevent multiple pipes attaching to the same side * old code * prioritize linking already connecting pipes * constructable pressure tanks * tank icon fix * color fix * fixes * multiple connection universal pipes * possible network fix * buh buh * tanks no longer go invisible
This commit is contained in:
@@ -143,13 +143,13 @@
|
||||
var/node2_connect = turn(dir, -90)
|
||||
var/node1_connect = turn(dir, 90)
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
for(var/obj/machinery/atmospherics/target in get_prioritized_nodes(get_step(src,node1_connect)))
|
||||
if(can_be_node(target, 1))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
for(var/obj/machinery/atmospherics/target in get_prioritized_nodes(get_step(src,node2_connect)))
|
||||
if(can_be_node(target, 2))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "pump"
|
||||
level = 1
|
||||
var/base_icon = "pump"
|
||||
|
||||
name = "gas pump"
|
||||
desc = "A pump that moves gas from one place to another."
|
||||
@@ -27,6 +26,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
//var/max_volume_transfer = 10000
|
||||
|
||||
pipe_flags = NONE // Other pumps can be on other layers
|
||||
use_power = USE_POWER_OFF
|
||||
idle_power_usage = 150 //internal circuitry, friction losses and stuff
|
||||
power_rating = 7500 //7500 W ~ 10 HP
|
||||
@@ -39,7 +39,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
air1.volume = ATMOS_DEFAULT_VOLUME_PUMP
|
||||
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP
|
||||
if(frequency)
|
||||
@@ -55,7 +54,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/fuel
|
||||
icon_state = "map_off-fuel"
|
||||
base_icon = "pump-fuel"
|
||||
icon_connect_type = "-fuel"
|
||||
connect_types = CONNECT_TYPE_FUEL
|
||||
|
||||
@@ -65,7 +63,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/aux
|
||||
icon_state = "map_off-aux"
|
||||
base_icon = "pump-aux"
|
||||
icon_connect_type = "-aux"
|
||||
connect_types = CONNECT_TYPE_AUX
|
||||
|
||||
@@ -73,7 +70,26 @@ Thus, the two variables affect pump operation are set in New():
|
||||
icon_state = "map_on-aux"
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/scrubbers
|
||||
icon_state = "map_off-scrubbers"
|
||||
icon_connect_type = "-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/scrubbers/on
|
||||
icon_state = "map_on-scrubbers"
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/supply
|
||||
icon_state = "map_off-supply"
|
||||
icon_connect_type = "-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/supply/on
|
||||
icon_state = "map_on-supply"
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/update_icon()
|
||||
var/base_icon = "pump[icon_connect_type]"
|
||||
if(!powered())
|
||||
icon_state = "[base_icon]-off"
|
||||
else
|
||||
@@ -85,8 +101,10 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type)
|
||||
add_underlay(T, node2, dir, node2?.icon_connect_type)
|
||||
if(node1)
|
||||
add_underlay(T, node1, turn(dir, -180), icon_connect_type)
|
||||
if(node2)
|
||||
add_underlay(T, node2, dir, icon_connect_type)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/hide(i)
|
||||
update_underlays()
|
||||
@@ -295,9 +313,3 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/binary/pump/high_power/on
|
||||
use_power = USE_POWER_IDLE
|
||||
icon_state = "map_on"
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/high_power/update_icon()
|
||||
if(!powered())
|
||||
icon_state = "off"
|
||||
else
|
||||
icon_state = "[use_power ? "on" : "off"]"
|
||||
|
||||
@@ -20,11 +20,11 @@ Thus, the two variables affect pump operation are set in New():
|
||||
construction_type = /obj/item/pipe/directional
|
||||
pipe_state = "volumepump"
|
||||
level = 1
|
||||
var/base_icon = "pump"
|
||||
|
||||
name = "volumetric gas pump"
|
||||
desc = "A pump that moves gas by volume"
|
||||
|
||||
pipe_flags = NONE // Other pumps can be on other layers
|
||||
use_power = USE_POWER_OFF
|
||||
idle_power_usage = 150 //internal circuitry, friction losses and stuff
|
||||
power_rating = 15000 //15000 W ~ 20.4 HP
|
||||
@@ -51,13 +51,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
unregister_radio(src, frequency)
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/on
|
||||
/obj/machinery/atmospherics/binary/volume_pump/on
|
||||
icon_state = "map_on"
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/fuel
|
||||
icon_state = "map_off-fuel"
|
||||
base_icon = "pump-fuel"
|
||||
icon_connect_type = "-fuel"
|
||||
connect_types = CONNECT_TYPE_FUEL
|
||||
|
||||
@@ -67,7 +66,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/aux
|
||||
icon_state = "map_off-aux"
|
||||
base_icon = "pump-aux"
|
||||
icon_connect_type = "-aux"
|
||||
connect_types = CONNECT_TYPE_AUX
|
||||
|
||||
@@ -75,13 +73,32 @@ Thus, the two variables affect pump operation are set in New():
|
||||
icon_state = "map_on-aux"
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/update_icon()
|
||||
if(!powered())
|
||||
icon_state = "off"
|
||||
else
|
||||
icon_state = "[use_power ? "on" : "off"]"
|
||||
/obj/machinery/atmospherics/binary/volume_pump/scrubbers
|
||||
icon_state = "map_off-scrubbers"
|
||||
icon_connect_type = "-scrubbers"
|
||||
connect_types = CONNECT_TYPE_SCRUBBER
|
||||
|
||||
overclock_overlay = mutable_appearance('icons/atmos/volume_pump_overclock.dmi', "vpumpoverclock")
|
||||
/obj/machinery/atmospherics/binary/volume_pump/scrubbers/on
|
||||
icon_state = "map_on-scrubbers"
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/supply
|
||||
icon_state = "map_off-supply"
|
||||
icon_connect_type = "-supply"
|
||||
connect_types = CONNECT_TYPE_SUPPLY
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/supply/on
|
||||
icon_state = "map_on-supply"
|
||||
use_power = USE_POWER_IDLE
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/update_icon()
|
||||
var/base_icon = "pump[icon_connect_type]"
|
||||
if(!powered())
|
||||
icon_state = "[base_icon]-off"
|
||||
else
|
||||
icon_state = "[use_power ? "[base_icon]-on" : "[base_icon]-off"]"
|
||||
|
||||
overclock_overlay = mutable_appearance('icons/atmos/volume_pump_overclock.dmi', "vpumpoverclock[icon_connect_type]")
|
||||
if(powered() && use_power && overclocked)
|
||||
add_overlay(overclock_overlay)
|
||||
else
|
||||
@@ -93,8 +110,10 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type)
|
||||
add_underlay(T, node2, dir, node2?.icon_connect_type)
|
||||
if(node1)
|
||||
add_underlay(T, node1, turn(dir, -180), icon_connect_type)
|
||||
if(node2)
|
||||
add_underlay(T, node2, dir, icon_connect_type)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/hide(i)
|
||||
update_underlays()
|
||||
|
||||
Reference in New Issue
Block a user