mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
fixes update_icon(), fixes welded issue, fixes undocumented(?) issue of the eastern cap on mixers/filters being one pixel too far to the right
the cap thing applied to filters/mixers before this PR, too
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/obj/machinery/atmospherics/binary
|
||||
/obj/machinery/atmospherics/components/binary
|
||||
icon = 'icons/obj/atmospherics/binary_devices.dmi'
|
||||
dir = SOUTH
|
||||
initialize_directions = SOUTH|NORTH
|
||||
@@ -13,9 +13,7 @@
|
||||
var/datum/pipeline/parent1
|
||||
var/datum/pipeline/parent2
|
||||
|
||||
var/showpipe = 0
|
||||
|
||||
/obj/machinery/atmospherics/binary/New()
|
||||
/obj/machinery/atmospherics/components/binary/New()
|
||||
..()
|
||||
|
||||
air1 = new
|
||||
@@ -24,7 +22,7 @@
|
||||
air1.volume = 200
|
||||
air2.volume = 200
|
||||
|
||||
/obj/machinery/atmospherics/binary/SetInitDirections()
|
||||
/obj/machinery/atmospherics/components/binary/SetInitDirections()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = NORTH|SOUTH
|
||||
@@ -35,35 +33,35 @@
|
||||
if(WEST)
|
||||
initialize_directions = EAST|WEST
|
||||
|
||||
//Separate this because we don't need to update pipe icons if we just are going to change the state
|
||||
/obj/machinery/atmospherics/binary/proc/update_icon_nopipes()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/update_icon()
|
||||
/obj/machinery/atmospherics/components/binary/update_icon()
|
||||
nodes = list(node1, node2)
|
||||
..()
|
||||
/* /obj/machinery/atmospherics/components/binary/update_icon()
|
||||
update_icon_nopipes()
|
||||
|
||||
underlays.Cut()
|
||||
if(showpipe)
|
||||
var/connected = 0
|
||||
if(!showpipe)
|
||||
return
|
||||
var/connected = 0
|
||||
|
||||
//Add intact pieces
|
||||
if(node1)
|
||||
connected = icon_addintact(node1, connected)
|
||||
//Add intact pieces
|
||||
if(node1)
|
||||
connected = icon_addintact(node1, connected)
|
||||
|
||||
if(node2)
|
||||
connected = icon_addintact(node2, connected)
|
||||
if(node2)
|
||||
connected = icon_addintact(node2, connected)
|
||||
|
||||
//Add broken pieces
|
||||
icon_addbroken(connected)
|
||||
//Add broken pieces
|
||||
icon_addbroken(connected) */
|
||||
|
||||
/obj/machinery/atmospherics/binary/hide(var/intact)
|
||||
/obj/machinery/atmospherics/components/binary/hide(var/intact)
|
||||
showpipe = !intact
|
||||
update_icon()
|
||||
|
||||
..(intact)
|
||||
|
||||
// Housekeeping and pipe network stuff below
|
||||
/obj/machinery/atmospherics/binary/Destroy()
|
||||
/obj/machinery/atmospherics/components/binary/Destroy()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
node1 = null
|
||||
@@ -74,7 +72,7 @@
|
||||
nullifyPipenet(parent2)
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/atmosinit()
|
||||
/obj/machinery/atmospherics/components/binary/atmosinit()
|
||||
|
||||
var/node2_connect = dir
|
||||
var/node1_connect = turn(dir, 180)
|
||||
@@ -95,12 +93,12 @@
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/construction()
|
||||
/obj/machinery/atmospherics/components/binary/construction()
|
||||
..()
|
||||
parent1.update = 1
|
||||
parent2.update = 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/build_network()
|
||||
/obj/machinery/atmospherics/components/binary/build_network()
|
||||
if(!parent1)
|
||||
parent1 = new /datum/pipeline()
|
||||
parent1.build_pipeline(src)
|
||||
@@ -109,7 +107,7 @@
|
||||
parent2 = new /datum/pipeline()
|
||||
parent2.build_pipeline(src)
|
||||
|
||||
/obj/machinery/atmospherics/binary/disconnect(obj/machinery/atmospherics/reference)
|
||||
/obj/machinery/atmospherics/components/binary/disconnect(obj/machinery/atmospherics/reference)
|
||||
if(reference == node1)
|
||||
if(istype(node1, /obj/machinery/atmospherics/pipe))
|
||||
qdel(parent1)
|
||||
@@ -120,7 +118,7 @@
|
||||
node2 = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/nullifyPipenet(datum/pipeline/P)
|
||||
/obj/machinery/atmospherics/components/binary/nullifyPipenet(datum/pipeline/P)
|
||||
..()
|
||||
if(P == parent1)
|
||||
parent1.other_airs -= air1
|
||||
@@ -129,13 +127,13 @@
|
||||
parent2.other_airs -= air2
|
||||
parent2 = null
|
||||
|
||||
/obj/machinery/atmospherics/binary/returnPipenetAir(datum/pipeline/P)
|
||||
/obj/machinery/atmospherics/components/binary/returnPipenetAir(datum/pipeline/P)
|
||||
if(P == parent1)
|
||||
return air1
|
||||
else if(P == parent2)
|
||||
return air2
|
||||
|
||||
/obj/machinery/atmospherics/binary/pipeline_expansion(datum/pipeline/P)
|
||||
/obj/machinery/atmospherics/components/binary/pipeline_expansion(datum/pipeline/P)
|
||||
if(P)
|
||||
if(parent1 == P)
|
||||
return list(node1)
|
||||
@@ -144,26 +142,26 @@
|
||||
else
|
||||
return list(node1, node2)
|
||||
|
||||
/obj/machinery/atmospherics/binary/setPipenet(datum/pipeline/P, obj/machinery/atmospherics/A)
|
||||
/obj/machinery/atmospherics/components/binary/setPipenet(datum/pipeline/P, obj/machinery/atmospherics/A)
|
||||
if(A == node1)
|
||||
parent1 = P
|
||||
else if(A == node2)
|
||||
parent2 = P
|
||||
|
||||
/obj/machinery/atmospherics/binary/returnPipenet(obj/machinery/atmospherics/A)
|
||||
/obj/machinery/atmospherics/components/binary/returnPipenet(obj/machinery/atmospherics/A)
|
||||
if(A == node1)
|
||||
return parent1
|
||||
else if(A == node2)
|
||||
return parent2
|
||||
|
||||
/obj/machinery/atmospherics/binary/replacePipenet(datum/pipeline/Old, datum/pipeline/New)
|
||||
/obj/machinery/atmospherics/components/binary/replacePipenet(datum/pipeline/Old, datum/pipeline/New)
|
||||
if(Old == parent1)
|
||||
parent1 = New
|
||||
else if(Old == parent2)
|
||||
parent2 = New
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
/obj/machinery/atmospherics/components/binary/unsafe_pressure_release(var/mob/user,var/pressures)
|
||||
..()
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
Reference in New Issue
Block a user