Skip to content

Commit

Permalink
[PORT] Autoconnect Canister Ports, Make Bearcat Fuel Lines Actually W…
Browse files Browse the repository at this point in the history
…ork (#524)
  • Loading branch information
RimiNosha authored Jan 10, 2024
1 parent bca5e85 commit a19227c
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 14 deletions.
33 changes: 19 additions & 14 deletions _maps/map_files/Bearcat/Bearcat.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1455,8 +1455,8 @@
/area/space/nearstation)
"id" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/components/trinary/filter/critical{
dir = 8
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/visible{
dir = 4
},
/turf/open/floor/engine,
/area/station/engineering/supermatter/room)
Expand Down Expand Up @@ -1960,6 +1960,12 @@
},
/turf/open/floor/iron,
/area/station/cargo/warehouse)
"kY" = (
/obj/machinery/atmospherics/pipe/layer_manifold/scrubbers/visible{
dir = 4
},
/turf/open/floor/engine,
/area/station/engineering/supermatter/room)
"lb" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/smart/manifold4w/orange/visible,
Expand Down Expand Up @@ -2198,8 +2204,10 @@
/area/station/cargo/warehouse)
"me" = (
/obj/effect/decal/cleanable/ash,
/obj/machinery/atmospherics/pipe/layer_manifold/scrubbers/visible{
dir = 4
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/visible/layer2,
/obj/machinery/atmospherics/components/binary/pump/off{
dir = 8;
name = "SM Waste to Fuel Pump"
},
/turf/open/floor/engine,
/area/station/engineering/supermatter/room)
Expand Down Expand Up @@ -2550,10 +2558,10 @@
/turf/open/floor/iron/dark,
/area/station/engineering/lobby)
"nV" = (
/obj/machinery/atmospherics/components/unary/portables_connector/visible{
/obj/machinery/portable_atmospherics/canister/carbon_dioxide,
/obj/machinery/atmospherics/components/unary/portables_connector/visible/auto_connect{
dir = 4
},
/obj/machinery/portable_atmospherics/canister/carbon_dioxide,
/turf/open/floor/iron/dark,
/area/station/engineering/atmos)
"nX" = (
Expand Down Expand Up @@ -4106,11 +4114,11 @@
/turf/open/floor/iron/white,
/area/station/pathfinders/pathfinders_armory)
"wb" = (
/obj/machinery/atmospherics/components/unary/portables_connector/visible{
dir = 4
},
/obj/machinery/portable_atmospherics/canister/carbon_dioxide,
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/components/unary/portables_connector/visible/auto_connect{
dir = 4
},
/turf/open/floor/iron/dark,
/area/station/engineering/atmos)
"wc" = (
Expand Down Expand Up @@ -4470,10 +4478,7 @@
"yw" = (
/obj/machinery/light/directional/west,
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/components/binary/pump/off{
dir = 1;
name = "SM Waste to Fuel Pump"
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/orange/visible,
/turf/open/floor/engine,
/area/station/engineering/supermatter/room)
"yy" = (
Expand Down Expand Up @@ -172990,7 +172995,7 @@ HS
EA
ew
uj
pm
kY
rr
rK
Kf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@

///Reference to the connected device
var/obj/machinery/portable_atmospherics/connected_device
/// If TRUE, it will try to connect to a canister on roundstart.
var/connect_roundstart = FALSE

/obj/machinery/atmospherics/components/unary/portables_connector/New()
. = ..()
var/datum/gas_mixture/air_contents = airs[1]
air_contents.volume = 0
if(!connect_roundstart)
return
addtimer(CALLBACK(src, PROC_REF(connect_to_canister)), 1 SECONDS)

/obj/machinery/atmospherics/components/unary/portables_connector/Destroy()
if(connected_device)
Expand Down Expand Up @@ -52,21 +57,48 @@
to_chat(user, span_warning("You cannot unwrench [src], detach [connected_device] first!"))
return FALSE

/obj/machinery/atmospherics/components/unary/portables_connector/proc/connect_to_canister()
connect_roundstart = FALSE
var/obj/machinery/portable_atmospherics/canister = locate(/obj/machinery/portable_atmospherics) in loc
if(canister)
canister.connect(src)
return
// Crash so CI gets angry
CRASH("No connectable found on top of the portables connector at [x], [y], [z]! Fix this.")

/obj/machinery/atmospherics/components/unary/portables_connector/auto_connect
connect_roundstart = TRUE

/obj/machinery/atmospherics/components/unary/portables_connector/layer2
piping_layer = 2
icon_state = "connector_map-2"

/obj/machinery/atmospherics/components/unary/portables_connector/layer2/auto_connect
connect_roundstart = TRUE

/obj/machinery/atmospherics/components/unary/portables_connector/layer4
piping_layer = 4
icon_state = "connector_map-4"

/obj/machinery/atmospherics/components/unary/portables_connector/layer4/auto_connect
connect_roundstart = TRUE

/obj/machinery/atmospherics/components/unary/portables_connector/visible
hide = FALSE

/obj/machinery/atmospherics/components/unary/portables_connector/visible/auto_connect
connect_roundstart = TRUE

/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer2
piping_layer = 2
icon_state = "connector_map-2"

/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer2/auto_connect
connect_roundstart = TRUE

/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer4
piping_layer = 4
icon_state = "connector_map-4"

/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer4/auto_connect
connect_roundstart = TRUE

0 comments on commit a19227c

Please sign in to comment.