Merge branch 'master' into list-memory-optimization

This commit is contained in:
dearmochi
2020-06-25 09:15:18 +02:00
committed by GitHub
172 changed files with 1019 additions and 5126 deletions
+35 -196
View File
@@ -24058,29 +24058,17 @@
pressure_checks_default = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"aUm" = (
/obj/machinery/camera{
c_tag = "Atmospherics Air Tank";
network = list("SS13","Engineering")
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"aUn" = (
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"aUo" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
@@ -25034,31 +25022,19 @@
frequency = 1441;
id_tag = "air_sensor"
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"aVT" = (
/obj/machinery/portable_atmospherics/canister/air{
anchored = 1
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"aVU" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"aVV" = (
/obj/structure/table/wood,
@@ -25824,24 +25800,14 @@
/turf/simulated/floor/plating,
/area/security/prison)
"aXa" = (
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"aXb" = (
/obj/machinery/camera{
c_tag = "Atmospherics CO2 Tank";
network = list("SS13","Engineering")
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"aXc" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -25860,12 +25826,7 @@
pressure_checks_default = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"aXd" = (
/obj/structure/grille,
@@ -26062,11 +26023,7 @@
frequency = 1441;
id = "air_in"
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"aXy" = (
/obj/structure/cable{
@@ -26589,35 +26546,20 @@
/obj/machinery/light/small{
dir = 8
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"aYv" = (
/obj/machinery/portable_atmospherics/canister/carbon_dioxide{
anchored = 1
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"aYw" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "co2_sensor"
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"aYx" = (
/obj/structure/window/reinforced{
@@ -27718,12 +27660,7 @@
frequency = 1441;
id = "co2_in"
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"bah" = (
/obj/structure/grille,
@@ -27932,29 +27869,17 @@
pressure_checks_default = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"baA" = (
/obj/machinery/camera{
c_tag = "Atmospherics Oxygen Tank";
network = list("SS13","Engineering")
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"baB" = (
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"baC" = (
/obj/effect/decal/cleanable/dirt,
@@ -28759,31 +28684,19 @@
frequency = 1441;
id_tag = "o2_sensor"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"bbZ" = (
/obj/machinery/portable_atmospherics/canister/oxygen{
anchored = 1
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"bca" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"bcb" = (
/obj/effect/decal/cleanable/dirt,
@@ -29370,26 +29283,14 @@
},
/area/shuttle/pod_3)
"bdk" = (
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bdl" = (
/obj/machinery/camera{
c_tag = "Atmospherics Toxins Tank";
network = list("SS13","Engineering")
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bdm" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -29408,13 +29309,7 @@
pressure_checks_default = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bdn" = (
/obj/structure/window/reinforced{
@@ -29502,11 +29397,7 @@
frequency = 1441;
id = "o2_in"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"bdw" = (
/obj/structure/reagent_dispensers/watertank,
@@ -30166,38 +30057,20 @@
/obj/machinery/light/small{
dir = 8
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"beF" = (
/obj/machinery/portable_atmospherics/canister/toxins{
anchored = 1
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"beG" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "tox_sensor"
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"beH" = (
/obj/structure/window/reinforced{
@@ -30872,13 +30745,7 @@
frequency = 1441;
id = "tox_in"
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bgb" = (
/obj/structure/window/reinforced,
@@ -30999,29 +30866,17 @@
pressure_checks_default = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bgl" = (
/obj/machinery/camera{
c_tag = "Atmospherics Nitrogen Tank";
network = list("SS13","Engineering")
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bgm" = (
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bgn" = (
/turf/simulated/floor/plasteel{
@@ -31594,31 +31449,19 @@
frequency = 1441;
id_tag = "n2_sensor"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bht" = (
/obj/machinery/portable_atmospherics/canister/nitrogen{
anchored = 1
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bhu" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bhv" = (
/obj/structure/reagent_dispensers/watertank,
@@ -32533,11 +32376,7 @@
frequency = 1441;
id = "n2_in"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bjc" = (
/obj/structure/closet/crate,
@@ -55399,9 +55399,7 @@
/turf/simulated/floor/engine/n20,
/area/atmos)
"bRk" = (
/obj/machinery/portable_atmospherics/canister/sleeping_agent/roomfiller{
valve_open = 1
},
/obj/machinery/portable_atmospherics/canister/sleeping_agent,
/turf/simulated/floor/engine/n20,
/area/atmos)
"bRl" = (
@@ -57907,35 +57905,17 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bVV" = (
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bVW" = (
/obj/effect/landmark{
name = "xeno_spawn";
pixel_x = -1
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bVY" = (
/obj/structure/window/reinforced{
@@ -58797,35 +58777,17 @@
frequency = 1441;
id_tag = "tox_sensor"
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bXA" = (
/obj/machinery/portable_atmospherics/canister/toxins,
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bXB" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bXH" = (
/obj/structure/cable/yellow{
@@ -59451,13 +59413,7 @@
id = "tox_in";
pixel_y = 1
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bYP" = (
/obj/item/storage/belt/utility,
@@ -59976,13 +59932,7 @@
dir = 8;
network = list("SS13")
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"bZP" = (
/turf/simulated/wall,
@@ -60850,20 +60800,10 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"cbl" = (
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"cbm" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -61344,32 +61284,17 @@
frequency = 1441;
id_tag = "co2_sensor"
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"cci" = (
/obj/machinery/portable_atmospherics/canister/carbon_dioxide,
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"ccj" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"ccl" = (
/obj/effect/landmark{
@@ -62198,12 +62123,7 @@
id = "co2_in";
pixel_y = 1
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"cdA" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
@@ -62396,12 +62316,7 @@
dir = 8;
network = list("SS13")
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"cdT" = (
/turf/simulated/wall,
@@ -69133,22 +69048,14 @@
frequency = 1441;
id = "n2_in"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"cpi" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "n2_sensor"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"cpj" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -69162,11 +69069,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"cpk" = (
/obj/machinery/atmospherics/unary/outlet_injector/on{
@@ -69174,22 +69077,14 @@
frequency = 1441;
id = "o2_in"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"cpl" = (
/obj/machinery/air_sensor{
frequency = 1441;
id_tag = "o2_sensor"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"cpm" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -69203,11 +69098,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"cpn" = (
/obj/machinery/atmospherics/unary/outlet_injector/on{
@@ -69215,11 +69106,7 @@
frequency = 1443;
id = "air_in"
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"cpo" = (
/obj/machinery/air_sensor{
@@ -69227,11 +69114,7 @@
id_tag = "air_sensor";
output = 7
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"cpp" = (
/obj/machinery/atmospherics/unary/vent_pump/high_volume{
@@ -69245,11 +69128,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"cpq" = (
/obj/machinery/atmospherics/binary/pump{
@@ -70140,19 +70019,11 @@
name = "\improper Secure Lab"
})
"cqK" = (
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"cqL" = (
/obj/machinery/portable_atmospherics/canister/nitrogen,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"cqM" = (
/obj/machinery/door_control{
@@ -70163,19 +70034,11 @@
/turf/simulated/floor/engine,
/area/toxins/explab)
"cqN" = (
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"cqO" = (
/obj/machinery/portable_atmospherics/canister/oxygen,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"cqP" = (
/obj/structure/cable{
@@ -70190,19 +70053,11 @@
name = "xeno_spawn";
pixel_x = -1
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"cqR" = (
/obj/machinery/portable_atmospherics/canister/air,
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"cqS" = (
/obj/machinery/camera{
@@ -70210,11 +70065,7 @@
dir = 8;
network = list("SS13")
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"cqT" = (
/obj/machinery/atmospherics/unary/outlet_injector/on{
@@ -70418,11 +70269,7 @@
dir = 8;
network = list("SS13")
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"crm" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
@@ -70487,11 +70334,7 @@
dir = 8;
network = list("SS13")
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"crr" = (
/turf/simulated/floor/plasteel{
@@ -71112,34 +70955,18 @@
/area/space/nearstation)
"csq" = (
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"csr" = (
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"css" = (
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"cst" = (
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"csu" = (
/obj/item/stack/rods{
@@ -857,21 +857,13 @@
frequency = 1442;
id_tag = "syndie_lavaland_n2_sensor"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"bt" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"bu" = (
/obj/machinery/atmospherics/unary/vent_pump/siphon/on{
@@ -880,11 +872,7 @@
id_tag = "syndie_lavaland_n2_out";
name = "nitrogen out"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"bv" = (
/obj/effect/turf_decal/stripes/line{
@@ -1243,32 +1231,20 @@
/area/ruin/unpowered/syndicate_lava_base/main)
"cg" = (
/obj/machinery/portable_atmospherics/canister/nitrogen,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"ch" = (
/obj/machinery/air_sensor{
frequency = 1442;
id_tag = "syndie_lavaland_o2_sensor"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"ci" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"cj" = (
/obj/machinery/atmospherics/unary/vent_pump/siphon/on{
@@ -1277,19 +1253,11 @@
id_tag = "syndie_lavaland_o2_out";
name = "oxygen out"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"ck" = (
/obj/machinery/portable_atmospherics/canister/oxygen,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"cl" = (
/obj/machinery/atmospherics/unary/vent_pump/siphon/on{
@@ -1298,46 +1266,22 @@
id_tag = "syndie_lavaland_tox_out";
name = "toxin out"
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"cm" = (
/obj/machinery/air_sensor{
frequency = 1442;
id_tag = "syndie_lavaland_tox_sensor"
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"cn" = (
/obj/machinery/portable_atmospherics/canister/toxins,
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"co" = (
/obj/machinery/light/small,
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/ruin/unpowered/syndicate_lava_base/engineering)
"cp" = (
/obj/structure/cable{
@@ -591,10 +591,6 @@
},
/turf/simulated/floor/light,
/area/ruin/unpowered)
"bq" = (
/obj/machinery/blackbox_recorder,
/turf/simulated/floor/plasteel,
/area/ruin/unpowered)
"br" = (
/obj/structure/cable{
icon_state = "0-4";
@@ -2575,8 +2571,8 @@ ac
bg
bj
ac
bq
bx
ar
bG
bO
bU
+12 -60
View File
@@ -7904,11 +7904,7 @@
/area/awaymission/UO71/centralhall)
"pu" = (
/obj/machinery/portable_atmospherics/canister/air,
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaymission/UO71/eng)
"pv" = (
/obj/machinery/air_sensor{
@@ -7916,11 +7912,7 @@
id_tag = "UO71_air_sensor";
output = 7
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaymission/UO71/eng)
"pw" = (
/obj/structure/cable{
@@ -8172,11 +8164,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaymission/UO71/eng)
"pQ" = (
/obj/machinery/atmospherics/unary/outlet_injector/on{
@@ -8184,11 +8172,7 @@
frequency = 1443;
id = "UO71_air_in"
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaymission/UO71/eng)
"pR" = (
/obj/machinery/atmospherics/pipe/simple/visible/cyan,
@@ -11446,11 +11430,7 @@
frequency = 1441;
id = "UO71_n2_in"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaymission/UO71/eng)
"vF" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -11464,11 +11444,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaymission/UO71/eng)
"vG" = (
/obj/machinery/atmospherics/unary/outlet_injector/on{
@@ -11476,11 +11452,7 @@
frequency = 1441;
id = "UO71_o2_in"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/awaymission/UO71/eng)
"vH" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -11494,11 +11466,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/awaymission/UO71/eng)
"vI" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
@@ -11821,19 +11789,11 @@
id_tag = "UO71_n2_sensor"
},
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaymission/UO71/eng)
"wm" = (
/obj/machinery/portable_atmospherics/canister/nitrogen,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaymission/UO71/eng)
"wn" = (
/obj/machinery/air_sensor{
@@ -11841,19 +11801,11 @@
id_tag = "UO71_o2_sensor"
},
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/awaymission/UO71/eng)
"wo" = (
/obj/machinery/portable_atmospherics/canister/oxygen,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/awaymission/UO71/eng)
"wp" = (
/obj/effect/decal/warning_stripes/yellow/partial{
@@ -10200,11 +10200,7 @@
})
"pa" = (
/obj/machinery/portable_atmospherics/canister/air,
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -10215,11 +10211,7 @@
id_tag = "UO45_air_sensor";
output = 7
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -10612,11 +10604,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -10627,11 +10615,7 @@
frequency = 1443;
id = "UO45_air_in"
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -14650,11 +14634,7 @@
frequency = 1441;
id = "UO45_n2_in"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -14671,11 +14651,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -14686,11 +14662,7 @@
frequency = 1441;
id = "UO45_o2_in"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 10000
},
/turf/simulated/floor/engine/o2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -14707,11 +14679,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 10000
},
/turf/simulated/floor/engine/o2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -15040,22 +15008,14 @@
id_tag = "UO45_n2_sensor"
},
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
})
"vF" = (
/obj/machinery/portable_atmospherics/canister/nitrogen,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 10000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
@@ -15066,22 +15026,14 @@
id_tag = "UO45_o2_sensor"
},
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 10000
},
/turf/simulated/floor/engine/o2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
})
"vH" = (
/obj/machinery/portable_atmospherics/canister/oxygen,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 10000
},
/turf/simulated/floor/engine/o2,
/area/awaycontent/a3{
has_gravity = 1;
name = "UO45 Engineering"
+50 -259
View File
@@ -29501,11 +29501,7 @@
/obj/machinery/portable_atmospherics/canister/nitrogen{
anchored = 1
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"bbN" = (
/obj/effect/decal/warning_stripes/northeast,
@@ -29517,11 +29513,7 @@
/obj/machinery/portable_atmospherics/canister/oxygen{
anchored = 1
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"bbP" = (
/obj/effect/decal/warning_stripes/north,
@@ -30507,11 +30499,7 @@
/obj/machinery/portable_atmospherics/canister/air{
anchored = 1
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"bdH" = (
/obj/effect/landmark/start{
@@ -59016,12 +59004,7 @@
icon_state = "intact";
dir = 6
},
/turf/simulated/floor/bluegrid{
name = "Server Base";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/bluegrid/telecomms/server,
/area/toxins/server_coldroom)
"ccU" = (
/obj/effect/spawner/window/reinforced,
@@ -59058,13 +59041,7 @@
pixel_x = 0;
pixel_y = 24
},
/turf/simulated/floor/bluegrid{
icon_state = "dark";
name = "Server Walkway";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/plasteel/dark/telecomms,
/area/toxins/server_coldroom)
"ccW" = (
/obj/machinery/camera{
@@ -59085,9 +59062,7 @@
pixel_x = 0;
pixel_y = 24
},
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"ccX" = (
/obj/structure/cable{
@@ -59154,7 +59129,7 @@
/area/engine/gravitygenerator)
"cdb" = (
/obj/machinery/atmospherics/unary/cold_sink/freezer{
current_temperature = 73;
current_temperature = 80;
dir = 2;
on = 1
},
@@ -59163,9 +59138,7 @@
name = "station intercom (General)";
pixel_y = 25
},
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"cdc" = (
/obj/structure/cable{
@@ -59941,13 +59914,7 @@
dir = 8
},
/obj/machinery/atmospherics/pipe/simple/heat_exchanging,
/turf/simulated/floor/bluegrid{
icon_state = "dark";
name = "Server Walkway";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/plasteel/dark/telecomms,
/area/toxins/server_coldroom)
"ceA" = (
/obj/machinery/atmospherics/unary/vent_pump/on,
@@ -60024,12 +59991,7 @@
dir = 4
},
/obj/machinery/atmospherics/unary/vent_pump/on,
/turf/simulated/floor/bluegrid{
name = "Server Base";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/bluegrid/telecomms/server,
/area/toxins/server_coldroom)
"ceJ" = (
/obj/structure/cable{
@@ -60049,9 +60011,7 @@
},
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"ceK" = (
/obj/effect/decal/cleanable/dirt,
@@ -60908,12 +60868,7 @@
icon_state = "intact";
dir = 5
},
/turf/simulated/floor/bluegrid{
name = "Server Base";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/bluegrid/telecomms/server,
/area/toxins/server_coldroom)
"cgd" = (
/obj/effect/spawner/window/reinforced,
@@ -60940,15 +60895,11 @@
/obj/machinery/light_switch{
pixel_y = -23
},
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"cgg" = (
/obj/machinery/computer/message_monitor,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"cgh" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
@@ -61323,13 +61274,7 @@
dir = 5;
level = 1
},
/turf/simulated/floor/bluegrid{
icon_state = "dark";
name = "Server Walkway";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/plasteel/dark/telecomms,
/area/toxins/server_coldroom)
"cgU" = (
/obj/effect/spawner/window/reinforced,
@@ -61417,9 +61362,7 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
},
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"chb" = (
/obj/machinery/atmospherics/pipe/simple/heat_exchanging{
@@ -61431,13 +61374,7 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
},
/turf/simulated/floor/bluegrid{
icon_state = "dark";
name = "Server Walkway";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/plasteel/dark/telecomms,
/area/toxins/server_coldroom)
"chc" = (
/turf/simulated/wall,
@@ -61646,9 +61583,7 @@
initialize_directions = 11;
level = 1
},
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"chw" = (
/obj/machinery/firealarm{
@@ -61669,9 +61604,7 @@
scrub_N2O = 1;
scrub_Toxins = 1
},
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"chx" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
@@ -63057,12 +62990,7 @@
/obj/machinery/atmospherics/pipe/simple/heat_exchanging{
dir = 4
},
/turf/simulated/floor/bluegrid{
name = "Server Base";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/bluegrid/telecomms/server,
/area/toxins/server_coldroom)
"cjI" = (
/obj/machinery/camera{
@@ -63095,13 +63023,7 @@
scrub_N2O = 1;
scrub_Toxins = 1
},
/turf/simulated/floor/bluegrid{
icon_state = "dark";
name = "Server Walkway";
nitrogen = 250;
oxygen = 0;
temperature = 0
},
/turf/simulated/floor/plasteel/dark/telecomms,
/area/toxins/server_coldroom)
"cjK" = (
/obj/machinery/alarm{
@@ -63112,9 +63034,7 @@
/obj/machinery/atmospherics/unary/vent_pump/on{
dir = 1
},
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
/turf/simulated/floor/plasteel/dark,
/area/toxins/server)
"cjL" = (
/obj/effect/decal/cleanable/dirt,
@@ -77463,10 +77383,7 @@
},
/area/engine/chiefs_office)
"cIf" = (
/obj/machinery/portable_atmospherics/canister/sleeping_agent/roomfiller{
valve_open = 0;
volume = 1e+006
},
/obj/machinery/portable_atmospherics/canister/sleeping_agent,
/turf/simulated/floor/engine/n20,
/area/atmos)
"cIg" = (
@@ -79581,13 +79498,7 @@
/area/maintenance/asmaint)
"cLV" = (
/obj/machinery/portable_atmospherics/canister/toxins,
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"cLW" = (
/obj/structure/cable{
@@ -82407,12 +82318,7 @@
/area/engine/engineering)
"cRi" = (
/obj/machinery/portable_atmospherics/canister/carbon_dioxide,
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"cRj" = (
/obj/machinery/atmospherics/binary/pump{
@@ -88005,13 +87911,7 @@
/turf/space,
/area/space/nearstation)
"dbb" = (
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"dbc" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -88026,13 +87926,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"dbd" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
@@ -88452,13 +88346,7 @@
frequency = 1441;
id_tag = "tox_sensor"
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"dbT" = (
/obj/structure/lattice,
@@ -88485,13 +88373,7 @@
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"dbX" = (
/obj/structure/lattice,
@@ -88922,13 +88804,7 @@
on = 1;
pixel_y = 1
},
/turf/simulated/floor/engine{
carbon_dioxide = 0;
name = "plasma floor";
nitrogen = 0;
oxygen = 0;
toxins = 70000
},
/turf/simulated/floor/engine/plasma,
/area/atmos)
"dcU" = (
/obj/machinery/door/airlock/external{
@@ -89605,12 +89481,7 @@
/turf/space,
/area/space/nearstation)
"dem" = (
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"den" = (
/obj/machinery/atmospherics/unary/vent_pump{
@@ -89625,12 +89496,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"deo" = (
/obj/machinery/door/airlock/maintenance,
@@ -89987,23 +89853,13 @@
frequency = 1441;
id_tag = "co2_sensor"
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"deY" = (
/obj/machinery/light/small{
dir = 4
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"deZ" = (
/obj/machinery/power/smes{
@@ -90406,12 +90262,7 @@
on = 1;
pixel_y = 1
},
/turf/simulated/floor/engine{
carbon_dioxide = 50000;
name = "co2 floor";
nitrogen = 0;
oxygen = 0
},
/turf/simulated/floor/engine/co2,
/area/atmos)
"dfP" = (
/obj/structure/table,
@@ -92547,11 +92398,7 @@
frequency = 1441;
id_tag = "n2_sensor"
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"dki" = (
/obj/machinery/atmospherics/unary/outlet_injector{
@@ -92561,11 +92408,7 @@
id = "n2_in";
on = 1
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"dkj" = (
/obj/effect/spawner/window/reinforced,
@@ -92584,11 +92427,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"dkl" = (
/obj/item/radio/intercom{
@@ -92636,11 +92475,7 @@
frequency = 1441;
id_tag = "o2_sensor"
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"dkq" = (
/obj/machinery/atmospherics/unary/outlet_injector{
@@ -92650,11 +92485,7 @@
id = "o2_in";
on = 1
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"dkr" = (
/obj/machinery/portable_atmospherics/canister,
@@ -92674,11 +92505,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"dkt" = (
/obj/structure/disposalpipe/segment,
@@ -92691,11 +92518,7 @@
id_tag = "air_sensor";
output = 7
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"dkv" = (
/mob/living/simple_animal/mouse,
@@ -92709,11 +92532,7 @@
id = "o2_in";
on = 1
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"dkx" = (
/obj/machinery/atmospherics/unary/vent_pump/high_volume{
@@ -92727,11 +92546,7 @@
pressure_checks = 2;
pump_direction = 0
},
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"dky" = (
/obj/machinery/camera{
@@ -92897,11 +92712,7 @@
/turf/simulated/floor/carpet,
/area/crew_quarters/bar)
"dkO" = (
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"dkP" = (
/obj/machinery/atmospherics/unary/portables_connector{
@@ -92939,11 +92750,7 @@
/turf/simulated/floor/plating,
/area/maintenance/asmaint)
"dkT" = (
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"dkU" = (
/obj/effect/decal/warning_stripes/west,
@@ -92974,11 +92781,7 @@
name = "\improper AI Satellite Atmospherics"
})
"dkV" = (
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"dkW" = (
/obj/machinery/door/firedoor,
@@ -93328,27 +93131,15 @@
/area/turret_protected/aisat_interior)
"dlv" = (
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "n2 floor";
nitrogen = 100000;
oxygen = 0
},
/turf/simulated/floor/engine/n2,
/area/atmos)
"dlw" = (
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "o2 floor";
nitrogen = 0;
oxygen = 100000
},
/turf/simulated/floor/engine/o2,
/area/atmos)
"dlx" = (
/obj/machinery/light/small,
/turf/simulated/floor/engine{
name = "air floor";
nitrogen = 10580;
oxygen = 2644
},
/turf/simulated/floor/engine/air,
/area/atmos)
"dly" = (
/obj/structure/cable{
+1 -7
View File
@@ -8419,12 +8419,6 @@
icon_state = "gcircuit"
},
/area/centcom/control)
"ux" = (
/obj/machinery/blackbox_recorder,
/turf/unsimulated/floor{
icon_state = "gcircuit"
},
/area/centcom/control)
"uy" = (
/obj/machinery/computer/card/centcom,
/turf/unsimulated/floor{
@@ -37334,7 +37328,7 @@ nD
tR
ud
su
ux
uv
tR
tR
tR
@@ -26,7 +26,6 @@
var/frequency = ATMOS_VENTSCRUB
var/id_tag = null
var/datum/radio_frequency/radio_connection
var/advcontrol = 0//does this device listen to the AAC
settagwhitelist = list("id_tag")
@@ -75,7 +74,7 @@
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
@@ -192,7 +191,7 @@
return 1
/obj/machinery/atmospherics/binary/dp_vent_pump/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
if(signal.data["power"] != null)
on = text2num(signal.data["power"])
@@ -256,14 +255,5 @@
<ul>
<li><b>Frequency:</b> <a href="?src=[UID()];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=[UID()];set_freq=[ATMOS_VENTSCRUB]">Reset</a>)</li>
<li><b>ID Tag:</b> <a href="?src=[UID()];set_id=1">[id_tag]</a></li>
<li><b>AAC Acces:</b> <a href="?src=[UID()];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a></li>
</ul>
"}
/obj/machinery/atmospherics/binary/dp_vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
. = ..()
if(.)
return .
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return TRUE
@@ -89,12 +89,12 @@
if(ATM_P)
filtered_out.toxins = removed.toxins
removed.toxins = 0
filtered_out.agent_b = removed.agent_b
removed.agent_b = 0
if(ATM_N2O)
if(removed.trace_gases.len>0)
for(var/datum/gas/sleeping_agent/trace_gas in removed.trace_gases)
if(istype(trace_gas))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
filtered_out.sleeping_agent = removed.sleeping_agent
removed.sleeping_agent = 0
else
filtered_out = null
@@ -150,11 +150,8 @@ Filter types:
filtered_out.toxins = removed.toxins
removed.toxins = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
filtered_out.agent_b = removed.agent_b
removed.agent_b = 0
if(1) //removing O2
filtered_out.oxygen = removed.oxygen
@@ -169,12 +166,8 @@ Filter types:
removed.carbon_dioxide = 0
if(4)//removing N2O
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/sleeping_agent))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
filtered_out.sleeping_agent = removed.sleeping_agent
removed.sleeping_agent = 0
else
filtered_out = null
@@ -92,10 +92,7 @@
air_contents.volume = volume
air_contents.temperature = T20C
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.trace_gases += trace_gas
air_contents.sleeping_agent = (25 * ONE_ATMOSPHERE) * (air_contents.volume) / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
/obj/machinery/atmospherics/unary/tank/oxygen_agent_b
name = "Unidentified Gas Tank"
@@ -108,6 +105,4 @@
air_contents.volume = volume
air_contents.temperature = T20C
var/datum/gas/oxygen_agent_b/trace_gas = new
trace_gas.moles = (50 * ONE_ATMOSPHERE) * (air_contents.volume) / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
air_contents.trace_gases += trace_gas
air_contents.agent_b = (50 * ONE_ATMOSPHERE) * (air_contents.volume) / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
@@ -43,7 +43,6 @@
var/frequency = ATMOS_VENTSCRUB
var/datum/radio_frequency/radio_connection
Mtoollink = 1
var/advcontrol = 0//does this device listen to the AAC
var/radio_filter_out
var/radio_filter_in
@@ -250,7 +249,7 @@
if(stat & (NOPOWER|BROKEN))
return
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
if(signal.data["purge"] != null)
@@ -425,15 +424,10 @@
<ul>
<li><b>Frequency:</b> <a href="?src=[UID()];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=[UID()];set_freq=[ATMOS_VENTSCRUB]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</li>
<li><b>AAC Acces:</b> <a href="?src=[UID()];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a>
</ul>
"}
/obj/machinery/atmospherics/unary/vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return TRUE
if("set_id" in href_list)
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src.id_tag) as null|text), 1, MAX_MESSAGE_LEN)
if(!newid)
@@ -18,7 +18,6 @@
var/id_tag = null
var/frequency = ATMOS_VENTSCRUB
var/datum/radio_frequency/radio_connection
var/advcontrol = 0//does this device listen to the AAC?
var/list/turf/simulated/adjacent_turfs = list()
@@ -226,7 +225,7 @@
var/datum/gas_mixture/environment = tile.return_air()
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))
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.sleeping_agent) || (environment.agent_b))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
//Take a gas sample
@@ -250,14 +249,13 @@
filtered_out.carbon_dioxide = removed.carbon_dioxide
removed.carbon_dioxide = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
else if(istype(trace_gas, /datum/gas/sleeping_agent) && scrub_N2O)
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
if(removed.agent_b)
filtered_out.agent_b = removed.agent_b
removed.agent_b = 0
if(scrub_N2O)
filtered_out.sleeping_agent = removed.sleeping_agent
removed.sleeping_agent = 0
//Remix the resulting gases
air_contents.merge(filtered_out)
@@ -286,7 +284,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
return 0
if(signal.data["power"] != null)
@@ -354,15 +352,10 @@
<ul>
<li><b>Frequency:</b> <a href="?src=[UID()];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=[UID()];set_freq=[ATMOS_VENTSCRUB]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag", "set_id")]</li>
<li><b>AAC Acces:</b> <a href="?src=[UID()];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a>
</ul>
"}
/obj/machinery/atmospherics/unary/vent_scrubber/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return TRUE
if("set_id" in href_list)
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src:id_tag) as null|text),1,MAX_MESSAGE_LEN)
if(!newid)
+16 -34
View File
@@ -127,20 +127,15 @@ GLOBAL_VAR_INIT(pipenetwarnings, 10)
member.air_temporary = new
member.air_temporary.volume = member.volume
member.air_temporary.oxygen = air.oxygen*member.volume/air.volume
member.air_temporary.nitrogen = air.nitrogen*member.volume/air.volume
member.air_temporary.toxins = air.toxins*member.volume/air.volume
member.air_temporary.carbon_dioxide = air.carbon_dioxide*member.volume/air.volume
member.air_temporary.oxygen = air.oxygen * member.volume / air.volume
member.air_temporary.nitrogen = air.nitrogen * member.volume / air.volume
member.air_temporary.toxins = air.toxins * member.volume / air.volume
member.air_temporary.carbon_dioxide = air.carbon_dioxide * member.volume / air.volume
member.air_temporary.sleeping_agent = air.sleeping_agent * member.volume / air.volume
member.air_temporary.agent_b = air.agent_b * member.volume / air.volume
member.air_temporary.temperature = air.temperature
if(air.trace_gases.len)
for(var/datum/gas/trace_gas in air.trace_gases)
var/datum/gas/corresponding = new trace_gas.type()
member.air_temporary.trace_gases += corresponding
corresponding.moles = trace_gas.moles*member.volume/air.volume
/datum/pipeline/proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
var/total_heat_capacity = air.heat_capacity()
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
@@ -228,7 +223,8 @@ GLOBAL_VAR_INIT(pipenetwarnings, 10)
var/total_nitrogen = 0
var/total_toxins = 0
var/total_carbon_dioxide = 0
var/list/total_trace_gases = list()
var/total_sleeping_agent = 0
var/total_agent_b = 0
for(var/datum/gas_mixture/G in GL)
total_volume += G.volume
@@ -239,15 +235,8 @@ GLOBAL_VAR_INIT(pipenetwarnings, 10)
total_nitrogen += G.nitrogen
total_toxins += G.toxins
total_carbon_dioxide += G.carbon_dioxide
if(G.trace_gases.len)
for(var/datum/gas/trace_gas in G.trace_gases)
var/datum/gas/corresponding = locate(trace_gas.type) in total_trace_gases
if(!corresponding)
corresponding = new trace_gas.type()
total_trace_gases += corresponding
corresponding.moles += trace_gas.moles
total_sleeping_agent += G.sleeping_agent
total_agent_b += G.agent_b
if(total_volume > 0)
@@ -259,18 +248,11 @@ GLOBAL_VAR_INIT(pipenetwarnings, 10)
//Update individual gas_mixtures by volume ratio
for(var/datum/gas_mixture/G in GL)
G.oxygen = total_oxygen*G.volume/total_volume
G.nitrogen = total_nitrogen*G.volume/total_volume
G.toxins = total_toxins*G.volume/total_volume
G.carbon_dioxide = total_carbon_dioxide*G.volume/total_volume
G.oxygen = total_oxygen * G.volume / total_volume
G.nitrogen = total_nitrogen * G.volume / total_volume
G.toxins = total_toxins * G.volume / total_volume
G.carbon_dioxide = total_carbon_dioxide * G.volume / total_volume
G.sleeping_agent = total_sleeping_agent * G.volume / total_volume
G.agent_b = total_agent_b * G.volume / total_volume
G.temperature = temperature
if(total_trace_gases.len)
for(var/datum/gas/trace_gas in total_trace_gases)
var/datum/gas/corresponding = locate(trace_gas.type) in G.trace_gases
if(!corresponding)
corresponding = new trace_gas.type()
G.trace_gases += corresponding
corresponding.moles = trace_gas.moles*G.volume/total_volume
+8 -4
View File
@@ -142,7 +142,7 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5)
return
T.atmos_spawn_air(text, amount)
/turf/simulated/proc/atmos_spawn_air(var/flag, var/amount)
/turf/simulated/proc/atmos_spawn_air(flag, amount)
if(!text || !amount || !air)
return
@@ -156,17 +156,21 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5)
if(flag & LINDA_SPAWN_TOXINS)
G.toxins += amount
if(flag & LINDA_SPAWN_OXYGEN)
G.oxygen += amount
if(flag & LINDA_SPAWN_CO2)
G.carbon_dioxide += amount
if(flag & LINDA_SPAWN_NITROGEN)
G.nitrogen += amount
if(flag & LINDA_SPAWN_N2O)
var/datum/gas/sleeping_agent/T = new
T.moles += amount
G.trace_gases += T
G.sleeping_agent += amount
if(flag & LINDA_SPAWN_AGENT_B)
G.agent_b += amount
if(flag & LINDA_SPAWN_AIR)
G.oxygen += MOLES_O2STANDARD * amount
+42 -37
View File
@@ -19,20 +19,24 @@
GM.carbon_dioxide = carbon_dioxide
GM.nitrogen = nitrogen
GM.toxins = toxins
GM.sleeping_agent = sleeping_agent
GM.agent_b = agent_b
GM.temperature = temperature
return GM
/turf/remove_air(amount as num)
/turf/remove_air(amount)
var/datum/gas_mixture/GM = new
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
if(sum>0)
GM.oxygen = (oxygen/sum)*amount
GM.carbon_dioxide = (carbon_dioxide/sum)*amount
GM.nitrogen = (nitrogen/sum)*amount
GM.toxins = (toxins/sum)*amount
var/sum = oxygen + carbon_dioxide + nitrogen + toxins + sleeping_agent + agent_b
if(sum > 0)
GM.oxygen = (oxygen / sum) * amount
GM.carbon_dioxide = (carbon_dioxide / sum) * amount
GM.nitrogen = (nitrogen / sum) * amount
GM.toxins = (toxins / sum) * amount
GM.sleeping_agent = (sleeping_agent / sum) * amount
GM.agent_b = (agent_b / sum) * amount
GM.temperature = temperature
@@ -53,7 +57,7 @@
var/temperature_archived //USED ONLY FOR SOLIDS
var/atmos_overlay_type = "" //current active overlay
var/atmos_overlay_type = null //current active overlay
/turf/simulated/New()
..()
@@ -64,6 +68,8 @@
air.carbon_dioxide = carbon_dioxide
air.nitrogen = nitrogen
air.toxins = toxins
air.sleeping_agent = sleeping_agent
air.agent_b = agent_b
air.temperature = temperature
@@ -100,7 +106,7 @@
else
return ..()
/turf/simulated/remove_air(amount as num)
/turf/simulated/remove_air(amount)
if(air)
var/datum/gas_mixture/removed = null
@@ -155,7 +161,7 @@
var/turf/enemy_tile = get_step(src, direction)
if(istype(enemy_tile,/turf/simulated))
if(istype(enemy_tile, /turf/simulated))
var/turf/simulated/enemy_simulated = enemy_tile
if(current_cycle > enemy_simulated.current_cycle)
@@ -211,7 +217,13 @@
if(planet_atmos) //share our air with the "atmosphere" "above" the turf
var/datum/gas_mixture/G = new
G.copy_from_turf(src)
G.oxygen = oxygen
G.carbon_dioxide = carbon_dioxide
G.nitrogen = nitrogen
G.toxins = toxins
G.sleeping_agent = sleeping_agent
G.agent_b = agent_b
G.temperature = initial(temperature) // Temperature is modified at runtime; we only care about the turf's initial temperature
G.archive()
if(!air.compare(G))
if(!excited_group)
@@ -271,8 +283,7 @@
if(air.toxins > MOLES_PLASMA_VISIBLE)
return "plasma"
var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air.trace_gases
if(sleeping_agent && (sleeping_agent.moles > 1))
if(air.sleeping_agent > 1)
return "sleeping_agent"
return null
@@ -340,7 +351,7 @@
reset_cooldowns()
/datum/excited_group/proc/merge_groups(var/datum/excited_group/E)
if(turf_list.len > E.turf_list.len)
if(length(turf_list) > length(E.turf_list))
SSair.excited_groups -= E
for(var/turf/simulated/T in E.turf_list)
T.excited_group = src
@@ -358,32 +369,26 @@
/datum/excited_group/proc/self_breakdown()
var/datum/gas_mixture/A = new
var/datum/gas/sleeping_agent/S = new
A.trace_gases += S
for(var/turf/simulated/T in turf_list)
A.oxygen += T.air.oxygen
A.carbon_dioxide+= T.air.carbon_dioxide
A.nitrogen += T.air.nitrogen
A.toxins += T.air.toxins
if(T.air.trace_gases.len)
for(var/datum/gas/N in T.air.trace_gases)
S.moles += N.moles
var/list/cached_turf_list = turf_list // cache for super speed
for(var/turf/simulated/T in turf_list)
T.air.oxygen = A.oxygen/turf_list.len
T.air.carbon_dioxide= A.carbon_dioxide/turf_list.len
T.air.nitrogen = A.nitrogen/turf_list.len
T.air.toxins = A.toxins/turf_list.len
for(var/turf/simulated/T in cached_turf_list)
A.oxygen += T.air.oxygen
A.carbon_dioxide += T.air.carbon_dioxide
A.nitrogen += T.air.nitrogen
A.toxins += T.air.toxins
A.sleeping_agent += T.air.sleeping_agent
A.agent_b += T.air.agent_b
if(S.moles > 0)
if(T.air.trace_gases.len)
for(var/datum/gas/G in T.air.trace_gases)
G.moles = S.moles/turf_list.len
else
var/datum/gas/sleeping_agent/G = new
G.moles = S.moles/turf_list.len
T.air.trace_gases += G
var/turflen = length(cached_turf_list)
for(var/turf/simulated/T in cached_turf_list)
T.air.oxygen = A.oxygen / turflen
T.air.carbon_dioxide = A.carbon_dioxide / turflen
T.air.nitrogen = A.nitrogen / turflen
T.air.toxins = A.toxins / turflen
T.air.sleeping_agent = A.sleeping_agent / turflen
T.air.agent_b = A.agent_b / turflen
T.update_visuals()
+3 -4
View File
@@ -32,17 +32,16 @@
// (Requires a MC restart to change)
#define SS_NO_FIRE 2
//subsystem only runs on spare cpu (after all non-background subsystems have ran that tick)
// SS_BACKGROUND has its own priority bracket
/** Subsystem only runs on spare cpu (after all non-background subsystems have ran that tick) */
/// SS_BACKGROUND has its own priority bracket, this overrides SS_TICKER's priority bump
#define SS_BACKGROUND 4
//subsystem does not tick check, and should not run unless there is enough time (or its running behind (unless background))
#define SS_NO_TICK_CHECK 8
//Treat wait as a tick count, not DS, run every wait ticks.
// (also forces it to run first in the tick, above even SS_NO_TICK_CHECK subsystems)
/// (also forces it to run first in the tick (unless SS_BACKGROUND))
// (implies all runlevels because of how it works)
// (overrides SS_BACKGROUND)
// This is designed for basically anything that works as a mini-mc (like SStimer)
#define SS_TICKER 16
+1 -2
View File
@@ -431,7 +431,6 @@
#define LINDA_SPAWN_OXYGEN 8
#define LINDA_SPAWN_CO2 16
#define LINDA_SPAWN_NITROGEN 32
#define LINDA_SPAWN_N2O 64
#define LINDA_SPAWN_AGENT_B 128
#define LINDA_SPAWN_AIR 256
+2
View File
@@ -18,6 +18,8 @@ GLOBAL_LIST_EMPTY(player_list) //List of all mobs **with clients attached**.
GLOBAL_LIST_EMPTY(mob_list) //List of all mobs, including clientless
GLOBAL_LIST_EMPTY(silicon_mob_list) //List of all silicon mobs, including clientless
GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain simple animals
GLOBAL_LIST_EMPTY(human_list) //all instances of /mob/living/carbon/human and subtypes
GLOBAL_LIST_EMPTY(spirits) //List of all the spirits, including Masks
GLOBAL_LIST_EMPTY(alive_mob_list) //List of all alive mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_EMPTY(dead_mob_list) //List of all dead mobs, including clientless. Excludes /mob/new_player
+1 -1
View File
@@ -14,7 +14,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
var/datum/controller/exclude_these = new
gvars_datum_in_built_vars = exclude_these.vars + list("gvars_datum_protected_varlist", "gvars_datum_in_built_vars", "gvars_datum_init_order")
qdel(exclude_these)
QDEL_IN(exclude_these, 0) //signal logging isn't ready
Initialize()
+8 -7
View File
@@ -451,14 +451,15 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
// in those cases, so we just let them run)
if(queue_node_flags & SS_NO_TICK_CHECK)
if(queue_node.tick_usage > TICK_LIMIT_RUNNING - TICK_USAGE && ran_non_ticker)
queue_node.queued_priority += queue_priority_count * 0.1
queue_priority_count -= queue_node_priority
queue_priority_count += queue_node.queued_priority
current_tick_budget -= queue_node_priority
queue_node = queue_node.queue_next
if(!(queue_node_flags & SS_BACKGROUND))
queue_node.queued_priority += queue_priority_count * 0.1
queue_priority_count -= queue_node_priority
queue_priority_count += queue_node.queued_priority
current_tick_budget -= queue_node_priority
queue_node = queue_node.queue_next
continue
if((queue_node_flags & SS_BACKGROUND) && !bg_calc)
if(!bg_calc && (queue_node_flags & SS_BACKGROUND))
current_tick_budget = queue_priority_count_bg
bg_calc = TRUE
@@ -511,7 +512,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
queue_node.paused_ticks = 0
queue_node.paused_tick_usage = 0
if(queue_node_flags & SS_BACKGROUND) //update our running total
if(bg_calc) //update our running total
queue_priority_count_bg -= queue_node_priority
else
queue_priority_count -= queue_node_priority
+1 -1
View File
@@ -89,7 +89,7 @@
queue_node_flags = queue_node.flags
if(queue_node_flags & SS_TICKER)
if(!(SS_flags & SS_TICKER))
if((SS_flags & (SS_TICKER|SS_BACKGROUND)) != SS_TICKER)
continue
if(queue_node_priority < SS_priority)
break
+5
View File
@@ -121,3 +121,8 @@ SUBSYSTEM_DEF(input)
for(var/i in 1 to clients.len)
var/client/C = clients[i]
C.keyLoop()
/datum/controller/subsystem/input/Recover()
macro_sets = SSinput.macro_sets
movement_keys = SSinput.movement_keys
alt_movement_keys = SSinput.alt_movement_keys
+26 -36
View File
@@ -4,7 +4,7 @@ GLOBAL_DATUM_INIT(crew_repository, /datum/repository/crew, new())
cache_data = list()
..()
/datum/repository/crew/proc/health_data(var/turf/T)
/datum/repository/crew/proc/health_data(turf/T)
var/list/crewmembers = list()
if(!T)
return crewmembers
@@ -18,50 +18,40 @@ GLOBAL_DATUM_INIT(crew_repository, /datum/repository/crew, new())
if(world.time < cache_entry.timestamp)
return cache_entry.data
var/tracked = scan()
for(var/obj/item/clothing/under/C in tracked)
for(var/thing in GLOB.human_list)
var/mob/living/carbon/human/H = thing
var/obj/item/clothing/under/C = H.w_uniform
if(!C || C.sensor_mode == SUIT_SENSOR_OFF || !C.has_sensor)
continue
var/turf/pos = get_turf(C)
if((C) && (C.has_sensor) && (pos) && (T && pos.z == T.z) && (C.sensor_mode != SUIT_SENSOR_OFF))
if(istype(C.loc, /mob/living/carbon/human))
var/mob/living/carbon/human/H = C.loc
if(H.w_uniform != C)
continue
if(!T || pos.z != T.z)
continue
var/list/crewmemberData = list("dead"=0, "oxy"=-1, "tox"=-1, "fire"=-1, "brute"=-1, "area"="", "x"=-1, "y"=-1, "ref" = "\ref[H]")
var/list/crewmemberData = list("dead"=0, "oxy"=-1, "tox"=-1, "fire"=-1, "brute"=-1, "area"="", "x"=-1, "y"=-1, "ref" = "\ref[H]")
crewmemberData["sensor_type"] = C.sensor_mode
crewmemberData["name"] = H.get_authentification_name(if_no_id="Unknown")
crewmemberData["rank"] = H.get_authentification_rank(if_no_id="Unknown", if_no_job="No Job")
crewmemberData["assignment"] = H.get_assignment(if_no_id="Unknown", if_no_job="No Job")
crewmemberData["sensor_type"] = C.sensor_mode
crewmemberData["name"] = H.get_authentification_name(if_no_id="Unknown")
crewmemberData["rank"] = H.get_authentification_rank(if_no_id="Unknown", if_no_job="No Job")
crewmemberData["assignment"] = H.get_assignment(if_no_id="Unknown", if_no_job="No Job")
if(C.sensor_mode >= SUIT_SENSOR_BINARY)
crewmemberData["dead"] = H.stat > UNCONSCIOUS
if(C.sensor_mode >= SUIT_SENSOR_BINARY)
crewmemberData["dead"] = H.stat > UNCONSCIOUS
if(C.sensor_mode >= SUIT_SENSOR_VITAL)
crewmemberData["oxy"] = round(H.getOxyLoss(), 1)
crewmemberData["tox"] = round(H.getToxLoss(), 1)
crewmemberData["fire"] = round(H.getFireLoss(), 1)
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
if(C.sensor_mode >= SUIT_SENSOR_VITAL)
crewmemberData["oxy"] = round(H.getOxyLoss(), 1)
crewmemberData["tox"] = round(H.getToxLoss(), 1)
crewmemberData["fire"] = round(H.getFireLoss(), 1)
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
if(C.sensor_mode >= SUIT_SENSOR_TRACKING)
var/area/A = get_area(H)
crewmemberData["area"] = sanitize(A.name)
crewmemberData["x"] = pos.x
crewmemberData["y"] = pos.y
if(C.sensor_mode >= SUIT_SENSOR_TRACKING)
var/area/A = get_area(H)
crewmemberData["area"] = sanitize(A.name)
crewmemberData["x"] = pos.x
crewmemberData["y"] = pos.y
crewmembers[++crewmembers.len] = crewmemberData
crewmembers[++crewmembers.len] = crewmemberData
crewmembers = sortByKey(crewmembers, "name")
cache_entry.timestamp = world.time + 5 SECONDS
cache_entry.data = crewmembers
return crewmembers
/datum/repository/crew/proc/scan()
var/list/tracked = list()
for(var/mob/living/carbon/human/H in GLOB.mob_list)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/C = H.w_uniform
if(C.has_sensor)
tracked |= C
return tracked
+55
View File
@@ -0,0 +1,55 @@
/datum/component/swarming
var/offset_x = 0
var/offset_y = 0
var/is_swarming = FALSE
var/list/swarm_members = list()
/datum/component/swarming/Initialize(max_x = 24, max_y = 24)
if(!ismovableatom(parent))
return COMPONENT_INCOMPATIBLE
offset_x = rand(-max_x, max_x)
offset_y = rand(-max_y, max_y)
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/join_swarm)
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm)
/datum/component/swarming/Destroy()
for(var/other in swarm_members)
var/datum/component/swarming/other_swarm = other
other_swarm.swarm_members -= src
if(!other_swarm.swarm_members.len)
other_swarm.unswarm()
swarm_members = null
return ..()
/datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM)
var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
if(!other_swarm)
return
swarm()
swarm_members |= other_swarm
other_swarm.swarm()
other_swarm.swarm_members |= src
/datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM)
var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
if(!other_swarm || !(other_swarm in swarm_members))
return
swarm_members -= other_swarm
if(!swarm_members.len)
unswarm()
other_swarm.swarm_members -= src
if(!other_swarm.swarm_members.len)
other_swarm.unswarm()
/datum/component/swarming/proc/swarm()
var/atom/movable/owner = parent
if(!is_swarming)
is_swarming = TRUE
animate(owner, pixel_x = owner.pixel_x + offset_x, pixel_y = owner.pixel_y + offset_y, time = 2)
/datum/component/swarming/proc/unswarm()
var/atom/movable/owner = parent
if(is_swarming)
animate(owner, pixel_x = owner.pixel_x - offset_x, pixel_y = owner.pixel_y - offset_y, time = 2)
is_swarming = FALSE
+176 -289
View File
@@ -7,33 +7,22 @@ What are the archived variables for?
#define SPECIFIC_HEAT_TOXIN 200
#define SPECIFIC_HEAT_AIR 20
#define SPECIFIC_HEAT_CDO 30
#define HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins) \
(carbon_dioxide*SPECIFIC_HEAT_CDO + (oxygen+nitrogen)*SPECIFIC_HEAT_AIR + toxins*SPECIFIC_HEAT_TOXIN)
#define SPECIFIC_HEAT_N2O 40
#define SPECIFIC_HEAT_AGENT_B 300
#define HEAT_CAPACITY_CALCULATION(oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b) \
(carbon_dioxide * SPECIFIC_HEAT_CDO + (oxygen + nitrogen) * SPECIFIC_HEAT_AIR + toxins * SPECIFIC_HEAT_TOXIN + sleeping_agent * SPECIFIC_HEAT_N2O + agent_b * SPECIFIC_HEAT_AGENT_B)
#define MINIMUM_HEAT_CAPACITY 0.0003
#define QUANTIZE(variable) (round(variable,0.0001))
/datum/gas
var/moles = 0
var/specific_heat = 0
var/moles_archived = 0
/datum/gas/sleeping_agent
specific_heat = 40
/datum/gas/oxygen_agent_b
specific_heat = 300
/datum/gas/volatile_fuel
specific_heat = 30
#define QUANTIZE(variable) (round(variable, 0.0001))
/datum/gas_mixture
var/oxygen = 0
var/carbon_dioxide = 0
var/nitrogen = 0
var/toxins = 0
var/sleeping_agent = 0
var/agent_b = 0
var/volume = CELL_VOLUME
@@ -41,13 +30,12 @@ What are the archived variables for?
var/last_share
var/list/datum/gas/trace_gases = list()
var/tmp/oxygen_archived
var/tmp/carbon_dioxide_archived
var/tmp/nitrogen_archived
var/tmp/toxins_archived
var/tmp/sleeping_agent_archived
var/tmp/agent_b_archived
var/tmp/temperature_archived
@@ -55,35 +43,24 @@ What are the archived variables for?
//PV=nRT - related procedures
/datum/gas_mixture/proc/heat_capacity()
var/heat_capacity = HEAT_CAPACITY_CALCULATION(oxygen,carbon_dioxide,nitrogen,toxins)
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
heat_capacity += trace_gas.moles*trace_gas.specific_heat
return heat_capacity
return HEAT_CAPACITY_CALCULATION(oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b)
/datum/gas_mixture/proc/heat_capacity_archived()
var/heat_capacity_archived = HEAT_CAPACITY_CALCULATION(oxygen_archived,carbon_dioxide_archived,nitrogen_archived,toxins_archived)
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
heat_capacity_archived += trace_gas.moles_archived*trace_gas.specific_heat
return heat_capacity_archived
return HEAT_CAPACITY_CALCULATION(oxygen_archived, carbon_dioxide_archived, nitrogen_archived, toxins_archived, sleeping_agent_archived, agent_b_archived)
/datum/gas_mixture/proc/total_moles()
var/moles = oxygen + carbon_dioxide + nitrogen + toxins
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
moles += trace_gas.moles
var/moles = oxygen + carbon_dioxide + nitrogen + toxins + sleeping_agent + agent_b
return moles
/datum/gas_mixture/proc/total_trace_moles()
var/moles = sleeping_agent + agent_b
return moles
/datum/gas_mixture/proc/return_pressure()
if(volume>0)
return total_moles()*R_IDEAL_GAS_EQUATION*temperature/volume
if(volume > 0)
return total_moles() * R_IDEAL_GAS_EQUATION * temperature / volume
return 0
@@ -96,7 +73,7 @@ What are the archived variables for?
/datum/gas_mixture/proc/thermal_energy()
return temperature*heat_capacity()
return temperature * heat_capacity()
//Procedures used for very specific events
@@ -105,28 +82,23 @@ What are the archived variables for?
/datum/gas_mixture/proc/react(atom/dump_location)
var/reacting = 0 //set to 1 if a notable reaction occured (used by pipe_network)
if(trace_gases.len > 0)
if(temperature > 900)
if(toxins > MINIMUM_HEAT_CAPACITY && carbon_dioxide > MINIMUM_HEAT_CAPACITY)
var/datum/gas/oxygen_agent_b/trace_gas = locate(/datum/gas/oxygen_agent_b/) in trace_gases
if(trace_gas)
var/reaction_rate = min(carbon_dioxide*0.75, toxins*0.25, trace_gas.moles*0.05)
if(agent_b && temperature > 900)
if(toxins > MINIMUM_HEAT_CAPACITY && carbon_dioxide > MINIMUM_HEAT_CAPACITY)
var/reaction_rate = min(carbon_dioxide * 0.75, toxins * 0.25, agent_b * 0.05)
carbon_dioxide -= reaction_rate
oxygen += reaction_rate
carbon_dioxide -= reaction_rate
oxygen += reaction_rate
trace_gas.moles -= reaction_rate*0.05
agent_b -= reaction_rate * 0.05
temperature += (reaction_rate*20000)/heat_capacity()
temperature += (reaction_rate * 20000) / heat_capacity()
reacting = 1
reacting = 1
fuel_burnt = 0
if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
// to_chat(world, "pre [temperature], [oxygen], [toxins]")
if(fire() > 0)
reacting = 1
// to_chat(world, "post [temperature], [oxygen], [toxins]")
return reacting
@@ -134,24 +106,6 @@ What are the archived variables for?
var/energy_released = 0
var/old_heat_capacity = heat_capacity()
var/datum/gas/volatile_fuel/fuel_store = locate(/datum/gas/volatile_fuel/) in trace_gases
if(fuel_store) //General volatile gas burn
var/burned_fuel = 0
if(oxygen < fuel_store.moles)
burned_fuel = oxygen
fuel_store.moles -= burned_fuel
oxygen = 0
else
burned_fuel = fuel_store.moles
oxygen -= fuel_store.moles
trace_gases -= fuel_store
fuel_store = null
energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel
carbon_dioxide += burned_fuel
fuel_burnt += burned_fuel
//Handle plasma burning
if(toxins > MINIMUM_HEAT_CAPACITY)
var/plasma_burn_rate = 0
@@ -161,13 +115,13 @@ What are the archived variables for?
if(temperature > PLASMA_UPPER_TEMPERATURE)
temperature_scale = 1
else
temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE)
temperature_scale = (temperature - PLASMA_MINIMUM_BURN_TEMPERATURE) / (PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE)
if(temperature_scale > 0)
oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale
if(oxygen > toxins*PLASMA_OXYGEN_FULLBURN)
plasma_burn_rate = (toxins*temperature_scale)/PLASMA_BURN_RATE_DELTA
if(oxygen > toxins * PLASMA_OXYGEN_FULLBURN)
plasma_burn_rate = (toxins * temperature_scale) / PLASMA_BURN_RATE_DELTA
else
plasma_burn_rate = (temperature_scale*(oxygen/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
plasma_burn_rate = (temperature_scale * (oxygen / PLASMA_OXYGEN_FULLBURN)) / PLASMA_BURN_RATE_DELTA
if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY)
toxins -= plasma_burn_rate
oxygen -= plasma_burn_rate*oxygen_burn_rate
@@ -175,12 +129,12 @@ What are the archived variables for?
energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate)
fuel_burnt += (plasma_burn_rate)*(1+oxygen_burn_rate)
fuel_burnt += (plasma_burn_rate) * (1 + oxygen_burn_rate)
if(energy_released > 0)
var/new_heat_capacity = heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
temperature = (temperature*old_heat_capacity + energy_released)/new_heat_capacity
temperature = (temperature * old_heat_capacity + energy_released) / new_heat_capacity
return fuel_burnt
@@ -231,10 +185,8 @@ What are the archived variables for?
carbon_dioxide_archived = carbon_dioxide
nitrogen_archived = nitrogen
toxins_archived = toxins
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
trace_gas.moles_archived = trace_gas.moles
sleeping_agent_archived = sleeping_agent
agent_b_archived = agent_b
temperature_archived = temperature
@@ -244,55 +196,45 @@ What are the archived variables for?
if(!giver)
return 0
if(abs(temperature-giver.temperature)>MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
if(abs(temperature - giver.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/self_heat_capacity = heat_capacity()
var/giver_heat_capacity = giver.heat_capacity()
var/combined_heat_capacity = giver_heat_capacity + self_heat_capacity
if(combined_heat_capacity != 0)
temperature = (giver.temperature*giver_heat_capacity + temperature*self_heat_capacity)/combined_heat_capacity
temperature = (giver.temperature * giver_heat_capacity + temperature * self_heat_capacity) / combined_heat_capacity
oxygen += giver.oxygen
carbon_dioxide += giver.carbon_dioxide
nitrogen += giver.nitrogen
toxins += giver.toxins
for(var/gas in giver.trace_gases)
var/datum/gas/trace_gas = gas
var/datum/gas/corresponding = locate(trace_gas.type) in trace_gases
if(!corresponding)
corresponding = new trace_gas.type()
trace_gases += corresponding
corresponding.moles += trace_gas.moles
sleeping_agent += giver.sleeping_agent
agent_b += giver.agent_b
return 1
/datum/gas_mixture/remove(amount)
var/sum = total_moles()
amount = min(amount,sum) //Can not take more air than tile has!
amount = min(amount, sum) //Can not take more air than tile has!
if(amount <= 0)
return null
var/datum/gas_mixture/removed = new
removed.oxygen = QUANTIZE((oxygen/sum)*amount)
removed.nitrogen = QUANTIZE((nitrogen/sum)*amount)
removed.carbon_dioxide = QUANTIZE((carbon_dioxide/sum)*amount)
removed.toxins = QUANTIZE((toxins/sum)*amount)
removed.oxygen = QUANTIZE((oxygen / sum) * amount)
removed.nitrogen = QUANTIZE((nitrogen/ sum) * amount)
removed.carbon_dioxide = QUANTIZE((carbon_dioxide / sum) * amount)
removed.toxins = QUANTIZE((toxins / sum) * amount)
removed.sleeping_agent = QUANTIZE((sleeping_agent / sum) * amount)
removed.agent_b = QUANTIZE((agent_b / sum) * amount)
oxygen -= removed.oxygen
nitrogen -= removed.nitrogen
carbon_dioxide -= removed.carbon_dioxide
toxins -= removed.toxins
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
var/datum/gas/corresponding = new trace_gas.type()
removed.trace_gases += corresponding
corresponding.moles = (trace_gas.moles/sum)*amount
trace_gas.moles -= corresponding.moles
sleeping_agent -= removed.sleeping_agent
agent_b -= removed.agent_b
removed.temperature = temperature
@@ -307,23 +249,19 @@ What are the archived variables for?
var/datum/gas_mixture/removed = new
removed.oxygen = QUANTIZE(oxygen*ratio)
removed.nitrogen = QUANTIZE(nitrogen*ratio)
removed.carbon_dioxide = QUANTIZE(carbon_dioxide*ratio)
removed.toxins = QUANTIZE(toxins*ratio)
removed.oxygen = QUANTIZE(oxygen * ratio)
removed.nitrogen = QUANTIZE(nitrogen * ratio)
removed.carbon_dioxide = QUANTIZE(carbon_dioxide * ratio)
removed.toxins = QUANTIZE(toxins * ratio)
removed.sleeping_agent = QUANTIZE(sleeping_agent * ratio)
removed.agent_b = QUANTIZE(agent_b * ratio)
oxygen -= removed.oxygen
nitrogen -= removed.nitrogen
carbon_dioxide -= removed.carbon_dioxide
toxins -= removed.toxins
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
var/datum/gas/corresponding = new trace_gas.type()
removed.trace_gases += corresponding
corresponding.moles = trace_gas.moles*ratio
trace_gas.moles -= corresponding.moles
sleeping_agent -= removed.sleeping_agent
agent_b -= removed.agent_b
removed.temperature = temperature
@@ -334,14 +272,8 @@ What are the archived variables for?
carbon_dioxide = sample.carbon_dioxide
nitrogen = sample.nitrogen
toxins = sample.toxins
trace_gases.len=null
for(var/gas in sample.trace_gases)
var/datum/gas/trace_gas = gas
var/datum/gas/corresponding = new trace_gas.type()
trace_gases += corresponding
corresponding.moles = trace_gas.moles
sleeping_agent = sample.sleeping_agent
agent_b = sample.agent_b
temperature = sample.temperature
@@ -352,6 +284,8 @@ What are the archived variables for?
carbon_dioxide = model.carbon_dioxide
nitrogen = model.nitrogen
toxins = model.toxins
sleeping_agent = model.sleeping_agent
agent_b = model.agent_b
//acounts for changes in temperature
var/turf/model_parent = model.parent_type
@@ -361,26 +295,25 @@ What are the archived variables for?
return 1
/datum/gas_mixture/check_turf(turf/model, atmos_adjacent_turfs = 4)
var/delta_oxygen = (oxygen_archived - model.oxygen)/(atmos_adjacent_turfs+1)
var/delta_carbon_dioxide = (carbon_dioxide_archived - model.carbon_dioxide)/(atmos_adjacent_turfs+1)
var/delta_nitrogen = (nitrogen_archived - model.nitrogen)/(atmos_adjacent_turfs+1)
var/delta_toxins = (toxins_archived - model.toxins)/(atmos_adjacent_turfs+1)
var/delta_oxygen = (oxygen_archived - model.oxygen) / (atmos_adjacent_turfs + 1)
var/delta_carbon_dioxide = (carbon_dioxide_archived - model.carbon_dioxide) / (atmos_adjacent_turfs + 1)
var/delta_nitrogen = (nitrogen_archived - model.nitrogen) / (atmos_adjacent_turfs + 1)
var/delta_toxins = (toxins_archived - model.toxins) / (atmos_adjacent_turfs + 1)
var/delta_sleeping_agent = (sleeping_agent_archived - model.sleeping_agent) / (atmos_adjacent_turfs + 1)
var/delta_agent_b = (agent_b_archived - model.agent_b) / (atmos_adjacent_turfs + 1)
var/delta_temperature = (temperature_archived - model.temperature)
if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= oxygen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= carbon_dioxide_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= nitrogen_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= toxins_archived*MINIMUM_AIR_RATIO_TO_SUSPEND)))
if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= oxygen_archived * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= carbon_dioxide_archived * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= nitrogen_archived * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= toxins_archived * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_sleeping_agent) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_sleeping_agent) >= sleeping_agent_archived * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_agent_b) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_agent_b) >= agent_b_archived * MINIMUM_AIR_RATIO_TO_SUSPEND)))
return 0
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND)
return 0
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
if(trace_gas.moles_archived > MINIMUM_AIR_TO_SUSPEND*4)
return 0
return 1
/datum/gas_mixture/proc/check_turf_total(turf/model) //I want this proc to die a painful death
@@ -388,30 +321,32 @@ What are the archived variables for?
var/delta_carbon_dioxide = (carbon_dioxide - model.carbon_dioxide)
var/delta_nitrogen = (nitrogen - model.nitrogen)
var/delta_toxins = (toxins - model.toxins)
var/delta_sleeping_agent = (sleeping_agent - model.sleeping_agent)
var/delta_agent_b = (agent_b - model.agent_b)
var/delta_temperature = (temperature - model.temperature)
if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= oxygen*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= carbon_dioxide*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= nitrogen*MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= toxins*MINIMUM_AIR_RATIO_TO_SUSPEND)))
if(((abs(delta_oxygen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_oxygen) >= oxygen * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_carbon_dioxide) >= carbon_dioxide * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_nitrogen) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_nitrogen) >= nitrogen * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_toxins) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_toxins) >= toxins * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_sleeping_agent) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_sleeping_agent) >= sleeping_agent * MINIMUM_AIR_RATIO_TO_SUSPEND)) \
|| ((abs(delta_agent_b) > MINIMUM_AIR_TO_SUSPEND) && (abs(delta_agent_b) >= agent_b * MINIMUM_AIR_RATIO_TO_SUSPEND)))
return 0
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND)
return 0
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
if(trace_gas.moles > MINIMUM_AIR_TO_SUSPEND*4)
return 0
return 1
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
if(!sharer) return 0
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived)/(atmos_adjacent_turfs+1)
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived)/(atmos_adjacent_turfs+1)
var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived)/(atmos_adjacent_turfs+1)
var/delta_toxins = QUANTIZE(toxins_archived - sharer.toxins_archived)/(atmos_adjacent_turfs+1)
if(!sharer)
return 0
var/delta_oxygen = QUANTIZE(oxygen_archived - sharer.oxygen_archived) / (atmos_adjacent_turfs + 1)
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - sharer.carbon_dioxide_archived) / (atmos_adjacent_turfs + 1)
var/delta_nitrogen = QUANTIZE(nitrogen_archived - sharer.nitrogen_archived) / (atmos_adjacent_turfs + 1)
var/delta_toxins = QUANTIZE(toxins_archived - sharer.toxins_archived) / (atmos_adjacent_turfs + 1)
var/delta_sleeping_agent = QUANTIZE(sleeping_agent_archived - sharer.sleeping_agent_archived) / (atmos_adjacent_turfs + 1)
var/delta_agent_b = QUANTIZE(agent_b_archived - sharer.agent_b_archived) / (atmos_adjacent_turfs + 1)
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
@@ -423,28 +358,42 @@ What are the archived variables for?
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/delta_air = delta_oxygen+delta_nitrogen
var/delta_air = delta_oxygen + delta_nitrogen
if(delta_air)
var/air_heat_capacity = SPECIFIC_HEAT_AIR*delta_air
var/air_heat_capacity = SPECIFIC_HEAT_AIR * delta_air
if(delta_air > 0)
heat_capacity_self_to_sharer += air_heat_capacity
else
heat_capacity_sharer_to_self -= air_heat_capacity
if(delta_carbon_dioxide)
var/carbon_dioxide_heat_capacity = SPECIFIC_HEAT_CDO*delta_carbon_dioxide
var/carbon_dioxide_heat_capacity = SPECIFIC_HEAT_CDO * delta_carbon_dioxide
if(delta_carbon_dioxide > 0)
heat_capacity_self_to_sharer += carbon_dioxide_heat_capacity
else
heat_capacity_sharer_to_self -= carbon_dioxide_heat_capacity
if(delta_toxins)
var/toxins_heat_capacity = SPECIFIC_HEAT_TOXIN*delta_toxins
var/toxins_heat_capacity = SPECIFIC_HEAT_TOXIN * delta_toxins
if(delta_toxins > 0)
heat_capacity_self_to_sharer += toxins_heat_capacity
else
heat_capacity_sharer_to_self -= toxins_heat_capacity
if(delta_sleeping_agent)
var/sleeping_agent_heat_capacity = SPECIFIC_HEAT_N2O * delta_sleeping_agent
if(delta_sleeping_agent > 0)
heat_capacity_self_to_sharer += sleeping_agent_heat_capacity
else
heat_capacity_sharer_to_self -= sleeping_agent_heat_capacity
if(delta_agent_b)
var/agent_b_heat_capacity = SPECIFIC_HEAT_AGENT_B * delta_agent_b
if(delta_agent_b > 0)
heat_capacity_self_to_sharer += agent_b_heat_capacity
else
heat_capacity_sharer_to_self -= agent_b_heat_capacity
old_self_heat_capacity = heat_capacity()
old_sharer_heat_capacity = sharer.heat_capacity()
@@ -460,83 +409,40 @@ What are the archived variables for?
toxins -= delta_toxins
sharer.toxins += delta_toxins
var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins)
last_share = abs(delta_oxygen) + abs(delta_carbon_dioxide) + abs(delta_nitrogen) + abs(delta_toxins)
sleeping_agent -= delta_sleeping_agent
sharer.sleeping_agent += delta_sleeping_agent
var/list/trace_types_considered = list()
agent_b -= delta_agent_b
sharer.agent_b += delta_agent_b
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
var/datum/gas/corresponding = locate(trace_gas.type) in sharer.trace_gases
var/delta = 0
if(corresponding)
delta = QUANTIZE(trace_gas.moles_archived - corresponding.moles_archived)/(atmos_adjacent_turfs+1)
else
corresponding = new trace_gas.type()
sharer.trace_gases += corresponding
delta = trace_gas.moles_archived/(atmos_adjacent_turfs+1)
trace_gas.moles -= delta
corresponding.moles += delta
if(delta)
var/individual_heat_capacity = trace_gas.specific_heat*delta
if(delta > 0)
heat_capacity_self_to_sharer += individual_heat_capacity
else
heat_capacity_sharer_to_self -= individual_heat_capacity
moved_moles += delta
last_share += abs(delta)
trace_types_considered += trace_gas.type
for(var/gas in sharer.trace_gases)
var/datum/gas/trace_gas = gas
if(trace_gas.type in trace_types_considered)
continue
var/datum/gas/corresponding
var/delta = 0
corresponding = new trace_gas.type()
trace_gases += corresponding
delta = trace_gas.moles_archived/5
trace_gas.moles -= delta
corresponding.moles += delta
//Guaranteed transfer from sharer to self
var/individual_heat_capacity = trace_gas.specific_heat*delta
heat_capacity_sharer_to_self += individual_heat_capacity
moved_moles += -delta
last_share += abs(delta)
var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins + delta_sleeping_agent + delta_agent_b)
last_share = abs(delta_oxygen) + abs(delta_carbon_dioxide) + abs(delta_nitrogen) + abs(delta_toxins) + abs(delta_sleeping_agent) + abs(delta_agent_b)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/new_self_heat_capacity = old_self_heat_capacity + heat_capacity_sharer_to_self - heat_capacity_self_to_sharer
var/new_sharer_heat_capacity = old_sharer_heat_capacity + heat_capacity_self_to_sharer - heat_capacity_sharer_to_self
if(new_self_heat_capacity > MINIMUM_HEAT_CAPACITY)
temperature = (old_self_heat_capacity*temperature - heat_capacity_self_to_sharer*temperature_archived + heat_capacity_sharer_to_self*sharer.temperature_archived)/new_self_heat_capacity
temperature = (old_self_heat_capacity * temperature - heat_capacity_self_to_sharer * temperature_archived + heat_capacity_sharer_to_self * sharer.temperature_archived) / new_self_heat_capacity
if(new_sharer_heat_capacity > MINIMUM_HEAT_CAPACITY)
sharer.temperature = (old_sharer_heat_capacity*sharer.temperature-heat_capacity_sharer_to_self*sharer.temperature_archived + heat_capacity_self_to_sharer*temperature_archived)/new_sharer_heat_capacity
sharer.temperature = (old_sharer_heat_capacity * sharer.temperature - heat_capacity_sharer_to_self * sharer.temperature_archived + heat_capacity_self_to_sharer * temperature_archived) / new_sharer_heat_capacity
if(abs(old_sharer_heat_capacity) > MINIMUM_HEAT_CAPACITY)
if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.10) // <10% change in sharer heat capacity
if(abs(new_sharer_heat_capacity / old_sharer_heat_capacity - 1) < 0.10) // <10% change in sharer heat capacity
temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT)
if((delta_temperature > MINIMUM_TEMPERATURE_TO_MOVE) || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
var/delta_pressure = temperature_archived*(total_moles() + moved_moles) - sharer.temperature_archived*(sharer.total_moles() - moved_moles)
return delta_pressure*R_IDEAL_GAS_EQUATION/volume
var/delta_pressure = temperature_archived * (total_moles() + moved_moles) - sharer.temperature_archived * (sharer.total_moles() - moved_moles)
return delta_pressure * R_IDEAL_GAS_EQUATION / volume
/datum/gas_mixture/mimic(turf/model, atmos_adjacent_turfs = 4)
var/delta_oxygen = QUANTIZE(oxygen_archived - model.oxygen)/(atmos_adjacent_turfs+1)
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - model.carbon_dioxide)/(atmos_adjacent_turfs+1)
var/delta_nitrogen = QUANTIZE(nitrogen_archived - model.nitrogen)/(atmos_adjacent_turfs+1)
var/delta_toxins = QUANTIZE(toxins_archived - model.toxins)/(atmos_adjacent_turfs+1)
var/delta_oxygen = QUANTIZE(oxygen_archived - model.oxygen) / (atmos_adjacent_turfs + 1)
var/delta_carbon_dioxide = QUANTIZE(carbon_dioxide_archived - model.carbon_dioxide) / (atmos_adjacent_turfs + 1)
var/delta_nitrogen = QUANTIZE(nitrogen_archived - model.nitrogen) / (atmos_adjacent_turfs + 1)
var/delta_toxins = QUANTIZE(toxins_archived - model.toxins) / (atmos_adjacent_turfs + 1)
var/delta_sleeping_agent = QUANTIZE(sleeping_agent_archived - model.sleeping_agent) / (atmos_adjacent_turfs + 1)
var/delta_agent_b = QUANTIZE(agent_b_archived - model.agent_b) / (atmos_adjacent_turfs + 1)
var/delta_temperature = (temperature_archived - model.temperature)
@@ -546,57 +452,54 @@ What are the archived variables for?
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/delta_air = delta_oxygen+delta_nitrogen
var/delta_air = delta_oxygen + delta_nitrogen
if(delta_air)
var/air_heat_capacity = SPECIFIC_HEAT_AIR*delta_air
heat_transferred -= air_heat_capacity*model.temperature
var/air_heat_capacity = SPECIFIC_HEAT_AIR * delta_air
heat_transferred -= air_heat_capacity * model.temperature
heat_capacity_transferred -= air_heat_capacity
if(delta_carbon_dioxide)
var/carbon_dioxide_heat_capacity = SPECIFIC_HEAT_CDO*delta_carbon_dioxide
heat_transferred -= carbon_dioxide_heat_capacity*model.temperature
var/carbon_dioxide_heat_capacity = SPECIFIC_HEAT_CDO * delta_carbon_dioxide
heat_transferred -= carbon_dioxide_heat_capacity * model.temperature
heat_capacity_transferred -= carbon_dioxide_heat_capacity
if(delta_toxins)
var/toxins_heat_capacity = SPECIFIC_HEAT_TOXIN*delta_toxins
heat_transferred -= toxins_heat_capacity*model.temperature
var/toxins_heat_capacity = SPECIFIC_HEAT_TOXIN * delta_toxins
heat_transferred -= toxins_heat_capacity * model.temperature
heat_capacity_transferred -= toxins_heat_capacity
if(delta_sleeping_agent)
var/sleeping_agent_heat_capacity = SPECIFIC_HEAT_N2O * delta_sleeping_agent
heat_transferred -= sleeping_agent_heat_capacity * model.temperature
heat_capacity_transferred -= sleeping_agent_heat_capacity
if(delta_agent_b)
var/agent_b_heat_capacity = SPECIFIC_HEAT_AGENT_B * delta_agent_b
heat_transferred -= agent_b_heat_capacity * model.temperature
heat_capacity_transferred -= agent_b_heat_capacity
old_self_heat_capacity = heat_capacity()
oxygen -= delta_oxygen
carbon_dioxide -= delta_carbon_dioxide
nitrogen -= delta_nitrogen
toxins -= delta_toxins
sleeping_agent -= delta_sleeping_agent
agent_b -= delta_agent_b
var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins)
last_share = abs(delta_oxygen) + abs(delta_carbon_dioxide) + abs(delta_nitrogen) + abs(delta_toxins)
if(trace_gases.len)
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
var/delta = 0
delta = trace_gas.moles_archived/(atmos_adjacent_turfs+1)
trace_gas.moles -= delta
var/heat_cap_transferred = delta*trace_gas.specific_heat
heat_transferred += heat_cap_transferred*temperature_archived
heat_capacity_transferred += heat_cap_transferred
moved_moles += delta
moved_moles += abs(delta)
var/moved_moles = (delta_oxygen + delta_carbon_dioxide + delta_nitrogen + delta_toxins + delta_sleeping_agent + delta_agent_b)
last_share = abs(delta_oxygen) + abs(delta_carbon_dioxide) + abs(delta_nitrogen) + abs(delta_toxins) + abs(delta_sleeping_agent) + abs(delta_agent_b)
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
var/new_self_heat_capacity = old_self_heat_capacity - heat_capacity_transferred
if(new_self_heat_capacity > MINIMUM_HEAT_CAPACITY)
temperature = (old_self_heat_capacity*temperature - heat_capacity_transferred*temperature_archived)/new_self_heat_capacity
temperature = (old_self_heat_capacity * temperature - heat_capacity_transferred * temperature_archived) / new_self_heat_capacity
temperature_mimic(model, model.thermal_conductivity)
if((delta_temperature > MINIMUM_TEMPERATURE_TO_MOVE) || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
var/delta_pressure = temperature_archived*(total_moles() + moved_moles) - model.temperature*(model.oxygen+model.carbon_dioxide+model.nitrogen+model.toxins)
return delta_pressure*R_IDEAL_GAS_EQUATION/volume
var/delta_pressure = temperature_archived * (total_moles() + moved_moles) - model.temperature * (model.oxygen + model.carbon_dioxide + model.nitrogen + model.toxins + model.sleeping_agent + model.agent_b)
return delta_pressure * R_IDEAL_GAS_EQUATION / volume
else
return 0
@@ -608,11 +511,11 @@ What are the archived variables for?
var/sharer_heat_capacity = sharer.heat_capacity_archived()
if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
var/heat = conduction_coefficient*delta_temperature* \
(self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity))
var/heat = conduction_coefficient*delta_temperature * \
(self_heat_capacity * sharer_heat_capacity / (self_heat_capacity + sharer_heat_capacity))
temperature -= heat/self_heat_capacity
sharer.temperature += heat/sharer_heat_capacity
temperature -= heat / self_heat_capacity
sharer.temperature += heat / sharer_heat_capacity
/datum/gas_mixture/temperature_mimic(turf/model, conduction_coefficient)
var/delta_temperature = (temperature - model.temperature)
@@ -620,10 +523,10 @@ What are the archived variables for?
var/self_heat_capacity = heat_capacity()
if((model.heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
var/heat = conduction_coefficient*delta_temperature* \
(self_heat_capacity*model.heat_capacity/(self_heat_capacity+model.heat_capacity))
var/heat = conduction_coefficient * delta_temperature * \
(self_heat_capacity * model.heat_capacity / (self_heat_capacity + model.heat_capacity))
temperature -= heat/self_heat_capacity
temperature -= heat / self_heat_capacity
/datum/gas_mixture/temperature_turf_share(turf/simulated/sharer, conduction_coefficient)
var/delta_temperature = (temperature_archived - sharer.temperature)
@@ -631,52 +534,36 @@ What are the archived variables for?
var/self_heat_capacity = heat_capacity()
if((sharer.heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
var/heat = conduction_coefficient*delta_temperature* \
(self_heat_capacity*sharer.heat_capacity/(self_heat_capacity+sharer.heat_capacity))
var/heat = conduction_coefficient * delta_temperature * \
(self_heat_capacity * sharer.heat_capacity / (self_heat_capacity + sharer.heat_capacity))
temperature -= heat/self_heat_capacity
sharer.temperature += heat/sharer.heat_capacity
temperature -= heat / self_heat_capacity
sharer.temperature += heat / sharer.heat_capacity
/datum/gas_mixture/compare(datum/gas_mixture/sample)
if((abs(oxygen-sample.oxygen) > MINIMUM_AIR_TO_SUSPEND) && \
((oxygen < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.oxygen) || (oxygen > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.oxygen)))
if((abs(oxygen - sample.oxygen) > MINIMUM_AIR_TO_SUSPEND) && \
((oxygen < (1 - MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.oxygen) || (oxygen > (1 + MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.oxygen)))
return 0
if((abs(nitrogen-sample.nitrogen) > MINIMUM_AIR_TO_SUSPEND) && \
((nitrogen < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.nitrogen) || (nitrogen > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.nitrogen)))
if((abs(nitrogen - sample.nitrogen) > MINIMUM_AIR_TO_SUSPEND) && \
((nitrogen < (1 - MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.nitrogen) || (nitrogen > (1 + MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.nitrogen)))
return 0
if((abs(carbon_dioxide-sample.carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && \
((carbon_dioxide < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.carbon_dioxide) || (carbon_dioxide > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.carbon_dioxide)))
if((abs(carbon_dioxide - sample.carbon_dioxide) > MINIMUM_AIR_TO_SUSPEND) && \
((carbon_dioxide < (1 - MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.carbon_dioxide) || (carbon_dioxide > (1 + MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.carbon_dioxide)))
return 0
if((abs(toxins-sample.toxins) > MINIMUM_AIR_TO_SUSPEND) && \
((toxins < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.toxins) || (toxins > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*sample.toxins)))
if((abs(toxins - sample.toxins) > MINIMUM_AIR_TO_SUSPEND) && \
((toxins < (1 - MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.toxins) || (toxins > (1 + MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.toxins)))
return 0
if((abs(sleeping_agent - sample.sleeping_agent) > MINIMUM_AIR_TO_SUSPEND) && \
((sleeping_agent < (1 - MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.sleeping_agent) || (sleeping_agent > (1 + MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.sleeping_agent)))
return 0
if((abs(agent_b - sample.agent_b) > MINIMUM_AIR_TO_SUSPEND) && \
((agent_b < (1 - MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.agent_b) || (agent_b > (1 + MINIMUM_AIR_RATIO_TO_SUSPEND) * sample.agent_b)))
return 0
if(total_moles() > MINIMUM_AIR_TO_SUSPEND)
if((abs(temperature-sample.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && \
((temperature < (1-MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND)*sample.temperature) || (temperature > (1+MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND)*sample.temperature)))
if((abs(temperature - sample.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND) && \
((temperature < (1 - MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND) * sample.temperature) || (temperature > (1 + MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND) * sample.temperature)))
return 0
for(var/gas in sample.trace_gases)
var/datum/gas/trace_gas = gas
if(trace_gas.moles_archived > MINIMUM_AIR_TO_SUSPEND)
var/datum/gas/corresponding = locate(trace_gas.type) in trace_gases
if(corresponding)
if((abs(trace_gas.moles - corresponding.moles) > MINIMUM_AIR_TO_SUSPEND) && \
((corresponding.moles < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*trace_gas.moles) || (corresponding.moles > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*trace_gas.moles)))
return 0
else
return 0
for(var/gas in trace_gases)
var/datum/gas/trace_gas = gas
if(trace_gas.moles > MINIMUM_AIR_TO_SUSPEND)
var/datum/gas/corresponding = locate(trace_gas.type) in sample.trace_gases
if(corresponding)
if((abs(trace_gas.moles - corresponding.moles) > MINIMUM_AIR_TO_SUSPEND) && \
((trace_gas.moles < (1-MINIMUM_AIR_RATIO_TO_SUSPEND)*corresponding.moles) || (trace_gas.moles > (1+MINIMUM_AIR_RATIO_TO_SUSPEND)*corresponding.moles)))
return 0
else
return 0
return 1
@@ -691,12 +578,12 @@ What are the archived variables for?
//Does handle trace gases!
/datum/gas_mixture/proc/get_breath_partial_pressure(gas_pressure)
return (gas_pressure*R_IDEAL_GAS_EQUATION*temperature)/BREATH_VOLUME
return (gas_pressure * R_IDEAL_GAS_EQUATION * temperature) / BREATH_VOLUME
//Reverse of the above
/datum/gas_mixture/proc/get_true_breath_pressure(breath_pp)
return (breath_pp*BREATH_VOLUME)/(R_IDEAL_GAS_EQUATION*temperature)
return (breath_pp * BREATH_VOLUME) / (R_IDEAL_GAS_EQUATION * temperature)
//Mathematical proofs:
/*
+1 -1
View File
@@ -211,7 +211,7 @@
var/datum/gas_mixture/A = F.air
// Can most things breathe?
if(A.trace_gases.len)
if(A.sleeping_agent)
continue
if(A.oxygen < 16)
continue
+6 -3
View File
@@ -216,7 +216,8 @@
if(!silent)
announce_here("Depot Code BLUE", reason)
var/list/possible_bot_spawns = list()
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "syndi_depot_bot")
possible_bot_spawns |= L
if(possible_bot_spawns.len)
@@ -248,7 +249,8 @@
comms_online = TRUE
if(comms_online)
spawn(0)
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(prob(50))
if(L.name == "syndi_depot_backup")
var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space/S = new /mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space(get_turf(L))
@@ -344,7 +346,8 @@
/area/syndicate_depot/core/proc/shields_up()
if(shield_list.len)
return
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "syndi_depot_shield")
var/obj/machinery/shieldwall/syndicate/S = new /obj/machinery/shieldwall/syndicate(L.loc)
shield_list += S.UID()
+5 -6
View File
@@ -233,6 +233,9 @@
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM)
SEND_SIGNAL(AM, COMSIG_CROSSED_MOVABLE, src)
/atom/movable/Uncrossed(atom/movable/AM)
SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM)
/atom/movable/Bump(atom/A, yes) //the "yes" arg is to differentiate our Bump proc from byond's, without it every Bump() call would become a double Bump().
if(A && yes)
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A)
@@ -493,7 +496,7 @@
target.fingerprintshidden += fingerprintshidden
target.fingerprintslast = fingerprintslast
/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
if(!no_effect && (visual_effect_icon || used_item))
do_item_attack_animation(A, visual_effect_icon, used_item)
@@ -501,10 +504,6 @@
return //don't do an animation if attacking self
var/pixel_x_diff = 0
var/pixel_y_diff = 0
var/final_pixel_y = initial(pixel_y)
if(end_pixel_y)
final_pixel_y = end_pixel_y
var/direction = get_dir(src, A)
if(direction & NORTH)
pixel_y_diff = 8
@@ -517,7 +516,7 @@
pixel_x_diff = -8
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
animate(pixel_x = initial(pixel_x), pixel_y = final_pixel_y, time = 2)
animate(pixel_x = pixel_x - pixel_x_diff, pixel_y = pixel_y - pixel_y_diff, time = 2)
/atom/movable/proc/do_item_attack_animation(atom/A, visual_effect_icon, obj/item/used_item)
var/image/I
+1 -1
View File
@@ -19,7 +19,7 @@
intercepttext += "Message ends."
if(2)
var/nukecode = rand(10000, 99999)
for(var/obj/machinery/nuclearbomb/bomb in world)
for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
if(bomb && bomb.r_code)
if(is_station_level(bomb.z))
bomb.r_code = nukecode
@@ -321,7 +321,7 @@
if(INTENT_GRAB)
C.visible_message("<span class='danger'>[L] is grabbed by [H]'s tentacle!</span>","<span class='userdanger'>A tentacle grabs you and pulls you towards [H]!</span>")
add_attack_logs(src, C, "[src] has grabbed [C] and pulled them towards [H] with a tentacle")
add_attack_logs(H, C, "[H] grabbed [C] with a changeling tentacle")
C.throw_at(get_step_towards(H,C), 8, 2, callback=CALLBACK(H, /mob/proc/tentacle_grab, C))
return 1
+1 -1
View File
@@ -415,7 +415,7 @@ proc/display_roundstart_logout_report()
/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
if(bomb && bomb.r_code && is_station_level(bomb.z))
nukecode = bomb.r_code
return nukecode
@@ -652,7 +652,8 @@
button.desc = desc
/datum/action/innate/ai/blackout/Activate()
for(var/obj/machinery/power/apc/apc in GLOB.apcs)
for(var/thing in GLOB.apcs)
var/obj/machinery/power/apc/apc
if(prob(30 * apc.overload))
apc.overload_lighting()
else
@@ -16,7 +16,7 @@
/datum/event/borer_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery)
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
//Stops cortical borers getting stuck in small networks. See: Security, Virology
if(temp_vent.parent.other_atmosmch.len > 50)
@@ -180,15 +180,19 @@
input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "")
else
input = message
if(!input) return
if(!input)
return
for(var/mob/M in GLOB.mob_list)
if(M == summoner)
to_chat(M, "<span class='changeling'><i>[src]:</i> [input]</span>")
log_say("(GUARDIAN to [key_name(M)]) [input]", src)
else if(M in GLOB.dead_mob_list && M.client && M.stat == DEAD && !isnewplayer(M))
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
// Show the message to the host and to the guardian.
to_chat(summoner, "<span class='changeling'><i>[src]:</i> [input]</span>")
to_chat(src, "<span class='changeling'><i>[src]:</i> [input]</span>")
log_say("(GUARDIAN to [key_name(summoner)]) [input]", src)
create_log(SAY_LOG, "GUARDIAN to HOST: [input]", summoner)
// Show the message to any ghosts/dead players.
for(var/mob/M in GLOB.dead_mob_list)
if(M && M.client && M.stat == DEAD && !isnewplayer(M))
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
//override set to true if message should be passed through instead of going to host communication
/mob/living/simple_animal/hostile/guardian/say(message, override = FALSE)
@@ -206,18 +210,24 @@
set category = "Guardian"
set desc = "Communicate telepathically with your guardian."
var/input = stripped_input(src, "Please enter a message to tell your guardian.", "Message", "")
if(!input) return
if(!input)
return
for(var/mob/M in GLOB.mob_list)
if(istype(M, /mob/living/simple_animal/hostile/guardian))
var/mob/living/simple_animal/hostile/guardian/G = M
if(G.summoner == src)
to_chat(G, "<span class='changeling'><i>[src]:</i> [input]</span>")
log_say("(GUARDIAN to [key_name(G)]) [input]", src)
// Find the guardian in our host's contents.
var/mob/living/simple_animal/hostile/guardian/G = locate() in contents
if(!G)
return
else if(M in GLOB.dead_mob_list && M.client && M.stat == DEAD && !isnewplayer(M))
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
// Show the message to our guardian and to host.
to_chat(G, "<span class='changeling'><i>[src]:</i> [input]</span>")
to_chat(src, "<span class='changeling'><i>[src]:</i> [input]</span>")
log_say("(GUARDIAN to [key_name(G)]) [input]", src)
create_log(SAY_LOG, "HOST to GUARDIAN: [input]", G)
// Show the message to any ghosts/dead players.
for(var/mob/M in GLOB.dead_mob_list)
if(M && M.client && M.stat == DEAD && !isnewplayer(M))
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
/mob/living/proc/guardian_recall()
set name = "Recall Guardian"
@@ -130,7 +130,7 @@
if(beacon) //Check that the beacon still exists and is in a safe place. No instant kills.
if(beacon.air)
var/datum/gas_mixture/Z = beacon.air
if(Z.oxygen >= 16 && !Z.toxins && Z.carbon_dioxide < 10 && !Z.trace_gases.len)
if(Z.oxygen >= 16 && !Z.toxins && Z.carbon_dioxide < 10 && !Z.sleeping_agent)
if((Z.temperature > 270) && (Z.temperature < 360))
var/pressure = Z.return_pressure()
if((pressure > 20) && (pressure < 550))
@@ -26,13 +26,15 @@
var/datum/mind/player_mind = new /datum/mind(key_of_revenant)
player_mind.active = 1
var/list/spawn_locs = list()
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(isturf(L.loc))
switch(L.name)
if("revenantspawn")
spawn_locs += L.loc
if(!spawn_locs) //If we can't find any revenant spawns, try the carp spawns
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(isturf(L.loc))
switch(L.name)
if("carpspawn")
+10 -6
View File
@@ -95,7 +95,8 @@ proc/issyndicate(mob/living/M as mob)
var/list/turf/synd_spawn = list()
for(var/obj/effect/landmark/A in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/A = thing
if(A.name == "Syndicate-Spawn")
synd_spawn += get_turf(A)
qdel(A)
@@ -450,7 +451,7 @@ proc/issyndicate(mob/living/M as mob)
if(foecount == GLOB.score_arrested)
GLOB.score_allarrested = 1
for(var/obj/machinery/nuclearbomb/nuke in world)
for(var/obj/machinery/nuclearbomb/nuke in GLOB.machines)
if(nuke.r_code == "Nope") continue
var/turf/T = get_turf(nuke)
var/area/A = T.loc
@@ -491,13 +492,16 @@ proc/issyndicate(mob/living/M as mob)
for(var/datum/mind/M in SSticker.mode.syndicates)
foecount++
for(var/mob/living/C in world)
for(var/mob in GLOB.mob_living_list)
var/mob/living/C = mob
if(ishuman(C) || isAI(C) || isrobot(C))
if(C.stat == 2) continue
if(!C.client) continue
if(C.stat == DEAD)
continue
if(!C.client)
continue
crewcount++
var/obj/item/disk/nuclear/N = locate() in world
var/obj/item/disk/nuclear/N = locate() in GLOB.poi_list
if(istype(N))
var/atom/disk_loc = N.loc
while(!isturf(disk_loc))
+4 -3
View File
@@ -385,7 +385,7 @@
if(foecount == GLOB.score_arrested)
GLOB.score_allarrested = 1
for(var/mob/living/carbon/human/player in world)
for(var/mob/living/carbon/human/player in GLOB.mob_living_list)
if(player.mind)
var/role = player.mind.assigned_role
if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director"))
@@ -415,7 +415,7 @@
for(var/datum/mind/M in SSticker.mode:revolutionaries)
if(M.current && M.current.stat != DEAD)
revcount++
for(var/mob/living/carbon/human/player in world)
for(var/mob/living/carbon/human/player in GLOB.mob_living_list)
if(player.mind)
var/role = player.mind.assigned_role
if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director"))
@@ -425,7 +425,8 @@
if(player.mind in SSticker.mode.revolutionaries) continue
loycount++
for(var/mob/living/silicon/X in world)
for(var/beepboop in GLOB.silicon_mob_list)
var/mob/living/silicon/X = beepboop
if(X.stat != DEAD)
loycount++
+2 -1
View File
@@ -71,7 +71,8 @@
// Check station's power levels
for(var/obj/machinery/power/apc/A in GLOB.apcs)
for(var/thing in GLOB.apcs)
var/obj/machinery/power/apc/A = thing
if(!is_station_level(A.z)) continue
for(var/obj/item/stock_parts/cell/C in A.contents)
if(C.charge < 2300)
@@ -161,7 +161,8 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
for(var/mob/living/M in orange(7, H))
M.Weaken(10)
to_chat(M, "<span class='userdanger'>An immense pressure slams you onto the ground!</span>")
for(var/obj/machinery/power/apc/A in GLOB.apcs)
for(var/thing in GLOB.apcs)
var/obj/machinery/power/apc/A = thing
A.overload_lighting()
var/mob/living/simple_animal/ascendant_shadowling/A = new /mob/living/simple_animal/ascendant_shadowling(H.loc)
A.announce("VYSHA NERADA YEKHEZET U'RUU!!", 5, 'sound/hallucinations/veryfar_noise.ogg')
+3 -8
View File
@@ -299,10 +299,7 @@
var/plasma_dangerlevel = cur_tlv.get_danger_level(environment.toxins*GET_PP)
cur_tlv = TLV["other"]
var/other_moles = 0.0
for(var/datum/gas/G in environment.trace_gases)
other_moles+=G.moles
var/other_dangerlevel = cur_tlv.get_danger_level(other_moles*GET_PP)
var/other_dangerlevel = cur_tlv.get_danger_level(environment.total_trace_moles() * GET_PP)
cur_tlv = TLV["temperature"]
var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature)
@@ -625,10 +622,8 @@
var/plasma_percent = round(environment.toxins / total * 100, 2)
cur_tlv = TLV["other"]
var/other_moles = 0.0
for(var/datum/gas/G in environment.trace_gases)
other_moles+=G.moles
var/other_dangerlevel = cur_tlv.get_danger_level(other_moles*GET_PP)
var/other_moles = environment.total_trace_moles()
var/other_dangerlevel = cur_tlv.get_danger_level(other_moles * GET_PP)
cur_tlv = TLV["temperature"]
var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature)
@@ -164,7 +164,7 @@
var/turf/T = get_turf(src)
if(!T.loc) return
var/area/A = get_area(T)
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in world )
for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in SSair.atmos_machinery)
var/turf/T2 = get_turf(scrubber)
if(T2 && T2.loc)
var/area/A2 = T2.loc
+2 -21
View File
@@ -417,8 +417,7 @@ update_flag
if(air_contents.toxins > 0)
message_admins("[key_name_admin(usr)] opened a canister that contains plasma in [get_area(src)]! (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
log_admin("[key_name(usr)] opened a canister that contains plasma at [get_area(src)]: [x], [y], [z]")
var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air_contents.trace_gases
if(sleeping_agent && (sleeping_agent.moles > 1))
if(air_contents.sleeping_agent > 0)
message_admins("[key_name_admin(usr)] opened a canister that contains N2O in [get_area(src)]! (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
log_admin("[key_name(usr)] opened a canister that contains N2O at [get_area(src)]: [x], [y], [z]")
investigate_log(logmsg, "atmos")
@@ -533,29 +532,11 @@ update_flag
..()
canister_color["prim"] = "redws"
var/datum/gas/sleeping_agent/trace_gas = new
air_contents.trace_gases += trace_gas
trace_gas.moles = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.sleeping_agent = (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
src.update_icon()
return 1
//Dirty way to fill room with gas. However it is a bit easier to do than creating some floor/engine/n2o -rastaf0
/obj/machinery/portable_atmospherics/canister/sleeping_agent/roomfiller/New()
..()
var/datum/gas/sleeping_agent/trace_gas = air_contents.trace_gases[1]
trace_gas.moles = 9*4000
spawn(100)
var/turf/simulated/location = src.loc
if(istype(src.loc))
while(!location.air)
sleep(1000)
location.assume_air(air_contents)
air_contents = new
return 1
/obj/machinery/portable_atmospherics/canister/nitrogen/New()
..()
+4 -10
View File
@@ -81,17 +81,11 @@
filtered_out.carbon_dioxide = removed.carbon_dioxide
removed.carbon_dioxide = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/sleeping_agent))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
filtered_out.sleeping_agent = removed.sleeping_agent
removed.sleeping_agent = 0
if(removed.trace_gases.len>0)
for(var/datum/gas/trace_gas in removed.trace_gases)
if(istype(trace_gas, /datum/gas/oxygen_agent_b))
removed.trace_gases -= trace_gas
filtered_out.trace_gases += trace_gas
filtered_out.agent_b = removed.agent_b
removed.agent_b = 0
//Remix the resulting gases
air_contents.merge(filtered_out)
+2 -2
View File
@@ -189,12 +189,12 @@
active = 1
icon_state = "launcheract"
for(var/obj/machinery/sparker/M in world)
for(var/obj/machinery/sparker/M in GLOB.machines)
if(M.id == id)
spawn( 0 )
M.spark()
for(var/obj/machinery/igniter/M in world)
for(var/obj/machinery/igniter/M in GLOB.machines)
if(M.id == id)
use_power(50)
M.on = !( M.on )
+1 -1
View File
@@ -41,7 +41,7 @@
number = 1
var/area/A = get_area(src)
if(A)
for(var/obj/machinery/camera/autoname/C in world)
for(var/obj/machinery/camera/autoname/C in GLOB.machines)
if(C == src) continue
var/area/CA = get_area(C)
if(CA.type == A.type)
@@ -350,9 +350,6 @@
build_path = /obj/machinery/computer/telescience
origin_tech = "programming=3;bluespace=3;plasmatech=4"
/obj/item/circuitboard/atmos_automation
name = "Circuit board (Atmospherics Automation)"
build_path = /obj/machinery/computer/general_air_control/atmos_automation
/obj/item/circuitboard/large_tank_control
name = "Circuit board (Atmospheric Tank Control)"
build_path = /obj/machinery/computer/general_air_control/large_tank_control
+1 -1
View File
@@ -121,7 +121,7 @@
data["virus"] += list(list("name" = DS.name, "D" = D))
if(MED_DATA_MEDBOT)
data["medbots"] = list()
for(var/mob/living/simple_animal/bot/medbot/M in world)
for(var/mob/living/simple_animal/bot/medbot/M in GLOB.bots_list)
if(M.z != z)
continue
var/turf/T = get_turf(M)
+11 -9
View File
@@ -23,7 +23,7 @@
timings = list()
times = list()
synced = list()
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
for(var/ident_tag in id_tags)
if((M.id_tag == ident_tag) && !(ident_tag in synced))
@@ -49,7 +49,7 @@
return
/obj/machinery/computer/pod/proc/solo_sync(var/ident_tag)
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if((M.id_tag == ident_tag) && !(ident_tag in synced))
synced += ident_tag
@@ -78,7 +78,7 @@
if(stat & (NOPOWER|BROKEN))
return
var/anydriver = 0
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
anydriver = 1
@@ -94,7 +94,7 @@
sleep(20)
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
M.drive()
@@ -219,7 +219,7 @@
var/ident_tag = href_list["driver"]
var/t = text2num(href_list["power"])
t = min(max(0.25, t), 16)
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.id_tag == ident_tag)
M.power = t
powers[ident_tag] = t
@@ -294,7 +294,7 @@
if(stat & (NOPOWER|BROKEN))
return
var/anydriver = 0
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
anydriver = 1
@@ -303,10 +303,12 @@
return
var/spawn_marauder[] = new()
for(var/obj/effect/landmark/L in world)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Marauder Entry")
spawn_marauder.Add(L)
for(var/obj/effect/landmark/L in world)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Marauder Exit")
var/obj/effect/portal/P = new(L.loc, pick(spawn_marauder))
P.invisibility = 101//So it is not seen by anyone.
@@ -320,7 +322,7 @@
M.open()
sleep(20)
for(var/obj/machinery/mass_driver/M in world)
for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
M.drive()
@@ -93,7 +93,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
GLOB.specops_shuttle_at_station = 0
for(var/obj/machinery/computer/specops_shuttle/S in world)
for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
qdel(announcer)
@@ -160,10 +160,12 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
sleep(10)
var/spawn_marauder[] = new()
for(var/obj/effect/landmark/L in world)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Marauder Entry")
spawn_marauder.Add(L.loc)
for(var/obj/effect/landmark/L in world)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Marauder Exit")
var/obj/effect/portal/P = new(L.loc, pick(spawn_marauder))
//P.invisibility = 101//So it is not seen by anyone.
@@ -233,7 +235,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
var/mob/M = locate(/mob) in T
to_chat(M, "<span class='warning'>You have arrived to [station_name()]. Commence operation!</span>")
for(var/obj/machinery/computer/specops_shuttle/S in world)
for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
qdel(announcer)
@@ -241,7 +243,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
/proc/specops_can_move()
if(GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom)
return 0
for(var/obj/machinery/computer/specops_shuttle/S in world)
for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
if(world.timeofday <= S.specops_shuttle_timereset)
return 0
return 1
@@ -132,7 +132,8 @@ GLOBAL_VAR_INIT(syndicate_elite_shuttle_timeleft, 0)
*/
//End Marauder launchpad.
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Syndicate Breach Area")
explosion(L.loc,4,6,8,10,0)
@@ -936,49 +936,3 @@ to destroy them and players will be able to make replacements.
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stack/cable_coil = 3,
/obj/item/stack/sheet/glass = 1)
//Selectable mode board, like vending machine boards
/obj/item/circuitboard/logic_gate
name = "circuit board (Logic Connector)"
build_path = /obj/machinery/logic_gate
board_type = "machine"
origin_tech = "programming=1" //This stuff is pretty much the absolute basis of programming, so it's mostly useless for research
req_components = list(/obj/item/stack/cable_coil = 1)
var/list/names_paths = list(
"NOT Gate" = /obj/machinery/logic_gate/not,
"OR Gate" = /obj/machinery/logic_gate/or,
"AND Gate" = /obj/machinery/logic_gate/and,
"NAND Gate" = /obj/machinery/logic_gate/nand,
"NOR Gate" = /obj/machinery/logic_gate/nor,
"XOR Gate" = /obj/machinery/logic_gate/xor,
"XNOR Gate" = /obj/machinery/logic_gate/xnor,
"STATUS Gate" = /obj/machinery/logic_gate/status,
"CONVERT Gate" = /obj/machinery/logic_gate/convert
)
/obj/item/circuitboard/logic_gate/New()
..()
if(build_path == /obj/machinery/logic_gate) //If we spawn the base type board (determined by the base type machine as the build path), become a random gate board
var/new_path = names_paths[pick(names_paths)]
set_type(new_path)
/obj/item/circuitboard/logic_gate/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver))
set_type(null, user)
return
return ..()
/obj/item/circuitboard/logic_gate/proc/set_type(typepath, mob/user)
var/new_name = "Logic Base"
if(!typepath)
new_name = input("Circuit Setting", "What would you change the board setting to?") in names_paths
typepath = names_paths[new_name]
else
for(var/name in names_paths)
if(names_paths[name] == typepath)
new_name = name
break
build_path = typepath
name = "circuit board ([new_name])"
if(user)
to_chat(user, "<span class='notice'>You set the board to [new_name].</span>")
+6 -1
View File
@@ -876,6 +876,8 @@ About the new airlock wires panel:
if(!user.unEquip(C))
to_chat(user, "<span class='warning'>For some reason, you can't attach [C]!</span>")
return
C.add_fingerprint(user)
user.create_log(MISC_LOG, "put [C] on", src)
C.forceMove(src)
user.visible_message("<span class='notice'>[user] pins [C] to [src].</span>", "<span class='notice'>You pin [C] to [src].</span>")
note = C
@@ -1347,10 +1349,13 @@ About the new airlock wires panel:
if (ishuman(user) && user.a_intent == INTENT_GRAB)//grab that note
user.visible_message("<span class='notice'>[user] removes [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
playsound(src, 'sound/items/poster_ripped.ogg', 50, 1)
else return FALSE
else
return FALSE
else
user.visible_message("<span class='notice'>[user] cuts down [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
playsound(src, 'sound/items/wirecutter.ogg', 50, 1)
note.add_fingerprint(user)
user.create_log(MISC_LOG, "removed [note] from", src)
user.put_in_hands(note)
note = null
update_icon()
+1 -1
View File
@@ -144,7 +144,7 @@
active = 1
icon_state = "launcheract"
for(var/obj/machinery/flasher/M in world)
for(var/obj/machinery/flasher/M in GLOB.machines)
if(M.id == id)
spawn()
M.flash()
+1 -1
View File
@@ -67,7 +67,7 @@
else
icon_state = "light0"
for(var/obj/machinery/holosign/M in world)
for(var/obj/machinery/holosign/M in GLOB.machines)
if(M.id == src.id)
spawn( 0 )
M.toggle()
+2 -2
View File
@@ -202,7 +202,7 @@
..()
if(autolink)
for(var/obj/machinery/magnetic_module/M in world)
for(var/obj/machinery/magnetic_module/M in GLOB.machines)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
@@ -224,7 +224,7 @@
/obj/machinery/magnetic_controller/process()
if(magnets.len == 0 && autolink)
for(var/obj/machinery/magnetic_module/M in world)
for(var/obj/machinery/magnetic_module/M in GLOB.machines)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
+1 -1
View File
@@ -200,7 +200,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
var/log_msg = message
var/pass = 0
screen = RCS_SENTFAIL
for(var/obj/machinery/message_server/MS in world)
for(var/obj/machinery/message_server/MS in GLOB.machines)
if(!MS.active) continue
MS.send_rc_message(ckey(href_list["department"]),department,log_msg,msgStamped,msgVerified,priority)
pass = 1
+4 -2
View File
@@ -121,7 +121,8 @@
if(user)
to_chat(user, "<span class='notice'>The connected wire doesn't have enough current.</span>")
return
for(var/obj/singularity/singulo in GLOB.singularities)
for(var/thing in GLOB.singularities)
var/obj/singularity/singulo = thing
if(singulo.z == z)
singulo.target = src
icon_state = "[icontype]1"
@@ -132,7 +133,8 @@
/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null)
for(var/obj/singularity/singulo in world)
for(var/thing in GLOB.singularities)
var/obj/singularity/singulo = thing
if(singulo.target == src)
singulo.target = null
icon_state = "[icontype]0"
+2
View File
@@ -171,6 +171,8 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
var/vname
/// List of all channels this can be sent or recieved on
var/list/zlevels = list()
/// Should this signal be re-broadcasted (Can be modified by NTTC, defaults to TRUE)
var/pass = TRUE
/**
* Destructor for the TCM datum.
+36 -1
View File
@@ -1,5 +1,6 @@
#define UI_TAB_CONFIG "CONFIG"
#define UI_TAB_LINKS "LINKS"
#define UI_TAB_FILTER "FILTER"
/**
* # Telecommunications Core
@@ -81,6 +82,11 @@
// Now we can run NTTC
tcm = nttc.modify_message(tcm)
// If the signal shouldnt be broadcast, dont broadcast it
if(!tcm.pass)
// We still return TRUE here because the signal was handled, even though we didnt broadcast
return TRUE
// Now we generate the list of where that signal should go to
tcm.zlevels = reachable_zlevels
tcm.zlevels |= tcm.source_level
@@ -168,6 +174,9 @@
data["entries"] += list(list("addr" = "\ref[R]", "net_id" = R.network_id, "sector" = R.loc.z, "status" = status, "status_color" = status_color))
// End the shit
if(ui_tab == UI_TAB_FILTER)
data["filtered_users"] = nttc.filtering
return data
/obj/machinery/tcomms/core/Topic(href, href_list)
@@ -177,7 +186,7 @@
if(href_list["tab"])
// Make sure its a valid tab
if(href_list["tab"] in list(UI_TAB_CONFIG, UI_TAB_LINKS))
if(href_list["tab"] in list(UI_TAB_CONFIG, UI_TAB_LINKS, UI_TAB_FILTER))
ui_tab = href_list["tab"]
// Check if they did a href, but only for that current tab
@@ -257,9 +266,35 @@
to_chat(usr, "<span class='notice'>Successfully changed password from <b>[link_password]</b> to <b>[new_password]</b>.</span>")
link_password = new_password
if(ui_tab == UI_TAB_FILTER)
if(href_list["add_filter"])
// This is a stripped input because I did NOT come this far for this system to be abused by HTML injection
var/name_to_add = stripped_input(usr, "Enter a name to add to the filtering list", "Name Entry")
if(name_to_add == "")
return
if(name_to_add in nttc.filtering)
to_chat(usr, "<span class='alert'><b>ERROR:</b> User already in filtering list.</span>")
else
nttc.filtering |= name_to_add
log_action(usr, "has added [name_to_add] to the NTTC filter list on core with ID [network_id]", TRUE)
to_chat(usr, "<span class='notice'>Successfully added <b>[name_to_add]</b> to the NTTC filtering list.</span>")
if(href_list["remove_filter"])
var/name_to_remove = href_list["remove_filter"]
if(!(name_to_remove in nttc.filtering))
to_chat(usr, "<span class='alert'><b>ERROR:</b> Name does not exist in filter list. Please file an issue report.</span>")
else
var/confirm = alert(usr, "Are you sure you want to remove [name_to_remove] from the filtering list?", "Confirm Removal", "Yes", "No")
if(confirm == "Yes")
nttc.filtering -= name_to_remove
log_action(usr, "has removed [name_to_remove] from the NTTC filter list on core with ID [network_id]", TRUE)
to_chat(usr, "<span class='notice'>Successfully removed <b>[name_to_remove]</b> from the NTTC filtering list.</span>")
// Hack to speed update the nanoUI
SSnanoui.update_uis(src)
#undef UI_TAB_CONFIG
#undef UI_TAB_LINKS
#undef UI_TAB_FILTER
+7
View File
@@ -153,6 +153,10 @@
var/list/job_card_styles = list(
JOB_STYLE_1, JOB_STYLE_2, JOB_STYLE_3, JOB_STYLE_4
)
// List of people who will get blocked out of comms
var/list/filtering = list()
// Used to determine what languages are allowable for conversion. Generated during runtime.
var/list/valid_languages = list("--DISABLE--")
@@ -220,6 +224,9 @@
// Primary signal modification. This is where all of the variables behavior are actually implemented.
/datum/nttc_configuration/proc/modify_message(datum/tcomms_message/tcm)
// Check if they should be blacklisted right off the bat. We can save CPU if the message wont even be processed
if(tcm.sender_name in filtering)
tcm.pass = FALSE
// All job and coloring shit
if(toggle_job_color || toggle_name_color)
var/job = tcm.sender_job
+4 -2
View File
@@ -609,6 +609,8 @@
occupant = null
icon_state = initial(icon_state)+"-open"
setDir(dir_in)
if(A in trackers)
trackers -= A
/obj/mecha/Destroy()
if(occupant)
@@ -639,7 +641,7 @@
cabin_air = null
QDEL_NULL(spark_system)
QDEL_NULL(smoke_system)
QDEL_LIST(trackers)
GLOB.mechas_list -= src //global mech list
return ..()
@@ -1454,7 +1456,7 @@
..()
/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
if(!no_effect)
if(selected)
used_item = selected
+6 -1
View File
@@ -28,7 +28,12 @@
data["screen"] = screen
if(screen == 0)
var/list/mechas[0]
for(var/obj/item/mecha_parts/mecha_tracking/TR in world)
var/list/trackerlist = list()
for(var/stompy in GLOB.mechas_list)
var/obj/mecha/MC = stompy
trackerlist += MC.trackers
for(var/thing in trackerlist)
var/obj/item/mecha_parts/mecha_tracking/TR = thing
var/answer = TR.get_mecha_info()
if(answer)
mechas[++mechas.len] = answer
+1 -2
View File
@@ -124,8 +124,7 @@
//Attach hydraulic clamp
var/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/HC = new
HC.attach(src)
for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)//Deletes the beacon so it can't be found easily
qdel(B)
QDEL_LIST(trackers) //Deletes the beacon so it can't be found easily
var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new
scanner.attach(src)
+1
View File
@@ -98,6 +98,7 @@
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
START_PROCESSING(SSobj, src)
AddComponent(/datum/component/swarming)
/obj/structure/spider/spiderling/Destroy()
STOP_PROCESSING(SSobj, src)
+12 -13
View File
@@ -33,9 +33,11 @@
icon_state = "trashbag"
item_state = "trashbag"
w_class = WEIGHT_CLASS_TINY
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_SMALL
slot_flags = null
storage_slots = 30
max_combined_w_class = 30
can_hold = list() // any
cant_hold = list(/obj/item/disk/nuclear)
@@ -45,18 +47,15 @@
return TOXLOSS
/obj/item/storage/bag/trash/update_icon()
if(contents.len == 0)
w_class = WEIGHT_CLASS_TINY
icon_state = "[initial(icon_state)]"
else if(contents.len < 12)
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]1"
else if(contents.len < 21)
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]2"
else
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]3"
switch(contents.len)
if(20 to INFINITY)
icon_state = "[initial(icon_state)]3"
if(11 to 20)
icon_state = "[initial(icon_state)]2"
if(1 to 11)
icon_state = "[initial(icon_state)]1"
else
icon_state = "[initial(icon_state)]"
/obj/item/storage/bag/trash/cyborg
@@ -53,13 +53,8 @@ obj/item/tank/oxygen/empty/New()
/obj/item/tank/anesthetic/New()
..()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.trace_gases += trace_gas
air_contents.oxygen = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD
air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD
/*
* Air
@@ -115,7 +115,7 @@ Frequency:
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in world)
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[com.id] (Active)"] = com.target
-785
View File
@@ -1,785 +0,0 @@
#define HEALPERWELD 15
/* Tools!
* Note: Multitools are in devices
*
* Contains:
* Wrench
* Screwdriver
* Wirecutters
* Welding Tool
* Crowbar
* Revolver Conversion Kit
*/
//Wrench
/obj/item/wrench
name = "wrench"
desc = "A wrench with common uses. Can be found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
usesound = 'sound/items/ratchet.ogg'
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=150)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
/obj/item/wrench/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
return BRUTELOSS
/obj/item/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
toolspeed = 0.5
/obj/item/wrench/brass
name = "brass wrench"
desc = "A brass wrench. It's faintly warm to the touch."
icon_state = "wrench_brass"
toolspeed = 0.5
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/wrench/abductor
name = "alien wrench"
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
icon = 'icons/obj/abductor.dmi'
icon_state = "wrench"
usesound = 'sound/effects/empulse.ogg'
toolspeed = 0.1
origin_tech = "materials=5;engineering=5;abductor=3"
/obj/item/wrench/power
name = "hand drill"
desc = "A simple powered drill with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
usesound = 'sound/items/drill_use.ogg'
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
/obj/item/wrench/power/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1)
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power
to_chat(user, "<span class='notice'>You attach the screwdriver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(s_drill)
/obj/item/wrench/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
return BRUTELOSS
/obj/item/wrench/medical
name = "medical wrench"
desc = "A medical wrench with common (medical?) uses. Can be found in your hand."
icon_state = "wrench_medical"
force = 2 //MEDICAL
throwforce = 4
origin_tech = "materials=1;engineering=1;biotech=3"
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
/obj/item/wrench/medical/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
// TODO Make them glow with the power of the M E D I C A L W R E N C H
// during their ascension
// Stun stops them from wandering off
user.Stun(5)
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
// Let the sound effect finish playing
sleep(20)
if(!user)
return
for(var/obj/item/W in user)
user.unEquip(W)
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
W.add_fingerprint(user)
W.desc += " For some reason, it reminds you of [user.name]."
if(!user)
return
user.dust()
return OBLITERATION
//Screwdriver
/obj/item/screwdriver
name = "screwdriver"
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver_map"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
w_class = WEIGHT_CLASS_TINY
throwforce = 5
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=75)
attack_verb = list("stabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/screwdriver.ogg'
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/random_color = TRUE //if the screwdriver uses random coloring
/obj/item/screwdriver/nuke
name = "screwdriver"
desc = "A screwdriver with an ultra thin tip."
icon_state = "screwdriver_nuke"
toolspeed = 0.5
/obj/item/screwdriver/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/screwdriver/New(loc, var/param_color = null)
..()
if(random_color)
if(!param_color)
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
icon_state = "screwdriver_[param_color]"
if (prob(75))
src.pixel_y = rand(0, 16)
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M) || user.a_intent == INTENT_HELP)
return ..()
if(user.zone_selected != "eyes" && user.zone_selected != "head")
return ..()
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to harm [M]!</span>")
return
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/obj/item/screwdriver/brass
name = "brass screwdriver"
desc = "A screwdriver made of brass. The handle feels freezing cold."
icon_state = "screwdriver_brass"
toolspeed = 0.5
random_color = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/screwdriver/abductor
name = "alien screwdriver"
desc = "An ultrasonic screwdriver."
icon = 'icons/obj/abductor.dmi'
icon_state = "screwdriver"
usesound = 'sound/items/pshoom.ogg'
toolspeed = 0.1
random_color = FALSE
/obj/item/screwdriver/power
name = "hand drill"
desc = "A simple hand drill with a screwdriver bit attached."
icon_state = "drill_screw"
item_state = "drill"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
throwforce = 8
throw_speed = 2
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
attack_verb = list("drilled", "screwed", "jabbed","whacked")
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/screwdriver/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/screwdriver/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1)
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(b_drill)
/obj/item/screwdriver/cyborg
name = "powered screwdriver"
desc = "An electrical screwdriver, designed to be both precise and quick."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
//Wirecutters
/obj/item/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=80)
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/wirecutter.ogg'
usesound = 'sound/items/wirecutter.ogg'
sharp = 1
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/random_color = TRUE
/obj/item/wirecutters/New(loc, param_color = null)
..()
if(random_color)
if(!param_color)
param_color = pick("yellow", "red")
icon_state = "cutters_[param_color]"
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
QDEL_NULL(C.handcuffed)
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob(C)
C.update_handcuffed()
return
else
..()
/obj/item/wirecutters/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, usesound, 50, 1, -1)
return BRUTELOSS
/obj/item/wirecutters/brass
name = "brass wirecutters"
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
icon_state = "cutters_brass"
toolspeed = 0.5
random_color = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/wirecutters/abductor
name = "alien wirecutters"
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
icon = 'icons/obj/abductor.dmi'
icon_state = "cutters"
toolspeed = 0.1
origin_tech = "materials=5;engineering=4;abductor=3"
random_color = FALSE
/obj/item/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires."
toolspeed = 0.5
/obj/item/wirecutters/power
name = "jaws of life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = "materials=2;engineering=2"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/wirecutters/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
if(head)
head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE)
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
return BRUTELOSS
/obj/item/wirecutters/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(pryjaws)
//Welding Tool
/obj/item/weldingtool
name = "welding tool"
desc = "A standard edition welder provided by Nanotrasen."
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 3
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = "swing_hit"
usesound = 'sound/items/welder.ogg'
var/acti_sound = 'sound/items/welderactivate.ogg'
var/deac_sound = 'sound/items/welderdeactivate.ogg'
w_class = WEIGHT_CLASS_SMALL
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
materials = list(MAT_METAL=70, MAT_GLASS=30)
origin_tech = "engineering=1;plasmatech=1"
toolspeed = 1
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
var/max_fuel = 20 //The max amount of fuel the welder can hold
var/change_icons = 1
var/can_off_process = 0
var/light_intensity = 2 //how powerful the emitted light is when used.
var/nextrefueltick = 0
/obj/item/weldingtool/New()
..()
create_reagents(max_fuel)
reagents.add_reagent("fuel", max_fuel)
update_icon()
/obj/item/weldingtool/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0)
. += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weldingtool/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return FIRELOSS
/obj/item/weldingtool/proc/update_torch()
overlays.Cut()
if(welding)
overlays += "[initial(icon_state)]-on"
item_state = "[initial(item_state)]1"
else
item_state = "[initial(item_state)]"
/obj/item/weldingtool/update_icon()
if(change_icons)
var/ratio = get_fuel() / max_fuel
ratio = Ceiling(ratio*4) * 25
if(ratio == 100)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)][ratio]"
update_torch()
..()
/obj/item/weldingtool/process()
switch(welding)
if(0)
force = 3
damtype = "brute"
update_icon()
if(!can_off_process)
STOP_PROCESSING(SSobj, src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
force = 15
damtype = "fire"
if(prob(5))
remove_fuel(1)
update_icon()
//This is to start fires. process() is only called if the welder is on.
var/turf/location = loc
if(ismob(location))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
location = get_turf(M)
if(isturf(location))
location.hotspot_expose(700, 5)
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
if(isscrewdriver(I))
flamethrower_screwdriver(I, user)
else if(istype(I, /obj/item/stack/rods))
flamethrower_rods(I, user)
else
..()
/obj/item/weldingtool/attack(mob/M, mob/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.bodyparts_by_name[user.zone_selected]
if(!S)
return
if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2)
return ..()
if(!isOn()) //why wasn't this being checked already?
to_chat(user, "<span class='warning'>Turn on [src] before attempting repairs!</span>")
return 1
if(S.brute_dam > ROBOLIMB_SELF_REPAIR_CAP)
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
return
if(!S.brute_dam)
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
if(get_fuel() >= 1)
if(H == user)
if(!do_mob(user, H, 10))
return 1
if(!remove_fuel(1,null))
to_chat(user, "<span class='warning'>Need more welding fuel!</span>")
var/rembrute = HEALPERWELD
var/nrembrute = 0
var/childlist
if(!isnull(S.children))
childlist = S.children.Copy()
var/parenthealed = FALSE
while(rembrute > 0)
var/obj/item/organ/external/E
if(S.brute_dam)
E = S
else if(LAZYLEN(childlist))
E = pick_n_take(childlist)
if(!E.brute_dam || !E.is_robotic())
continue
else if(S.parent && !parenthealed)
E = S.parent
parenthealed = TRUE
if(!E.brute_dam || !E.is_robotic())
break
else
break
playsound(src.loc, usesound, 50, 1)
nrembrute = max(rembrute - E.brute_dam, 0)
E.heal_damage(rembrute,0,0,1)
rembrute = nrembrute
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [M]'s [E.name] with \the [src].</span>")
if(H.bleed_rate && H.isSynthetic())
H.bleed_rate = 0
user.visible_message("<span class='alert'>\The [user] patches some leaks on [M] with \the [src].</span>")
return 1
else
return ..()
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
if(!proximity)
return
if(welding)
remove_fuel(1)
var/turf/location = get_turf(user)
location.hotspot_expose(700, 50, 1)
if(get_fuel() <= 0)
set_light(0)
if(isliving(O))
var/mob/living/L = O
if(L.IgniteMob())
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
log_game("[key_name(user)] set [key_name(L)] on fire")
/obj/item/weldingtool/attack_self(mob/user)
switched_on(user)
if(welding)
set_light(light_intensity)
update_icon()
//Returns the amount of fuel in the welder
/obj/item/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
if(!welding || !check_fuel())
return FALSE
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
check_fuel()
if(M)
M.flash_eyes(light_intensity)
return TRUE
else
if(M)
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return FALSE
//Returns whether or not the welding tool is currently on.
/obj/item/weldingtool/proc/isOn()
return welding
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
/obj/item/weldingtool/proc/check_fuel(mob/user)
if(get_fuel() <= 0 && welding)
switched_on(user)
update_icon()
//mob icon update
if(ismob(loc))
var/mob/M = loc
M.update_inv_r_hand(0)
M.update_inv_l_hand(0)
return 0
return 1
//Switches the welder on
/obj/item/weldingtool/proc/switched_on(mob/user)
if(!status)
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
return
welding = !welding
if(welding)
if(get_fuel() >= 1)
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
playsound(loc, acti_sound, 50, 1)
force = 15
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
update_icon()
START_PROCESSING(SSobj, src)
else
to_chat(user, "<span class='warning'>You need more fuel!</span>")
switched_off(user)
else
if(user)
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
playsound(loc, deac_sound, 50, 1)
switched_off(user)
//Switches the welder off
/obj/item/weldingtool/proc/switched_off(mob/user)
welding = 0
set_light(0)
force = 3
damtype = "brute"
hitsound = "swing_hit"
update_icon()
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
to_chat(user, "<span class='warning'>Turn it off first!</span>")
return
status = !status
if(status)
to_chat(user, "<span class='notice'>You resecure [src].</span>")
else
to_chat(user, "<span class='notice'>[src] can now be attached and modified.</span>")
add_fingerprint(user)
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
if(!status)
var/obj/item/stack/rods/R = I
if(R.use(1))
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
if(!remove_item_from_storage(F))
user.unEquip(src)
loc = F
F.weldtool = src
add_fingerprint(user)
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
user.put_in_hands(F)
else
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
/obj/item/weldingtool/largetank
name = "Industrial Welding Tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
max_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=60)
origin_tech = "engineering=2;plasmatech=2"
/obj/item/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
toolspeed = 0.5
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
return
/obj/item/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
icon_state = "miniwelder"
max_fuel = 10
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL=30, MAT_GLASS=10)
change_icons = 0
/obj/item/weldingtool/mini/flamethrower_screwdriver()
return
/obj/item/weldingtool/abductor
name = "alien welding tool"
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
icon = 'icons/obj/abductor.dmi'
icon_state = "welder"
toolspeed = 0.1
light_intensity = 0
change_icons = 0
origin_tech = "plasmatech=5;engineering=5;abductor=3"
can_off_process = 1
/obj/item/weldingtool/abductor/process()
if(get_fuel() <= max_fuel)
reagents.add_reagent("fuel", 1)
..()
/obj/item/weldingtool/hugetank
name = "Upgraded Welding Tool"
desc = "An upgraded welder based off the industrial welder."
icon_state = "upindwelder"
item_state = "upindwelder"
max_fuel = 80
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "engineering=3;plasmatech=2"
/obj/item/weldingtool/experimental
name = "Experimental Welding Tool"
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
icon_state = "exwelder"
item_state = "exwelder"
max_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
change_icons = 0
can_off_process = 1
light_intensity = 1
toolspeed = 0.5
var/last_gen = 0
/obj/item/weldingtool/experimental/brass
name = "brass welding tool"
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
icon_state = "brasswelder"
item_state = "brasswelder"
resistance_flags = FIRE_PROOF | ACID_PROOF
obj/item/weldingtool/experimental/process()
..()
if(get_fuel() < max_fuel && nextrefueltick < world.time)
nextrefueltick = world.time + 10
reagents.add_reagent("fuel", 1)
//Crowbar
/obj/item/crowbar
name = "pocket crowbar"
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
item_state = "crowbar"
usesound = 'sound/items/crowbar.ogg'
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
item_state = "crowbar"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50)
origin_tech = "engineering=1;combat=1"
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
/obj/item/crowbar/red
icon_state = "crowbar_red"
item_state = "crowbar_red"
force = 8
/obj/item/crowbar/brass
name = "brass crowbar"
desc = "A brass crowbar. It feels faintly warm to the touch."
icon_state = "crowbar_brass"
item_state = "crowbar_brass"
toolspeed = 0.5
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/crowbar/abductor
name = "alien crowbar"
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
icon = 'icons/obj/abductor.dmi'
usesound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "crowbar"
toolspeed = 0.1
origin_tech = "combat=4;engineering=4;abductor=3"
/obj/item/crowbar/large
name = "crowbar"
desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big."
force = 12
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 3
materials = list(MAT_METAL=70)
icon_state = "crowbar_large"
item_state = "crowbar_large"
toolspeed = 0.5
/obj/item/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2"
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
var/airlock_open_time = 100 // Time required to open powered airlocks
/obj/item/crowbar/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
return BRUTELOSS
/obj/item/crowbar/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(cutjaws)
// Conversion kit
/obj/item/conversion_kit
name = "\improper Revolver Conversion Kit"
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
icon_state = "kit"
flags = CONDUCT
w_class = WEIGHT_CLASS_SMALL
origin_tech = "combat=2"
var/open = 0
/obj/item/conversion_kit/New()
..()
update_icon()
/obj/item/conversion_kit/update_icon()
icon_state = "[initial(icon_state)]_[open]"
/obj/item/conversion_kit/attack_self(mob/user)
open = !open
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the conversion kit.</span>")
update_icon()
@@ -154,7 +154,7 @@
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in world)
for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
@@ -89,7 +89,7 @@
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in world)
for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
@@ -20,6 +20,14 @@
icon = 'icons/turf/floors.dmi'
icon_state = "bcircuit"
/turf/simulated/floor/bluegrid/telecomms
nitrogen = 100
oxygen = 0
temperature = 80
/turf/simulated/floor/bluegrid/telecomms/server
name = "server base"
/turf/simulated/floor/greengrid
icon = 'icons/turf/floors.dmi'
icon_state = "gcircuit"
@@ -41,6 +41,11 @@
/turf/simulated/floor/plasteel/dark
icon_state = "darkfull"
/turf/simulated/floor/plasteel/dark/telecomms
nitrogen = 100
oxygen = 0
temperature = 80
/turf/simulated/floor/plasteel/freezer
icon_state = "freezerfloor"
+33 -8
View File
@@ -205,16 +205,41 @@
color = "#FAE48C"
animate(src, color = previouscolor, time = 8)
/turf/simulated/floor/engine/n20/New()
..()
var/datum/gas_mixture/adding = new
var/datum/gas/sleeping_agent/trace_gas = new
//air filled floors; used in atmos pressure chambers
trace_gas.moles = 6000
adding.trace_gases += trace_gas
adding.temperature = T20C
/turf/simulated/floor/engine/n20
name = "\improper N2O floor"
sleeping_agent = 6000
oxygen = 0
nitrogen = 0
/turf/simulated/floor/engine/co2
name = "\improper CO2 floor"
carbon_dioxide = 50000
oxygen = 0
nitrogen = 0
/turf/simulated/floor/engine/plasma
name = "plasma floor"
toxins = 70000
oxygen = 0
nitrogen = 0
/turf/simulated/floor/engine/o2
name = "\improper O2 floor"
oxygen = 100000
nitrogen = 0
/turf/simulated/floor/engine/n2
name = "\improper N2 floor"
nitrogen = 100000
oxygen = 0
/turf/simulated/floor/engine/air
name = "air floor"
oxygen = 2644
nitrogen = 10580
assume_air(adding)
/turf/simulated/floor/engine/singularity_pull(S, current_size)
..()
+16 -7
View File
@@ -7,11 +7,14 @@
var/turf/baseturf = /turf/space
var/slowdown = 0 //negative for faster, positive for slower
//Properties for open tiles (/floor)
///Properties for open tiles (/floor)
/// All the gas vars, on the turf, are meant to be utilized for initializing a gas datum and setting its first gas values; the turf vars are never further modified at runtime; it is never directly used for calculations by the atmospherics system.
var/oxygen = 0
var/carbon_dioxide = 0
var/nitrogen = 0
var/toxins = 0
var/sleeping_agent = 0
var/agent_b = 0
//Properties for airtight tiles (/wall)
var/thermal_conductivity = 0.05
@@ -265,10 +268,12 @@
//////Assimilate Air//////
/turf/simulated/proc/Assimilate_Air()
if(air)
var/aoxy = 0//Holders to assimilate air from nearby turfs
var/aoxy = 0 //Holders to assimilate air from nearby turfs
var/anitro = 0
var/aco = 0
var/atox = 0
var/asleep = 0
var/ab = 0
var/atemp = 0
var/turf_count = 0
@@ -284,13 +289,17 @@
anitro += S.air.nitrogen
aco += S.air.carbon_dioxide
atox += S.air.toxins
asleep += S.air.sleeping_agent
ab += S.air.agent_b
atemp += S.air.temperature
turf_count++
air.oxygen = (aoxy/max(turf_count, 1))//Averages contents of the turfs, ignoring walls and the like
air.nitrogen = (anitro/max(turf_count, 1))
air.carbon_dioxide = (aco/max(turf_count, 1))
air.toxins = (atox/max(turf_count, 1))
air.temperature = (atemp/max(turf_count, 1))//Trace gases can get bant
air.oxygen = (aoxy / max(turf_count, 1)) //Averages contents of the turfs, ignoring walls and the like
air.nitrogen = (anitro / max(turf_count, 1))
air.carbon_dioxide = (aco / max(turf_count, 1))
air.toxins = (atox / max(turf_count, 1))
air.sleeping_agent = (asleep / max(turf_count, 1))
air.agent_b = (ab / max(turf_count, 1))
air.temperature = (atemp / max(turf_count, 1))
if(SSair)
SSair.add_to_active(src)
+1 -1
View File
@@ -246,7 +246,7 @@ GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday)
if(!key_valid)
return keySpamProtect(addr)
if(input["req"] == "public")
hub_password = hub_password_base
hub_password = initial(hub_password)
update_status()
return "Set listed status to public."
else
-1
View File
@@ -3,7 +3,6 @@
hub = "Exadv1.spacestation13"
hub_password = "kMZy3U5jJHSiBQjr"
name = "Space Station 13"
/var/hub_password_base = "kMZy3U5jJHSiBQjr"
/* This is for any host that would like their server to appear on the main SS13 hub.
To use it, simply replace the password above, with the password found below, and it should work.
If not, let us know on the main tgstation IRC channel of irc.rizon.net #tgstation13 we can help you there.
+4 -3
View File
@@ -11,17 +11,18 @@
to_chat(usr, "Checking for disconnected pipes...")
//all plumbing - yes, some things might get stated twice, doesn't matter.
for(var/obj/machinery/atmospherics/plumbing in world)
for(var/thing in SSair.atmos_machinery)
var/obj/machinery/atmospherics/plumbing = thing
if(plumbing.nodealert)
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
//Manifolds
for(var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
for(var/obj/machinery/atmospherics/pipe/manifold/pipe in SSair.atmos_machinery)
if(!pipe.node1 || !pipe.node2 || !pipe.node3)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
//Pipes
for(var/obj/machinery/atmospherics/pipe/simple/pipe in world)
for(var/obj/machinery/atmospherics/pipe/simple/pipe in SSair.atmos_machinery)
if(!pipe.node1 || !pipe.node2)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
+9 -7
View File
@@ -487,7 +487,8 @@ GLOBAL_PROTECT(AdminProcCaller)
for(var/area/A in world)
areas_all |= A.type
for(var/obj/machinery/power/apc/APC in world)
for(var/thing in GLOB.apcs)
var/obj/machinery/power/apc/APC = thing
var/area/A = get_area(APC)
if(!A)
continue
@@ -496,7 +497,8 @@ GLOBAL_PROTECT(AdminProcCaller)
else
areas_with_multiple_APCs |= A.type
for(var/obj/machinery/alarm/alarm in world)
for(var/thing in GLOB.air_alarms)
var/obj/machinery/alarm/alarm = thing
var/area/A = get_area(alarm)
if(!A)
continue
@@ -505,31 +507,31 @@ GLOBAL_PROTECT(AdminProcCaller)
else
areas_with_multiple_air_alarms |= A.type
for(var/obj/machinery/requests_console/RC in world)
for(var/obj/machinery/requests_console/RC in GLOB.machines)
var/area/A = get_area(RC)
if(!A)
continue
areas_with_RC |= A.type
for(var/obj/machinery/light/L in world)
for(var/obj/machinery/light/L in GLOB.machines)
var/area/A = get_area(L)
if(!A)
continue
areas_with_light |= A.type
for(var/obj/machinery/light_switch/LS in world)
for(var/obj/machinery/light_switch/LS in GLOB.machines)
var/area/A = get_area(LS)
if(!A)
continue
areas_with_LS |= A.type
for(var/obj/item/radio/intercom/I in world)
for(var/obj/item/radio/intercom/I in GLOB.global_radios)
var/area/A = get_area(I)
if(!A)
continue
areas_with_intercom |= A.type
for(var/obj/machinery/camera/C in world)
for(var/obj/machinery/camera/C in GLOB.machines)
var/area/A = get_area(C)
if(!A)
continue
+1 -3
View File
@@ -15,9 +15,7 @@
if(T.active_hotspot)
burning = 1
to_chat(usr, "<span class='notice'>@[target.x],[target.y]: O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("<span class='warning'>BURNING</span>"):(null)]</span>")
for(var/datum/gas/trace_gas in GM.trace_gases)
to_chat(usr, "[trace_gas.type]: [trace_gas.moles]")
to_chat(usr, "<span class='notice'>@[target.x],[target.y]: O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] N2O: [GM.sleeping_agent] Agent B: [GM.agent_b] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("<span class='warning'>BURNING</span>"):(null)]</span>")
message_admins("[key_name_admin(usr)] has checked the air status of [target]")
log_admin("[key_name(usr)] has checked the air status of [target]")
+2 -1
View File
@@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_honksquad, 0)
commandos += candidate//Add their ghost to commandos.
//Spawns HONKsquad and equips them.
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(honksquad_number<=0) break
if(L.name == "HONKsquad")
honk_leader_selected = honksquad_number == 1?1:0
@@ -66,7 +66,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
var/list/sit_spawns = list()
var/list/sit_spawns_leader = list()
var/list/sit_spawns_mgmt = list()
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Syndicate-Infiltrator")
sit_spawns += L
if(L.name == "Syndicate-Infiltrator-Leader")
+1 -1
View File
@@ -118,7 +118,7 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
qdel(M)
if(GLOB.intercom_range_display_status)
for(var/obj/item/radio/intercom/I in world)
for(var/obj/item/radio/intercom/I in GLOB.global_radios)
for(var/turf/T in orange(7,I))
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if(!(F in view(7,I.loc)))
+5 -3
View File
@@ -267,7 +267,7 @@ client/proc/one_click_antag()
var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
synd_mind.current.client.images += I
for(var/obj/machinery/nuclearbomb/bomb in world)
for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
bomb.r_code = nuke_code // All the nukes are set to this code.
return 1
@@ -455,7 +455,8 @@ client/proc/one_click_antag()
if(candidates.len)
var/raiders = min(antnum, candidates.len)
//Spawns vox raiders and equips them.
for(var/obj/effect/landmark/L in world)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "voxstart")
if(raiders<=0)
break
@@ -583,7 +584,8 @@ client/proc/one_click_antag()
var/teamOneMembers = 5
var/teamTwoMembers = 5
var/datum/preferences/A = new()
for(var/obj/effect/landmark/L in world)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "tdome1")
if(teamOneMembers<=0)
break
+7 -4
View File
@@ -30,7 +30,7 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
// Find the nuclear auth code
var/nuke_code
var/temp_code
for(var/obj/machinery/nuclearbomb/N in world)
for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
temp_code = text2num(N.r_code)
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
nuke_code = N.r_code
@@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
var/commando_number = COMMANDOS_POSSIBLE //for selecting a leader
var/is_leader = TRUE // set to FALSE after leader is spawned
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(commando_number <= 0)
break
@@ -109,7 +110,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
commando_number--
//Spawns the rest of the commando gear.
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Commando_Manual")
//new /obj/item/gun/energy/pulse_rifle(L.loc)
var/obj/item/paper/P = new(L.loc)
@@ -120,7 +122,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
P.stamp(stamp)
qdel(stamp)
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name == "Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
qdel(L)
@@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
// Find the nuclear auth code
var/nuke_code
var/temp_code
for(var/obj/machinery/nuclearbomb/N in world)
for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
temp_code = text2num(N.r_code)
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
nuke_code = N.r_code
@@ -53,7 +53,8 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
GLOB.sent_syndicate_strike_team = 1
//Spawns commandos and equips them.
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(syndicate_commando_number <= 0)
break
+2 -4
View File
@@ -59,8 +59,7 @@
cooldown--
if(cooldown <= 0)
return FALSE
spawn(10)
process_cooldown()
addtimer(CALLBACK(src, .proc/process_cooldown), 10)
return TRUE
/obj/item/assembly/Destroy()
@@ -94,8 +93,7 @@
if(!secured || cooldown > 0)
return FALSE
cooldown = 2
spawn(10)
process_cooldown()
addtimer(CALLBACK(src, .proc/process_cooldown), 10)
return TRUE
/obj/item/assembly/toggle_secure()
+3 -4
View File
@@ -127,13 +127,12 @@
/obj/item/assembly/infra/proc/trigger_beam()
if(!secured || !on || cooldown > 0)
return FALSE
pulse(0)
cooldown = 2
pulse(FALSE)
audible_message("[bicon(src)] *beep* *beep*", null, 3)
if(first)
qdel(first)
cooldown = 2
spawn(10)
process_cooldown()
addtimer(CALLBACK(src, .proc/process_cooldown), 10)
/obj/item/assembly/infra/interact(mob/user)//TODO: change this this to the wire control panel
if(!secured) return
+3 -4
View File
@@ -47,11 +47,10 @@
/obj/item/assembly/prox_sensor/proc/sense()
if(!secured || !scanning || cooldown > 0)
return FALSE
pulse(0)
visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
cooldown = 2
spawn(10)
process_cooldown()
pulse(FALSE)
visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
addtimer(CALLBACK(src, .proc/process_cooldown), 10)
/obj/item/assembly/prox_sensor/process()
if(timing && (time >= 0))
+1 -2
View File
@@ -41,8 +41,7 @@
if(cooldown > 0)
return FALSE
cooldown = 2
spawn(10)
process_cooldown()
addtimer(CALLBACK(src, .proc/process_cooldown), 10)
signal()
return TRUE
+3 -4
View File
@@ -39,12 +39,11 @@
/obj/item/assembly/timer/proc/timer_end()
if(!secured || cooldown > 0)
return FALSE
pulse(0)
cooldown = 2
pulse(FALSE)
if(loc)
loc.visible_message("[bicon(src)] *beep* *beep*", "*beep* *beep*")
cooldown = 2
spawn(10)
process_cooldown()
addtimer(CALLBACK(src, .proc/process_cooldown), 10)
/obj/item/assembly/timer/process()
if(timing && (time > 0))
-454
View File
@@ -1,454 +0,0 @@
/obj/machinery/computer/general_air_control/atmos_automation
icon = 'icons/obj/computer.dmi'
icon_screen = "area_atmos"
icon_keyboard = "atmos_key"
circuit = /obj/item/circuitboard/atmos_automation
req_one_access_txt = "24;10"
Mtoollink = 1
show_sensors = 0
var/on = 0
name = "Atmospherics Automations Console"
var/list/datum/automation/automations = list()
/obj/machinery/computer/general_air_control/atmos_automation/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/id_tag = signal.data["tag"]
if(!id_tag)
return
sensor_information[id_tag] = signal.data
/obj/machinery/computer/general_air_control/atmos_automation/process()
if(on)
for(var/datum/automation/A in automations)
A.process()
/obj/machinery/computer/general_air_control/atmos_automation/update_icon()
icon_state = initial(icon_state)
// Broken
if(stat & BROKEN)
icon_state += "b"
// Powered
else if(stat & NOPOWER)
icon_state = initial(icon_state)
icon_state += "0"
else if(on)
icon_state += "_active"
/obj/machinery/computer/general_air_control/atmos_automation/proc/request_device_refresh(device)
send_signal(list("tag"=device, "status"))
/obj/machinery/computer/general_air_control/atmos_automation/proc/send_signal(list/data, filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data=data
signal.data["sigtype"]="command"
signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this
radio_connection.post_signal(src, signal, range = 8, filter = filter)
/obj/machinery/computer/general_air_control/atmos_automation/proc/selectValidChildFor(datum/automation/parent, mob/user, list/valid_returntypes)
var/list/choices=list()
for(var/childtype in GLOB.automation_types)
var/datum/automation/A = new childtype(src)
if(A.returntype == null)
continue
if(!(A.returntype in valid_returntypes))
continue
choices[A.name]=A
if(choices.len==0)
testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
return 0
var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
if(!label)
return 0
return choices[label]
/obj/machinery/computer/general_air_control/atmos_automation/return_text()
var/out=..()
if(on)
out += "<a href=\"?src=[UID()];on=1\" style=\"font-size:large;font-weight:bold;color:red;\">RUNNING</a>"
else
out += "<a href=\"?src=[UID()];on=1\" style=\"font-size:large;font-weight:bold;color:green;\">STOPPED</a>"
out += {"
<h2>Automations</h2>
<p>\[
<a href="?src=[UID()];add=1">
Add
</a>
|
<a href="?src=[UID()];reset=*">
Reset All
</a>
|
<a href="?src=[UID()];remove=*">
Clear
</a>
\]</p>
<p>\[
<a href="?src=[UID()];dump=1">
Export
</a>
|
<a href="?src=[UID()];read=1">
Import
</a>
\]</p>"}
if(automations.len==0)
out += "<i>No automations present.</i>"
else
for(var/datum/automation/A in automations)
out += {"
<fieldset>
<legend>
<a href="?src=[UID()];label=\ref[A]">[A.label]</a>
(<a href="?src=[UID()];reset=\ref[A]">Reset</a> |
<a href="?src=[UID()];remove=\ref[A]">&times;</a>)
</legend>
[A.GetText()]
</fieldset>
"}
return out
/obj/machinery/computer/general_air_control/atmos_automation/Topic(href,href_list)
if(..())
return 1
if(href_list["on"])
on = !on
updateUsrDialog()
update_icon()
return 1
if(href_list["add"])
var/new_child=selectValidChildFor(null,usr,list(0))
if(!new_child)
return 1
automations += new_child
updateUsrDialog()
return 1
if(href_list["label"])
var/datum/automation/A=locate(href_list["label"])
if(!A) return 1
var/nl=input(usr, "Please enter a label for this automation task.") as text|null
if(!nl) return 1
nl = copytext(sanitize(nl), 1, 50)
A.label=nl
updateUsrDialog()
return 1
if(href_list["reset"])
if(href_list["reset"]=="*")
for(var/datum/automation/A in automations)
if(!A) continue
A.OnReset()
else
var/datum/automation/A=locate(href_list["reset"])
if(!A) return 1
A.OnReset()
updateUsrDialog()
return 1
if(href_list["remove"])
if(href_list["remove"]=="*")
var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
if(confirm == "No") return 0
for(var/datum/automation/A in automations)
if(!A) continue
A.OnRemove()
automations.Remove(A)
else
var/datum/automation/A=locate(href_list["remove"])
if(!A) return 1
A.OnRemove()
automations.Remove(A)
updateUsrDialog()
return 1
if(href_list["read"])
var/code = input("Input exported AAC code.","Automations","") as message|null
if(!code) return 0
ReadCode(code)
updateUsrDialog()
return 1
if(href_list["dump"])
input("Exported AAC code:","Automations",DumpCode()) as message|null
return 0
/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeCompare(datum/automation/a, datum/automation/b, comparetype)
var/datum/automation/compare/compare=new(src)
compare.comparator = comparetype
compare.children[1] = a
compare.children[2] = b
return compare
/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeNumber(value)
var/datum/automation/static_value/val = new(src)
val.value=value
return val
/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeGetSensorData(sns_tag,field)
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sns_tag
sensor.field=field
return sensor
/obj/machinery/computer/general_air_control/atmos_automation/proc/DumpCode()
var/list/json[0]
for(var/datum/automation/A in automations)
json += list(A.Export())
return json_encode(json)
/obj/machinery/computer/general_air_control/atmos_automation/proc/ReadCode(jsonStr)
automations.Cut()
var/list/json = json_decode(jsonStr)
if(json.len>0)
for(var/list/cData in json)
if(isnull(cData) || !("type" in cData))
testing("AAC: Null cData in root JS array.")
continue
var/Atype=text2path(cData["type"])
if(!(Atype in GLOB.automation_types))
testing("AAC: Unrecognized Atype [Atype].")
continue
var/datum/automation/A = new Atype(src)
A.Import(cData)
automations += A
/obj/machinery/computer/general_air_control/atmos_automation/burnchamber
var/injector_tag="inc_in"
var/output_tag="inc_out"
var/sensor_tag="inc_sensor"
frequency=AIRLOCK_FREQ
var/temperature=1000
/obj/machinery/computer/general_air_control/atmos_automation/burnchamber/New()
..()
// On State
// Pretty much this:
/*
if(get_sensor("inc_sensor","temperature") < 200)
set_injector_state("inc_in",1)
set_vent_pump_power("inc_out",0)
else
set_vent_pump_power("inc_out",1
*/
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
var/datum/automation/static_value/val = new(src)
val.value=temperature - 800
var/datum/automation/compare/compare=new(src)
compare.comparator = "Less Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=injector_tag
inj_on.state=1
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/i = new (src)
i.label = "Fuel Injector On"
i.condition = compare
i.children_then.Add(inj_on)
i.children_then.Add(vp_off)
i.children_else.Add(vp_on)
automations += i
// Off state
/*
if(get_sensor("inc_sensor","temperature") > 1000)
set_injector_state("inc_in",0)
*/
sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
val = new(src)
val.value=temperature
compare=new(src)
compare.comparator = "Greater Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=injector_tag
inj_off.state=0
i = new (src)
i.label = "Fuel Injector Off"
i.condition = compare
i.children_then.Add(inj_off)
automations += i
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing
var/n2_injector_tag="air_n2_in"
var/o2_injector_tag="air_o2_in"
var/output_tag="air_out"
var/sensor_tag="air_sensor"
frequency=ATMOS_DISTRO_FREQ
var/temperature=1000
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/New()
..()
buildO2()
buildN2()
buildOutletVent()
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildO2()
///////////////////////////////////////////////////////////////
// Oxygen Injection
///////////////////////////////////////////////////////////////
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=o2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=o2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/i = new (src)
i.label = "Oxygen Injection"
i.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than or Equal to"
)
i.children_then.Add(inj_on)
i.children_else.Add(inj_off)
automations += i
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildN2()
///////////////////////////////////////////////////////////////
// Nitrogen Injection
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") < 100)
injector_on()
else
if(get_sensor_data("pressure") > 5000)
injector_off()
*/
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=n2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=n2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/if_on = new (src)
if_on.label = "Nitrogen Injection"
if_on.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
if_on.children_then.Add(inj_on)
var/datum/automation/if_statement/if_off=new(src)
if_off.condition=MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than"
)
if_off.children_then.Add(inj_off)
if_on.children_else.Add(if_off)
automations += if_on
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildOutletVent()
///////////////////////////////////////////////////////////////
// Outlet Management
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20)
vent_on()
else
if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100)
vent_off()
*/
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/if_on=new(src)
if_on.label="Air Output"
var/datum/automation/and/and_on=new(src)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than or Equal to"
)
)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Greater Than or Equal to"
)
)
if_on.condition=and_on
if_on.children_then.Add(vp_on)
//////////////////////////////
var/datum/automation/if_statement/if_off=new(src)
var/datum/automation/or/or_off=new(src)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than"
)
)
if_off.condition=or_off
if_off.children_then.Add(vp_off)
if_on.children_else.Add(if_off)
automations += if_on
@@ -1,44 +0,0 @@
/datum/automation/set_valve_state
name = "Digital Valve: Set Open/Closed"
var/valve=null
var/state=0
Export()
var/list/json = ..()
json["valve"]=valve
json["state"]=state
return json
Import(var/list/json)
..(json)
valve = json["valve"]
state = text2num(json["state"])
process()
if(valve)
parent.send_signal(list ("tag" = valve, "command"="valve_set","valve_set"=state))
return 0
GetText()
return "Set digital valve <a href=\"?src=[UID()];set_subject=1\">[fmtString(valve)]</a> to <a href=\"?src=[UID()];set_state=1\">[state?"open":"closed"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_state"])
state=!state
parent.updateUsrDialog()
return 1
if(href_list["set_subject"])
var/list/valves=list()
for(var/obj/machinery/atmospherics/binary/valve/digital/V in world)
if(!isnull(V.id_tag) && V.frequency == parent.frequency)
valves|=V.id_tag
if(valves.len==0)
to_chat(usr, "<span class='warning'>Unable to find any digital valves on this frequency.</span>")
return
valve = input("Select a valve:", "Sensor Data", valve) as null|anything in valves
parent.updateUsrDialog()
return 1
@@ -1,42 +0,0 @@
/datum/automation/set_emitter_power
name = "Emitter: Set Power"
var/emitter=null
var/on=0
Export()
var/list/json = ..()
json["emitter"]=emitter
json["on"]=on
return json
Import(var/list/json)
..(json)
emitter = json["emitter"]
on = text2num(json["on"])
process()
if(emitter)
parent.send_signal(list("tag" = emitter, "command"="set", "state" = on, "hiddenprints" = parent.fingerprintshidden))
return 0
GetText()
return "Set emitter <a href=\"?src=[UID()];set_subject=1\">[fmtString(emitter)]</a> to <a href=\"?src=[UID()];set_power=1\">[on?"on":"off"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_power"])
on=!on
parent.updateUsrDialog()
return 1
if(href_list["set_subject"])
var/list/emitters=list()
for(var/obj/machinery/power/emitter/E in GLOB.machines)
if(!isnull(E.id_tag) && E.frequency == parent.frequency)
emitters|=E.id_tag
if(emitters.len==0)
to_chat(usr, "<span class='warning'>Unable to find any emitters on this frequency.</span>")
return
emitter = input("Select an emitter:", "Emitter", emitter) as null|anything in emitters
parent.updateUsrDialog()
return 1
@@ -1,83 +0,0 @@
////////////////////////////////////////////
// Injector
////////////////////////////////////////////
/datum/automation/set_injector_power
name = "Injector: Power"
var/injector=null
var/state=0
Export()
var/list/json = ..()
json["injector"]=injector
json["state"]=state
return json
Import(var/list/json)
..(json)
injector = json["injector"]
state = text2num(json["state"])
process()
if(injector)
parent.send_signal(list ("tag" = injector, "power"=state))
return 0
GetText()
return "Set injector <a href=\"?src=[UID()];set_injector=1\">[fmtString(injector)]</a> power to <a href=\"?src=[UID()];toggle_state=1\">[state ? "on" : "off"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["toggle_state"])
state = !state
parent.updateUsrDialog()
return 1
if(href_list["set_injector"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in GLOB.machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names
parent.updateUsrDialog()
return 1
/datum/automation/set_injector_rate
name = "Injector: Rate"
var/injector = null
var/rate = 0
Export()
var/list/json = ..()
json["injector"] = injector
json["rate"] = rate
return json
Import(var/list/json)
..(json)
injector = json["injector"]
rate = text2num(json["rate"])
process()
if(injector)
parent.send_signal(list ("tag" = injector, "set_volume_rate"=rate))
return 0
GetText()
return "Set injector <a href=\"?src=[UID()];set_injector=1\">[fmtString(injector)]</a> transfer rate to <a href=\"?src=[UID()];set_rate=1\">[rate]</a> L/s."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_rate"])
rate = input("Set rate in L/s.", "Rate", rate) as num
parent.updateUsrDialog()
return 1
if(href_list["set_injector"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in GLOB.machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names
parent.updateUsrDialog()
return 1
@@ -1,153 +0,0 @@
/datum/automation/set_scrubber_mode
name="Scrubber: Mode"
var/scrubber=null
var/mode=1
Export()
var/list/json = ..()
json["scrubber"]=scrubber
json["mode"]=mode
return json
Import(var/list/json)
..(json)
scrubber = json["scrubber"]
mode = text2num(json["mode"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
children=list(null)
process()
if(scrubber)
parent.send_signal(list ("tag" = scrubber, "sigtype"="command", "scrubbing"=mode),filter = RADIO_FROM_AIRALARM)
return 0
GetText()
return "Set Scrubber <a href=\"?src=[UID()];set_scrubber=1\">[fmtString(scrubber)]</a> mode to <a href=\"?src=[UID()];set_mode=1\">[mode?"Scrubbing":"Syphoning"]</a>."
Topic(href,href_list)
if(..()) return
if(href_list["set_mode"])
mode=!mode
parent.updateUsrDialog()
return 1
if(href_list["set_scrubber"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines)
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
injector_names|=S.id_tag
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
parent.updateUsrDialog()
return 1
/datum/automation/set_scrubber_power
name="Scrubber: Power"
var/scrubber=null
var/state=0
Export()
var/list/json = ..()
json["scrubber"]=scrubber
json["state"]=state
return json
Import(var/list/json)
..(json)
scrubber = json["scrubber"]
state = text2num(json["state"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(scrubber)
parent.send_signal(list ("tag" = scrubber, "sigtype"="command", "power"=state),filter = RADIO_FROM_AIRALARM)
GetText()
return "Set Scrubber <a href=\"?src=[UID()];set_scrubber=1\">[fmtString(scrubber)]</a> power to <a href=\"?src=[UID()];set_power=1\">[state ? "on" : "off"]</a>."
Topic(href,href_list)
if(..()) return
if(href_list["set_power"])
state = !state
parent.updateUsrDialog()
return 1
if(href_list["set_scrubber"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines)
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
injector_names|=S.id_tag
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
parent.updateUsrDialog()
return 1
GLOBAL_LIST_INIT(gas_labels, list(
"co2" = "CO<sub>2</sub>",
"tox" = "Plasma",
"n2o" = "N<sub>2</sub>O",
"o2" = "O<sub>2</sub>",
"n2" = "N<sub>2</sub>"
))
/datum/automation/set_scrubber_gasses
name="Scrubber: Gasses"
var/scrubber=null
var/list/gasses=list(
"co2" = 1,
"tox" = 0,
"n2o" = 0,
"o2" = 0,
"n2" = 0
)
Export()
var/list/json = ..()
json["scrubber"]=scrubber
json["gasses"]=gasses
return json
Import(var/list/json)
..(json)
scrubber = json["scrubber"]
var/list/newgasses=json["gasses"]
for(var/key in newgasses)
gasses[key]=newgasses[key]
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(scrubber)
var/list/data = list ("tag" = scrubber, "sigtype"="command")
for(var/gas in gasses)
data[gas+"_scrub"]=gasses[gas]
parent.send_signal(data,filter = RADIO_FROM_AIRALARM)
GetText()
var/txt = "Set Scrubber <a href=\"?src=[UID()];set_scrubber=1\">[fmtString(scrubber)]</a> to scrub "
for(var/gas in gasses)
txt += " [GLOB.gas_labels[gas]] (<a href=\"?src=[UID()];tog_gas=[gas]\">[gasses[gas] ? "on" : "off"]</a>),"
return txt
Topic(href,href_list)
if(..()) return
if(href_list["tog_gas"])
var/gas = href_list["tog_gas"]
if(!(gas in gasses))
return
gasses[gas] = !gasses[gas]
parent.updateUsrDialog()
return 1
if(href_list["set_scrubber"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in GLOB.machines)
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
injector_names|=S.id_tag
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
parent.updateUsrDialog()
return 1
@@ -1,56 +0,0 @@
///////////////////////////////////////////
// sensor data
///////////////////////////////////////////
/datum/automation/get_sensor_data
name = "Sensor: Get Data"
var/field="temperature"
var/sensor=null
returntype=AUTOM_RT_NUM
Export()
var/list/json = ..()
json["sensor"]=sensor
json["field"]=field
return json
Import(var/list/json)
..(json)
sensor = json["sensor"]
field = json["field"]
Evaluate()
if(sensor && field && (sensor in parent.sensor_information))
return parent.sensor_information[sensor][field]
return 0
GetText()
return "<a href=\"?src=[UID()];set_field=1\">[fmtString(field)]</a> from sensor <a href=\"?src=[UID()];set_sensor=1\">[fmtString(sensor)]</a>"
Topic(href,href_list)
if(..())
return 1
if(href_list["set_field"])
field = input("Select a sensor output:", "Sensor Data", field) as null|anything in list(
"temperature",
"pressure",
"oxygen",
"toxins",
"nitrogen",
"carbon_dioxide"
)
parent.updateUsrDialog()
return 1
if(href_list["set_sensor"])
var/list/sensor_list = list()
for(var/obj/machinery/air_sensor/G in GLOB.machines)
if(!isnull(G.id_tag) && G.frequency == parent.frequency)
sensor_list|=G.id_tag
for(var/obj/machinery/meter/M in GLOB.machines)
if(!isnull(M.id_tag) && M.frequency == parent.frequency)
sensor_list|=M.id_tag
sensor = input("Select a sensor:", "Sensor Data", field) as null|anything in sensor_list
parent.updateUsrDialog()
return 1
@@ -1,314 +0,0 @@
/datum/automation/set_vent_pump_mode
name="Vent Pump: Mode"
var/vent_pump = null
var/mode = "stabilize"
var/vent_type = 0//0 for unary vents, 1 for DP vents
var/list/modes = list("stabilize","purge")
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["mode"] = mode
json["vent_type"] = vent_type
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
mode = json["mode"]
vent_type = text2num(json["vent_type"])
process()
if(vent_pump)
var/dirvalue = (mode == "stabilize" ? 1 : mode == "purge" ? 0 : 1)
parent.send_signal(list("tag" = vent_pump, "direction" = dirvalue), filter = (vent_type ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))
return 0
GetText()
return "Set <a href=\"?src=[UID()];toggle_type=1\">[vent_type ? "Dual-Port" : "Unary"]</a> vent pump <a href=\"?src=[UID()];set_vent_pump=1\">[fmtString(vent_pump)]</a> mode to <a href=\"?src=[UID()];set_mode=1\">[mode]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_mode"])
mode = input("Select a mode to put this pump into.",mode) in modes
parent.updateUsrDialog()
return 1
if(href_list["set_vent_pump"])
var/list/injector_names = list()
if(!vent_type)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names |= I.id_tag
else
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
// to_chat(world, "test")
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names |= I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["toggle_type"])
vent_type = !vent_type
parent.updateUsrDialog()
return 1
/datum/automation/set_vent_pump_power
name="Vent Pump: Power"
var/vent_pump = null
var/state = 0
var/mode = 0//0 for unary vents, 1 for DP vents.
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["state"] = state
json["mode"] = mode
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
state = text2num(json["state"])
mode = text2num(json["mode"])
process()
if(vent_pump)
parent.send_signal(list ("tag" = vent_pump, "power" = state), filter = (mode ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))
GetText()
return "Set <a href=\"?src=[UID()];toggle_mode=1\">[mode ? "Dual-Port" : "Unary"]</a> vent pump <a href=\"?src=[UID()];set_vent_pump=1\">[fmtString(vent_pump)]</a> power to <a href=\"?src=[UID()];set_power=1\">[state ? "on" : "off"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_power"])
state = !state
parent.updateUsrDialog()
return 1
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(!mode)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["toggle_mode"])
mode = !mode
parent.updateUsrDialog()
return 1
/datum/automation/set_vent_pump_pressure//controls the internal/external pressure bounds of a vent pump.
name = "Vent Pump: Pressure Settings"
var/vent_pump = null
var/intpressureout = 0//these 2 are for DP vents, if it's a unary vent you're sending to it will take intpressureout as var
var/intpressurein = 0
var/extpressure = 0
var/mode = 0//0 for unary vents, 1 for DP vents.
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["intpressureout"] = intpressureout
json["intpressurein"] = intpressurein
json["extpressure"] = extpressure
json["mode"] = mode
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
intpressureout = text2num(json["intpressureout"])
intpressurein = text2num(json["intpressurein"])
extpressure = text2num(json["extpressure"])
mode = text2num(json["mode"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(vent_pump)
var/list/data = list( \
"tag" = vent_pump, \
)
var/filter = RADIO_ATMOSIA
if(mode)//it's a DP vent
if(intpressurein)
data.Add(list("set_input_pressure" = intpressurein))
if(intpressureout)
data.Add(list("set_output_pressure" = intpressureout))
if(extpressure)
data.Add(list("set_external_pressure" = extpressure))
else
if(intpressureout)
data.Add(list("set_internal_pressure" = intpressureout))
if(extpressure)
data.Add(list("set_external_pressure" = extpressure))
filter = RADIO_FROM_AIRALARM
parent.send_signal(data, filter)
GetText()
if(mode)//DP vent
return {"Set <a href=\"?src=[UID()];swap_modes=1\">dual-port</a> vent pump <a href=\"?src=[UID()];set_vent_pump=1\">[fmtString(vent_pump)]</a>
pressure bounds: internal outwards: <a href=\"?src=[UID()];set_intpressure_out=1">[fmtString(intpressureout)]</a>
internal inwards: <a href=\"?src=[UID()];set_intpressure_in=1">[fmtString(intpressurein)]</a>
external: <a href=\"?src=[UID()];set_external=1">[fmtString(extpressure)]</a>
"}//well that was a lot to type
else
return {"Set <a href=\"?src=[UID()];swap_modes=1\">unary</a> vent pump <a href=\"?src=[UID()];set_vent_pump=1\">[fmtString(vent_pump)]</a>
pressure bounds: internal: <a href=\"?src=[UID()];set_intpressure_out=1">[fmtString(intpressureout)]</a>
external: <a href=\"?src=[UID()];set_external=1">[fmtString(extpressure)]</a>
"}//copy paste FTW
Topic(href, href_list)
if(..())
return 1
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(mode)//DP vent selection
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["set_intpressure_out"])
var/response = input("Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num
intpressureout = text2num(response)
intpressureout = between(0, intpressureout, 50*ONE_ATMOSPHERE)
parent.updateUsrDialog()
return 1
if(href_list["set_intpressure_in"])
var/response = input("Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num
intpressurein = text2num(response)
intpressurein = between(0, intpressurein, 50*ONE_ATMOSPHERE)
parent.updateUsrDialog()
return 1
if(href_list["set_external"])
var/response = input(usr,"Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num
extpressure = text2num(response)
extpressure = between(0, extpressure, 50*ONE_ATMOSPHERE)
parent.updateUsrDialog()
return 1
if(href_list["swap_modes"])
mode = !mode
vent_pump = null//if we don't clear this is could get glitchy, by which I mean not at all, whatever, stay clean
parent.updateUsrDialog()
return 1
/datum/automation/set_vent_pressure_checks
name = "Vent Pump: Pressure Checks"
var/vent_pump = null
var/checks = 1
var/mode = 0//1 for DP vent, 0 for unary vent
/*
checks bitflags
1 = external
2 = internal in (regular internal for unaries)
4 = internal out (ignored by unaries)
*/
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["checks"] = checks
json["mode"] = mode
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
checks = text2num(json["checks"])
mode = text2num(json["mode"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(vent_pump)
parent.send_signal(list("tag" = vent_pump, "checks" = checks), filter = (mode ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))//not gonna bother with a sanity check here, there *should* not be any problems
GetText()
if(mode)
return {"Set <a href=\"?src=[UID()];swap_modes=1\">dual-port</a> vent pump <a href=\"?src=[UID()];set_vent_pump=1\">[fmtString(vent_pump)]</a> pressure checks to:
external <a href=\"?src=[UID()];togglecheck=1\">[checks&1 ? "Enabled" : "Disabled"]</a>
internal inwards <a href=\"?src=[UID()];togglecheck=2\">[checks&2 ? "Enabled" : "Disabled"]</a>
internal outwards <a href=\"?src=[UID()];togglecheck=4\">[checks&4 ? "Enabled" : "Disabled"]</a>
"}
else
return {"Set <a href=\"?src=[UID()];swap_modes=1\">unary</a> vent pump <a href=\"?src=[UID()];set_vent_pump=1\">[fmtString(vent_pump)]</a> pressure checks to:
external: <a href=\"?src=[UID()];togglecheck=1\">[checks&1 ? "Enabled" : "Disabled"]</a>,
internal: <a href=\"?src=[UID()];togglecheck=2\">[checks&2 ? "Enabled" : "Disabled"]</a>
"}
Topic(href, href_list)
if(..())
return 1
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(mode)//DP vent selection
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["swap_modes"])
mode = !mode
vent_pump = null//if we don't clear this is could get glitchy, by which I mean not at all, whatever, stay clean
if(!mode && checks&4)//disable this bitflag since we're switching to unaries
checks &= ~4
parent.updateUsrDialog()
return 1
if(href_list["togglecheck"])
var/bitflagvalue = text2num(href_list["togglecheck"])
if(mode)
if(!(bitflagvalue in list(1, 2, 4)))
return 0
else if(!(bitflagvalue in list(1, 2)))
return 0
if(checks&bitflagvalue)//the bitflag is on ATM
checks &= ~bitflagvalue
else//can't not be off
checks |= bitflagvalue
parent.updateUsrDialog()
return 1

Some files were not shown because too many files have changed in this diff Show More