Add 2 new pipe types

This commit is contained in:
Arokha Sieyes
2020-04-05 23:05:33 -04:00
parent 536f3db762
commit f0bc46cc49
24 changed files with 319 additions and 35 deletions

View File

@@ -18,6 +18,7 @@ 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."
@@ -49,12 +50,31 @@ Thus, the two variables affect pump operation are set in New():
icon_state = "map_on"
use_power = USE_POWER_IDLE
/obj/machinery/atmospherics/binary/pump/fuel
icon_state = "map_off-fuel"
base_icon = "pump-fuel"
icon_connect_type = "-fuel"
connect_types = CONNECT_TYPE_FUEL
/obj/machinery/atmospherics/binary/pump/fuel/on
icon_state = "map_on-fuel"
use_power = USE_POWER_IDLE
/obj/machinery/atmospherics/binary/pump/aux
icon_state = "map_off-aux"
base_icon = "pump-aux"
icon_connect_type = "-aux"
connect_types = CONNECT_TYPE_AUX
/obj/machinery/atmospherics/binary/pump/aux/on
icon_state = "map_on-aux"
use_power = USE_POWER_IDLE
/obj/machinery/atmospherics/binary/pump/update_icon()
if(!powered())
icon_state = "off"
icon_state = "[base_icon]-off"
else
icon_state = "[use_power ? "on" : "off"]"
icon_state = "[use_power ? "[base_icon]-on" : "[base_icon]-off"]"
/obj/machinery/atmospherics/binary/pump/update_underlays()
if(..())
@@ -62,8 +82,8 @@ 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))
add_underlay(T, node2, dir)
add_underlay(T, node1, turn(dir, -180), node1?.icon_connect_type)
add_underlay(T, node2, dir, node2?.icon_connect_type)
/obj/machinery/atmospherics/binary/pump/hide(var/i)
update_underlays()

View File

@@ -21,6 +21,20 @@
use_power = USE_POWER_OFF
level = 1
/obj/machinery/atmospherics/portables_connector/fuel
icon_state = "map_connector-fuel"
pipe_state = "connector-fuel"
icon_connect_type = "-fuel"
pipe_flags = PIPING_ONE_PER_TURF
connect_types = CONNECT_TYPE_FUEL
/obj/machinery/atmospherics/portables_connector/aux
icon_state = "map_connector-aux"
pipe_state = "connector-aux"
icon_connect_type = "-aux"
pipe_flags = PIPING_ONE_PER_TURF
connect_types = CONNECT_TYPE_AUX
/obj/machinery/atmospherics/portables_connector/init_dir()
initialize_directions = dir
@@ -33,7 +47,7 @@
var/turf/T = get_turf(src)
if(!istype(T))
return
add_underlay(T, node, dir)
add_underlay(T, node, dir, node?.icon_connect_type)
/obj/machinery/atmospherics/portables_connector/hide(var/i)
update_underlays()

View File

@@ -53,6 +53,11 @@
use_power = USE_POWER_IDLE
icon_state = "map_vent_out"
/obj/machinery/atmospherics/unary/vent_pump/aux
icon_state = "map_vent_aux"
icon_connect_type = "-aux"
connect_types = CONNECT_TYPE_AUX //connects to aux pipes
/obj/machinery/atmospherics/unary/vent_pump/siphon
pump_direction = 0
@@ -98,6 +103,11 @@
power_channel = EQUIP
power_rating = 45000 //15 kW ~ 20 HP //VOREStation Edit - 45000
/obj/machinery/atmospherics/unary/vent_pump/high_volume/aux
icon_state = "map_vent_aux"
icon_connect_type = "-aux"
connect_types = CONNECT_TYPE_AUX //connects to aux pipes
/obj/machinery/atmospherics/unary/vent_pump/high_volume/New()
..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 800