mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
@@ -33,7 +33,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
/obj/machinery/atmospherics/New()
|
||||
..()
|
||||
|
||||
atmos_machinery += src
|
||||
if(!icon_manager)
|
||||
icon_manager = new()
|
||||
|
||||
@@ -54,6 +54,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
/obj/machinery/atmospherics/Destroy()
|
||||
QDEL_NULL(stored)
|
||||
atmos_machinery -= src
|
||||
for(var/mob/living/L in src) //ventcrawling is serious business
|
||||
L.remove_ventcrawl()
|
||||
L.forceMove(get_turf(src))
|
||||
|
||||
@@ -147,6 +147,6 @@
|
||||
T.assume_air(to_release)
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/machinery/atmospherics/binary/process()
|
||||
/obj/machinery/atmospherics/binary/process_atmos()
|
||||
..()
|
||||
return parent1 && parent2
|
||||
@@ -70,7 +70,7 @@
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/process()
|
||||
/obj/machinery/atmospherics/binary/circulator/process_atmos()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -104,8 +104,9 @@
|
||||
else
|
||||
add_underlay(T, node2, dir)
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
add_underlay(T, node1, turn(dir, 180))
|
||||
add_underlay(T, node2, dir)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/binary/passive_gate/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
|
||||
@@ -53,8 +53,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
add_underlay(T, node1, turn(dir, -180))
|
||||
add_underlay(T, node2, dir)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/process()
|
||||
if(!..() || (stat & (NOPOWER|BROKEN)) || !on)
|
||||
/obj/machinery/atmospherics/binary/pump/process_atmos()
|
||||
..()
|
||||
if((stat & (NOPOWER|BROKEN)) || !on)
|
||||
return 0
|
||||
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
|
||||
@@ -51,8 +51,9 @@ Thus, the two variables affect pump operation are set in New():
|
||||
add_underlay(T, node1, turn(dir, -180))
|
||||
add_underlay(T, node2, dir)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/process()
|
||||
if(!..() || (stat & (NOPOWER|BROKEN)) || !on)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/process_atmos()
|
||||
..()
|
||||
if((stat & (NOPOWER|BROKEN)) || !on)
|
||||
return 0
|
||||
|
||||
// Pump mechanism just won't do anything if the pressure is too high/too low
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/atmospherics/omni/filter/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/omni/filter/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
if(!input || !output)
|
||||
|
||||
@@ -83,8 +83,9 @@
|
||||
|
||||
return 0
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/omni/mixer/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/output_air = output.air
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/omni/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/omni/proc/build_icons()
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
@@ -293,7 +293,7 @@
|
||||
P.parent = New
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/omni/process()
|
||||
/obj/machinery/atmospherics/omni/process_atmos()
|
||||
..()
|
||||
for(var/datum/omni_port/port in ports)
|
||||
if(!port.parent)
|
||||
|
||||
@@ -68,8 +68,9 @@ Filter types:
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/trinary/filter/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/output_starting_pressure = air3.return_pressure()
|
||||
|
||||
@@ -56,8 +56,9 @@
|
||||
..()
|
||||
air3.volume = 300
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/trinary/mixer/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/output_starting_pressure = air3.return_pressure()
|
||||
|
||||
@@ -206,6 +206,6 @@
|
||||
T.assume_air(to_release)
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/process()
|
||||
/obj/machinery/atmospherics/trinary/process_atmos()
|
||||
..()
|
||||
return parent1 && parent2 && parent3
|
||||
@@ -22,10 +22,11 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/unary/cold_sink/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
|
||||
var/air_heat_capacity = air_contents.heat_capacity()
|
||||
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
|
||||
var/old_temperature = air_contents.temperature
|
||||
|
||||
@@ -32,9 +32,8 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/process()
|
||||
if(!..())
|
||||
return 0
|
||||
/obj/machinery/atmospherics/unary/heat_exchanger/process_atmos()
|
||||
..()
|
||||
if(!partner)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
var/air_heat_capacity = air_contents.heat_capacity()
|
||||
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
|
||||
|
||||
@@ -51,10 +51,9 @@
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/process()
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/process_atmos()
|
||||
..()
|
||||
|
||||
injecting = 0
|
||||
|
||||
if(!on || stat & NOPOWER)
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
|
||||
air_contents.volume = 50
|
||||
|
||||
/obj/machinery/atmospherics/unary/oxygen_generator/process()
|
||||
if(!..() || !on)
|
||||
/obj/machinery/atmospherics/unary/oxygen_generator/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/total_moles = air_contents.total_moles()
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
..()
|
||||
air_contents.volume = volume
|
||||
|
||||
/obj/machinery/atmospherics/unary/passive_vent/process()
|
||||
if(!..())
|
||||
return 0
|
||||
/obj/machinery/atmospherics/unary/passive_vent/process_atmos()
|
||||
..()
|
||||
|
||||
if(!node)
|
||||
return 0
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
return
|
||||
add_underlay(T, node, dir)
|
||||
|
||||
/obj/machinery/atmospherics/unary/portables_connector/process()
|
||||
if(!..() || !connected_device)
|
||||
/obj/machinery/atmospherics/unary/portables_connector/process_atmos()
|
||||
..()
|
||||
if(!connected_device)
|
||||
return 0
|
||||
parent.update = 1
|
||||
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
prefix="h"
|
||||
icon_state = "[prefix]off"
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermal_plate/process()
|
||||
if(!..())
|
||||
return 0
|
||||
/obj/machinery/atmospherics/unary/thermal_plate/process_atmos()
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
|
||||
@@ -99,6 +99,6 @@
|
||||
T.assume_air(to_release)
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/machinery/atmospherics/unary/process()
|
||||
/obj/machinery/atmospherics/unary/process_atmos()
|
||||
..()
|
||||
return parent
|
||||
@@ -121,8 +121,9 @@
|
||||
update_icon()
|
||||
update_underlays()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/process()
|
||||
if(!..() || (stat & (NOPOWER|BROKEN)))
|
||||
/obj/machinery/atmospherics/unary/vent_pump/process_atmos()
|
||||
..()
|
||||
if((stat & (NOPOWER|BROKEN)))
|
||||
return 0
|
||||
if(!node)
|
||||
on = 0
|
||||
@@ -146,7 +147,7 @@
|
||||
|
||||
if(pressure_delta > 0.5)
|
||||
if(air_contents.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
|
||||
var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION) / 5
|
||||
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
|
||||
@@ -164,7 +165,7 @@
|
||||
|
||||
if(pressure_delta > 0.5)
|
||||
if(environment.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
|
||||
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION) / 5
|
||||
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
if(isnull(removed)) //in space
|
||||
|
||||
@@ -175,9 +175,8 @@
|
||||
src.broadcast_status()
|
||||
check_turfs()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/process()
|
||||
if(!..())
|
||||
return 0
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/process_atmos()
|
||||
..()
|
||||
|
||||
if(widenet)
|
||||
check_turfs()
|
||||
@@ -215,7 +214,7 @@
|
||||
|
||||
if(scrubbing)
|
||||
if((scrub_O2 && environment.oxygen>0.001) || (scrub_N2 && environment.nitrogen>0.001) || (scrub_CO2 && environment.carbon_dioxide>0.001) || (scrub_Toxins && environment.toxins>0.001) || (environment.trace_gases.len>0))
|
||||
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
|
||||
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles() / 5
|
||||
|
||||
//Take a gas sample
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
@@ -257,7 +256,7 @@
|
||||
if(air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
|
||||
return
|
||||
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume) / 5
|
||||
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
|
||||
|
||||
@@ -25,11 +25,12 @@
|
||||
/obj/machinery/atmospherics/pipe/cap/pipeline_expansion()
|
||||
return list(node)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/process()
|
||||
/obj/machinery/atmospherics/pipe/cap/process_atmos()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
. = PROCESS_KILL
|
||||
|
||||
/obj/machinery/atmospherics/pipe/cap/Destroy()
|
||||
. = ..()
|
||||
if(node)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold/pipeline_expansion()
|
||||
return list(node1, node2, node3)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/process()
|
||||
/obj/machinery/atmospherics/pipe/manifold/process_atmos()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/pipeline_expansion()
|
||||
return list(node1, node2, node3, node4)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/process()
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/process_atmos()
|
||||
if(!parent)
|
||||
..()
|
||||
else
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
buckle_lying = 1
|
||||
var/icon_temperature = T20C //stop small changes in temperature causing icon refresh
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process()
|
||||
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/process_atmos()
|
||||
var/environment_temperature = 0
|
||||
var/datum/gas_mixture/pipe_air = return_air()
|
||||
if(!pipe_air)
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
|
||||
if(air.temperature < T0C && air.return_pressure() > 10)
|
||||
icy = 1
|
||||
else
|
||||
else if(air.temperature > T0C)
|
||||
icy = 0
|
||||
|
||||
update_visuals()
|
||||
@@ -305,17 +305,30 @@
|
||||
|
||||
|
||||
/atom/movable/var/pressure_resistance = 5
|
||||
/atom/movable/var/throw_pressure_limit = 15
|
||||
/atom/movable/var/last_forced_movement = 0
|
||||
|
||||
/atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
|
||||
if(last_forced_movement >= air_master.current_cycle)
|
||||
return 0
|
||||
else if(!anchored && !pulledby)
|
||||
if(pressure_difference > pressure_resistance)
|
||||
if(pressure_difference >= throw_pressure_limit)
|
||||
var/general_direction = get_edge_target_turf(src, direction)
|
||||
if(last_forced_movement + 10 < air_master.current_cycle && is_valid_tochat_target(src)) //the first check prevents spamming throw to_chat
|
||||
to_chat(src, "<span class='userdanger'>The pressure sends you flying!</span>")
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.Weaken(min(pressure_difference / 10, 10))
|
||||
spawn()
|
||||
throw_at(general_direction, pressure_difference / 10, pressure_difference / 200, null, 0, 0, null)
|
||||
last_forced_movement = air_master.current_cycle
|
||||
spawn step(src, direction)
|
||||
return 1
|
||||
|
||||
return 1
|
||||
else if(pressure_difference > pressure_resistance)
|
||||
spawn()
|
||||
step(src, direction)
|
||||
last_forced_movement = air_master.current_cycle
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -48,14 +48,14 @@
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C
|
||||
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C
|
||||
#define FIRE_SPREAD_RADIOSITY_SCALE 0.85
|
||||
#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile
|
||||
#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile
|
||||
#define FIRE_CARBON_ENERGY_RELEASED 2500000 //Amount of heat released per mole of burnt carbon into the tile
|
||||
#define FIRE_PLASMA_ENERGY_RELEASED 15000000 //Amount of heat released per mole of burnt plasma into the tile
|
||||
#define FIRE_GROWTH_RATE 40000 //For small fires
|
||||
#define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C //Resistance to fire damage
|
||||
#define CARBON_LIFEFORM_FIRE_DAMAGE 4 //Fire damage
|
||||
//Plasma fire properties
|
||||
#define OXYGEN_BURN_RATE_BASE 1.4
|
||||
#define PLASMA_BURN_RATE_DELTA 4
|
||||
#define OXYGEN_BURN_RATE_BASE 7
|
||||
#define PLASMA_BURN_RATE_DELTA 20
|
||||
#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
|
||||
#define PLASMA_UPPER_TEMPERATURE 1370+T0C
|
||||
#define PLASMA_MINIMUM_OXYGEN_NEEDED 2
|
||||
@@ -119,4 +119,4 @@
|
||||
// Atmos alarm defines
|
||||
#define ATMOS_ALARM_NONE 0
|
||||
#define ATMOS_ALARM_WARNING 1
|
||||
#define ATMOS_ALARM_DANGER 2
|
||||
#define ATMOS_ALARM_DANGER 2
|
||||
|
||||
@@ -19,6 +19,7 @@ var/global/list/all_areas = list()
|
||||
var/global/list/machines = list()
|
||||
var/global/list/machine_processing = list()
|
||||
var/global/list/fast_processing = list()
|
||||
var/global/list/atmos_machinery = list()
|
||||
var/global/list/processing_power_items = list() //items that ask to be called every cycle
|
||||
var/global/list/rcd_list = list() //list of Rapid Construction Devices.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ var/global/datum/controller/process/air_system/air_master
|
||||
|
||||
/datum/controller/process/air_system/setup()
|
||||
name = "air"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
schedule_interval = 4
|
||||
start_delay = 4
|
||||
|
||||
var/watch = start_watch()
|
||||
@@ -38,6 +38,8 @@ var/global/datum/controller/process/air_system/air_master
|
||||
if(kill_air)
|
||||
return 1
|
||||
current_cycle++
|
||||
process_pipenets()
|
||||
process_atmos_machinery()
|
||||
process_active_turfs()
|
||||
process_excited_groups()
|
||||
process_high_pressure_delta()
|
||||
@@ -49,6 +51,8 @@ var/global/datum/controller/process/air_system/air_master
|
||||
..()
|
||||
stat(null, "[last_active] active")
|
||||
stat(null, "[last_excited] EG | [last_hpd] HPD | [last_asc] ASC | [last_hotspots] Hot")
|
||||
stat(null, "[pipe_networks.len] pipe nets, [deferred_pipenet_rebuilds.len] deferred")
|
||||
stat(null, "[atmos_machinery.len] atmos machines")
|
||||
|
||||
DECLARE_GLOBAL_CONTROLLER(air_system, air_master)
|
||||
|
||||
@@ -78,6 +82,48 @@ DECLARE_GLOBAL_CONTROLLER(air_system, air_master)
|
||||
T.process_cell()
|
||||
SCHECK
|
||||
|
||||
/datum/controller/process/air_system/proc/process_pipenets()
|
||||
for(last_object in deferred_pipenet_rebuilds)
|
||||
var/obj/machinery/atmospherics/M = last_object
|
||||
if(istype(M) && isnull(M.gcDestroyed))
|
||||
try
|
||||
M.build_network()
|
||||
catch(var/exception/e)
|
||||
catchException(e, M)
|
||||
SCHECK
|
||||
else
|
||||
catchBadType(M)
|
||||
deferred_pipenet_rebuilds -= M
|
||||
|
||||
for(last_object in pipe_networks)
|
||||
var/datum/pipeline/pipeNetwork = last_object
|
||||
if(istype(pipeNetwork) && isnull(pipeNetwork.gcDestroyed))
|
||||
try
|
||||
pipeNetwork.process()
|
||||
catch(var/exception/e)
|
||||
catchException(e, pipeNetwork)
|
||||
SCHECK
|
||||
else
|
||||
catchBadType(pipeNetwork)
|
||||
pipe_networks -= pipeNetwork
|
||||
|
||||
/datum/controller/process/air_system/proc/process_atmos_machinery()
|
||||
for(last_object in atmos_machinery)
|
||||
var/obj/machinery/M = last_object
|
||||
if(istype(M) && isnull(M.gcDestroyed))
|
||||
try
|
||||
if(M.process_atmos() == PROCESS_KILL)
|
||||
atmos_machinery.Remove(M)
|
||||
continue
|
||||
catch(var/exception/e)
|
||||
catchException(e, M)
|
||||
else
|
||||
catchBadType(M)
|
||||
atmos_machinery -= M
|
||||
|
||||
SCHECK
|
||||
|
||||
|
||||
/datum/controller/process/air_system/proc/remove_from_active(var/turf/simulated/T)
|
||||
if(istype(T))
|
||||
T.excited = 0
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/datum/controller/process/pipenet/setup()
|
||||
name = "pipenet"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
start_delay = 18
|
||||
|
||||
/datum/controller/process/pipenet/statProcess()
|
||||
..()
|
||||
stat(null, "[pipe_networks.len] pipe nets, [deferred_pipenet_rebuilds.len] deferred")
|
||||
|
||||
/datum/controller/process/pipenet/doWork()
|
||||
for(last_object in deferred_pipenet_rebuilds)
|
||||
var/obj/machinery/atmospherics/M = last_object
|
||||
if(istype(M) && isnull(M.gcDestroyed))
|
||||
try
|
||||
M.build_network()
|
||||
catch(var/exception/e)
|
||||
catchException(e, M)
|
||||
SCHECK
|
||||
else
|
||||
catchBadType(M)
|
||||
deferred_pipenet_rebuilds -= M
|
||||
|
||||
for(last_object in pipe_networks)
|
||||
var/datum/pipeline/pipeNetwork = last_object
|
||||
if(istype(pipeNetwork) && isnull(pipeNetwork.gcDestroyed))
|
||||
try
|
||||
pipeNetwork.process()
|
||||
catch(var/exception/e)
|
||||
catchException(e, pipeNetwork)
|
||||
SCHECK
|
||||
else
|
||||
catchBadType(pipeNetwork)
|
||||
pipe_networks -= pipeNetwork
|
||||
@@ -41,6 +41,8 @@
|
||||
var/list/human_overlays = list()
|
||||
var/is_zombie = 0
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
@@ -88,6 +90,8 @@
|
||||
human_overlays = H.overlays
|
||||
update_icons()
|
||||
H.loc = src
|
||||
pressure_resistance = 20 //5 kPa difference required to push lowered
|
||||
throw_pressure_limit = 30 //15 kPa difference required to throw lowered
|
||||
loc.visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed)
|
||||
@@ -163,6 +167,8 @@
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
environment_smash = 3
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/blob_act()
|
||||
|
||||
@@ -302,11 +302,18 @@
|
||||
|
||||
if(old_danger_level!=danger_level)
|
||||
apply_danger_level()
|
||||
if(mode == AALARM_MODE_SCRUBBING && danger_level == ATMOS_ALARM_DANGER)
|
||||
if(pressure_dangerlevel == ATMOS_ALARM_DANGER)
|
||||
mode = AALARM_MODE_OFF
|
||||
if(temperature_dangerlevel == ATMOS_ALARM_DANGER && cur_tlv.max2 <= environment.temperature)
|
||||
mode = AALARM_MODE_PANIC
|
||||
apply_mode()
|
||||
|
||||
if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05)
|
||||
mode = AALARM_MODE_SCRUBBING
|
||||
apply_mode()
|
||||
|
||||
|
||||
/obj/machinery/alarm/proc/handle_heating_cooling(var/datum/gas_mixture/environment, var/datum/tlv/cur_tlv, var/turf/simulated/location)
|
||||
cur_tlv = TLV["temperature"]
|
||||
//Handle temperature adjustment here.
|
||||
|
||||
@@ -85,7 +85,7 @@ obj/machinery/air_sensor
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
process()
|
||||
process_atmos()
|
||||
if(on)
|
||||
if(!radio_connection)
|
||||
return
|
||||
@@ -129,9 +129,11 @@ obj/machinery/air_sensor
|
||||
|
||||
initialize()
|
||||
..()
|
||||
atmos_machinery += src
|
||||
set_frequency(frequency)
|
||||
|
||||
Destroy()
|
||||
atmos_machinery -= src
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
return ..()
|
||||
|
||||
@@ -269,7 +269,7 @@ update_flag
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/process()
|
||||
/obj/machinery/portable_atmospherics/canister/process_atmos()
|
||||
if(destroyed)
|
||||
return
|
||||
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
|
||||
/obj/machinery/meter/New()
|
||||
..()
|
||||
atmos_machinery += src
|
||||
target = locate(/obj/machinery/atmospherics/pipe) in loc
|
||||
if(id && !id_tag)//i'm not dealing with further merge conflicts, fuck it
|
||||
id_tag = id
|
||||
return 1
|
||||
|
||||
/obj/machinery/meter/Destroy()
|
||||
atmos_machinery -= src
|
||||
target = null
|
||||
return ..()
|
||||
|
||||
@@ -32,7 +34,7 @@
|
||||
if(!target)
|
||||
target = locate(/obj/machinery/atmospherics/pipe) in loc
|
||||
|
||||
/obj/machinery/meter/process()
|
||||
/obj/machinery/meter/process_atmos()
|
||||
if(!target)
|
||||
icon_state = "meterX"
|
||||
return 0
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
/obj/machinery/portable_atmospherics/New()
|
||||
..()
|
||||
atmos_machinery += src
|
||||
|
||||
air_contents.volume = volume
|
||||
air_contents.temperature = T20C
|
||||
@@ -27,7 +28,7 @@
|
||||
connect(port)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/process()
|
||||
/obj/machinery/portable_atmospherics/process_atmos()
|
||||
if(!connected_port) //only react when pipe_network will ont it do it for you
|
||||
//Allow for reactions
|
||||
air_contents.react()
|
||||
@@ -35,6 +36,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/portable_atmospherics/Destroy()
|
||||
atmos_machinery -= src
|
||||
disconnect()
|
||||
QDEL_NULL(air_contents)
|
||||
QDEL_NULL(holding)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/portable_atmospherics/pump/process()
|
||||
/obj/machinery/portable_atmospherics/pump/process_atmos()
|
||||
..()
|
||||
if(on)
|
||||
var/datum/gas_mixture/environment
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/scrubber/process()
|
||||
/obj/machinery/portable_atmospherics/scrubber/process_atmos()
|
||||
..()
|
||||
|
||||
if(!on)
|
||||
|
||||
@@ -9,7 +9,15 @@
|
||||
var/on = 0
|
||||
var/volume_rate = 800
|
||||
|
||||
/obj/machinery/zvent/process()
|
||||
/obj/machinery/zvent/New()
|
||||
..()
|
||||
atmos_machinery += src
|
||||
|
||||
/obj/machinery/zvent/Destroy()
|
||||
atmos_machinery -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/zvent/process_atmos()
|
||||
|
||||
//all this object does, is make its turf share air with the ones above and below it, if they have a vent too.
|
||||
if(istype(loc,/turf/simulated)) //if we're not on a valid turf, forget it
|
||||
|
||||
@@ -126,6 +126,15 @@
|
||||
on = 0
|
||||
go_out()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
|
||||
if(air_contents)
|
||||
if(occupant)
|
||||
process_occupant()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/process_atmos()
|
||||
..()
|
||||
if(!node)
|
||||
return
|
||||
if(!on)
|
||||
@@ -135,13 +144,9 @@
|
||||
temperature_archived = air_contents.temperature
|
||||
heat_gas_contents()
|
||||
|
||||
if(occupant)
|
||||
process_occupant()
|
||||
if(abs(temperature_archived-air_contents.temperature) > 1)
|
||||
parent.update = 1
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/allow_drop()
|
||||
return 0
|
||||
|
||||
@@ -166,6 +166,9 @@ Class Procs:
|
||||
/obj/machinery/process() // If you dont use process or power why are you here
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/proc/process_atmos() //If you dont use process why are you here
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/machinery/emp_act(severity)
|
||||
if(use_power && stat == 0)
|
||||
use_power(7500/severity)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
materials = list(MAT_METAL=500)
|
||||
origin_tech = "combat=1;plasmatech=2;engineering=2"
|
||||
var/status = 0
|
||||
var/throw_amount = 100
|
||||
var/lit = 0 //on or off
|
||||
var/operating = 0//cooldown
|
||||
var/turf/previousturf = null
|
||||
@@ -124,7 +123,7 @@
|
||||
if(!ptank)
|
||||
to_chat(user, "<span class='notice'>Attach a plasma tank first!</span>")
|
||||
return
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=[UID()];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\nAmount to throw: <A HREF='?src=[UID()];amount=-100'>-</A> <A HREF='?src=[UID()];amount=-10'>-</A> <A HREF='?src=[UID()];amount=-1'>-</A> [throw_amount] <A HREF='?src=[UID()];amount=1'>+</A> <A HREF='?src=[UID()];amount=10'>+</A> <A HREF='?src=[UID()];amount=100'>+</A><BR>\n<A HREF='?src=[UID()];remove=1'>Remove plasmatank</A> - <A HREF='?src=[UID()];close=1'>Close</A></TT>")
|
||||
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=[UID()];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\n<A HREF='?src=[UID()];remove=1'>Remove plasmatank</A> - <A HREF='?src=[UID()];close=1'>Close</A></TT>")
|
||||
user << browse(dat, "window=flamethrower;size=600x300")
|
||||
onclose(user, "flamethrower")
|
||||
return
|
||||
@@ -143,9 +142,6 @@
|
||||
lit = !lit
|
||||
if(lit)
|
||||
processing_objects.Add(src)
|
||||
if(href_list["amount"])
|
||||
throw_amount = throw_amount + text2num(href_list["amount"])
|
||||
throw_amount = max(50, min(5000, throw_amount))
|
||||
if(href_list["remove"])
|
||||
if(!ptank) return
|
||||
usr.put_in_hands(ptank)
|
||||
@@ -191,10 +187,8 @@
|
||||
|
||||
|
||||
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
|
||||
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
|
||||
air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
air_transfer.toxins = air_transfer.toxins // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
|
||||
|
||||
@@ -277,22 +277,22 @@
|
||||
if(Adj)
|
||||
return //Safety check so you don't blast yourself trying to refill your tank
|
||||
var/datum/reagents/R = reagents
|
||||
if(R.total_volume < 100)
|
||||
to_chat(user, "You need at least 100 units of water to use the nanofrost launcher!")
|
||||
if(R.total_volume < 50)
|
||||
to_chat(user, "You need at least 50 units of water to use the nanofrost launcher!")
|
||||
return
|
||||
if(nanofrost_cooldown)
|
||||
to_chat(user, "Nanofrost launcher is still recharging")
|
||||
return
|
||||
nanofrost_cooldown = 1
|
||||
R.remove_any(100)
|
||||
R.remove_any(50)
|
||||
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
|
||||
log_game("[user.ckey] ([user.name]) used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(2)
|
||||
sleep(1)
|
||||
A.Smoke()
|
||||
spawn(100)
|
||||
spawn(50)
|
||||
if(src)
|
||||
nanofrost_cooldown = 0
|
||||
return
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
opacity = 1
|
||||
density = 1
|
||||
explosion_block = 2
|
||||
damage_cap = 200
|
||||
damage_cap = 600
|
||||
max_temperature = 6000
|
||||
hardness = 10
|
||||
sheet_type = /obj/item/stack/sheet/plasteel
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
var/leap_on_click = 0
|
||||
var/custom_pixel_x_offset = 0 //for admin fuckery.
|
||||
var/custom_pixel_y_offset = 0
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/humanoid/New()
|
||||
|
||||
@@ -1342,6 +1342,7 @@ var/list/robot_verbs_default = list(
|
||||
designation = "Nanotrasen Combat"
|
||||
req_access = list(access_cent_specops)
|
||||
ionpulse = 1
|
||||
magpulse = 1
|
||||
var/searching_for_ckey = 0
|
||||
|
||||
/mob/living/silicon/robot/deathsquad/New(loc)
|
||||
@@ -1391,6 +1392,7 @@ var/list/robot_verbs_default = list(
|
||||
modtype = "Syndicate"
|
||||
req_access = list(access_syndicate)
|
||||
ionpulse = 1
|
||||
magpulse = 1
|
||||
lawchannel = "State"
|
||||
var/playstyle_string = "<span class='userdanger'>You are a Syndicate assault cyborg!</span><br>\
|
||||
<b>You are armed with powerful offensive tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
|
||||
unsuitable_atmos_damage = 15
|
||||
heat_damage_per_tick = 20
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
faction = list("alien")
|
||||
status_flags = CANPUSH
|
||||
minbodytemp = 0
|
||||
|
||||
@@ -38,6 +38,8 @@ var/global/list/ts_spiderling_list = list()
|
||||
// Movement
|
||||
move_to_delay = 6
|
||||
turns_per_move = 5
|
||||
pressure_resistance = 50 //50 kPa difference required to push
|
||||
throw_pressure_limit = 100 //100 kPa difference required to throw
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
// Ventcrawling
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
icon = 'icons/vehicles/CargoTrain.dmi'
|
||||
icon_state = "ambulance"
|
||||
anchored = 0
|
||||
throw_pressure_limit = 9001 //Throwing an ambulance trolley can kill the process scheduler.
|
||||
|
||||
/obj/structure/stool/bed/amb_trolley/MouseDrop(obj/over_object as obj)
|
||||
..()
|
||||
@@ -55,4 +56,4 @@
|
||||
to_chat(usr, "You unhook the bed to the ambulance.")
|
||||
else
|
||||
amb.bed = src
|
||||
to_chat(usr, "You hook the bed to the ambulance.")
|
||||
to_chat(usr, "You hook the bed to the ambulance.")
|
||||
|
||||
@@ -189,7 +189,6 @@
|
||||
#include "code\controllers\Processes\npcai.dm"
|
||||
#include "code\controllers\Processes\npcpool.dm"
|
||||
#include "code\controllers\Processes\obj.dm"
|
||||
#include "code\controllers\Processes\pipenet.dm"
|
||||
#include "code\controllers\Processes\shuttles.dm"
|
||||
#include "code\controllers\Processes\spacedrift.dm"
|
||||
#include "code\controllers\Processes\sun.dm"
|
||||
|
||||
Reference in New Issue
Block a user