mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Replaces Reamining Del()'s
This commit is contained in:
@@ -9,11 +9,11 @@
|
||||
var/datum/omni_port/input
|
||||
var/datum/omni_port/output
|
||||
|
||||
/obj/machinery/atmospherics/omni/filter/Del()
|
||||
/obj/machinery/atmospherics/omni/filter/Destroy()
|
||||
input = null
|
||||
output = null
|
||||
filters.Cut()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/omni/filter/sort_ports()
|
||||
for(var/datum/omni_port/P in ports)
|
||||
@@ -46,7 +46,7 @@
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
|
||||
if(!input || !output)
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
var/datum/gas_mixture/input_air = input.air // it's completely happy with them if they're in a loop though i.e. "P.air.return_pressure()"... *shrug*
|
||||
|
||||
var/output_pressure = output_air.return_pressure()
|
||||
|
||||
|
||||
if(output_pressure >= target_pressure)
|
||||
return
|
||||
for(var/datum/omni_port/P in filters)
|
||||
@@ -68,14 +68,14 @@
|
||||
|
||||
if(input.transfer_moles > 0)
|
||||
var/datum/gas_mixture/removed = input_air.remove(input.transfer_moles)
|
||||
|
||||
|
||||
if(!removed)
|
||||
return
|
||||
|
||||
|
||||
for(var/datum/omni_port/P in filters)
|
||||
var/datum/gas_mixture/filtered_out = new
|
||||
filtered_out.temperature = removed.return_temperature()
|
||||
|
||||
|
||||
switch(P.mode)
|
||||
if(ATM_O2)
|
||||
filtered_out.oxygen = removed.oxygen
|
||||
@@ -97,15 +97,15 @@
|
||||
filtered_out.trace_gases += trace_gas
|
||||
else
|
||||
filtered_out = null
|
||||
|
||||
|
||||
P.air.merge(filtered_out)
|
||||
if(P.network)
|
||||
P.network.update = 1
|
||||
|
||||
|
||||
output_air.merge(removed)
|
||||
if(output.network)
|
||||
output.network.update = 1
|
||||
|
||||
|
||||
input.transfer_moles = 0
|
||||
if(input.network)
|
||||
input.network.update = 1
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/datum/omni_port/output
|
||||
|
||||
//setup tags for initial concentration values (must be decimal)
|
||||
var/tag_north_con
|
||||
var/tag_north_con
|
||||
var/tag_south_con
|
||||
var/tag_east_con
|
||||
var/tag_west_con
|
||||
@@ -44,10 +44,10 @@
|
||||
tag_east_con = null
|
||||
tag_west_con = null
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/Del()
|
||||
/obj/machinery/atmospherics/omni/mixer/Destroy()
|
||||
inputs.Cut()
|
||||
output = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/sort_ports()
|
||||
for(var/datum/omni_port/P in ports)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/machinery/atmospherics/omni/New()
|
||||
..()
|
||||
icon_state = "base"
|
||||
|
||||
|
||||
ports = new()
|
||||
for(var/d in cardinal)
|
||||
var/datum/omni_port/new_port = new(src, d)
|
||||
@@ -44,7 +44,7 @@
|
||||
if(new_port.mode > 0)
|
||||
initialize_directions |= d
|
||||
ports += new_port
|
||||
|
||||
|
||||
build_icons()
|
||||
|
||||
/obj/machinery/atmospherics/omni/update_icon()
|
||||
@@ -173,7 +173,7 @@
|
||||
if(ATM_O2 to ATM_N2O)
|
||||
ic_on += "_filter"
|
||||
ic_off += "_out"
|
||||
|
||||
|
||||
ic_on = icon_manager.get_atmos_icon("omni", , , ic_on)
|
||||
ic_off = icon_manager.get_atmos_icon("omni", , , ic_off)
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/omni/Del()
|
||||
/obj/machinery/atmospherics/omni/Destroy()
|
||||
loc = null
|
||||
|
||||
for(var/datum/omni_port/P in ports)
|
||||
@@ -232,7 +232,7 @@
|
||||
del(P.network)
|
||||
P.node = null
|
||||
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/omni/initialize()
|
||||
for(var/datum/omni_port/P in ports)
|
||||
@@ -287,7 +287,7 @@
|
||||
P.node = null
|
||||
P.update = 1
|
||||
break
|
||||
|
||||
|
||||
update_ports()
|
||||
|
||||
return null
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/portables_connector/Del()
|
||||
/obj/machinery/atmospherics/portables_connector/Destroy()
|
||||
loc = null
|
||||
|
||||
if(connected_device)
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
node = null
|
||||
|
||||
..()
|
||||
.return .()
|
||||
|
||||
/obj/machinery/atmospherics/portables_connector/initialize()
|
||||
if(node) return
|
||||
@@ -127,7 +127,7 @@
|
||||
if(reference==node)
|
||||
del(network)
|
||||
node = null
|
||||
|
||||
|
||||
update_underlays()
|
||||
|
||||
return null
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/Del()
|
||||
/obj/machinery/atmospherics/tvalve/Destroy()
|
||||
loc = null
|
||||
|
||||
if(node1)
|
||||
@@ -118,7 +118,7 @@
|
||||
node2 = null
|
||||
node3 = null
|
||||
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/tvalve/proc/go_to_side()
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/valve/Del()
|
||||
/obj/machinery/atmospherics/valve/Destroy()
|
||||
loc = null
|
||||
|
||||
if(node1)
|
||||
@@ -88,7 +88,7 @@
|
||||
node1 = null
|
||||
node2 = null
|
||||
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/valve/proc/open()
|
||||
if(open) return 0
|
||||
|
||||
Reference in New Issue
Block a user