diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index 8341f18677e..841591ea396 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -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)) diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm index 8951977d4db..d19c95d6a66 100644 --- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm +++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm @@ -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 \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index a0f563669c1..403f9759ac6 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -70,7 +70,7 @@ else last_pressure_delta = 0 -/obj/machinery/atmospherics/binary/circulator/process() +/obj/machinery/atmospherics/binary/circulator/process_atmos() ..() update_icon() diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index 74293d6a807..d36c6059c5f 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index a9071e5ba13..e4e4464b55f 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 908a5318dda..8b36352700c 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 0ec613cb049..334e632f1df 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index cbe1422c38a..ce0089b0639 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -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) diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index 07269c5f3db..0676d833029 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm index a247d6f93a3..ed3e6836fc9 100644 --- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm +++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm @@ -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) diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index 109c3a2fa04..7ec310f2642 100755 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 0657f8d9f5f..8d388d478dd 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index 47cfb15fa51..6dc5e5cc303 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -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 \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm b/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm index 3e716d6f1cb..39441f8ed87 100644 --- a/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary_devices/cold_sink.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm index 8b871847b23..1b726a6c066 100644 --- a/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm +++ b/code/ATMOSPHERICS/components/unary_devices/heat_exchanger.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary_devices/heat_source.dm b/code/ATMOSPHERICS/components/unary_devices/heat_source.dm index 13b3b239986..2b0cbc14277 100644 --- a/code/ATMOSPHERICS/components/unary_devices/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary_devices/heat_source.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm index f30ca5a016c..63070b19538 100644 --- a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm @@ -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) diff --git a/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm b/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm index 274f9999edb..0f575fb9c3a 100644 --- a/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm +++ b/code/ATMOSPHERICS/components/unary_devices/oxygen_generator.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/unary_devices/passive_vent.dm b/code/ATMOSPHERICS/components/unary_devices/passive_vent.dm index 5deec7925b9..4078f5412c2 100644 --- a/code/ATMOSPHERICS/components/unary_devices/passive_vent.dm +++ b/code/ATMOSPHERICS/components/unary_devices/passive_vent.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm b/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm index db76b56cac0..f2243760dd5 100644 --- a/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm +++ b/code/ATMOSPHERICS/components/unary_devices/portables_connector.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm b/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm index dc7da589017..c245bfc120e 100644 --- a/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm +++ b/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm index e61a62736c3..bcdf6c51903 100644 --- a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm +++ b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm @@ -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 \ No newline at end of file diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm index 08febf1c572..4c4f1a91d06 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm index 6747b103972..e86b8caa722 100644 --- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm @@ -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) diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm index 0504062eb09..7691b157857 100644 --- a/code/ATMOSPHERICS/pipes/cap.dm +++ b/code/ATMOSPHERICS/pipes/cap.dm @@ -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) diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm index 0c3e5fd5be3..dc8dbeca381 100644 --- a/code/ATMOSPHERICS/pipes/manifold.dm +++ b/code/ATMOSPHERICS/pipes/manifold.dm @@ -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 diff --git a/code/ATMOSPHERICS/pipes/manifold4w.dm b/code/ATMOSPHERICS/pipes/manifold4w.dm index c00696ed1a9..1b03b12fe2a 100644 --- a/code/ATMOSPHERICS/pipes/manifold4w.dm +++ b/code/ATMOSPHERICS/pipes/manifold4w.dm @@ -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 diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm index a771bdd6234..26139b40606 100644 --- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm +++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm @@ -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) diff --git a/code/LINDA/LINDA_turf_tile.dm b/code/LINDA/LINDA_turf_tile.dm index 28c1a7e6860..a7f5ee69d39 100644 --- a/code/LINDA/LINDA_turf_tile.dm +++ b/code/LINDA/LINDA_turf_tile.dm @@ -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, "The pressure sends you flying!") + 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 diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm index fe7e2b0067c..1e7f98ecb53 100644 --- a/code/__DEFINES/atmospherics.dm +++ b/code/__DEFINES/atmospherics.dm @@ -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 \ No newline at end of file +#define ATMOS_ALARM_DANGER 2 diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 0cc712799c7..cb1ce8f10a7 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -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. diff --git a/code/controllers/Processes/air.dm b/code/controllers/Processes/air.dm index 311699bb720..e7937593c19 100644 --- a/code/controllers/Processes/air.dm +++ b/code/controllers/Processes/air.dm @@ -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 diff --git a/code/controllers/Processes/pipenet.dm b/code/controllers/Processes/pipenet.dm deleted file mode 100644 index 5706fa8326e..00000000000 --- a/code/controllers/Processes/pipenet.dm +++ /dev/null @@ -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 diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 71a6b5be37f..439d169bc37 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -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("The corpse of [H.name] suddenly rises!") /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() diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index b7c7961e5de..ee6493973e5 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -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. diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index 91687844329..62996473291 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -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 ..() diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index b785297bd06..8057c6edf23 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -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 diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 231a50bf802..d3f1f25a52d 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -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 diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index 44ac6caf479..45dcb5f7880 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -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) diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index acdb4d30aa0..4fca317bf0d 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -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 diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 2d714606610..17f671d9cc8 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -41,7 +41,7 @@ return -/obj/machinery/portable_atmospherics/scrubber/process() +/obj/machinery/portable_atmospherics/scrubber/process_atmos() ..() if(!on) diff --git a/code/game/machinery/atmoalter/zvent.dm b/code/game/machinery/atmoalter/zvent.dm index e3ac09e8f09..a9d288fe37e 100644 --- a/code/game/machinery/atmoalter/zvent.dm +++ b/code/game/machinery/atmoalter/zvent.dm @@ -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 diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 8e026cfd80a..938011c1fc8 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -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 diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 901ea27a7df..b8244771de0 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -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) diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 024783359b5..9601b86beec 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -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, "Attach a plasma tank first!") return - var/dat = text("Flamethrower ([lit ? "Lit" : "Unlit"])
\n Tank Pressure: [ptank.air_contents.return_pressure()]
\nAmount to throw: - - - [throw_amount] + + +
\nRemove plasmatank - Close
") + var/dat = text("Flamethrower ([lit ? "Lit" : "Unlit"])
\n Tank Pressure: [ptank.air_contents.return_pressure()]
\nRemove plasmatank - Close
") 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 diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 5229a59fe5f..5795b04bfa3 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -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 diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 43374ce66d8..db766f19e68 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -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 diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index d37d83e8215..5132ae9453c 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -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() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5079f290240..cdf04da1c38 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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 = "You are a Syndicate assault cyborg!
\ You are armed with powerful offensive tools to aid you in your mission: help the operatives secure the nuclear authentication disk. \ diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 88db29b88a7..86dbc13b643 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index 0f85d78d01f..dd5fe980214 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -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 diff --git a/code/modules/vehicle/ambulance.dm b/code/modules/vehicle/ambulance.dm index ab64ac1252d..9e0d6d62d1b 100644 --- a/code/modules/vehicle/ambulance.dm +++ b/code/modules/vehicle/ambulance.dm @@ -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.") \ No newline at end of file + to_chat(usr, "You hook the bed to the ambulance.") diff --git a/paradise.dme b/paradise.dme index 4cc5aa5bd3b..d907993781b 100644 --- a/paradise.dme +++ b/paradise.dme @@ -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"