diff --git a/_maps/map_files/CogStation/CogStation.dmm b/_maps/map_files/CogStation/CogStation.dmm
index 0817c3033e..47182ff151 100644
--- a/_maps/map_files/CogStation/CogStation.dmm
+++ b/_maps/map_files/CogStation/CogStation.dmm
@@ -346,9 +346,6 @@
/obj/structure/cable{
icon_state = "0-8"
},
-/obj/structure/cable{
- icon_state = "4-8"
- },
/turf/open/space/basic,
/area/solar/starboard/fore)
"aaU" = (
@@ -410,10 +407,7 @@
"abc" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
- icon_state = "2-4"
- },
-/obj/structure/cable{
- icon_state = "2-8"
+ icon_state = "0-4"
},
/turf/open/space/basic,
/area/solar/starboard/fore)
@@ -432,10 +426,7 @@
"abe" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
- icon_state = "0-4"
- },
-/obj/structure/cable{
- icon_state = "4-8"
+ icon_state = "0-2"
},
/turf/open/space/basic,
/area/solar/starboard/fore)
@@ -1699,10 +1690,10 @@
"aee" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
- icon_state = "2-4"
+ icon_state = "0-8"
},
/turf/open/space/basic,
-/area/solar/starboard/fore)
+/area/solar/port)
"aef" = (
/obj/machinery/atmospherics/pipe/manifold/general/visible{
dir = 8
@@ -3426,7 +3417,7 @@
"aiq" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
- icon_state = "4-8"
+ icon_state = "0-2"
},
/turf/open/space/basic,
/area/solar/port)
@@ -3706,17 +3697,9 @@
/area/maintenance/starboard/fore)
"ajc" = (
/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/structure/cable{
- icon_state = "2-8"
- },
-/obj/structure/cable{
- icon_state = "1-8"
- },
+/obj/structure/cable,
/turf/open/space/basic,
-/area/solar/starboard/fore)
+/area/solar/port)
"ajd" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -6992,14 +6975,9 @@
/area/security/brig)
"aqA" = (
/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "0-2"
- },
-/obj/structure/cable{
- icon_state = "1-2"
- },
+/obj/structure/cable,
/turf/open/space/basic,
-/area/solar/starboard/fore)
+/area/solar/starboard/aft)
"aqB" = (
/turf/closed/wall,
/area/hydroponics)
@@ -9058,10 +9036,6 @@
/area/hallway/secondary/civilian)
"avg" = (
/obj/machinery/door/firedoor,
-/obj/machinery/door/airlock/public/glass{
- name = "Brig";
- req_access_txt = "2"
- },
/obj/structure/cable{
icon_state = "4-8"
},
@@ -9070,6 +9044,12 @@
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 8
},
+/obj/machinery/turnstile{
+ name = "Genpop Entrance Turnstile";
+ icon_state = "turnstile_map";
+ dir = 8;
+ req_access_txt = "69"
+ },
/turf/open/floor/plasteel,
/area/security/prison)
"avh" = (
@@ -9177,13 +9157,10 @@
"avr" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
- icon_state = "1-8"
- },
-/obj/structure/cable{
- icon_state = "1-4"
+ icon_state = "0-8"
},
/turf/open/space/basic,
-/area/solar/starboard/fore)
+/area/solar/starboard/aft)
"avs" = (
/turf/closed/wall,
/area/router/service)
@@ -9743,7 +9720,6 @@
/obj/structure/cable{
icon_state = "4-8"
},
-/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 8
},
@@ -9751,6 +9727,12 @@
id = "briglockdown";
name = "Brig Lockdown"
},
+/obj/machinery/turnstile{
+ name = "Genpop Entrance Turnstile";
+ icon_state = "turnstile_map";
+ dir = 8;
+ req_access_txt = "69"
+ },
/turf/open/floor/plasteel,
/area/security/prison)
"awI" = (
@@ -12721,6 +12703,9 @@
pixel_x = 24;
req_access_txt = "2"
},
+/obj/effect/turf_decal/arrows/red{
+ dir = 1
+ },
/turf/open/floor/plasteel,
/area/security/brig)
"aCF" = (
@@ -12743,22 +12728,21 @@
/turf/open/floor/plasteel,
/area/security/brig)
"aCH" = (
-/obj/machinery/door/firedoor,
-/obj/machinery/door/airlock/public/glass{
- name = "Brig";
- req_access_txt = "2"
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
},
/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
dir = 4
},
-/obj/effect/turf_decal/delivery,
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/door/poddoor/preopen{
- id = "briglockdown";
- name = "Brig Lockdown"
+/obj/effect/turf_decal/arrows/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/arrows/red{
+ dir = 1
},
/turf/open/floor/plasteel,
-/area/security/prison)
+/area/security/brig)
"aCI" = (
/obj/effect/turf_decal/tile/green,
/obj/effect/turf_decal/tile/green{
@@ -13411,15 +13395,23 @@
/turf/open/floor/plating,
/area/maintenance/solars/port)
"aDW" = (
-/obj/effect/turf_decal/tile/red,
-/obj/effect/turf_decal/tile/red{
- dir = 4
- },
+/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
dir = 4
},
+/obj/effect/turf_decal/delivery,
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/door/poddoor/preopen{
+ id = "briglockdown";
+ name = "Brig Lockdown"
+ },
+/obj/machinery/turnstile{
+ dir = 4;
+ name = "Genpop Exit Turnstile";
+ req_access_txt = "70"
+ },
/turf/open/floor/plasteel,
-/area/security/brig)
+/area/security/prison)
"aDX" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -13431,6 +13423,10 @@
dir = 4
},
/obj/effect/decal/cleanable/dirt,
+/obj/machinery/door/poddoor/preopen{
+ id = "briglockdown";
+ name = "Brig Lockdown"
+ },
/turf/open/floor/plasteel,
/area/security/prison)
"aDZ" = (
@@ -22792,12 +22788,6 @@
/area/library)
"aXg" = (
/obj/structure/bookcase/random/reference,
-/obj/effect/turf_decal/tile/yellow{
- dir = 1
- },
-/obj/effect/turf_decal/tile/yellow{
- dir = 4
- },
/turf/open/floor/wood,
/area/library)
"aXh" = (
@@ -24357,16 +24347,14 @@
/turf/open/floor/carpet,
/area/crew_quarters/bar)
"bau" = (
-/obj/structure/disposalpipe/segment,
-/obj/machinery/camera{
- c_tag = "Aft Maintenance - Port";
- pixel_x = 22
+/obj/effect/turf_decal/stripes/line{
+ dir = 4
},
-/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+/obj/structure/disposalpipe/junction/flip{
dir = 8
},
-/turf/open/floor/plating,
-/area/maintenance/aft)
+/turf/open/floor/plasteel/white,
+/area/science/lab)
"bav" = (
/obj/structure/chair/sofa/right,
/obj/machinery/firealarm{
@@ -26746,24 +26734,18 @@
/turf/open/floor/plasteel,
/area/quartermaster/sorting)
"bga" = (
-/obj/structure/cable{
- icon_state = "0-4"
- },
-/obj/machinery/power/apc/highcap/five_k{
- areastring = "/area/hallway/primary/aft";
- dir = 1;
- name = "Aft Primary Hallway APC";
- pixel_x = 1;
- pixel_y = 24
+/obj/effect/turf_decal/tile/blue,
+/obj/effect/turf_decal/tile/blue{
+ dir = 8
},
/obj/structure/cable{
- icon_state = "2-4"
+ icon_state = "1-2"
},
-/obj/machinery/atmospherics/pipe/simple/orange/hidden{
- dir = 10
+/obj/structure/disposalpipe/segment{
+ dir = 4
},
-/turf/open/floor/plating,
-/area/maintenance/aft)
+/turf/open/floor/plasteel,
+/area/hallway/primary/aft)
"bgb" = (
/obj/structure/disposalpipe/sorting/mail{
sortType = 30
@@ -31381,13 +31363,28 @@
/turf/open/space/basic,
/area/space/nearstation)
"bpA" = (
-/obj/structure/closet/emcloset,
-/turf/open/floor/plating,
-/area/maintenance/aft)
+/obj/effect/turf_decal/tile/blue,
+/obj/effect/turf_decal/tile/blue{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/blue{
+ dir = 4
+ },
+/obj/machinery/firealarm{
+ dir = 8;
+ pixel_x = 26
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plasteel,
+/area/hallway/primary/aft)
"bpB" = (
-/obj/effect/spawner/lootdrop/maintenance,
-/turf/open/floor/plating,
-/area/maintenance/aft)
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/closed/wall,
+/area/hallway/primary/aft)
"bpC" = (
/obj/effect/turf_decal/plaque{
icon_state = "L10"
@@ -31707,13 +31704,10 @@
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"bqs" = (
-/obj/structure/cable{
- icon_state = "1-8"
+/obj/structure/closet/emcloset,
+/obj/structure/disposalpipe/segment{
+ dir = 4
},
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
/turf/open/floor/plating,
/area/maintenance/aft)
"bqt" = (
@@ -32402,17 +32396,12 @@
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"brJ" = (
-/obj/machinery/door/firedoor,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
-/obj/machinery/door/airlock/maintenance{
- name = "Chemistry Maintenance";
- req_access_txt = "5; 33"
+/obj/effect/spawner/lootdrop/maintenance,
+/obj/structure/disposalpipe/segment{
+ dir = 4
},
/turf/open/floor/plating,
-/area/medical/chemistry)
+/area/maintenance/aft)
"brK" = (
/obj/structure/window/reinforced/spawner/east,
/obj/machinery/chem_dispenser,
@@ -33022,7 +33011,6 @@
/turf/open/space/basic,
/area/space/nearstation)
"bsU" = (
-/obj/structure/window/reinforced,
/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"bsV" = (
@@ -33463,17 +33451,8 @@
/turf/open/floor/plating,
/area/router)
"bua" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 1
- },
-/obj/effect/turf_decal/tile/purple{
- dir = 4
- },
-/obj/effect/turf_decal/stripes/line{
- dir = 1
- },
-/turf/open/floor/plasteel/dark/side,
-/area/science/robotics/lab)
+/turf/closed/wall/r_wall,
+/area/science/robotics/mechbay)
"bub" = (
/obj/effect/turf_decal/tile/yellow,
/obj/effect/turf_decal/tile/yellow{
@@ -33997,16 +33976,12 @@
/turf/open/floor/plating,
/area/maintenance/solars/starboard/fore)
"bvn" = (
-/obj/effect/turf_decal/tile/blue,
-/obj/effect/turf_decal/tile/blue{
- dir = 8
- },
+/obj/machinery/rnd/production/protolathe/department/science,
/obj/structure/disposalpipe/segment{
- dir = 5
+ dir = 4
},
-/obj/structure/window/reinforced/spawner,
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
+/turf/open/floor/plasteel,
+/area/science/lab)
"bvo" = (
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 8
@@ -36817,24 +36792,14 @@
/turf/open/floor/plating,
/area/maintenance/disposal)
"bBs" = (
-/obj/structure/cable{
- icon_state = "1-2"
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 5
},
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
-/obj/structure/cable{
- icon_state = "1-4"
- },
-/obj/effect/turf_decal/tile/yellow{
+/obj/structure/disposalpipe/segment{
dir = 4
},
-/obj/effect/turf_decal/tile/blue{
- dir = 1
- },
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/turf/open/floor/plasteel/white,
-/area/medical/chemistry)
+/turf/open/floor/plating,
+/area/maintenance/aft)
"bBt" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -37524,11 +37489,13 @@
name = "Thermo-Electric Generator"
})
"bCX" = (
-/obj/effect/turf_decal/bot,
-/obj/machinery/vending/snack/random,
-/obj/structure/disposalpipe/segment,
+/obj/machinery/rnd/production/circuit_imprinter/department/science,
+/obj/item/reagent_containers/glass/beaker/sulphuric,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
/turf/open/floor/plasteel,
-/area/hallway/primary/aft)
+/area/science/lab)
"bCY" = (
/obj/effect/turf_decal/tile/yellow{
dir = 4
@@ -37578,12 +37545,19 @@
/turf/open/floor/plasteel/grimy,
/area/security/detectives_office)
"bDd" = (
-/obj/effect/turf_decal/tile/blue,
-/obj/effect/turf_decal/tile/blue{
+/obj/structure/disposalpipe/segment,
+/obj/machinery/camera{
+ c_tag = "Aft Maintenance - Port";
+ pixel_x = 22
+ },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 8
},
-/turf/open/floor/plasteel,
-/area/hallway/primary/aft)
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plating,
+/area/maintenance/aft)
"bDe" = (
/obj/machinery/disposal/bin{
name = "Corpse Delivery"
@@ -37657,19 +37631,27 @@
/turf/open/floor/plasteel,
/area/quartermaster/warehouse)
"bDm" = (
-/obj/effect/turf_decal/tile/blue,
-/obj/effect/turf_decal/tile/blue{
- dir = 8
+/obj/structure/cable{
+ icon_state = "0-4"
},
-/obj/effect/turf_decal/tile/blue{
- dir = 4
+/obj/machinery/power/apc/highcap/five_k{
+ areastring = "/area/hallway/primary/aft";
+ dir = 1;
+ name = "Aft Primary Hallway APC";
+ pixel_x = 1;
+ pixel_y = 24
},
-/obj/machinery/firealarm{
- dir = 8;
- pixel_x = 26
+/obj/structure/cable{
+ icon_state = "2-4"
},
-/turf/open/floor/plasteel,
-/area/hallway/primary/aft)
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 10
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 10
+ },
+/turf/open/floor/plating,
+/area/maintenance/aft)
"bDn" = (
/obj/machinery/icecream_vat,
/turf/open/floor/plasteel/freezer,
@@ -37936,8 +37918,9 @@
/turf/open/floor/plasteel/stairs,
/area/crew_quarters/bar)
"bDT" = (
-/obj/machinery/mecha_part_fabricator,
-/turf/open/floor/plasteel/dark,
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/turf/closed/wall,
/area/science/robotics/lab)
"bDU" = (
/obj/machinery/atmospherics/pipe/simple/supplymain/hidden,
@@ -38736,25 +38719,11 @@
/turf/open/floor/plasteel,
/area/science/xenobiology)
"bFx" = (
-/obj/structure/table,
-/obj/item/stack/sheet/metal/fifty,
-/obj/item/stack/sheet/metal/fifty,
-/obj/item/stack/sheet/glass/fifty{
- pixel_x = 1
+/obj/machinery/mecha_part_fabricator,
+/obj/effect/turf_decal/stripes/line{
+ dir = 10
},
-/obj/item/stack/sheet/glass/fifty{
- pixel_x = 1
- },
-/obj/item/stack/sheet/metal/fifty,
-/obj/item/stack/sheet/metal/fifty,
-/obj/machinery/requests_console{
- department = "Robotics";
- departmentType = 2;
- name = "Robotics RC";
- pixel_y = 31;
- receive_ore_updates = 1
- },
-/turf/open/floor/plasteel/dark,
+/turf/open/floor/plasteel,
/area/science/robotics/lab)
"bFy" = (
/obj/machinery/atmospherics/pipe/simple/orange/hidden,
@@ -38783,22 +38752,20 @@
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"bFB" = (
-/obj/structure/window/reinforced{
- dir = 8
+/obj/structure/disposalpipe/segment{
+ dir = 4
},
-/obj/structure/bodycontainer/morgue{
- dir = 2
- },
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
+/turf/closed/wall,
+/area/science/lab)
"bFC" = (
-/obj/structure/table,
-/obj/item/mmi,
-/obj/item/mmi,
-/obj/item/mmi,
-/obj/item/storage/box/bodybags,
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
+/obj/effect/turf_decal/bot,
+/obj/machinery/vending/snack/random,
+/obj/structure/disposalpipe/segment,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plasteel,
+/area/hallway/primary/aft)
"bFD" = (
/obj/structure/disposaloutlet{
dir = 4
@@ -38810,19 +38777,16 @@
/turf/open/floor/plasteel,
/area/quartermaster/sorting)
"bFE" = (
-/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
- dir = 8
+/obj/structure/cable{
+ icon_state = "1-8"
},
-/obj/structure/table/glass,
-/obj/item/reagent_containers/glass/beaker/large{
- pixel_x = -3;
- pixel_y = 3
+/obj/structure/cable{
+ icon_state = "1-2"
},
-/obj/item/reagent_containers/glass/beaker/large,
-/obj/item/reagent_containers/dropper,
-/obj/item/reagent_containers/dropper,
-/turf/open/floor/plasteel/white,
-/area/medical/chemistry)
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/structure/disposalpipe/segment,
+/turf/open/floor/plating,
+/area/maintenance/aft)
"bFF" = (
/obj/machinery/light_switch{
pixel_y = 24
@@ -39995,44 +39959,65 @@
/turf/open/floor/plasteel/white,
/area/science/xenobiology)
"bIc" = (
-/obj/effect/spawner/structure/window/reinforced,
-/obj/structure/disposalpipe/junction{
- dir = 8
+/obj/structure/cable{
+ icon_state = "1-2"
},
-/obj/machinery/door/poddoor/shutters/preopen{
- id = "robotics";
- name = "robotics lab shutters"
+/obj/structure/disposalpipe/sorting/mail{
+ dir = 1;
+ sortType = 14
},
-/turf/open/floor/plating,
+/obj/machinery/atmospherics/pipe/simple/cyan/hidden,
+/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"bId" = (
-/obj/effect/turf_decal/tile/purple,
-/obj/effect/turf_decal/stripes/corner,
-/turf/open/floor/plasteel/dark/side{
- dir = 9
+/obj/structure/table,
+/obj/item/mmi,
+/obj/item/mmi,
+/obj/item/storage/box/bodybags,
+/obj/structure/window/reinforced/spawner/west,
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
},
+/obj/effect/turf_decal/tile/purple{
+ dir = 4
+ },
+/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bIe" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 8
+/obj/structure/table,
+/obj/item/stack/sheet/metal/fifty,
+/obj/item/stack/sheet/metal/fifty,
+/obj/item/stack/sheet/glass/fifty{
+ pixel_x = 1
+ },
+/obj/item/stack/sheet/glass/fifty{
+ pixel_x = 1
+ },
+/obj/item/stack/sheet/metal/fifty,
+/obj/item/stack/sheet/metal/fifty,
+/obj/machinery/requests_console{
+ department = "Robotics";
+ departmentType = 2;
+ name = "Robotics RC";
+ pixel_y = 31;
+ receive_ore_updates = 1
},
-/obj/effect/turf_decal/tile/purple,
/obj/effect/turf_decal/stripes/line,
-/obj/effect/turf_decal/loading_area,
-/turf/open/floor/plasteel/dark/side{
- dir = 1
- },
+/turf/open/floor/plasteel,
/area/science/robotics/lab)
"bIf" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 8
+/obj/machinery/door/firedoor,
+/obj/structure/cable{
+ icon_state = "1-2"
},
-/obj/effect/turf_decal/tile/purple,
-/obj/effect/turf_decal/stripes/line,
-/turf/open/floor/plasteel/dark/side{
- dir = 1
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/machinery/door/airlock/maintenance{
+ name = "Chemistry Maintenance";
+ req_access_txt = "5; 33"
},
-/area/science/robotics/lab)
+/obj/structure/disposalpipe/segment,
+/turf/open/floor/plating,
+/area/medical/chemistry)
"bIg" = (
/obj/structure/table,
/obj/effect/turf_decal/tile/purple{
@@ -40050,10 +40035,11 @@
name = "Research Sector"
})
"bIh" = (
-/obj/structure/window/reinforced{
+/obj/machinery/disposal/bin,
+/obj/effect/turf_decal/delivery/white,
+/obj/structure/disposalpipe/trunk{
dir = 8
},
-/obj/structure/window/reinforced,
/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"bIi" = (
@@ -40061,8 +40047,21 @@
/turf/closed/wall,
/area/medical/chemistry)
"bIj" = (
-/obj/machinery/door/window/southright,
-/turf/open/floor/plasteel/dark,
+/obj/structure/table/optable{
+ name = "Robotics Operating Table"
+ },
+/obj/item/tank/internals/anesthetic,
+/obj/item/clothing/mask/breath,
+/obj/machinery/light{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/purple{
+ dir = 4
+ },
+/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bIk" = (
/turf/closed/wall/r_wall,
@@ -40145,13 +40144,23 @@
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
"bIt" = (
-/obj/structure/disposalpipe/segment,
+/obj/structure/cable{
+ icon_state = "1-2"
+ },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/structure/cable{
+ icon_state = "1-4"
+ },
/obj/effect/turf_decal/tile/yellow{
- dir = 8
+ dir = 4
},
/obj/effect/turf_decal/tile/blue{
dir = 1
},
+/obj/structure/cable{
+ icon_state = "1-8"
+ },
+/obj/structure/disposalpipe/segment,
/turf/open/floor/plasteel/white,
/area/medical/chemistry)
"bIu" = (
@@ -40287,12 +40296,21 @@
/turf/open/floor/plasteel,
/area/science/xenobiology)
"bIL" = (
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/machinery/atmospherics/pipe/manifold/orange/hidden{
+/obj/structure/disposalpipe/segment,
+/obj/effect/turf_decal/tile/yellow{
dir = 8
},
+/obj/effect/turf_decal/tile/blue{
+ dir = 1
+ },
+/obj/structure/table/glass,
+/obj/item/reagent_containers/glass/beaker/large{
+ pixel_x = -3;
+ pixel_y = 3
+ },
+/obj/item/reagent_containers/glass/beaker/large,
+/obj/item/reagent_containers/dropper,
+/obj/item/reagent_containers/dropper,
/turf/open/floor/plasteel/white,
/area/medical/chemistry)
"bIM" = (
@@ -40483,7 +40501,13 @@
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
"bJd" = (
-/obj/effect/landmark/event_spawn,
+/obj/structure/cable{
+ icon_state = "1-2"
+ },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/structure/disposalpipe/segment{
+ dir = 5
+ },
/turf/open/floor/plasteel/white,
/area/medical/chemistry)
"bJe" = (
@@ -40709,47 +40733,42 @@
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"bJC" = (
-/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
- dir = 4
+/obj/machinery/camera{
+ c_tag = "Library";
+ network = list("ss13","rd")
},
-/obj/machinery/button/door{
- id = "robotics2";
- name = "Shutters Control Button";
- pixel_x = 24;
- pixel_y = -24;
- req_access_txt = "29"
+/obj/machinery/airalarm{
+ pixel_y = 24
},
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
+/turf/open/floor/wood,
+/area/library)
"bJD" = (
-/obj/machinery/atmospherics/components/unary/vent_pump/on{
- dir = 8
+/obj/machinery/disposal/bin{
+ name = "Corpse Disposal Unit"
},
-/obj/machinery/disposal/bin,
-/obj/structure/disposalpipe/trunk{
- dir = 8
+/obj/structure/disposalpipe/trunk,
+/obj/effect/turf_decal/stripes/red/full,
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
},
-/turf/open/floor/plasteel/dark,
+/obj/effect/turf_decal/tile/purple,
+/obj/effect/turf_decal/tile/purple{
+ dir = 4
+ },
+/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bJE" = (
-/obj/structure/table,
-/obj/item/stack/sheet/plasteel{
- amount = 10;
- pixel_x = -5
+/obj/machinery/mecha_part_fabricator,
+/obj/machinery/light{
+ dir = 1
},
-/obj/item/stack/cable_coil/random,
-/obj/item/stack/cable_coil/random{
- pixel_x = -2;
- pixel_y = -2
+/obj/effect/turf_decal/stripes/line{
+ dir = 6
},
-/obj/item/stack/cable_coil/random{
- pixel_x = 2;
- pixel_y = 2
+/obj/machinery/light_switch{
+ pixel_y = 24
},
-/turf/open/floor/plasteel/dark,
+/turf/open/floor/plasteel,
/area/science/robotics/lab)
"bJF" = (
/obj/effect/turf_decal/tile/purple{
@@ -40960,40 +40979,33 @@
/turf/open/floor/plasteel,
/area/science/xenobiology)
"bKd" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 4
- },
-/obj/effect/turf_decal/tile/purple,
-/obj/effect/turf_decal/stripes/line{
- dir = 4
- },
-/obj/machinery/button/door{
- id = "robotics";
- name = "Shutters Control Button";
- pixel_y = 8;
- req_access_txt = "29";
- pixel_x = -24
- },
-/turf/open/floor/plasteel/dark/side{
- dir = 8
+/obj/structure/table,
+/obj/item/assembly/flash/handheld,
+/obj/item/assembly/flash/handheld,
+/obj/item/assembly/flash/handheld,
+/obj/item/assembly/flash/handheld,
+/obj/item/assembly/flash/handheld,
+/obj/item/assembly/flash/handheld,
+/obj/item/clothing/glasses/welding,
+/obj/item/clothing/glasses/welding,
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/structure/disposalpipe/segment,
+/obj/item/radio/intercom{
+ name = "Station Intercom (Common)";
+ pixel_y = 26
},
+/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"bKe" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 1
+/obj/effect/spawner/structure/window/reinforced,
+/obj/machinery/door/poddoor/shutters/preopen{
+ id = "robotics";
+ name = "robotics lab shutters"
},
-/obj/effect/turf_decal/tile/purple{
- dir = 8
- },
-/obj/effect/turf_decal/stripes/line{
- dir = 8
- },
-/obj/machinery/atmospherics/pipe/simple/orange/hidden{
- dir = 5
- },
-/turf/open/floor/plasteel/dark/side{
- dir = 4
+/obj/structure/disposalpipe/segment{
+ dir = 9
},
+/turf/open/floor/plating,
/area/science/robotics/lab)
"bKf" = (
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
@@ -41325,101 +41337,30 @@
/area/science/xenobiology)
"bKN" = (
/obj/structure/table,
-/obj/item/book/manual/wiki/robotics_cyborgs{
- pixel_x = -3;
- pixel_y = -2
- },
-/obj/item/book/manual/ripley_build_and_repair{
- pixel_x = 3;
- pixel_y = 2
- },
-/obj/item/mmi/posibrain,
-/turf/open/floor/plasteel/dark,
+/obj/item/storage/backpack/duffelbag/med/surgery,
+/obj/structure/window/reinforced/spawner/west,
+/obj/structure/window/reinforced,
+/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bKO" = (
-/obj/structure/table,
-/obj/item/storage/belt/utility,
-/obj/item/storage/belt/utility,
-/obj/item/multitool{
- pixel_x = 3
- },
-/obj/item/multitool{
- pixel_x = 3
- },
-/obj/item/storage/toolbox/mechanical{
- pixel_x = 2;
- pixel_y = -1
- },
-/obj/item/storage/toolbox/mechanical{
- pixel_x = 2;
- pixel_y = -1
- },
-/obj/item/storage/toolbox/electrical{
- pixel_x = -1;
- pixel_y = 4
- },
-/obj/item/storage/toolbox/electrical{
- pixel_x = -1;
- pixel_y = 4
- },
-/obj/item/clothing/head/welding{
- pixel_x = -3;
- pixel_y = 5
- },
-/obj/item/clothing/head/welding{
- pixel_x = -3;
- pixel_y = 5
- },
-/turf/open/floor/plasteel/dark,
+/obj/structure/window/reinforced,
+/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bKP" = (
-/obj/structure/table,
-/obj/machinery/cell_charger,
-/obj/item/stock_parts/cell/high{
- charge = 100;
- maxcharge = 15000;
- pixel_y = 3;
- pixel_x = 4
- },
-/obj/item/stock_parts/cell/high{
- charge = 100;
- maxcharge = 15000;
- pixel_x = -6;
- pixel_y = 6
- },
-/obj/item/stock_parts/cell/high{
- charge = 100;
- maxcharge = 15000
- },
-/obj/machinery/button/door{
- id = "robotics3";
- name = "Shutters Control Button";
- pixel_x = 24;
- pixel_y = -24;
- req_access_txt = "29"
- },
-/turf/open/floor/plasteel/dark,
+/obj/machinery/door/window/southright,
+/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"bKQ" = (
-/obj/machinery/droneDispenser,
-/obj/item/stack/sheet/metal/fifty,
-/obj/item/stack/sheet/glass/fifty,
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
-"bKR" = (
-/obj/effect/turf_decal/tile/yellow{
- dir = 1
- },
-/obj/effect/turf_decal/tile/yellow{
+/obj/structure/disposalpipe/segment,
+/obj/structure/window/reinforced,
+/obj/effect/turf_decal/tile/purple,
+/obj/effect/turf_decal/tile/purple{
dir = 4
},
-/obj/machinery/camera{
- c_tag = "Library";
- network = list("ss13","rd")
- },
-/obj/machinery/airalarm{
- pixel_y = 24
- },
+/turf/open/floor/plasteel/white,
+/area/science/robotics/lab)
+"bKR" = (
+/obj/structure/bookcase/random/religion,
/turf/open/floor/wood,
/area/library)
"bKS" = (
@@ -42965,13 +42906,10 @@
"bOc" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
- icon_state = "0-8"
- },
-/obj/structure/cable{
- icon_state = "4-8"
+ icon_state = "0-4"
},
/turf/open/space/basic,
-/area/solar/port)
+/area/solar/starboard/aft)
"bOd" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
@@ -42992,10 +42930,10 @@
"bOf" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
- icon_state = "2-8"
+ icon_state = "0-2"
},
/turf/open/space/basic,
-/area/solar/port)
+/area/solar/starboard/aft)
"bOg" = (
/obj/effect/turf_decal/stripes/line{
dir = 1
@@ -44355,29 +44293,18 @@
name = "Research Sector"
})
"bQQ" = (
-/obj/effect/turf_decal/tile/red,
-/obj/effect/turf_decal/tile/red{
- dir = 8
- },
-/obj/effect/turf_decal/tile/red{
+/obj/effect/turf_decal/tile/purple{
dir = 4
},
-/obj/effect/turf_decal/tile/red{
- dir = 1
+/obj/effect/turf_decal/tile/purple,
+/obj/machinery/firealarm{
+ dir = 4;
+ pixel_x = -28
},
-/obj/machinery/disposal/bin,
-/obj/machinery/light,
-/obj/effect/turf_decal/stripes/red/full,
-/obj/structure/disposalpipe/trunk{
- dir = 1
+/turf/open/floor/plasteel/dark/side{
+ dir = 8
},
-/obj/structure/sign/poster/official/cleanliness{
- pixel_y = -32
- },
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/zone2{
- name = "Medbay Treatment Center"
- })
+/area/science/robotics/lab)
"bQR" = (
/obj/effect/spawner/structure/window/reinforced,
/obj/structure/sign/directions/evac{
@@ -44938,26 +44865,24 @@
name = "Research Sector"
})
"bRT" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 8
- },
+/obj/effect/turf_decal/tile/purple,
/obj/effect/turf_decal/tile/purple{
dir = 1
},
-/obj/structure/disposalpipe/segment,
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
-/obj/effect/turf_decal/tile/purple,
-/obj/machinery/power/apc{
- areastring = "/area/science/robotics/lab";
- dir = 8;
- name = "Robotics Lab APC";
- pixel_x = -25
+/obj/effect/turf_decal/tile/yellow{
+ dir = 4
},
-/obj/structure/cable{
- icon_state = "0-4"
+/obj/effect/turf_decal/tile/yellow{
+ dir = 8
},
-/turf/open/floor/plasteel,
-/area/science/robotics/lab)
+/obj/structure/disposalpipe/trunk{
+ dir = 8
+ },
+/obj/machinery/disposal/bin{
+ name = "Lab Delivery"
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/chemistry)
"bRU" = (
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 8
@@ -44965,14 +44890,10 @@
/turf/open/floor/plasteel,
/area/ai_monitored/storage/eva)
"bRV" = (
-/obj/structure/disposalpipe/segment,
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
-/obj/effect/spawner/structure/window/reinforced,
-/obj/machinery/door/poddoor/shutters/preopen{
- id = "robotics";
- name = "robotics lab shutters"
+/obj/effect/turf_decal/tile/purple,
+/turf/open/floor/plasteel/dark/side{
+ dir = 9
},
-/turf/open/floor/plating,
/area/science/robotics/lab)
"bRW" = (
/obj/effect/turf_decal/bot,
@@ -44988,24 +44909,25 @@
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"bRX" = (
-/obj/effect/landmark/start/medical_doctor,
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
-"bRY" = (
-/obj/structure/closet/secure_closet/medical3,
-/obj/effect/turf_decal/tile/blue,
-/obj/effect/turf_decal/tile/blue{
- dir = 4
+/obj/structure/cable{
+ icon_state = "1-2"
},
-/obj/item/storage/belt/medical,
-/obj/item/clothing/neck/stethoscope,
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
-"bRZ" = (
-/obj/structure/closet/l3closet,
/obj/structure/disposalpipe/segment,
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
+/obj/machinery/atmospherics/pipe/manifold/cyan/hidden{
+ dir = 8
+ },
+/turf/open/floor/plasteel/dark,
+/area/science/robotics/lab)
+"bRY" = (
+/obj/machinery/atmospherics/components/unary/vent_pump/on{
+ dir = 8
+ },
+/turf/open/floor/plasteel/dark,
+/area/science/robotics/lab)
+"bRZ" = (
+/obj/structure/bookcase/random/fiction,
+/turf/open/floor/wood,
+/area/library)
"bSa" = (
/obj/structure/closet/secure_closet/medical3,
/obj/effect/turf_decal/tile/blue,
@@ -45028,24 +44950,24 @@
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
"bSd" = (
-/obj/structure/table,
-/obj/item/assembly/flash/handheld,
-/obj/item/assembly/flash/handheld,
-/obj/item/assembly/flash/handheld,
-/obj/item/assembly/flash/handheld,
-/obj/item/assembly/flash/handheld,
-/obj/item/assembly/flash/handheld,
-/obj/item/clothing/glasses/welding,
-/obj/item/clothing/glasses/welding,
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
-/obj/structure/disposalpipe/segment,
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
-"bSe" = (
-/obj/machinery/computer/rdconsole/robotics{
+/obj/effect/turf_decal/tile/purple{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/purple,
+/obj/effect/turf_decal/loading_area,
+/turf/open/floor/plasteel/dark/side{
+ dir = 1
+ },
+/area/science/robotics/lab)
+"bSe" = (
+/obj/effect/turf_decal/tile/purple{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/purple,
+/obj/effect/landmark/start/roboticist,
+/turf/open/floor/plasteel/dark/side{
dir = 1
},
-/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"bSf" = (
/obj/structure/table,
@@ -45546,23 +45468,36 @@
/turf/open/floor/plasteel/white,
/area/science/lab)
"bTg" = (
-/obj/effect/turf_decal/stripes/line{
- dir = 4
+/obj/machinery/power/apc/highcap/ten_k{
+ areastring = "/area/science/robotics/mechbay";
+ dir = 1;
+ name = "Mech Bay APC";
+ pixel_y = 28
},
-/obj/structure/disposalpipe/segment{
- dir = 10
+/obj/structure/cable{
+ icon_state = "0-2"
},
-/turf/open/floor/plasteel/white,
-/area/science/lab)
+/obj/machinery/airalarm{
+ dir = 8;
+ pixel_x = 23
+ },
+/turf/open/floor/plasteel/dark,
+/area/science/robotics/mechbay)
"bTh" = (
-/obj/machinery/rnd/production/protolathe/department/science,
+/obj/effect/turf_decal/bot,
+/obj/effect/landmark/start/cyborg,
/turf/open/floor/plasteel,
-/area/science/lab)
+/area/science/robotics/lab)
"bTi" = (
-/obj/machinery/rnd/production/circuit_imprinter/department/science,
-/obj/item/reagent_containers/glass/beaker/sulphuric,
-/turf/open/floor/plasteel,
-/area/science/lab)
+/obj/effect/turf_decal/tile/purple{
+ dir = 8
+ },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/structure/disposalpipe/segment,
+/turf/open/floor/plasteel/dark/side{
+ dir = 5
+ },
+/area/science/robotics/lab)
"bTj" = (
/obj/structure/table,
/obj/item/reagent_containers/glass/beaker/large{
@@ -45733,27 +45668,16 @@
},
/area/medical/medbay/lobby)
"bTC" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 8
- },
-/obj/effect/turf_decal/stripes/corner{
- dir = 1
- },
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
-/obj/structure/disposalpipe/junction{
- dir = 1
- },
-/turf/open/floor/plasteel/dark/side{
- dir = 5
- },
-/area/science/robotics/lab)
+/obj/effect/landmark/event_spawn,
+/obj/machinery/atmospherics/components/unary/vent_scrubber/on,
+/turf/open/floor/plasteel/white,
+/area/medical/chemistry)
"bTD" = (
-/obj/machinery/atmospherics/pipe/simple/cyan/hidden,
-/obj/structure/cable{
- icon_state = "1-2"
- },
/obj/structure/disposalpipe/segment{
- dir = 9
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 8
},
/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
@@ -47718,15 +47642,18 @@
/turf/open/floor/plating,
/area/router)
"bXq" = (
-/obj/effect/turf_decal/tile/blue,
-/obj/effect/turf_decal/tile/blue{
- dir = 8
+/obj/structure/disposalpipe/segment{
+ dir = 10
},
/obj/structure/cable{
icon_state = "1-2"
},
-/turf/open/floor/plasteel,
-/area/hallway/primary/aft)
+/obj/effect/turf_decal/tile/yellow{
+ dir = 8
+ },
+/obj/machinery/atmospherics/pipe/manifold4w/orange/hidden,
+/turf/open/floor/plasteel/white,
+/area/medical/chemistry)
"bXr" = (
/obj/effect/turf_decal/tile/purple{
dir = 1
@@ -48377,8 +48304,14 @@
name = "Research Sector"
})
"bYB" = (
-/obj/effect/turf_decal/bot,
-/turf/open/floor/plasteel,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 8
+ },
+/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"bYC" = (
/obj/structure/disposalpipe/segment,
@@ -48436,28 +48369,25 @@
/turf/open/floor/circuit/green,
/area/science/robotics/mechbay)
"bYI" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 1
+/obj/effect/landmark/start/medical_doctor,
+/obj/structure/disposalpipe/segment{
+ dir = 6
},
-/obj/effect/turf_decal/tile/purple{
- dir = 8
- },
-/obj/effect/turf_decal/stripes/line{
- dir = 8
- },
-/obj/machinery/atmospherics/pipe/simple/orange/hidden,
-/obj/structure/disposalpipe/segment,
-/turf/open/floor/plasteel/dark/side{
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
+"bYJ" = (
+/obj/structure/closet/secure_closet/medical3,
+/obj/effect/turf_decal/tile/blue,
+/obj/effect/turf_decal/tile/blue{
dir = 4
},
-/area/science/robotics/lab)
-"bYJ" = (
-/obj/machinery/atmospherics/pipe/simple/cyan/hidden,
-/obj/structure/cable{
- icon_state = "1-2"
+/obj/item/storage/belt/medical,
+/obj/item/clothing/neck/stethoscope,
+/obj/structure/disposalpipe/segment{
+ dir = 4
},
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"bYK" = (
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 5
@@ -48972,12 +48902,20 @@
/turf/closed/wall/r_wall,
/area/library)
"bZT" = (
-/obj/structure/table/optable{
- name = "Robotics Operating Table"
+/obj/structure/table,
+/obj/item/book/manual/wiki/robotics_cyborgs{
+ pixel_x = -3;
+ pixel_y = -2
},
-/obj/item/tank/internals/anesthetic,
-/obj/item/clothing/mask/breath,
-/turf/open/floor/plasteel/dark,
+/obj/item/book/manual/ripley_build_and_repair{
+ pixel_x = 3;
+ pixel_y = 2
+ },
+/obj/item/mmi/posibrain,
+/obj/effect/turf_decal/stripes/line{
+ dir = 9
+ },
+/turf/open/floor/plasteel,
/area/science/robotics/lab)
"bZU" = (
/obj/structure/table/wood,
@@ -49313,8 +49251,19 @@
/turf/open/floor/engine/o2,
/area/engine/atmos)
"caO" = (
-/obj/machinery/rnd/production/circuit_imprinter/department/science,
-/turf/open/floor/plasteel/dark,
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/purple{
+ dir = 8
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/manifold/orange/hidden{
+ dir = 8
+ },
+/turf/open/floor/plasteel/dark/side{
+ dir = 4
+ },
/area/science/robotics/lab)
"caP" = (
/obj/structure/chair/office/light,
@@ -49934,7 +49883,20 @@
/turf/open/floor/plating/airless,
/area/router/aux)
"ccd" = (
-/turf/open/floor/plasteel/dark,
+/obj/effect/turf_decal/tile/purple{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/purple,
+/obj/machinery/light{
+ dir = 8
+ },
+/obj/machinery/camera{
+ c_tag = "Robotics Lab";
+ dir = 4
+ },
+/turf/open/floor/plasteel/dark/side{
+ dir = 8
+ },
/area/science/robotics/lab)
"cce" = (
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
@@ -51982,25 +51944,18 @@
/turf/open/floor/plasteel,
/area/engine/atmos)
"cgf" = (
-/obj/effect/turf_decal/tile/purple{
+/obj/effect/turf_decal/tile/blue{
dir = 1
},
-/obj/effect/turf_decal/tile/purple{
+/obj/effect/turf_decal/tile/blue{
dir = 8
},
-/obj/effect/turf_decal/stripes/line{
- dir = 8
- },
-/obj/machinery/atmospherics/pipe/manifold/orange/hidden{
- dir = 4
- },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
/obj/structure/disposalpipe/segment{
- dir = 5
- },
-/turf/open/floor/plasteel/dark/side{
dir = 4
},
-/area/science/robotics/lab)
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"cgg" = (
/obj/effect/landmark/start/atmospheric_technician,
/obj/machinery/atmospherics/pipe/simple/cyan/visible{
@@ -52100,17 +52055,19 @@
/turf/open/floor/plasteel,
/area/quartermaster/warehouse)
"cgr" = (
-/obj/machinery/power/apc/highcap/ten_k{
- areastring = "/area/science/robotics/mechbay";
+/obj/machinery/vending/wardrobe/robo_wardrobe,
+/obj/structure/disposalpipe/segment{
+ dir = 5
+ },
+/obj/effect/turf_decal/stripes/line{
+ dir = 5
+ },
+/obj/machinery/airalarm{
dir = 1;
- name = "Mech Bay APC";
- pixel_y = 28
+ pixel_y = -22
},
-/obj/structure/cable{
- icon_state = "0-2"
- },
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/mechbay)
+/turf/open/floor/plasteel,
+/area/science/robotics/lab)
"cgs" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -53132,13 +53089,6 @@
},
/turf/open/floor/plating,
/area/maintenance/port/fore)
-"ciA" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/open/space/basic,
-/area/solar/port)
"ciB" = (
/obj/structure/frame/computer,
/obj/structure/disposalpipe/segment,
@@ -53268,18 +53218,10 @@
/turf/open/floor/plasteel,
/area/quartermaster/warehouse)
"ciQ" = (
-/obj/structure/disposalpipe/segment{
- dir = 10
- },
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/effect/turf_decal/tile/yellow{
+/obj/effect/turf_decal/tile/blue,
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 8
},
-/obj/machinery/atmospherics/pipe/manifold/orange/hidden{
- dir = 4
- },
/turf/open/floor/plasteel/white,
/area/medical/chemistry)
"ciR" = (
@@ -53883,23 +53825,30 @@
/turf/open/floor/plasteel,
/area/ai_monitored/storage/eva)
"cka" = (
-/obj/machinery/atmospherics/pipe/manifold/cyan/hidden{
- dir = 8
- },
/obj/structure/cable{
icon_state = "1-2"
},
/obj/structure/disposalpipe/segment{
dir = 4
},
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"ckb" = (
-/obj/machinery/aug_manipulator,
-/obj/machinery/camera/autoname{
+/obj/effect/turf_decal/tile/purple{
dir = 1
},
-/turf/open/floor/plasteel/dark,
+/obj/effect/turf_decal/tile/purple{
+ dir = 8
+ },
+/obj/machinery/atmospherics/pipe/manifold/orange/hidden{
+ dir = 4
+ },
+/obj/structure/disposalpipe/junction{
+ dir = 1
+ },
+/turf/open/floor/plasteel/dark/side{
+ dir = 4
+ },
/area/science/robotics/lab)
"ckc" = (
/obj/machinery/portable_atmospherics/canister/air,
@@ -54022,6 +53971,9 @@
},
/obj/effect/turf_decal/tile/blue,
/obj/effect/landmark/start/chemist,
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 8
+ },
/turf/open/floor/plasteel/white,
/area/medical/chemistry)
"ckq" = (
@@ -54166,6 +54118,9 @@
pixel_x = 32;
pixel_y = -32
},
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 9
+ },
/turf/open/floor/plasteel/white,
/area/medical/chemistry)
"ckE" = (
@@ -54578,10 +54533,12 @@
},
/area/library)
"clv" = (
-/obj/structure/table,
-/obj/item/storage/backpack/duffelbag/med/surgery,
-/turf/open/floor/plasteel/dark,
-/area/science/robotics/lab)
+/obj/effect/turf_decal/tile/blue,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"clw" = (
/obj/effect/landmark/start/librarian,
/obj/machinery/newscaster{
@@ -55237,40 +55194,14 @@
/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"cmS" = (
-/obj/structure/rack,
-/obj/item/storage/firstaid/regular{
- empty = 1;
- name = "First-Aid (empty)"
+/obj/machinery/disposal/bin,
+/obj/structure/disposalpipe/trunk{
+ dir = 8
},
-/obj/item/storage/firstaid/regular{
- empty = 1;
- name = "First-Aid (empty)"
+/obj/effect/turf_decal/stripes/line{
+ dir = 9
},
-/obj/item/storage/firstaid/regular{
- empty = 1;
- name = "First-Aid (empty)"
- },
-/obj/item/healthanalyzer{
- pixel_x = 4;
- pixel_y = -4
- },
-/obj/item/healthanalyzer{
- pixel_x = 4;
- pixel_y = -4
- },
-/obj/item/healthanalyzer{
- pixel_x = 4;
- pixel_y = -4
- },
-/obj/item/assembly/prox_sensor,
-/obj/item/assembly/prox_sensor,
-/obj/item/assembly/prox_sensor,
-/obj/item/assembly/prox_sensor,
-/obj/item/assembly/prox_sensor,
-/obj/machinery/camera/autoname{
- dir = 1
- },
-/turf/open/floor/plasteel/dark,
+/turf/open/floor/plasteel,
/area/science/robotics/lab)
"cmT" = (
/obj/structure/table/reinforced,
@@ -55694,41 +55625,6 @@
icon_state = "panelscorched"
},
/area/maintenance/port/fore)
-"cnG" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/structure/cable{
- icon_state = "2-8"
- },
-/turf/open/space/basic,
-/area/solar/port)
-"cnH" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "0-2"
- },
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/open/space/basic,
-/area/solar/port)
-"cnI" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/open/space/basic,
-/area/solar/port)
-"cnJ" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/turf/open/space/basic,
-/area/solar/port)
"cnK" = (
/obj/effect/turf_decal/stripes/line{
dir = 8
@@ -55738,71 +55634,10 @@
},
/turf/open/floor/plasteel,
/area/engine/teg_hot)
-"cnL" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/open/space/basic,
-/area/solar/starboard/aft)
-"cnM" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "0-8"
- },
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/turf/open/space/basic,
-/area/solar/starboard/aft)
-"cnN" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/turf/open/space/basic,
-/area/solar/starboard/aft)
"cnO" = (
/obj/effect/landmark/event_spawn,
/turf/open/floor/engine,
/area/science/storage)
-"cnP" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/obj/structure/cable{
- icon_state = "1-4"
- },
-/turf/open/space/basic,
-/area/solar/starboard/aft)
-"cnQ" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "0-4"
- },
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/turf/open/space/basic,
-/area/solar/starboard/aft)
-"cnR" = (
-/obj/structure/lattice/catwalk,
-/obj/structure/cable{
- icon_state = "0-2"
- },
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/open/space/basic,
-/area/solar/starboard/aft)
"cnS" = (
/obj/structure/cable{
icon_state = "0-2"
@@ -56652,7 +56487,6 @@
icon_state = "2-4"
},
/obj/machinery/holopad,
-/obj/effect/turf_decal/bot,
/turf/open/floor/wood,
/area/library)
"cpv" = (
@@ -56663,16 +56497,17 @@
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"cpw" = (
+/obj/machinery/computer/operating,
/obj/effect/turf_decal/tile/purple{
dir = 4
},
-/obj/effect/turf_decal/tile/purple,
-/obj/effect/turf_decal/stripes/line{
- dir = 4
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
},
-/turf/open/floor/plasteel/dark/side{
- dir = 8
+/obj/structure/sign/poster/official/space_cops{
+ pixel_y = 32
},
+/turf/open/floor/plasteel/white,
/area/science/robotics/lab)
"cpx" = (
/obj/machinery/atmospherics/pipe/simple/orange/hidden,
@@ -57445,6 +57280,13 @@
/area/hallway/secondary/entry)
"cqW" = (
/obj/effect/turf_decal/tile/blue,
+/obj/effect/turf_decal/tile/blue{
+ dir = 8
+ },
+/obj/structure/window/reinforced/spawner,
+/obj/structure/disposalpipe/junction/flip{
+ dir = 4
+ },
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
"cqX" = (
@@ -57767,10 +57609,29 @@
name = "Engine Room"
})
"cry" = (
-/obj/structure/bookcase/random/religion,
-/obj/effect/turf_decal/bot,
-/turf/open/floor/wood,
-/area/library)
+/obj/structure/table,
+/obj/item/stack/sheet/plasteel{
+ amount = 10;
+ pixel_x = -5
+ },
+/obj/item/stack/cable_coil/random,
+/obj/item/stack/cable_coil/random{
+ pixel_x = -2;
+ pixel_y = -2
+ },
+/obj/item/stack/cable_coil/random{
+ pixel_x = 2;
+ pixel_y = 2
+ },
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/obj/machinery/camera{
+ c_tag = "Robotics - Surgery";
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/science/robotics/lab)
"crz" = (
/obj/effect/turf_decal/tile/yellow,
/obj/effect/turf_decal/tile/yellow{
@@ -57785,10 +57646,12 @@
/turf/open/floor/plasteel,
/area/tcommsat/computer)
"crA" = (
-/obj/structure/bookcase/random/fiction,
-/obj/effect/turf_decal/bot,
-/turf/open/floor/wood,
-/area/library)
+/obj/machinery/aug_manipulator,
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/science/robotics/lab)
"crB" = (
/obj/structure/lattice,
/obj/machinery/camera/motion{
@@ -57967,9 +57830,14 @@
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"crW" = (
-/obj/effect/landmark/start/paramedic,
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
+/obj/machinery/computer/rdconsole/robotics{
+ dir = 1
+ },
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/science/robotics/lab)
"crX" = (
/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
dir = 4
@@ -58496,12 +58364,20 @@
/turf/open/floor/plating,
/area/storage/tech)
"csV" = (
-/obj/machinery/mecha_part_fabricator,
-/obj/machinery/camera{
- c_tag = "Robotics Lab";
- network = list("ss13","rd")
+/obj/effect/turf_decal/tile/purple{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/purple,
+/obj/machinery/button/door{
+ id = "robotics";
+ name = "Shutters Control Button";
+ pixel_y = 8;
+ req_access_txt = "29";
+ pixel_x = -24
+ },
+/turf/open/floor/plasteel/dark/side{
+ dir = 8
},
-/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"csW" = (
/obj/effect/turf_decal/tile/neutral,
@@ -59234,8 +59110,41 @@
name = "Research Observatory"
})
"cum" = (
-/obj/machinery/computer/operating,
-/turf/open/floor/plasteel/dark,
+/obj/structure/rack,
+/obj/item/storage/firstaid/regular{
+ empty = 1;
+ name = "First-Aid (empty)"
+ },
+/obj/item/storage/firstaid/regular{
+ empty = 1;
+ name = "First-Aid (empty)"
+ },
+/obj/item/storage/firstaid/regular{
+ empty = 1;
+ name = "First-Aid (empty)"
+ },
+/obj/item/healthanalyzer{
+ pixel_x = 4;
+ pixel_y = -4
+ },
+/obj/item/healthanalyzer{
+ pixel_x = 4;
+ pixel_y = -4
+ },
+/obj/item/healthanalyzer{
+ pixel_x = 4;
+ pixel_y = -4
+ },
+/obj/item/assembly/prox_sensor,
+/obj/item/assembly/prox_sensor,
+/obj/item/assembly/prox_sensor,
+/obj/item/assembly/prox_sensor,
+/obj/item/assembly/prox_sensor,
+/obj/machinery/light,
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/open/floor/plasteel,
/area/science/robotics/lab)
"cun" = (
/obj/structure/table/reinforced,
@@ -59620,16 +59529,17 @@
/area/science/robotics/lab)
"cuZ" = (
/obj/effect/turf_decal/tile/purple{
- dir = 4
+ dir = 1
},
-/obj/effect/turf_decal/stripes/corner{
+/obj/effect/turf_decal/tile/purple{
dir = 8
},
-/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
- dir = 4
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 5
},
+/obj/structure/disposalpipe/segment,
/turf/open/floor/plasteel/dark/side{
- dir = 10
+ dir = 4
},
/area/science/robotics/lab)
"cva" = (
@@ -59780,19 +59690,15 @@
/turf/open/floor/plating,
/area/medical/virology)
"cvt" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 1
- },
/obj/effect/turf_decal/tile/purple{
dir = 4
},
-/obj/effect/turf_decal/stripes/line{
- dir = 1
- },
/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
dir = 4
},
-/turf/open/floor/plasteel/dark/side,
+/turf/open/floor/plasteel/dark/side{
+ dir = 10
+ },
/area/science/robotics/lab)
"cvu" = (
/obj/effect/turf_decal/tile/blue{
@@ -60106,11 +60012,8 @@
/obj/effect/turf_decal/tile/purple{
dir = 4
},
-/obj/effect/turf_decal/stripes/line{
- dir = 1
- },
-/obj/machinery/atmospherics/components/unary/vent_pump/on{
- dir = 8
+/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
+ dir = 4
},
/turf/open/floor/plasteel/dark/side,
/area/science/robotics/lab)
@@ -60134,7 +60037,14 @@
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
"cvS" = (
-/obj/machinery/vending/wardrobe/robo_wardrobe,
+/obj/structure/cable{
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/cyan/hidden,
+/obj/machinery/holopad,
/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"cvT" = (
@@ -61427,11 +61337,28 @@
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
"cyt" = (
-/obj/machinery/atmospherics/pipe/simple/orange/hidden{
- dir = 5
+/obj/effect/turf_decal/tile/purple{
+ dir = 8
},
-/turf/open/floor/plating,
-/area/maintenance/aft)
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/effect/turf_decal/tile/purple,
+/obj/machinery/power/apc{
+ areastring = "/area/science/robotics/lab";
+ dir = 8;
+ name = "Robotics Lab APC";
+ pixel_x = -25
+ },
+/obj/structure/cable{
+ icon_state = "0-4"
+ },
+/turf/open/floor/plasteel,
+/area/science/research{
+ name = "Research Sector"
+ })
"cyu" = (
/obj/structure/closet/wardrobe/chemistry_white{
anchored = 1
@@ -62094,15 +62021,17 @@
/turf/open/floor/plasteel/showroomfloor,
/area/medical/morgue)
"czH" = (
-/obj/effect/turf_decal/tile/purple{
- dir = 1
+/obj/machinery/button/door{
+ id = "robotics2";
+ name = "Shutters Control Button";
+ pixel_x = 24;
+ pixel_y = -24;
+ req_access_txt = "29"
},
-/obj/effect/turf_decal/stripes/corner{
+/obj/structure/disposalpipe/segment{
dir = 4
},
-/turf/open/floor/plasteel/dark/side{
- dir = 6
- },
+/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"czI" = (
/obj/structure/disposalpipe/segment{
@@ -65230,12 +65159,16 @@
/turf/open/floor/plasteel/dark,
/area/science/robotics/lab)
"cEP" = (
-/obj/machinery/atmospherics/pipe/simple/cyan/hidden,
-/obj/structure/cable{
- icon_state = "1-2"
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
},
-/obj/structure/disposalpipe/segment,
-/turf/open/floor/plasteel/dark,
+/obj/effect/turf_decal/tile/purple{
+ dir = 4
+ },
+/obj/machinery/atmospherics/components/unary/vent_pump/on{
+ dir = 8
+ },
+/turf/open/floor/plasteel/dark/side,
/area/science/robotics/lab)
"cEQ" = (
/obj/effect/turf_decal/tile/blue,
@@ -65925,22 +65858,54 @@
/turf/open/floor/plasteel/white,
/area/medical/virology)
"cFV" = (
-/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
- dir = 5
+/obj/structure/table,
+/obj/item/storage/belt/utility,
+/obj/item/storage/belt/utility,
+/obj/item/multitool{
+ pixel_x = 3
},
-/obj/structure/cable{
- icon_state = "1-4"
+/obj/item/multitool{
+ pixel_x = 3
},
-/turf/open/floor/plasteel/dark,
+/obj/item/storage/toolbox/mechanical{
+ pixel_x = 2;
+ pixel_y = -1
+ },
+/obj/item/storage/toolbox/mechanical{
+ pixel_x = 2;
+ pixel_y = -1
+ },
+/obj/item/storage/toolbox/electrical{
+ pixel_x = -1;
+ pixel_y = 4
+ },
+/obj/item/storage/toolbox/electrical{
+ pixel_x = -1;
+ pixel_y = 4
+ },
+/obj/item/clothing/head/welding{
+ pixel_x = -3;
+ pixel_y = 5
+ },
+/obj/item/clothing/head/welding{
+ pixel_x = -3;
+ pixel_y = 5
+ },
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/open/floor/plasteel,
/area/science/robotics/lab)
"cFW" = (
-/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
+/obj/effect/spawner/structure/window/reinforced,
+/obj/machinery/door/poddoor/shutters/preopen{
+ id = "robotics2";
+ name = "robotics lab shutters"
+ },
+/obj/structure/disposalpipe/segment{
dir = 4
},
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/turf/open/floor/plasteel/dark,
+/turf/open/floor/plating,
/area/science/robotics/lab)
"cFX" = (
/obj/machinery/chem_heater,
@@ -66456,6 +66421,21 @@
/obj/structure/tank_dispenser,
/turf/open/floor/engine,
/area/science/storage)
+"cGN" = (
+/obj/structure/closet/l3closet,
+/obj/structure/disposalpipe/segment,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
+"cGO" = (
+/obj/machinery/atmospherics/pipe/simple/cyan/hidden,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"cGP" = (
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
@@ -70684,6 +70664,13 @@
"cPw" = (
/turf/open/floor/plasteel/dark,
/area/science/robotics/mechbay)
+"cPx" = (
+/obj/machinery/atmospherics/pipe/simple/orange/hidden,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"cPy" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -70880,6 +70867,13 @@
},
/turf/open/floor/plating,
/area/maintenance/starboard/aft)
+"cPP" = (
+/obj/effect/landmark/start/paramedic,
+/obj/structure/disposalpipe/segment{
+ dir = 9
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"cPQ" = (
/obj/structure/disposalpipe/segment{
dir = 6
@@ -71704,6 +71698,149 @@
/area/science/server{
name = "Computer Core"
})
+"cRi" = (
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/purple{
+ dir = 4
+ },
+/turf/open/floor/plasteel/dark/side,
+/area/science/robotics/lab)
+"cRj" = (
+/obj/effect/turf_decal/tile/purple{
+ dir = 1
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 5
+ },
+/turf/open/floor/plasteel/dark/side{
+ dir = 6
+ },
+/area/science/robotics/lab)
+"cRk" = (
+/obj/structure/table,
+/obj/machinery/cell_charger,
+/obj/item/stock_parts/cell/high{
+ charge = 100;
+ maxcharge = 15000;
+ pixel_y = 3;
+ pixel_x = 4
+ },
+/obj/item/stock_parts/cell/high{
+ charge = 100;
+ maxcharge = 15000;
+ pixel_x = -6;
+ pixel_y = 6
+ },
+/obj/item/stock_parts/cell/high{
+ charge = 100;
+ maxcharge = 15000
+ },
+/obj/machinery/button/door{
+ id = "robotics3";
+ name = "Shutters Control Button";
+ pixel_x = 24;
+ pixel_y = -24;
+ req_access_txt = "29"
+ },
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/science/robotics/lab)
+"cRl" = (
+/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
+ dir = 4
+ },
+/obj/structure/cable{
+ icon_state = "4-8"
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/open/floor/plasteel/dark,
+/area/science/robotics/lab)
+"cRm" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/machinery/light,
+/obj/effect/turf_decal/stripes/red/full,
+/obj/structure/disposalpipe/trunk{
+ dir = 1
+ },
+/obj/structure/sign/poster/official/cleanliness{
+ pixel_y = -32
+ },
+/obj/machinery/disposal/bin{
+ name = "Corpse Disposal Unit"
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/zone2{
+ name = "Medbay Treatment Center"
+ })
+"cRn" = (
+/obj/machinery/atmospherics/pipe/simple/cyan/hidden,
+/obj/structure/cable{
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 5
+ },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 8
+ },
+/obj/effect/landmark/start/roboticist,
+/turf/open/floor/plasteel/dark,
+/area/science/robotics/lab)
+"cRo" = (
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/orange/hidden{
+ dir = 8
+ },
+/obj/effect/landmark/start/roboticist,
+/turf/open/floor/plasteel/dark,
+/area/science/robotics/lab)
+"cRp" = (
+/obj/machinery/atmospherics/pipe/simple/cyan/hidden{
+ dir = 5
+ },
+/obj/structure/cable{
+ icon_state = "1-4"
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/effect/landmark/start/roboticist,
+/turf/open/floor/plasteel/dark,
+/area/science/robotics/lab)
+"cRq" = (
+/obj/machinery/rnd/production/circuit_imprinter/department/science,
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/science/robotics/lab)
+"cRr" = (
+/obj/machinery/droneDispenser,
+/obj/item/stack/sheet/metal/fifty,
+/obj/item/stack/sheet/glass/fifty,
+/obj/effect/turf_decal/stripes/line{
+ dir = 5;
+ layer = 2.03
+ },
+/turf/open/floor/plasteel,
+/area/science/robotics/lab)
"cVq" = (
/obj/machinery/atmospherics/pipe/simple/orange/visible{
dir = 4
@@ -86931,7 +87068,7 @@ aaa
aaa
aaa
aaU
-aiq
+aee
aaU
aaa
aaa
@@ -87188,7 +87325,7 @@ aaa
aaa
aaa
aaU
-aiq
+abh
aaU
aaa
aaa
@@ -87445,7 +87582,7 @@ abi
aaa
aaa
aaK
-aaM
+aaL
abi
aaa
aaa
@@ -90010,17 +90147,17 @@ aaa
aaa
aaa
aaU
-bOc
+aee
aaU
aaU
aaU
aaU
-bOc
+aee
aaU
aaU
aaU
aaU
-bOc
+aee
aaU
aaU
aaU
@@ -90267,17 +90404,17 @@ aaa
aaa
aaa
aaU
-bOf
-ciA
-ciA
-ciA
-ciA
-cnG
-cnH
+abh
+abh
+abh
+abh
+abh
+abh
+aiq
aaL
-cnI
-ciA
-cnJ
+ajc
+abh
+abh
abh
abh
abh
@@ -95503,9 +95640,9 @@ ckk
bYF
cct
bFu
-bIc
-btn
-btn
+bKe
+bsM
+bsM
bsM
cuY
bIk
@@ -95759,13 +95896,13 @@ bYp
bYx
cPw
caz
+bsU
+bRV
+bQQ
ccd
-bId
-cpw
-cpw
-bKd
-cuZ
-bKN
+csV
+cvt
+bZT
bIk
aaU
aaU
@@ -96016,13 +96153,13 @@ bYq
cPv
bYH
bYv
-bDT
-bIe
-bYB
+bFx
+bSd
+bTh
bto
-bYB
-cvt
-bSe
+bTh
+cvQ
+crW
ceb
aaU
aaa
@@ -96183,7 +96320,7 @@ aew
axi
atW
aCE
-aDW
+aCH
anU
anU
anU
@@ -96269,17 +96406,17 @@ bXU
aJV
brz
bYv
-cgr
+bTg
bYy
crf
bYv
-bFx
-bIf
+bIe
+bSe
bto
csZ
bto
-cvQ
-caO
+cEP
+cRq
ceb
aaU
aaa
@@ -96440,7 +96577,7 @@ aeJ
aeJ
aeJ
aew
-aCH
+aDW
aew
aIn
aew
@@ -96529,14 +96666,14 @@ bYv
bYv
cwb
bYv
-bYv
-csV
-bIe
-bYB
-cqz
-bYB
bua
-cmS
+bJE
+bSd
+bTh
+cqz
+bTh
+cRi
+cum
ceb
aaU
aaa
@@ -96785,15 +96922,15 @@ bLU
bRM
bRO
bRR
-bRT
-bRV
-bSd
-bTC
-bYI
-cgf
-bKe
-czH
-bKO
+cyt
+bDT
+bKd
+bTi
+caO
+ckb
+cuZ
+cRj
+cFV
ceb
aaU
aaa
@@ -97044,13 +97181,13 @@ cEs
bRS
cEN
cEO
-cEP
-bTD
-bYJ
-cka
+bIc
+bRX
+cRn
+cvS
cmR
-cFV
-bKP
+cRp
+cRk
ceb
aaU
aaa
@@ -97300,14 +97437,14 @@ cfZ
bWX
bWX
ckf
-bIk
-bFB
+btn
bIh
-ccd
-bJC
+bRY
+bTD
+czH
bKf
-cFW
-bKQ
+cRl
+cRr
bIk
aaU
aaa
@@ -97558,10 +97695,10 @@ bXU
bXU
bWa
bIk
-bFC
-bIj
-ccd
-bJD
+bId
+bKN
+bTD
+cmS
ccm
coH
bJH
@@ -97815,10 +97952,10 @@ aaU
aaU
aaU
bIk
-clv
-bsU
-ccd
-bJE
+bIj
+bKO
+bTD
+cry
ccm
cOx
cOA
@@ -98072,10 +98209,10 @@ aaa
aaa
aaU
bIk
-bZT
-bsU
-ccd
-ckb
+cpw
+bKP
+cRo
+crA
cdW
cOy
cOB
@@ -98329,10 +98466,10 @@ aaU
aaU
aaU
bIk
-cum
-bIj
-ccd
-cvS
+bJD
+bKQ
+bYB
+cgr
bIk
cOz
cOC
@@ -98589,7 +98726,7 @@ bIk
bIk
bIk
ccB
-bJH
+cFW
bIk
cGb
bRI
@@ -98846,7 +98983,7 @@ bCh
bRL
bIs
ccC
-bRZ
+cGN
cFn
cGc
bMj
@@ -99103,7 +99240,7 @@ coc
bTz
bTE
ccD
-bTE
+cGO
bTE
cGd
cvT
@@ -99346,7 +99483,7 @@ bSE
bSN
bSU
bTa
-bTg
+bau
bTn
bSC
bRH
@@ -99360,7 +99497,7 @@ bRI
bTA
bVO
cfN
-ckd
+cPx
ckd
cGe
bMj
@@ -99575,7 +99712,7 @@ bWj
baS
bbr
aZy
-bKR
+bJC
bZF
bZF
cjx
@@ -99603,7 +99740,7 @@ bSE
bYV
cEC
cEL
-bTh
+bvn
bSC
bSC
bRJ
@@ -99616,8 +99753,8 @@ cKl
cKm
cKn
cKo
-bRX
-crW
+bYI
+cPP
bIq
cqZ
bMj
@@ -99832,8 +99969,8 @@ bWk
cdE
bbs
aZy
-cry
-crA
+bKR
+bRZ
bZF
cCJ
baE
@@ -99860,7 +99997,7 @@ bSE
bSP
cED
bTb
-bTi
+bCX
bSC
brk
bsp
@@ -99873,7 +100010,7 @@ cel
bCh
cEQ
bXn
-bRY
+bYJ
bSa
bSc
bSg
@@ -100117,7 +100254,7 @@ bSH
bSG
cij
bSG
-bSC
+bFB
bSC
bhx
bqv
@@ -100130,7 +100267,7 @@ cem
bRI
cER
cEU
-bCh
+bSh
bCh
bCh
bSh
@@ -100374,7 +100511,7 @@ coB
bbl
cEF
buD
-bCX
+bFC
bqc
brm
bst
@@ -100387,7 +100524,7 @@ coV
bCh
cES
cEV
-cFj
+cgf
cFj
cFo
cFr
@@ -100631,7 +100768,7 @@ cqe
cqg
cEG
bdv
-bDd
+bqr
bqe
brq
bst
@@ -100644,7 +100781,7 @@ bAo
cuW
cET
cEW
-bQk
+cka
bQk
bQk
bQu
@@ -100888,7 +101025,7 @@ cID
bZm
cEH
bdv
-bDd
+bqr
cyy
cyA
bst
@@ -100901,7 +101038,7 @@ bAq
cuX
bFJ
cEX
-cqW
+clv
bWD
cqb
bKy
@@ -101145,7 +101282,7 @@ cIE
cEz
cEI
bXi
-bXq
+bga
caQ
bXC
bvK
@@ -101158,7 +101295,7 @@ bKi
bPP
bQa
cEY
-bvn
+cqW
bJg
bQl
bYG
@@ -101402,7 +101539,7 @@ cIF
ccp
bqo
buF
-bDm
+bpA
bqe
ceY
bwf
@@ -101659,7 +101796,7 @@ cIF
ccp
bqr
bbh
-bbh
+bpB
bqm
bqm
byw
@@ -101916,7 +102053,7 @@ cIF
ccp
cpH
bbh
-bpA
+bqs
bXz
bqm
byD
@@ -102173,7 +102310,7 @@ cIF
ccp
cJe
bbh
-bpB
+brJ
btv
bqm
bzJ
@@ -102430,7 +102567,7 @@ cIG
ccw
csM
cyo
-cyt
+bBs
blU
bqz
bAD
@@ -102451,7 +102588,7 @@ bot
bot
bjx
bAH
-bQQ
+cRm
cpz
cvs
cwj
@@ -102687,11 +102824,11 @@ cIH
cgv
coE
bxM
-bau
+bDd
bXt
brH
bAE
-bIt
+bIL
cdX
buS
buS
@@ -102944,12 +103081,12 @@ cIF
cgB
bqr
bbh
-bga
-bqs
-brJ
-bBs
-bIL
-ciQ
+bDm
+bFE
+bIf
+bIt
+bJd
+bXq
cmK
cws
czv
@@ -103205,8 +103342,8 @@ bPw
bqz
bqz
bzA
-bFE
-bFG
+bRT
+ciQ
col
cxh
czB
@@ -103719,7 +103856,7 @@ bPw
bqz
brK
bCf
-bJd
+bTC
ckD
cpI
cyF
@@ -112864,10 +113001,10 @@ aaa
aaa
aaa
aaU
-aee
-aeP
-aeP
-aqA
+aaV
+aaV
+aaV
+abe
aeP
agX
ajS
@@ -113121,7 +113258,7 @@ aWj
aWj
aWj
aWj
-adx
+aaV
aaU
aaU
aaU
@@ -113378,7 +113515,7 @@ aaa
aaa
aaa
aaU
-adx
+aaV
aaU
aaa
aaa
@@ -113635,7 +113772,7 @@ aaa
aaa
aaa
aaU
-abe
+abc
aaU
aaa
aaa
@@ -115038,11 +115175,11 @@ bHM
aaa
aaa
aaU
-cnM
+avr
aaU
aaa
aaU
-cnM
+avr
aaU
aaa
aaa
@@ -115295,11 +115432,11 @@ bHM
aaa
aaa
bNK
-bYQ
+bNS
bNU
aaa
bNK
-bYQ
+bNS
bNU
aaa
aaa
@@ -116580,11 +116717,11 @@ bHN
bHN
bHN
bNL
-cnM
+avr
aaU
aaU
aaU
-cnM
+avr
aaU
aaU
aaU
@@ -116836,13 +116973,13 @@ bZy
bHN
bHz
ckn
-cnL
-cnN
-bOk
-bOk
-bOk
-cnP
-cnR
+aqA
+bNL
+bNL
+bNL
+bNL
+bNL
+bOf
bOk
bOk
bOq
@@ -117098,7 +117235,7 @@ aaU
aaU
aaU
aaU
-cnQ
+bOc
aaU
aaU
aaU
@@ -117485,17 +117622,17 @@ adl
abM
aZG
aaU
-abc
-aeP
-aeP
-aeP
-aeP
-ajc
-aeP
-aeP
-aeP
-aeP
-avr
+aaV
+aaV
+aaV
+aaV
+aaV
+aaV
+aaV
+aaV
+aaV
+aaV
+aaV
aaU
aTx
aoK
@@ -117742,17 +117879,17 @@ adw
adH
aaU
aaU
-abe
+abc
aaU
aaU
aaU
aaU
-abe
+abc
aaU
aaU
aaU
aaU
-abe
+abc
aaU
aaU
aoT
@@ -119803,7 +119940,7 @@ aaa
aaa
aaa
aaU
-adx
+aaV
aaU
aaa
aaa
@@ -120060,7 +120197,7 @@ aaa
aaa
aaa
aaU
-abe
+abc
aaU
aaa
aaa
diff --git a/_maps/map_files/LambdaStation/lambda.dmm b/_maps/map_files/LambdaStation/lambda.dmm
index c6553c728e..4d2d8cb624 100644
--- a/_maps/map_files/LambdaStation/lambda.dmm
+++ b/_maps/map_files/LambdaStation/lambda.dmm
@@ -33412,6 +33412,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 4
},
+/obj/machinery/gateway/centerstation,
/turf/open/floor/plasteel/dark,
/area/gateway)
"bkm" = (
diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm
index 588b55679c..ca155d6e94 100644
--- a/_maps/map_files/PubbyStation/PubbyStation.dmm
+++ b/_maps/map_files/PubbyStation/PubbyStation.dmm
@@ -32918,15 +32918,10 @@
/obj/machinery/light/small{
dir = 1
},
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 4
- },
/turf/open/floor/plasteel/white,
/area/hallway/secondary/entry)
"bxZ" = (
-/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
- dir = 4
- },
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/white,
/area/hallway/secondary/entry)
"bya" = (
@@ -34199,9 +34194,8 @@
/obj/structure/transit_tube/curved/flipped{
dir = 4
},
-/obj/effect/spawner/structure/window/reinforced,
-/turf/open/floor/plating,
-/area/hallway/secondary/entry)
+/turf/open/space/basic,
+/area/space/nearstation)
"bAJ" = (
/obj/structure/transit_tube/horizontal,
/obj/structure/window/reinforced/fulltile,
@@ -34871,6 +34865,7 @@
/area/science/xenobiology)
"bBV" = (
/obj/structure/transit_tube/curved,
+/obj/structure/lattice/catwalk,
/turf/open/space,
/area/space/nearstation)
"bBW" = (
@@ -38491,10 +38486,12 @@
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bIY" = (
-/turf/open/floor/plasteel/white{
- heat_capacity = 1e+006
+/obj/structure/window/reinforced{
+ dir = 8;
+ layer = 2.9
},
-/area/hallway/secondary/entry)
+/turf/open/space/basic,
+/area/space)
"bIZ" = (
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
@@ -39538,9 +39535,7 @@
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bLp" = (
-/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
- dir = 8
- },
+/obj/machinery/atmospherics/pipe/manifold4w/supply/hidden,
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bLq" = (
@@ -39563,20 +39558,17 @@
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bLr" = (
-/obj/machinery/atmospherics/pipe/manifold/supply/hidden,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 9
+ },
/turf/open/floor/plasteel/white{
heat_capacity = 1e+006
},
/area/chapel/dock)
"bLs" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/obj/machinery/light,
-/turf/open/floor/plasteel/white{
- heat_capacity = 1e+006
- },
-/area/hallway/secondary/entry)
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
+/turf/open/floor/plasteel/dark,
+/area/chapel/dock)
"bLt" = (
/obj/effect/decal/cleanable/oil{
icon_state = "floor6"
@@ -40049,6 +40041,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
@@ -40092,13 +40085,19 @@
},
/area/chapel/dock)
"bMy" = (
-/obj/structure/window/reinforced{
- dir = 8;
- layer = 2.9
+/obj/effect/turf_decal/tile/neutral{
+ dir = 1
},
-/obj/structure/lattice,
-/turf/open/space,
-/area/space/nearstation)
+/obj/effect/turf_decal/tile/neutral,
+/obj/effect/turf_decal/tile/neutral{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/neutral{
+ dir = 8
+ },
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
+/turf/open/floor/plasteel/dark,
+/area/chapel/dock)
"bMA" = (
/obj/effect/landmark/event_spawn,
/turf/open/floor/engine,
@@ -40520,12 +40519,12 @@
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bNu" = (
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 9
- },
/obj/structure/cable{
icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
+ dir = 4
+ },
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bNv" = (
@@ -40945,6 +40944,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bOy" = (
@@ -40958,6 +40958,9 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 6
+ },
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bOz" = (
@@ -41226,6 +41229,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bPo" = (
@@ -41242,6 +41246,7 @@
/obj/effect/turf_decal/tile/neutral{
dir = 8
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/plasteel/dark,
/area/chapel/dock)
"bPp" = (
@@ -41538,6 +41543,7 @@
icon_state = "1-2"
},
/obj/effect/turf_decal/sand,
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel,
/area/chapel/asteroid/monastery)
"bQg" = (
@@ -44734,14 +44740,14 @@
/obj/structure/cable{
icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/dark,
/area/chapel/main/monastery)
"bWX" = (
-/obj/machinery/door/airlock/grunge{
- name = "Chapel"
- },
-/turf/open/floor/plasteel/dark,
-/area/chapel/main/monastery)
+/obj/effect/turf_decal/sand,
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
+/turf/open/floor/plasteel,
+/area/chapel/asteroid/monastery)
"bWZ" = (
/turf/open/floor/plating{
icon_state = "panelscorched"
@@ -45071,6 +45077,7 @@
/obj/structure/cable{
icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/dark,
/area/chapel/main/monastery)
"bXJ" = (
@@ -45776,6 +45783,7 @@
/obj/structure/cable{
icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/carpet,
/area/chapel/main/monastery)
"bZo" = (
@@ -46530,6 +46538,7 @@
/obj/structure/cable{
icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/carpet,
/area/chapel/main/monastery)
"cbO" = (
@@ -46537,6 +46546,7 @@
/obj/item/reagent_containers/food/drinks/trophy{
pixel_y = 8
},
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/turf/open/floor/carpet,
/area/chapel/main/monastery)
"cbP" = (
@@ -46693,15 +46703,15 @@
/obj/structure/cable{
icon_state = "1-8"
},
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 10
+/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{
+ dir = 4
},
/turf/open/floor/carpet,
/area/chapel/main/monastery)
"ccF" = (
/obj/effect/landmark/start/chaplain,
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 6
+/obj/machinery/atmospherics/pipe/manifold/supply/hidden{
+ dir = 8
},
/turf/open/floor/carpet,
/area/chapel/main/monastery)
@@ -53372,8 +53382,9 @@
/turf/open/floor/plasteel/dark,
/area/chapel/office)
"dpc" = (
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
+/obj/machinery/atmospherics/pipe/simple/supply/hidden,
+/turf/open/floor/carpet,
+/area/chapel/main/monastery)
"dps" = (
/obj/machinery/status_display/ai,
/turf/closed/wall,
@@ -53737,13 +53748,6 @@
},
/turf/open/floor/plating,
/area/maintenance/department/engine)
-"eit" = (
-/obj/structure/window/reinforced{
- dir = 4
- },
-/obj/structure/lattice,
-/turf/open/space/basic,
-/area/space/nearstation)
"eiV" = (
/obj/machinery/atmospherics/pipe/heat_exchanging/simple{
dir = 4
@@ -53761,10 +53765,6 @@
/obj/structure/chair/office/dark,
/turf/open/floor/wood,
/area/lawoffice)
-"epg" = (
-/obj/structure/lattice,
-/turf/open/space,
-/area/space)
"epj" = (
/obj/machinery/cryopod{
dir = 8
@@ -54040,12 +54040,6 @@
},
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
-"eVT" = (
-/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
- dir = 1
- },
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"eWi" = (
/obj/structure/cable{
icon_state = "0-4"
@@ -54960,14 +54954,6 @@
},
/turf/open/floor/plating,
/area/maintenance/department/cargo)
-"gTy" = (
-/obj/structure/window/reinforced{
- dir = 4
- },
-/obj/structure/lattice,
-/obj/structure/lattice,
-/turf/open/space/basic,
-/area/space/nearstation)
"gUb" = (
/obj/structure/chair/office/dark{
dir = 4
@@ -55218,14 +55204,6 @@
},
/turf/open/floor/plating,
/area/maintenance/solars/port)
-"hCb" = (
-/obj/machinery/door/airlock/public/glass{
- name = "Monastery Transit"
- },
-/turf/open/floor/plasteel/white{
- heat_capacity = 1e+006
- },
-/area/hallway/secondary/entry)
"hDG" = (
/obj/machinery/door/airlock/engineering{
name = "Auxillary Base Construction";
@@ -56414,10 +56392,6 @@
},
/turf/open/floor/plasteel,
/area/hallway/primary/aft)
-"koE" = (
-/obj/structure/lattice,
-/turf/open/space/basic,
-/area/space)
"kpK" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 5
@@ -56602,12 +56576,7 @@
/turf/open/floor/plating,
/area/hallway/secondary/entry)
"kIc" = (
-/obj/machinery/door/airlock/public/glass{
- name = "Monastery Transit"
- },
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 4
- },
+/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plasteel/white{
heat_capacity = 1e+006
},
@@ -56752,12 +56721,6 @@
/obj/effect/turf_decal/delivery,
/turf/open/floor/plasteel/dark,
/area/engine/engineering)
-"kVy" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 9
- },
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"kWQ" = (
/obj/machinery/atmospherics/pipe/simple/orange/visible,
/obj/structure/cable/yellow{
@@ -57225,11 +57188,6 @@
/obj/effect/turf_decal/stripes/line,
/turf/open/floor/plasteel,
/area/engine/engineering)
-"mgU" = (
-/obj/effect/landmark/carpspawn,
-/obj/structure/lattice,
-/turf/open/space/basic,
-/area/space)
"mhl" = (
/obj/machinery/power/emitter,
/obj/machinery/light{
@@ -57532,14 +57490,6 @@
/obj/machinery/space_heater,
/turf/open/floor/plating,
/area/maintenance/department/science)
-"mSY" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/turf/open/floor/plasteel/white{
- heat_capacity = 1e+006
- },
-/area/chapel/dock)
"mTS" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -57549,12 +57499,6 @@
},
/turf/open/floor/plasteel/dark,
/area/science/xenobiology)
-"mVD" = (
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 4
- },
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"mVM" = (
/turf/open/floor/plating/airless,
/area/space/nearstation)
@@ -57636,12 +57580,6 @@
/obj/item/chair/stool,
/turf/open/floor/carpet,
/area/maintenance/department/crew_quarters/dorms)
-"nho" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"nih" = (
/obj/structure/closet,
/obj/effect/spawner/lootdrop/costume,
@@ -58727,17 +58665,6 @@
},
/turf/open/floor/plasteel/white/corner,
/area/hallway/secondary/exit/departure_lounge)
-"ppY" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/obj/machinery/door/airlock/public/glass{
- name = "Monastery Transit"
- },
-/turf/open/floor/plasteel/white{
- heat_capacity = 1e+006
- },
-/area/chapel/dock)
"prQ" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
dir = 4
@@ -60222,22 +60149,6 @@
},
/turf/open/floor/plasteel,
/area/science/xenobiology)
-"tbF" = (
-/obj/structure/window/reinforced,
-/obj/structure/window/reinforced{
- dir = 4
- },
-/obj/structure/lattice,
-/obj/structure/lattice,
-/turf/open/space/basic,
-/area/space/nearstation)
-"tbY" = (
-/obj/structure/closet/emcloset,
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 6
- },
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"tcY" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -60856,10 +60767,6 @@
/obj/machinery/field/generator,
/turf/open/floor/plating,
/area/maintenance/department/engine)
-"uxI" = (
-/obj/machinery/light,
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"uxP" = (
/obj/structure/disposalpipe/segment{
dir = 9
@@ -61064,10 +60971,6 @@
},
/turf/open/floor/plating,
/area/maintenance/department/engine)
-"vaB" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden,
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"vco" = (
/obj/machinery/light/small{
dir = 8
@@ -61278,12 +61181,6 @@
},
/turf/open/floor/plasteel,
/area/engine/engineering)
-"vxZ" = (
-/obj/machinery/light{
- dir = 8
- },
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"vzz" = (
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/public/glass{
@@ -61721,9 +61618,7 @@
/turf/open/floor/plating,
/area/maintenance/department/crew_quarters/bar)
"wDe" = (
-/obj/machinery/door/airlock/public/glass{
- name = "Monastery Transit"
- },
+/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plasteel/white{
heat_capacity = 1e+006
},
@@ -61910,10 +61805,6 @@
icon_state = "platingdmg3"
},
/area/maintenance/department/science)
-"wUc" = (
-/obj/machinery/atmospherics/components/unary/vent_pump/on,
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"wUf" = (
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plating,
@@ -61948,25 +61839,10 @@
},
/turf/open/floor/plating,
/area/maintenance/department/security/brig)
-"wYJ" = (
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
-/obj/machinery/light{
- dir = 8
- },
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"wYK" = (
/obj/machinery/power/supermatter_crystal/engine,
/turf/open/floor/engine,
/area/engine/supermatter)
-"wZs" = (
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/turf/open/floor/plasteel/white{
- heat_capacity = 1e+006
- },
-/area/hallway/secondary/entry)
"xah" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -62025,10 +61901,6 @@
/obj/structure/disposalpipe/segment,
/turf/open/floor/wood,
/area/lawoffice)
-"xeN" = (
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
-/turf/open/floor/plasteel/white,
-/area/hallway/secondary/entry)
"xgh" = (
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
@@ -79577,26 +79449,26 @@ bIW
bKc
bOy
bMt
-bLn
-bOy
+bLs
+bMy
bPo
-bQg
-bQg
-bQg
-bQg
-bQg
-bQg
-bQg
-bQg
-bQg
bWX
-bXJ
-bZo
-bZo
-bZo
-bZo
-bZo
-bZo
+bWX
+bWX
+bWX
+bWX
+bWX
+bWX
+bWX
+bWX
+cek
+cdx
+dpc
+dpc
+dpc
+dpc
+dpc
+dpc
cbO
ccF
cdx
@@ -80088,7 +79960,7 @@ aaa
bGI
bHM
bHM
-bHM
+bNw
bLq
bMv
bNw
@@ -80599,11 +80471,11 @@ aaa
aaa
aaa
aaa
-koE
+aht
aqG
bGE
bKf
-mSY
+bKf
bMw
bNy
bNw
@@ -80855,12 +80727,12 @@ aaa
aaa
aaa
aaa
-koE
-koE
+aht
+aht
aqG
bGE
bKf
-mSY
+bKf
bMx
bNz
bHM
@@ -81111,13 +80983,13 @@ aaa
aaa
aaa
aaa
-koE
-koE
-koE
+aaa
+aaa
+aaa
aqG
bGE
wDe
-ppY
+bHM
bHM
bNA
bHM
@@ -81361,23 +81233,23 @@ aZx
aaa
aaa
aaa
-mZE
-bVp
-bVp
-bVp
-bVp
-bVp
-eit
-gTy
-eit
-eit
-tbF
-aZx
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
bIY
-bLs
-aZx
+bIY
+aht
+aht
bNB
-bMy
+abI
abI
aby
abI
@@ -81618,21 +81490,21 @@ aZx
aaa
aaa
aaa
-bGI
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-bIY
-wZs
-aZx
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aht
amC
aaa
aht
@@ -81875,21 +81747,21 @@ aZx
aaa
aaa
aaa
-bGI
-aZx
-tbY
-wYJ
-xeN
-xeN
-xeN
-wYJ
-xeN
-eVT
-dpc
-vxZ
-bIY
-nho
-aZx
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
amB
aht
aht
@@ -82132,21 +82004,21 @@ aZx
aaa
aaa
aaa
-bGI
-aZx
-mVD
-dpc
-dpc
-dpc
-wUc
-vaB
-vaB
-vaB
-vaB
-vaB
-vaB
-kVy
-aZx
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aht
amC
aaa
aht
@@ -82389,21 +82261,21 @@ aZx
aaa
aaa
aaa
-bGI
-aZx
-mVD
-dpc
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
-aZx
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aaa
+aht
+aht
amB
aht
aht
@@ -82646,21 +82518,21 @@ aZx
aaa
aaa
aaa
-aqG
-aZx
-mVD
-dpc
-aZx
-koE
-koE
-koE
-koE
-koE
-koE
-koE
-koE
-koE
-koE
+aaa
+aaa
+aaa
+aaa
+aaa
+aht
+aaa
+aaa
+aaa
+aaa
+aht
+aht
+aht
+aht
+aht
amD
aaa
aht
@@ -82902,12 +82774,12 @@ bon
aZx
aaa
aaa
-koE
-aqG
-aZx
-mVD
-dpc
-aZx
+aaa
+aaa
+aaa
+aaa
+aaa
+aht
bBV
bDf
bDf
@@ -83162,12 +83034,12 @@ aZx
aZx
aZx
aZx
-mVD
-uxI
+aaa
+aht
bAI
-epg
abI
-koE
+abI
+aht
abI
aaa
bva
@@ -83420,7 +83292,7 @@ bbR
bbR
aZx
kIc
-hCb
+kIc
bAJ
bBX
bBX
@@ -83470,7 +83342,7 @@ cfN
cfN
xYV
cjm
-koE
+aht
aaa
aaa
aaa
@@ -83728,7 +83600,7 @@ cfN
qWo
cjm
cjm
-koE
+aht
aaa
aaa
aaa
@@ -84483,8 +84355,8 @@ bva
bNK
bva
bva
-koE
-mgU
+aht
+aht
kSb
kSb
aht
@@ -84742,7 +84614,7 @@ bQl
cqX
xNx
ctS
-aaa
+cFB
aaa
aaa
aaa
@@ -84754,8 +84626,8 @@ aaa
aaa
kSb
kSb
-koE
-koE
+aht
+aht
nKo
aaa
aaa
diff --git a/byond-extools.dll b/byond-extools.dll
index a83ea1e543..4910fad01b 100644
Binary files a/byond-extools.dll and b/byond-extools.dll differ
diff --git a/code/__DEFINES/atmospherics.dm b/code/__DEFINES/atmospherics.dm
index 2b19b557b2..621af2c811 100644
--- a/code/__DEFINES/atmospherics.dm
+++ b/code/__DEFINES/atmospherics.dm
@@ -136,7 +136,7 @@
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) //+1 for each SCALE kPa aboe threshold
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
#define TANK_MIN_RELEASE_PRESSURE 0
-#define TANK_DEFAULT_RELEASE_PRESSURE 16
+#define TANK_DEFAULT_RELEASE_PRESSURE 17
//CANATMOSPASS
#define ATMOS_PASS_YES 1
@@ -270,16 +270,9 @@
T.pixel_x = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_X;\
T.pixel_y = (PipingLayer - PIPING_LAYER_DEFAULT) * PIPING_LAYER_P_Y;
-#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
-//prefer this to gas_mixture/total_moles in performance critical areas
-#define TOTAL_MOLES(cached_gases, out_var)\
- out_var = 0;\
- for(var/total_moles_id in cached_gases){\
- out_var += cached_gases[total_moles_id];\
- }
#ifdef TESTING
GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
@@ -288,6 +281,19 @@ GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
#define CALCULATE_ADJACENT_TURFS(T) SSadjacent_air.queue[T] = 1
#endif
+#define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so")
+
+GLOBAL_VAR(atmos_extools_initialized) // this must be an uninitialized (null) one or init_monstermos will be called twice because reasons
+#define ATMOS_EXTOOLS_CHECK if(!GLOB.atmos_extools_initialized){\
+ GLOB.atmos_extools_initialized=TRUE;\
+ if(fexists(EXTOOLS)){\
+ var/result = call(EXTOOLS,"init_monstermos")();\
+ if(result != "ok") {CRASH(result);}\
+ } else {\
+ CRASH("[EXTOOLS] does not exist!");\
+ }\
+}
+
//Unomos - So for whatever reason, garbage collection actually drastically decreases the cost of atmos later in the round. Turning this into a define yields massively improved performance.
#define GAS_GARBAGE_COLLECT(GASGASGAS)\
var/list/CACHE_GAS = GASGASGAS;\
@@ -296,10 +302,6 @@ GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
CACHE_GAS -= id;\
}
-#define ARCHIVE_TEMPERATURE(gas) gas.temperature_archived = gas.temperature
-
-#define ARCHIVE(gas) gas.temperature_archived = gas.temperature; gas.gas_archive = gas.gases.Copy();
-
GLOBAL_LIST_INIT(pipe_paint_colors, list(
"amethyst" = rgb(130,43,255), //supplymain
"blue" = rgb(0,0,255),
diff --git a/code/__DEFINES/configuration.dm b/code/__DEFINES/configuration.dm
index 6b70eb1e0f..a4bf69b2ad 100644
--- a/code/__DEFINES/configuration.dm
+++ b/code/__DEFINES/configuration.dm
@@ -8,3 +8,12 @@
//flags
#define CONFIG_ENTRY_LOCKED 1 //can't edit
#define CONFIG_ENTRY_HIDDEN 2 //can't see value
+
+// Policy config keys
+// MAKE SURE THESE ARE UPPERCASE
+/// Displayed to cloned patients
+#define POLICYCONFIG_ON_CLONE "ON_CLONE"
+/// Displayed to defibbed/revival surgery'd patients before the memory loss time threshold
+#define POLICYCONFIG_ON_DEFIB_INTACT "ON_DEFIB_INTACT"
+/// Displayed to defibbed/revival surgery'd patients after the memory loss time threshold
+#define POLICYCONFIG_ON_DEFIB_LATE "ON_DEFIB_LATE"
diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index d9a6452f38..5c28694005 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -37,12 +37,14 @@
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal" //from base of atom/animal_attack(): (/mob/user)
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob, list/examine_return_text)
-#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" //from base of atom/get_examine_name(): (/mob, list/overrides)
+///from base of atom/get_examine_name(): (/mob, list/overrides)
+#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name"
+#define COMSIG_PARENT_EXAMINE_MORE "atom_examine_more" ///from base of atom/examine_more(): (/mob)
//Positions for overrides list
- #define EXAMINE_POSITION_ARTICLE 1
- #define EXAMINE_POSITION_BEFORE 2
+ #define EXAMINE_POSITION_ARTICLE (1<<0)
+ #define EXAMINE_POSITION_BEFORE (1<<1)
//End positions
- #define COMPONENT_EXNAME_CHANGED 1
+ #define COMPONENT_EXNAME_CHANGED (1<<0)
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" //from base of atom/update_icon(): ()
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2
@@ -179,6 +181,10 @@
#define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target)
#define COMSIG_MOB_KEY_CHANGE "mob_key_change" //from base of /mob/transfer_ckey(): (new_character, old_character)
#define COMSIG_MOB_PRE_PLAYER_CHANGE "mob_pre_player_change" //sent to the target mob from base of /mob/transfer_ckey() and /mind/transfer_to(): (our_character, their_character)
+///from /mob/living/handle_eye_contact(): (mob/living/other_mob)
+#define COMSIG_MOB_EYECONTACT "mob_eyecontact"
+ /// return this if you want to block printing this message to this person, if you want to print your own (does not affect the other person's message)
+ #define COMSIG_BLOCK_EYECONTACT (1<<0)
// #define COMPONENT_STOP_MIND_TRANSFER 1
#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" //from base of /mob/update_sight(): ()
#define COMSIG_MOB_ON_NEW_MIND "mob_on_new_mind" //called when a new mind is assigned to a mob: ()
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index fa7758be1f..42139cdeda 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -310,3 +310,9 @@
#define FOV_90_DEGREES 90
#define FOV_180_DEGREES 180
#define FOV_270_DEGREES 270
+
+/// How far away you can be to make eye contact with someone while examining
+#define EYE_CONTACT_RANGE 5
+
+/// If you examine the same atom twice in this timeframe, we call examine_more() instead of examine()
+#define EXAMINE_MORE_TIME 1 SECONDS
\ No newline at end of file
diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm
index aeacdb7c51..20e7975ec4 100644
--- a/code/__DEFINES/rust_g.dm
+++ b/code/__DEFINES/rust_g.dm
@@ -6,7 +6,7 @@
#define RUSTG_JOB_ERROR "JOB PANICKED"
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
-#define rustg_dmi_create_png(fname,width,height,data) call(RUST_G, "dmi_create_png")(fname,width,height,data)
+#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data)
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev)
@@ -14,14 +14,12 @@
#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format)
/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")()
-// RUST-G defines & procs for HTTP component
#define RUSTG_HTTP_METHOD_GET "get"
-#define RUSTG_HTTP_METHOD_POST "post"
#define RUSTG_HTTP_METHOD_PUT "put"
#define RUSTG_HTTP_METHOD_DELETE "delete"
#define RUSTG_HTTP_METHOD_PATCH "patch"
#define RUSTG_HTTP_METHOD_HEAD "head"
-
+#define RUSTG_HTTP_METHOD_POST "post"
#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)
diff --git a/code/__DEFINES/spaceman_dmm.dm b/code/__DEFINES/spaceman_dmm.dm
index 3d4207c5c9..e21f3dc1c1 100644
--- a/code/__DEFINES/spaceman_dmm.dm
+++ b/code/__DEFINES/spaceman_dmm.dm
@@ -29,6 +29,5 @@
#endif
/world/proc/enable_debugger()
- var/dll = world.GetConfig("env", "EXTOOLS_DLL")
- if (dll)
- call(dll, "debug_initialize")()
+ if (fexists(EXTOOLS))
+ call(EXTOOLS, "debug_initialize")()
diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm
index 8c423ad09c..bf76f8a523 100644
--- a/code/__DEFINES/subsystems.dm
+++ b/code/__DEFINES/subsystems.dm
@@ -137,12 +137,13 @@
// SSair run section
#define SSAIR_PIPENETS 1
#define SSAIR_ATMOSMACHINERY 2
-#define SSAIR_REACTQUEUE 3
-#define SSAIR_EXCITEDGROUPS 4
-#define SSAIR_HIGHPRESSURE 5
-#define SSAIR_HOTSPOTS 6
-#define SSAIR_SUPERCONDUCTIVITY 7
-#define SSAIR_REBUILD_PIPENETS 8
+#define SSAIR_EXCITEDGROUPS 3
+#define SSAIR_HIGHPRESSURE 4
+#define SSAIR_HOTSPOTS 5
+#define SSAIR_SUPERCONDUCTIVITY 6
+#define SSAIR_REBUILD_PIPENETS 7
+#define SSAIR_EQUALIZE 8
+#define SSAIR_ACTIVETURFS 9
#define COMPILE_OVERLAYS(A)\
if (TRUE) {\
diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm
index 4647b83cd7..7e8b1c8f38 100644
--- a/code/controllers/configuration/config_entry.dm
+++ b/code/controllers/configuration/config_entry.dm
@@ -209,6 +209,8 @@
new_value = new_list
continue_check_value = new_list.len
if(continue_check_value && continue_check_key && ValidateListEntry(new_key, new_value))
+ new_key = preprocess_key(new_key)
+ new_value = preprocess_value(new_value)
config_entry_value[new_key] = new_value
return TRUE
return FALSE
@@ -216,6 +218,12 @@
/datum/config_entry/keyed_list/vv_edit_var(var_name, var_value)
return var_name != "splitter" && ..()
+/datum/config_entry/keyed_list/proc/preprocess_key(key)
+ return key
+
+/datum/config_entry/keyed_list/proc/preprocess_value(value)
+ return value
+
//snowflake for donator things being on one line smh
/datum/config_entry/multi_keyed_flag
vv_VAS = FALSE
diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm
index 31431ddab9..1c6e96f9e4 100644
--- a/code/controllers/configuration/configuration.dm
+++ b/code/controllers/configuration/configuration.dm
@@ -14,6 +14,7 @@
var/list/modes // allowed modes
var/list/gamemode_cache
var/list/votable_modes // votable modes
+ // var/list/ic_filter_regex
var/list/storyteller_cache
var/list/mode_names
var/list/mode_reports
@@ -414,3 +415,21 @@
continue
runnable_modes[M] = probabilities[M.config_tag]
return runnable_modes
+/*
+/datum/controller/configuration/proc/LoadChatFilter()
+ var/list/in_character_filter = list()
+
+ if(!fexists("[directory]/in_character_filter.txt"))
+ return
+ log_config("Loading config file in_character_filter.txt...")
+ for(var/line in world.file2list("[directory]/in_character_filter.txt"))
+ if(!line)
+ continue
+ if(findtextEx(line,"#",1,2))
+ continue
+ in_character_filter += REGEX_QUOTE(line)
+
+ ic_filter_regex = in_character_filter.len ? regex("\\b([jointext(in_character_filter, "|")])\\b", "i") : null
+
+ syncChatRegexes()
+*/
diff --git a/code/controllers/configuration/entries/policy.dm b/code/controllers/configuration/entries/policy.dm
new file mode 100644
index 0000000000..de611e1813
--- /dev/null
+++ b/code/controllers/configuration/entries/policy.dm
@@ -0,0 +1,11 @@
+/// Seconds for CMD on defib-with-memory-loss policy config to display instead of defib-intact config
+/datum/config_entry/number/defib_cmd_time_limit
+ config_entry_value = 300
+ integer = TRUE
+
+/datum/config_entry/keyed_list/policyconfig
+ key_mode = KEY_MODE_TEXT
+ value_mode = VALUE_MODE_TEXT
+
+/datum/config_entry/keyed_list/policyconfig/preprocess_key(key)
+ return uppertext(..())
diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm
index 4d8bc3b1f6..baceb4d055 100644
--- a/code/controllers/subsystem/air.dm
+++ b/code/controllers/subsystem/air.dm
@@ -6,7 +6,7 @@ SUBSYSTEM_DEF(air)
flags = SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
- var/cost_turf_reactions = 0
+ var/cost_turfs = 0
var/cost_groups = 0
var/cost_highpressure = 0
var/cost_hotspots = 0
@@ -14,10 +14,9 @@ SUBSYSTEM_DEF(air)
var/cost_pipenets = 0
var/cost_rebuilds = 0
var/cost_atmos_machinery = 0
+ var/cost_equalize = 0
- var/list/excited_groups = list()
var/list/active_turfs = list()
- var/list/turf_react_queue = list()
var/list/hotspots = list()
var/list/networks = list()
var/list/pipenets_needing_rebuilt = list()
@@ -38,20 +37,25 @@ SUBSYSTEM_DEF(air)
var/map_loading = TRUE
var/list/queued_for_activation
+ var/log_explosive_decompression = TRUE // If things get spammy, admemes can turn this off.
+
+ var/monstermos_turf_limit = 10
+ var/monstermos_hard_turf_limit = 2000
+ var/monstermos_enabled = TRUE
+
/datum/controller/subsystem/air/stat_entry(msg)
msg += "C:{"
- msg += "RQ:[round(cost_turf_reactions,1)]|"
+ msg += "EQ:[round(cost_equalize,1)]|"
+ msg += "AT:[round(cost_turfs,1)]|"
msg += "EG:[round(cost_groups,1)]|"
msg += "HP:[round(cost_highpressure,1)]|"
msg += "HS:[round(cost_hotspots,1)]|"
msg += "SC:[round(cost_superconductivity,1)]|"
msg += "PN:[round(cost_pipenets,1)]|"
- msg += "RB:[round(cost_rebuilds,1)]|"
msg += "AM:[round(cost_atmos_machinery,1)]"
msg += "} "
msg += "AT:[active_turfs.len]|"
- msg += "RQ:[turf_react_queue.len]|"
- msg += "EG:[excited_groups.len]|"
+ msg += "EG:[get_amt_excited_groups()]|"
msg += "HS:[hotspots.len]|"
msg += "PN:[networks.len]|"
msg += "HP:[high_pressure_delta.len]|"
@@ -59,8 +63,8 @@ SUBSYSTEM_DEF(air)
msg += "AT/MS:[round((cost ? active_turfs.len/cost : 0),0.1)]"
..(msg)
-
/datum/controller/subsystem/air/Initialize(timeofday)
+ extools_update_ssair()
map_loading = FALSE
setup_allturfs()
setup_atmos_machinery()
@@ -68,6 +72,7 @@ SUBSYSTEM_DEF(air)
gas_reactions = init_gas_reactions()
return ..()
+/datum/controller/subsystem/air/proc/extools_update_ssair()
/datum/controller/subsystem/air/fire(resumed = 0)
var/timer = TICK_USAGE_REAL
@@ -101,12 +106,21 @@ SUBSYSTEM_DEF(air)
if(state != SS_RUNNING)
return
resumed = 0
- currentpart = SSAIR_REACTQUEUE
+ currentpart = monstermos_enabled ? SSAIR_EQUALIZE : SSAIR_ACTIVETURFS
- if(currentpart == SSAIR_REACTQUEUE)
+ if(currentpart == SSAIR_EQUALIZE)
timer = TICK_USAGE_REAL
- process_react_queue(resumed)
- cost_turf_reactions = MC_AVERAGE(cost_turf_reactions, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
+ process_turf_equalize(resumed)
+ cost_equalize = MC_AVERAGE(cost_equalize, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
+ if(state != SS_RUNNING)
+ return
+ resumed = 0
+ currentpart = SSAIR_ACTIVETURFS
+
+ if(currentpart == SSAIR_ACTIVETURFS)
+ timer = TICK_USAGE_REAL
+ process_active_turfs(resumed)
+ cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
@@ -148,6 +162,8 @@ SUBSYSTEM_DEF(air)
resumed = 0
currentpart = SSAIR_REBUILD_PIPENETS
+
+
/datum/controller/subsystem/air/proc/process_pipenets(resumed = 0)
if (!resumed)
src.currentrun = networks.Copy()
@@ -182,19 +198,6 @@ SUBSYSTEM_DEF(air)
return
-/datum/controller/subsystem/air/proc/process_react_queue(resumed = 0)
- if(!resumed)
- src.currentrun = turf_react_queue.Copy()
- var/list/currentrun = src.currentrun
- while(currentrun.len)
- var/turf/open/T = currentrun[currentrun.len]
- currentrun.len--
- if(T)
- T.process_cell_reaction()
- if(MC_TICK_CHECK)
- return
-
-
/datum/controller/subsystem/air/proc/process_super_conductivity(resumed = 0)
if (!resumed)
src.currentrun = active_super_conductivity.Copy()
@@ -229,10 +232,45 @@ SUBSYSTEM_DEF(air)
high_pressure_delta.len--
T.high_pressure_movements()
T.pressure_difference = 0
+ T.pressure_specific_target = null
if(MC_TICK_CHECK)
return
+/datum/controller/subsystem/air/proc/process_turf_equalize(resumed = 0)
+ //cache for sanic speed
+ var/fire_count = times_fired
+ if (!resumed)
+ src.currentrun = active_turfs.Copy()
+ //cache for sanic speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(currentrun.len)
+ var/turf/open/T = currentrun[currentrun.len]
+ currentrun.len--
+ if (T)
+ T.equalize_pressure_in_zone(fire_count)
+ //equalize_pressure_in_zone(T, fire_count)
+ if (MC_TICK_CHECK)
+ return
+
+/datum/controller/subsystem/air/proc/process_active_turfs(resumed = 0)
+ //cache for sanic speed
+ var/fire_count = times_fired
+ if (!resumed)
+ src.currentrun = active_turfs.Copy()
+ //cache for sanic speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(currentrun.len)
+ var/turf/open/T = currentrun[currentrun.len]
+ currentrun.len--
+ if (T)
+ T.process_cell(fire_count)
+ if (MC_TICK_CHECK)
+ return
+
/datum/controller/subsystem/air/proc/process_excited_groups(resumed = 0)
+ if(process_excited_groups_extools(resumed, (Master.current_ticklimit - TICK_USAGE) * 0.01 * world.tick_lag))
+ sleep()
+ /*
if (!resumed)
src.currentrun = excited_groups.Copy()
//cache for sanic speed (lists are references anyways)
@@ -248,29 +286,33 @@ SUBSYSTEM_DEF(air)
EG.dismantle()
if (MC_TICK_CHECK)
return
+ */
+
+/datum/controller/subsystem/air/proc/process_excited_groups_extools()
+/datum/controller/subsystem/air/proc/get_amt_excited_groups()
/datum/controller/subsystem/air/proc/remove_from_active(turf/open/T)
active_turfs -= T
- SSair_turfs.currentrun -= T
+ if(currentpart == SSAIR_ACTIVETURFS)
+ currentrun -= T
#ifdef VISUALIZE_ACTIVE_TURFS
T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#00ff00")
#endif
if(istype(T))
- T.excited = 0
- if(T.excited_group)
- T.excited_group.garbage_collect()
- remove_from_react_queue(T)
+ T.set_excited(FALSE)
+ T.eg_garbage_collect()
/datum/controller/subsystem/air/proc/add_to_active(turf/open/T, blockchanges = 1)
if(istype(T) && T.air)
#ifdef VISUALIZE_ACTIVE_TURFS
T.add_atom_colour("#00ff00", TEMPORARY_COLOUR_PRIORITY)
#endif
- T.excited = TRUE
- active_turfs[T] = SSair_turfs.currentrun[T] = TRUE
- if(blockchanges && T.excited_group)
- T.excited_group.garbage_collect()
- add_to_react_queue(T)
+ T.set_excited(TRUE)
+ active_turfs |= T
+ if(currentpart == SSAIR_ACTIVETURFS)
+ currentrun |= T
+ if(blockchanges)
+ T.eg_garbage_collect()
else if(T.flags_1 & INITIALIZED_1)
for(var/turf/S in T.atmos_adjacent_turfs)
add_to_active(S)
@@ -281,17 +323,6 @@ SUBSYSTEM_DEF(air)
else
T.requires_activation = TRUE
-/datum/controller/subsystem/air/proc/add_to_react_queue(turf/open/T)
- if(istype(T) && T.air)
- turf_react_queue[T] = TRUE
- if(currentpart == SSAIR_REACTQUEUE)
- currentrun[T] = TRUE
-
-/datum/controller/subsystem/air/proc/remove_from_react_queue(turf/open/T)
- turf_react_queue -= T
- if(currentpart == SSAIR_REACTQUEUE)
- currentrun -= T
-
/datum/controller/subsystem/air/StartLoadingMap()
LAZYINITLIST(queued_for_activation)
map_loading = TRUE
@@ -339,11 +370,11 @@ SUBSYSTEM_DEF(air)
while (turfs_to_check.len)
var/ending_ats = active_turfs.len
- for(var/thing in excited_groups)
+ /*for(var/thing in excited_groups)
var/datum/excited_group/EG = thing
- EG.self_breakdown(space_is_all_consuming = 1)
- EG.dismantle()
- CHECK_TICK
+ //EG.self_breakdown(space_is_all_consuming = 1)
+ //EG.dismantle()
+ CHECK_TICK*/
var/msg = "HEY! LISTEN! [DisplayTimeText(world.timeofday - timer)] were wasted processing [starting_ats] turf(s) (connected to [ending_ats] other turfs) with atmos differences at round start."
to_chat(world, "[msg]")
@@ -351,6 +382,7 @@ SUBSYSTEM_DEF(air)
/turf/open/proc/resolve_active_graph()
. = list()
+ /*
var/datum/excited_group/EG = excited_group
if (blocks_air || !air)
return
@@ -371,7 +403,8 @@ SUBSYSTEM_DEF(air)
EG.add_turf(ET)
if (!ET.excited)
ET.excited = 1
- . += ET
+ . += ET*/
+
/turf/open/space/resolve_active_graph()
return list()
@@ -389,9 +422,8 @@ SUBSYSTEM_DEF(air)
CHECK_TICK
/datum/controller/subsystem/air/proc/setup_template_machinery(list/atmos_machines)
- if(!initialized)
- return
-
+ if(!initialized) // yogs - fixes randomized bars
+ return // yogs
for(var/A in atmos_machines)
var/obj/machinery/atmospherics/AM = A
AM.atmosinit()
@@ -415,6 +447,7 @@ SUBSYSTEM_DEF(air)
#undef SSAIR_PIPENETS
#undef SSAIR_ATMOSMACHINERY
+#undef SSAIR_ACTIVETURFS
#undef SSAIR_EXCITEDGROUPS
#undef SSAIR_HIGHPRESSURE
#undef SSAIR_HOTSPOTS
diff --git a/code/controllers/subsystem/air_turfs.dm b/code/controllers/subsystem/air_turfs.dm
index 9dd41aede5..7320defcae 100644
--- a/code/controllers/subsystem/air_turfs.dm
+++ b/code/controllers/subsystem/air_turfs.dm
@@ -1,5 +1,5 @@
//WHAT IF WE TAKE THE ACTIVE TURF PROCESSING AND PUSH IT SOMEWHERE ELSE!!!
-
+/*
SUBSYSTEM_DEF(air_turfs)
name = "Atmospherics - Turfs"
init_order = INIT_ORDER_AIR_TURFS
@@ -24,3 +24,4 @@ SUBSYSTEM_DEF(air_turfs)
return
resumed = 0
return
+*/
diff --git a/code/controllers/subsystem/chat.dm b/code/controllers/subsystem/chat.dm
index 8d4de0c091..bbeb0683f0 100644
--- a/code/controllers/subsystem/chat.dm
+++ b/code/controllers/subsystem/chat.dm
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(chat)
wait = 1
priority = FIRE_PRIORITY_CHAT
init_order = INIT_ORDER_CHAT
+
var/list/payload = list()
@@ -17,7 +18,7 @@ SUBSYSTEM_DEF(chat)
return
-/datum/controller/subsystem/chat/proc/queue(target, message, handle_whitespace = TRUE)
+/datum/controller/subsystem/chat/proc/queue(target, message, handle_whitespace = TRUE, trailing_newline = TRUE, confidential = TRUE)
if(!target || !message)
return
@@ -35,8 +36,8 @@ SUBSYSTEM_DEF(chat)
if(handle_whitespace)
message = replacetext(message, "\n", "
")
message = replacetext(message, "\t", "[FOURSPACES][FOURSPACES]")
- message += "
"
-
+ if (trailing_newline)
+ message += "
"
//url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript.
//Do the double-encoding here to save nanoseconds
@@ -47,7 +48,7 @@ SUBSYSTEM_DEF(chat)
var/client/C = CLIENT_FROM_VAR(I) //Grab us a client if possible
if(!C)
- return
+ continue
//Send it to the old style output window.
SEND_TEXT(C, original_message)
diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm
index 0fbbcd59b0..e2c3cbff86 100644
--- a/code/datums/components/wet_floor.dm
+++ b/code/datums/components/wet_floor.dm
@@ -121,7 +121,7 @@
if(-INFINITY to T0C)
add_wet(TURF_WET_ICE, max_time_left()) //Water freezes into ice!
if(T0C to T0C + 100)
- decrease = ((T.air.temperature - T0C) / SSwet_floors.temperature_coeff) * (diff / SSwet_floors.time_ratio)
+ decrease = ((T.air.return_temperature() - T0C) / SSwet_floors.temperature_coeff) * (diff / SSwet_floors.time_ratio)
if(T0C + 100 to INFINITY)
decrease = INFINITY
decrease = max(0, decrease)
diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm
index 787704e848..2fc853500d 100644
--- a/code/datums/diseases/advance/symptoms/heal.dm
+++ b/code/datums/diseases/advance/symptoms/heal.dm
@@ -404,7 +404,7 @@
if(M.loc)
environment = M.loc.return_air()
if(environment)
- plasmamount = environment.gases[/datum/gas/plasma]
+ plasmamount = environment.get_moles(/datum/gas/plasma)
if(plasmamount && plasmamount > GLOB.meta_gas_visibility[/datum/gas/plasma]) //if there's enough plasma in the air to see
. += power * 0.5
if(M.reagents.has_reagent(/datum/reagent/toxin/plasma))
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index c46a03a986..5e9371f754 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -117,9 +117,8 @@
continue
var/datum/gas_mixture/A = F.air
- var/list/A_gases = A.gases
var/trace_gases
- for(var/id in A_gases)
+ for(var/id in A.get_gases())
if(id in GLOB.hardcoded_gases)
continue
trace_gases = TRUE
@@ -128,15 +127,15 @@
// Can most things breathe?
if(trace_gases)
continue
- if(A_gases[/datum/gas/oxygen] <= 16)
+ if(A.get_moles(/datum/gas/oxygen) < 16)
continue
- if(A_gases[/datum/gas/plasma])
+ if(A.get_moles(/datum/gas/plasma))
continue
- if(A_gases[/datum/gas/carbon_dioxide] >= 10)
+ if(A.get_moles(/datum/gas/carbon_dioxide) >= 10)
continue
// Aim for goldilocks temperatures and pressure
- if((A.temperature <= 270) || (A.temperature >= 360))
+ if((A.return_temperature() <= 270) || (A.return_temperature() >= 360))
continue
var/pressure = A.return_pressure()
if((pressure <= 20) || (pressure >= 550))
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 8ac9bc4276..d02249fb38 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -124,6 +124,8 @@
transfer_martial_arts(new_character)
if(active || force_key_move)
new_character.key = key //now transfer the key to link the client to our new body
+ if(new_character.client)
+ LAZYCLEARLIST(new_character.client.recent_examines)
current.update_atom_languages()
//CIT CHANGE - makes arousal update when transfering bodies
diff --git a/code/datums/mutations/actions.dm b/code/datums/mutations/actions.dm
index 335ecf889f..7e6d567cfa 100644
--- a/code/datums/mutations/actions.dm
+++ b/code/datums/mutations/actions.dm
@@ -226,9 +226,8 @@
/obj/effect/proc_holder/spell/targeted/olfaction/cast(list/targets, mob/living/user = usr)
//can we sniff? is there miasma in the air?
var/datum/gas_mixture/air = user.loc.return_air()
- var/list/cached_gases = air.gases
- if(cached_gases[/datum/gas/miasma])
+ if(air.get_moles(/datum/gas/miasma))
user.adjust_disgust(sensitivity * 45)
to_chat(user, "With your overly sensitive nose, you get a whiff of stench and feel sick! Try moving to a cleaner area!")
return
diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm
index 9c2128163f..40b71eec0a 100644
--- a/code/datums/traits/negative.dm
+++ b/code/datums/traits/negative.dm
@@ -314,6 +314,13 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
medical_record_text = "Patient is usually anxious in social encounters and prefers to avoid them."
var/dumb_thing = TRUE
+/datum/quirk/social_anxiety/add()
+ RegisterSignal(quirk_holder, COMSIG_MOB_EYECONTACT, .proc/eye_contact)
+ RegisterSignal(quirk_holder, COMSIG_MOB_EXAMINATE, .proc/looks_at_floor)
+
+/datum/quirk/social_anxiety/remove()
+ UnregisterSignal(quirk_holder, list(COMSIG_MOB_EYECONTACT, COMSIG_MOB_EXAMINATE))
+
/datum/quirk/social_anxiety/on_process()
var/nearby_people = 0
for(var/mob/living/carbon/human/H in oview(3, quirk_holder))
@@ -330,6 +337,45 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
dumb_thing = FALSE //only once per life
if(prob(1))
new/obj/item/reagent_containers/food/snacks/pastatomato(get_turf(H)) //now that's what I call spaghetti code
+// small chance to make eye contact with inanimate objects/mindless mobs because of nerves
+
+
+
+/datum/quirk/social_anxiety/proc/looks_at_floor(datum/source, atom/A)
+ var/mob/living/mind_check = A
+ if(prob(85) || (istype(mind_check) && mind_check.mind))
+ return
+
+ addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, quirk_holder, "You make eye contact with [A]."), 3)
+
+/datum/quirk/social_anxiety/proc/eye_contact(datum/source, mob/living/other_mob, triggering_examiner)
+ if(prob(75))
+ return
+ var/msg
+ if(triggering_examiner)
+ msg = "You make eye contact with [other_mob], "
+ else
+ msg = "[other_mob] makes eye contact with you, "
+
+ switch(rand(1,3))
+ if(1)
+ quirk_holder.Jitter(10)
+ msg += "causing you to start fidgeting!"
+ if(2)
+ quirk_holder.stuttering = max(3, quirk_holder.stuttering)
+ msg += "causing you to start stuttering!"
+ if(3)
+ quirk_holder.Stun(2 SECONDS)
+ msg += "causing you to freeze up!"
+
+ SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "anxiety_eyecontact", /datum/mood_event/anxiety_eyecontact)
+ addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, quirk_holder, "[msg]"), 3) // so the examine signal has time to fire and this will print after
+ return COMSIG_BLOCK_EYECONTACT
+
+/datum/mood_event/anxiety_eyecontact
+ description = "Sometimes eye contact makes me so nervous...\n"
+ mood_change = -5
+ timeout = 3 MINUTES
/datum/quirk/phobia
name = "Phobia"
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index f041c43bba..ff8c925a2b 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -366,6 +366,20 @@
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
+/**
+ * Called when a mob examines (shift click or verb) this atom twice (or more) within EXAMINE_MORE_TIME (default 1.5 seconds)
+ *
+ * This is where you can put extra information on something that may be superfluous or not important in critical gameplay
+ * moments, while allowing people to manually double-examine to take a closer look
+ *
+ * Produces a signal [COMSIG_PARENT_EXAMINE_MORE]
+ */
+/atom/proc/examine_more(mob/user)
+ . = list()
+ SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE_MORE, user, .)
+ if(!LAZYLEN(.)) // lol ..length
+ return list("You examine [src] closer, but find nothing of interest...")
+
/// Updates the icon of the atom
/atom/proc/update_icon()
// I expect we're going to need more return flags and options in this proc
diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm
index 2280bd45d6..f6b0c8e24b 100644
--- a/code/game/gamemodes/objective_items.dm
+++ b/code/game/gamemodes/objective_items.dm
@@ -125,7 +125,7 @@
/datum/objective_item/steal/plasma/check_special_completion(obj/item/tank/T)
var/target_amount = text2num(name)
var/found_amount = 0
- found_amount += T.air_contents.gases[/datum/gas/plasma]
+ found_amount += T.air_contents.get_moles(/datum/gas/plasma)
return found_amount>=target_amount
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 78a0365ac0..5bbd3f8a65 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -386,6 +386,11 @@
to_chat(occupant, "There is a bright flash!
You feel like a new being.")
mob_occupant.flash_act()
+ var/list/policies = CONFIG_GET(keyed_list/policyconfig)
+ var/policy = policies[POLICYCONFIG_ON_CLONE]
+ if(policy)
+ to_chat(occupant, policy)
+ occupant.log_message("revived using cloning.", LOG_GAME)
mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, mob_occupant.getCloneLoss())
occupant.forceMove(T)
diff --git a/code/game/machinery/computer/arcade/battle.dm b/code/game/machinery/computer/arcade/battle.dm
index b906b1afb5..fc99edd3eb 100644
--- a/code/game/machinery/computer/arcade/battle.dm
+++ b/code/game/machinery/computer/arcade/battle.dm
@@ -184,6 +184,15 @@
blocked = FALSE
return
+/obj/machinery/computer/arcade/battle/examine_more(mob/user)
+ to_chat(user, "Scribbled on the side of the Arcade Machine you notice some writing...\
+ \nmagical -> >=50 power\
+ \nsmart -> defend, defend, light attack\
+ \nshotgun -> defend, defend, power attack\
+ \nshort temper -> counter, counter, counter\
+ \npoisonous -> light attack, light attack, light attack\
+ \nchonker -> power attack, power attack, power attack")
+ return ..()
/obj/machinery/computer/arcade/battle/emag_act(mob/user)
. = ..()
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index 750a660ec0..6ee975b338 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -53,14 +53,14 @@
"id_tag" = id_tag,
"timestamp" = world.time,
"pressure" = air_sample.return_pressure(),
- "temperature" = air_sample.temperature,
+ "temperature" = air_sample.return_temperature(),
"gases" = list()
))
var/total_moles = air_sample.total_moles()
if(total_moles)
- for(var/gas_id in air_sample.gases)
+ for(var/gas_id in air_sample.get_gases())
var/gas_name = GLOB.meta_gas_names[gas_id]
- signal.data["gases"][gas_name] = air_sample.gases[gas_id] / total_moles * 100
+ signal.data["gases"][gas_name] = air_sample.get_moles(gas_id) / total_moles * 100
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 778023c1a9..6ef3f7bb01 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -93,7 +93,7 @@
var/shuttledocked = 0
var/delayed_close_requested = FALSE // TRUE means the door will automatically close the next time it's opened.
- var/air_tight = FALSE //TRUE means density will be set as soon as the door begins to close
+ air_tight = FALSE
var/prying_so_hard = FALSE
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 8b2eb9d1d7..b73e6a57ff 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -17,6 +17,7 @@
interaction_flags_atom = INTERACT_ATOM_UI_INTERACT
var/secondsElectrified = 0
+ var/air_tight = FALSE //TRUE means density will be set as soon as the door begins to close
var/shockedby
var/visible = TRUE // To explain: Whether the door can block line of sight when closed or not.
var/operating = FALSE
@@ -161,7 +162,7 @@
open()
else
close()
- return
+ return TRUE
if(density)
do_animate("deny")
@@ -181,11 +182,36 @@
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
return
+/obj/machinery/door/proc/is_holding_pressure()
+ var/turf/open/T = loc
+ if(!T)
+ return FALSE
+ if(!density)
+ return FALSE
+ // alrighty now we check for how much pressure we're holding back
+ var/min_moles = T.air.total_moles()
+ var/max_moles = min_moles
+ // okay this is a bit hacky. First, we set density to 0 and recalculate our adjacent turfs
+ density = FALSE
+ T.ImmediateCalculateAdjacentTurfs()
+ // then we use those adjacent turfs to figure out what the difference between the lowest and highest pressures we'd be holding is
+ for(var/turf/open/T2 in T.atmos_adjacent_turfs)
+ if((flags_1 & ON_BORDER_1) && get_dir(src, T2) != dir)
+ continue
+ var/moles = T2.air.total_moles()
+ if(moles < min_moles)
+ min_moles = moles
+ if(moles > max_moles)
+ max_moles = moles
+ density = TRUE
+ T.ImmediateCalculateAdjacentTurfs() // alright lets put it back
+ return max_moles - min_moles > 20
+
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
- if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/fireaxe)))
+ if(user.a_intent != INTENT_HARM && (I.tool_behaviour == TOOL_CROWBAR || istype(I, /obj/item/fireaxe)))
try_to_crowbar(I, user)
return 1
- else if(istype(I, /obj/item/weldingtool))
+ else if(I.tool_behaviour == TOOL_WELDER)
try_to_weld(I, user)
return 1
else if(!(I.item_flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
@@ -223,13 +249,13 @@
if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) )
INVOKE_ASYNC(src, .proc/open)
if(prob(severity*10 - 20))
- if(secondsElectrified == 0)
- secondsElectrified = -1
+ if(secondsElectrified == MACHINE_NOT_ELECTRIFIED)
+ secondsElectrified = MACHINE_ELECTRIFIED_PERMANENT
LAZYADD(shockedby, "\[[TIME_STAMP("hh:mm:ss", FALSE)]\]EM Pulse")
addtimer(CALLBACK(src, .proc/unelectrify), 300)
/obj/machinery/door/proc/unelectrify()
- secondsElectrified = 0
+ secondsElectrified = MACHINE_NOT_ELECTRIFIED
/obj/machinery/door/update_icon_state()
if(density)
@@ -289,8 +315,11 @@
return
operating = TRUE
+
do_animate("closing")
layer = closingLayer
+ if(air_tight)
+ density = TRUE
sleep(5)
density = TRUE
sleep(5)
@@ -302,7 +331,7 @@
update_freelook_sight()
if(safe)
CheckForMobs()
- else
+ else if(!(flags_1 & ON_BORDER_1))
crush()
return 1
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index b52cf1a891..e359c6331f 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -23,6 +23,8 @@
assemblytype = /obj/structure/firelock_frame
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 95, "acid" = 70)
interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN
+ air_tight = TRUE
+ var/emergency_close_timer = 0
var/nextstate = null
var/boltslocked = TRUE
var/list/affecting_areas
@@ -68,10 +70,14 @@
return ..()
/obj/machinery/door/firedoor/Bumped(atom/movable/AM)
- if(panel_open || operating)
+ if(panel_open || operating || welded)
return
- if(!density)
- return ..()
+ if(ismob(AM))
+ var/mob/user = AM
+ if(density && !welded && !operating && !(stat & NOPOWER) && (!density || allow_hand_open(user)))
+ add_fingerprint(user)
+ open()
+ return TRUE
return FALSE
@@ -86,6 +92,15 @@
. = ..()
if(.)
return
+
+ if(!welded && !operating && !(stat & NOPOWER) && (!density || allow_hand_open(user)))
+ add_fingerprint(user)
+ if(density)
+ emergency_close_timer = world.time + 30 // prevent it from instaclosing again if in space
+ open()
+ else
+ close()
+ return TRUE
if(operating || !density)
return
user.changeNext_move(CLICK_CD_MELEE)
@@ -100,7 +115,7 @@
return
if(welded)
- if(istype(C, /obj/item/wrench))
+ if(C.tool_behaviour == TOOL_WRENCH)
if(boltslocked)
to_chat(user, "There are screws locking the bolts in place!")
return
@@ -114,7 +129,7 @@
"You undo [src]'s floor bolts.")
deconstruct(TRUE)
return
- if(istype(C, /obj/item/screwdriver))
+ if(C.tool_behaviour == TOOL_SCREWDRIVER)
user.visible_message("[user] [boltslocked ? "unlocks" : "locks"] [src]'s bolts.", \
"You [boltslocked ? "unlock" : "lock"] [src]'s floor bolts.")
C.play_tool_sound(src)
@@ -140,10 +155,27 @@
return
if(density)
+ if(is_holding_pressure())
+ // tell the user that this is a bad idea, and have a do_after as well
+ to_chat(user, "As you begin crowbarring \the [src] a gush of air blows in your face... maybe you should reconsider?")
+ if(!do_after(user, 15, TRUE, src)) // give them a few seconds to reconsider their decision.
+ return
+ log_game("[key_name_admin(user)] has opened a firelock with a pressure difference at [AREACOORD(loc)]") // there bibby I made it logged just for you. Enjoy.
+ // since we have high-pressure-ness, close all other firedoors on the tile
+ whack_a_mole()
+ if(welded || operating || !density)
+ return // in case things changed during our do_after
+ emergency_close_timer = world.time + 60 // prevent it from instaclosing again if in space
open()
else
close()
+/obj/machinery/door/firedoor/proc/allow_hand_open(mob/user)
+ var/area/A = get_area(src)
+ if(A && A.fire)
+ return FALSE
+ return !is_holding_pressure()
+
/obj/machinery/door/firedoor/attack_ai(mob/user)
add_fingerprint(user)
if(welded || operating || stat & NOPOWER)
@@ -171,20 +203,16 @@
if("closing")
flick("door_closing", src)
-/obj/machinery/door/firedoor/update_icon_state()
+/obj/machinery/door/firedoor/update_icon()
+ cut_overlays()
if(density)
icon_state = "door_closed"
+ if(welded)
+ add_overlay("welded")
else
icon_state = "door_open"
-
-/obj/machinery/door/firedoor/update_overlays()
- . = ..()
- if(!welded)
- return
- if(density)
- . += "welded"
- else
- . += "welded_open"
+ if(welded)
+ add_overlay("welded_open")
/obj/machinery/door/firedoor/open()
. = ..()
@@ -194,6 +222,61 @@
. = ..()
latetoggle()
+/obj/machinery/door/firedoor/proc/whack_a_mole(reconsider_immediately = FALSE)
+ set waitfor = 0
+ for(var/cdir in GLOB.cardinals)
+ if((flags_1 & ON_BORDER_1) && cdir != dir)
+ continue
+ whack_a_mole_part(get_step(src, cdir), reconsider_immediately)
+ if(flags_1 & ON_BORDER_1)
+ whack_a_mole_part(get_turf(src), reconsider_immediately)
+
+/obj/machinery/door/firedoor/proc/whack_a_mole_part(turf/start_point, reconsider_immediately)
+ set waitfor = 0
+ var/list/doors_to_close = list()
+ var/list/turfs = list()
+ turfs[start_point] = 1
+ for(var/i = 1; (i <= turfs.len && i <= 11); i++) // check up to 11 turfs.
+ var/turf/open/T = turfs[i]
+ if(istype(T, /turf/open/space))
+ return -1
+ for(var/T2 in T.atmos_adjacent_turfs)
+ if(turfs[T2])
+ continue
+ var/is_cut_by_unopen_door = FALSE
+ for(var/obj/machinery/door/firedoor/FD in T2)
+ if((FD.flags_1 & ON_BORDER_1) && get_dir(T2, T) != FD.dir)
+ continue
+ if(FD.operating || FD == src || FD.welded || FD.density)
+ continue
+ doors_to_close += FD
+ is_cut_by_unopen_door = TRUE
+
+ for(var/obj/machinery/door/firedoor/FD in T)
+ if((FD.flags_1 & ON_BORDER_1) && get_dir(T, T2) != FD.dir)
+ continue
+ if(FD.operating || FD == src || FD.welded || FD.density)
+ continue
+ doors_to_close += FD
+ is_cut_by_unopen_door= TRUE
+ if(!is_cut_by_unopen_door)
+ turfs[T2] = 1
+ if(turfs.len > 10)
+ return // too big, don't bother
+ for(var/obj/machinery/door/firedoor/FD in doors_to_close)
+ FD.emergency_pressure_stop(FALSE)
+ if(reconsider_immediately)
+ var/turf/open/T = FD.loc
+ if(istype(T))
+ T.ImmediateCalculateAdjacentTurfs()
+
+/obj/machinery/door/firedoor/proc/emergency_pressure_stop(consider_timer = TRUE)
+ set waitfor = 0
+ if(density || operating || welded)
+ return
+ if(world.time >= emergency_close_timer || !consider_timer)
+ close()
+
/obj/machinery/door/firedoor/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
var/obj/structure/firelock_frame/F = new assemblytype(get_turf(src))
@@ -227,6 +310,59 @@
opacity = TRUE
density = TRUE
+/obj/machinery/door/firedoor/border_only/close()
+ if(density)
+ return TRUE
+ if(operating || welded)
+ return
+ var/turf/T1 = get_turf(src)
+ var/turf/T2 = get_step(T1, dir)
+ for(var/mob/living/M in T1)
+ if(M.stat == CONSCIOUS && M.pulling && M.pulling.loc == T2 && !M.pulling.anchored && M.pulling.move_resist <= M.move_force)
+ var/mob/living/M2 = M.pulling
+ if(!istype(M2) || !M2.buckled || !M2.buckled.buckle_prevents_pull)
+ to_chat(M, "You pull [M.pulling] through [src] right as it closes")
+ M.pulling.forceMove(T1)
+ M.start_pulling(M2)
+
+ for(var/mob/living/M in T2)
+ if(M.stat == CONSCIOUS && M.pulling && M.pulling.loc == T1 && !M.pulling.anchored && M.pulling.move_resist <= M.move_force)
+ var/mob/living/M2 = M.pulling
+ if(!istype(M2) || !M2.buckled || !M2.buckled.buckle_prevents_pull)
+ to_chat(M, "You pull [M.pulling] through [src] right as it closes")
+ M.pulling.forceMove(T2)
+ M.start_pulling(M2)
+ . = ..()
+
+/obj/machinery/door/firedoor/border_only/allow_hand_open(mob/user)
+ var/area/A = get_area(src)
+ if((!A || !A.fire) && !is_holding_pressure())
+ return TRUE
+ whack_a_mole(TRUE) // WOOP WOOP SIDE EFFECTS
+ var/turf/T = loc
+ var/turf/T2 = get_step(T, dir)
+ if(!T || !T2)
+ return
+ var/status1 = check_door_side(T)
+ var/status2 = check_door_side(T2)
+ if((status1 == 1 && status2 == -1) || (status1 == -1 && status2 == 1))
+ to_chat(user, "Access denied. Try closing another firedoor to minimize decompression, or using a crowbar.")
+ return FALSE
+ return TRUE
+
+/obj/machinery/door/firedoor/border_only/proc/check_door_side(turf/open/start_point)
+ var/list/turfs = list()
+ turfs[start_point] = 1
+ for(var/i = 1; (i <= turfs.len && i <= 11); i++) // check up to 11 turfs.
+ var/turf/open/T = turfs[i]
+ if(istype(T, /turf/open/space))
+ return -1
+ for(var/T2 in T.atmos_adjacent_turfs)
+ turfs[T2] = 1
+ if(turfs.len <= 10)
+ return 0 // not big enough to matter
+ return start_point.air.return_pressure() < 20 ? -1 : 1
+
/obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && (mover.pass_flags & PASSGLASS))
return TRUE
@@ -257,6 +393,18 @@
assemblytype = /obj/structure/firelock_frame/heavy
max_integrity = 550
+/obj/machinery/door/firedoor/window
+ name = "window shutter"
+ icon = 'icons/obj/doors/doorfirewindow.dmi'
+ desc = "A second window that slides in when the original window is broken, designed to protect against hull breaches. Truly a work of genius by NT engineers."
+ glass = TRUE
+ explosion_block = 0
+ max_integrity = 50
+ resistance_flags = 0 // not fireproof
+ heat_proof = FALSE
+
+/obj/machinery/door/firedoor/window/allow_hand_open()
+ return TRUE
/obj/item/electronics/firelock
name = "firelock circuitry"
@@ -294,7 +442,7 @@
/obj/structure/firelock_frame/attackby(obj/item/C, mob/user)
switch(constructionStep)
if(CONSTRUCTION_PANEL_OPEN)
- if(istype(C, /obj/item/crowbar))
+ if(C.tool_behaviour == TOOL_CROWBAR)
C.play_tool_sound(src)
user.visible_message("[user] starts prying something out from [src]...", \
"You begin prying out the wire cover...")
@@ -308,7 +456,7 @@
constructionStep = CONSTRUCTION_WIRES_EXPOSED
update_icon()
return
- if(istype(C, /obj/item/wrench))
+ if(C.tool_behaviour == TOOL_WRENCH)
if(locate(/obj/machinery/door/firedoor) in get_turf(src))
to_chat(user, "There's already a firelock there.")
return
@@ -350,7 +498,7 @@
return
if(CONSTRUCTION_WIRES_EXPOSED)
- if(istype(C, /obj/item/wirecutters))
+ if(C.tool_behaviour == TOOL_WIRECUTTER)
C.play_tool_sound(src)
user.visible_message("[user] starts cutting the wires from [src]...", \
"You begin removing [src]'s wires...")
@@ -364,7 +512,7 @@
constructionStep = CONSTRUCTION_GUTTED
update_icon()
return
- if(istype(C, /obj/item/crowbar))
+ if(C.tool_behaviour == TOOL_CROWBAR)
C.play_tool_sound(src)
user.visible_message("[user] starts prying a metal plate into [src]...", \
"You begin prying the cover plate back onto [src]...")
@@ -379,7 +527,7 @@
update_icon()
return
if(CONSTRUCTION_GUTTED)
- if(istype(C, /obj/item/crowbar))
+ if(C.tool_behaviour == TOOL_CROWBAR)
user.visible_message("[user] begins removing the circuit board from [src]...", \
"You begin prying out the circuit board from [src]...")
if(!C.use_tool(src, user, 50, volume=50))
@@ -401,7 +549,7 @@
"You begin adding wires to [src]...")
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
if(do_after(user, 60, target = src))
- if(constructionStep != CONSTRUCTION_GUTTED || !B.use_tool(src, user, 0, 5))
+ if(constructionStep != CONSTRUCTION_GUTTED || B.get_amount() < 5 || !B)
return
user.visible_message("[user] adds wires to [src].", \
"You wire [src].")
@@ -410,7 +558,7 @@
update_icon()
return
if(CONSTRUCTION_NOCIRCUIT)
- if(istype(C, /obj/item/weldingtool))
+ if(C.tool_behaviour == TOOL_WELDER)
if(!C.tool_start_check(user, amount=1))
return
user.visible_message("[user] begins cutting apart [src]'s frame...", \
diff --git a/code/game/machinery/shuttle/shuttle_engine.dm b/code/game/machinery/shuttle/shuttle_engine.dm
index 1b2ce686d2..c3de384c58 100644
--- a/code/game/machinery/shuttle/shuttle_engine.dm
+++ b/code/game/machinery/shuttle/shuttle_engine.dm
@@ -130,7 +130,7 @@
var/deltaTemperature = req_power / heat_cap
if(deltaTemperature < 0)
return
- env.temperature += deltaTemperature
+ env.set_temperature(env.return_temperature(),deltaTemperature)
air_update_turf()
/obj/machinery/shuttle/engine/default_change_direction_wrench(mob/user, obj/item/I)
diff --git a/code/game/machinery/shuttle/shuttle_heater.dm b/code/game/machinery/shuttle/shuttle_heater.dm
index 3c36e53b5a..56854d2d71 100644
--- a/code/game/machinery/shuttle/shuttle_heater.dm
+++ b/code/game/machinery/shuttle/shuttle_heater.dm
@@ -89,8 +89,8 @@
var/datum/gas_mixture/air_contents = airs[1]
if(!air_contents)
return
- air_contents.volume = gas_capacity
- air_contents.temperature = T20C
+ air_contents.set_volume(gas_capacity)
+ air_contents.set_temperature(T20C)
/obj/machinery/atmospherics/components/unary/shuttle/heater/proc/hasFuel(var/required)
var/datum/gas_mixture/air_contents = airs[1]
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index e516f6b02d..e6137c08c2 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -83,9 +83,9 @@
var/datum/gas_mixture/env = L.return_air()
var/newMode = HEATER_MODE_STANDBY
- if(setMode != HEATER_MODE_COOL && env.temperature < targetTemperature - temperatureTolerance)
+ if(setMode != HEATER_MODE_COOL && env.return_temperature() < targetTemperature - temperatureTolerance)
newMode = HEATER_MODE_HEAT
- else if(setMode != HEATER_MODE_HEAT && env.temperature > targetTemperature + temperatureTolerance)
+ else if(setMode != HEATER_MODE_HEAT && env.return_temperature() > targetTemperature + temperatureTolerance)
newMode = HEATER_MODE_COOL
if(mode != newMode)
@@ -96,7 +96,7 @@
return
var/heat_capacity = env.heat_capacity()
- var/requiredPower = abs(env.temperature - targetTemperature) * heat_capacity
+ var/requiredPower = abs(env.return_temperature() - targetTemperature) * heat_capacity
requiredPower = min(requiredPower, heatingPower)
if(requiredPower < 1)
@@ -106,7 +106,7 @@
if(mode == HEATER_MODE_COOL)
deltaTemperature *= -1
if(deltaTemperature)
- env.temperature += deltaTemperature
+ env.set_temperature(env.return_temperature() + deltaTemperature)
air_update_turf()
cell.use(requiredPower / efficiency)
else
@@ -194,9 +194,9 @@
var/curTemp
if(istype(L))
var/datum/gas_mixture/env = L.return_air()
- curTemp = env.temperature
+ curTemp = env.return_temperature()
else if(isturf(L))
- curTemp = L.temperature
+ curTemp = L.return_temperature()
if(isnull(curTemp))
data["currentTemp"] = "N/A"
else
diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm
index 717884e9a4..89b641ccc6 100644
--- a/code/game/mecha/combat/honker.dm
+++ b/code/game/mecha/combat/honker.dm
@@ -21,7 +21,7 @@
var/cell_charge = get_charge()
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None"
- var/tank_temperature = internal_tank ? int_tank_air.temperature : "Unknown"
+ var/tank_temperature = internal_tank ? int_tank_air.return_temperature() : "Unknown"
var/cabin_pressure = round(return_pressure(),0.01)
var/output = {"[report_internal_damage()]
[integrity<30?"DAMAGE LEVEL CRITICAL
":null]
@@ -155,4 +155,4 @@
var/color=""
for (var/i=0;i<6;i++)
color = color+pick(colors)
- return color
\ No newline at end of file
+ return color
diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm
index c13cb1d1c6..8039aabd1f 100644
--- a/code/game/mecha/equipment/tools/other_tools.dm
+++ b/code/game/mecha/equipment/tools/other_tools.dm
@@ -422,13 +422,13 @@
return
var/datum/gas_mixture/GM = new
if(prob(10))
- GM.gases[/datum/gas/plasma] += 100
- GM.temperature = 1500+T0C //should be enough to start a fire
+ GM.adjust_moles(/datum/gas/plasma,100)
+ GM.set_temperature(1500+T0C) //should be enough to start a fire
T.visible_message("[src] suddenly disgorges a cloud of heated plasma.")
qdel(src)
else
- GM.gases[/datum/gas/plasma] += 5
- GM.temperature = istype(T) ? T.air.return_temperature() : T20C
+ GM.adjust_moles(/datum/gas/plasma,5)
+ GM.set_temperature(istype(T) ? T.air.return_temperature() : T20C)
T.visible_message("[src] suddenly disgorges a cloud of plasma.")
T.assume_air(GM)
return
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 32be825489..d2340a15ea 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -247,10 +247,10 @@
/obj/mecha/proc/add_cabin()
cabin_air = new
- cabin_air.temperature = T20C
- cabin_air.volume = 200
- cabin_air.gases[/datum/gas/oxygen] = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
- cabin_air.gases[/datum/gas/nitrogen] = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature)
+ cabin_air.set_temperature(T20C)
+ cabin_air.set_volume(200)
+ cabin_air.set_moles(/datum/gas/oxygen,O2STANDARD*cabin_air.return_volume()/(R_IDEAL_GAS_EQUATION*cabin_air.return_temperature()))
+ cabin_air.set_moles(/datum/gas/nitrogen,N2STANDARD*cabin_air.return_volume()/(R_IDEAL_GAS_EQUATION*cabin_air.return_temperature()))
return cabin_air
/obj/mecha/proc/add_radio()
@@ -302,9 +302,9 @@
if(int_tank_air.return_pressure() > internal_tank.maximum_pressure && !(internal_damage & MECHA_INT_TANK_BREACH))
setInternalDamage(MECHA_INT_TANK_BREACH)
if(int_tank_air && int_tank_air.return_volume() > 0) //heat the air_contents
- int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15))
+ int_tank_air.set_temperature(min(6000+T0C, int_tank_air.return_temperature()+rand(10,15)))
if(cabin_air && cabin_air.return_volume()>0)
- cabin_air.temperature = min(6000+T0C, cabin_air.return_temperature()+rand(10,15))
+ cabin_air.set_temperature(min(6000+T0C, cabin_air.return_temperature()+rand(10,15)))
if(cabin_air.return_temperature() > max_temperature/2)
take_damage(4/round(max_temperature/cabin_air.return_temperature(),0.1), BURN, 0, 0)
@@ -329,8 +329,8 @@
if(internal_temp_regulation)
if(cabin_air && cabin_air.return_volume() > 0)
- var/delta = cabin_air.temperature - T20C
- cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1)))
+ var/delta = cabin_air.return_temperature() - T20C
+ cabin_air.set_temperature(cabin_air.return_temperature() - max(-10, min(10, round(delta/4,0.1))))
if(internal_tank)
var/datum/gas_mixture/tank_air = internal_tank.return_air()
diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm
index 8b6146dee7..067cffd319 100644
--- a/code/game/mecha/mecha_topic.dm
+++ b/code/game/mecha/mecha_topic.dm
@@ -75,7 +75,7 @@
var/cell_charge = get_charge()
var/datum/gas_mixture/int_tank_air = internal_tank.return_air()
var/tank_pressure = internal_tank ? round(int_tank_air.return_pressure(),0.01) : "None"
- var/tank_temperature = internal_tank ? int_tank_air.temperature : "Unknown"
+ var/tank_temperature = internal_tank ? int_tank_air.return_temperature() : "Unknown"
var/cabin_pressure = round(return_pressure(),0.01)
. = {"[report_internal_damage()]
[integrity<30?"DAMAGE LEVEL CRITICAL
":null]
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index f98b4937ef..23c5822727 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -40,12 +40,11 @@
if(hotspot && istype(T) && T.air)
qdel(hotspot)
var/datum/gas_mixture/G = T.air
- var/plas_amt = min(30,G.gases[/datum/gas/plasma]) //Absorb some plasma
- G.gases[/datum/gas/plasma] -= plas_amt
+ var/plas_amt = min(30,G.get_moles(/datum/gas/plasma)) //Absorb some plasma
+ G.adjust_moles(/datum/gas/plasma,-plas_amt)
absorbed_plasma += plas_amt
- if(G.temperature > T20C)
- G.temperature = max(G.temperature/2,T20C)
- GAS_GARBAGE_COLLECT(G.gases)
+ if(G.return_temperature() > T20C)
+ G.set_temperature(max(G.return_temperature()/2,T20C))
T.air_update_turf()
/obj/effect/particle_effect/foam/firefighting/kill_foam()
@@ -317,15 +316,13 @@
O.ClearWet()
if(O.air)
var/datum/gas_mixture/G = O.air
- G.temperature = 293.15
+ G.set_temperature(293.15)
for(var/obj/effect/hotspot/H in O)
qdel(H)
- var/list/G_gases = G.gases
- for(var/I in G_gases)
+ for(var/I in G.get_gases())
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
continue
- G_gases[I] = 0
- GAS_GARBAGE_COLLECT(G.gases)
+ G.set_moles(I, 0)
O.air_update_turf()
for(var/obj/machinery/atmospherics/components/unary/U in O)
if(!U.welded)
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index 80c0db2b7d..9a11f0e1d7 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -166,15 +166,13 @@
if(T.air)
var/datum/gas_mixture/G = T.air
if(!distcheck || get_dist(T, location) < blast) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
- G.temperature = temperature
+ G.set_temperature(temperature)
T.air_update_turf()
for(var/obj/effect/hotspot/H in T)
qdel(H)
- var/list/G_gases = G.gases
- if(G_gases[/datum/gas/plasma])
- G_gases[/datum/gas/nitrogen] += (G_gases[/datum/gas/plasma])
- G_gases[/datum/gas/plasma] = 0
- GAS_GARBAGE_COLLECT(G.gases)
+ if(G.get_moles(/datum/gas/plasma))
+ G.adjust_moles(/datum/gas/nitrogen, G.get_moles(/datum/gas/plasma))
+ G.set_moles(/datum/gas/plasma, 0)
if (weldvents)
for(var/obj/machinery/atmospherics/components/unary/U in T)
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm
index a0ae300c79..b5aaff5746 100644
--- a/code/game/objects/effects/spawners/bombspawner.dm
+++ b/code/game/objects/effects/spawners/bombspawner.dm
@@ -19,11 +19,11 @@
var/obj/item/tank/internals/plasma/PT = new(V)
var/obj/item/tank/internals/oxygen/OT = new(V)
- PT.air_contents.gases[/datum/gas/plasma] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
- PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
+ PT.air_contents.set_moles(/datum/gas/plasma, pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)))
+ PT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_p))
- OT.air_contents.gases[/datum/gas/oxygen] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
- OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
+ OT.air_contents.set_moles(/datum/gas/oxygen, pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)))
+ OT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_o))
V.tank_one = PT
V.tank_two = OT
diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm
index 53adc46239..396f463136 100644
--- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm
+++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm
@@ -486,4 +486,15 @@
addtimer(CALLBACK(src, .proc/end), 15)
/obj/effect/constructing_effect/proc/end()
- qdel(src)
\ No newline at end of file
+ qdel(src)
+
+/obj/effect/temp_visual/dir_setting/space_wind
+ icon = 'icons/effects/atmospherics.dmi'
+ icon_state = "space_wind"
+ layer = FLY_LAYER
+ duration = 20
+ mouse_opacity = 0
+
+/obj/effect/temp_visual/dir_setting/space_wind/Initialize(mapload, set_dir, set_alpha = 255)
+ . = ..()
+ alpha = set_alpha
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index 58d907e14b..60e869815b 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -113,6 +113,26 @@
. = ..()
. += "It has [uses ? uses : "no"] charges left."
+/obj/item/card/id/examine_more(mob/user)
+ var/list/msg = list("You examine [src] closer, and note the following...")
+
+ if(mining_points)
+ msg += "There's [mining_points] mining equipment redemption point\s loaded onto this card."
+ if(registered_account)
+ msg += "The account linked to the ID belongs to '[registered_account.account_holder]' and reports a balance of [registered_account.account_balance] cr."
+ if(registered_account.account_job)
+ var/datum/bank_account/D = SSeconomy.get_dep_account(registered_account.account_job.paycheck_department)
+ if(D)
+ msg += "The [D.account_holder] reports a balance of [D.account_balance] cr."
+ msg += "Alt-Click the ID to pull money from the linked account in the form of holochips."
+ msg += "You can insert credits into the linked account by pressing holochips, cash, or coins against the ID."
+ if(registered_account.account_holder == user.real_name)
+ msg += "If you lose this ID card, you can reclaim your account by Alt-Clicking a blank ID card while holding it and entering your account ID number."
+ else
+ msg += "There is no registered account linked to this card. Alt-Click to add one."
+
+ return msg
+
/obj/item/card/emag/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/emagrecharge))
var/obj/item/emagrecharge/ER = W
diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm
index 766c3d8636..16bc6897c8 100644
--- a/code/game/objects/items/chrono_eraser.dm
+++ b/code/game/objects/items/chrono_eraser.dm
@@ -246,9 +246,9 @@
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
var/datum/gas_mixture/GM = new
- GM.gases[/datum/gas/oxygen] = MOLES_O2STANDARD
- GM.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD
- GM.temperature = T20C
+ GM.set_moles(/datum/gas/oxygen, MOLES_O2STANDARD)
+ GM.set_moles(/datum/gas/nitrogen, MOLES_N2STANDARD)
+ GM.set_temperature(T20C)
return GM
/obj/effect/chrono_field/Move()
diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm
index b683ea9934..bcae1d750f 100644
--- a/code/game/objects/items/defib.dm
+++ b/code/game/objects/items/defib.dm
@@ -619,6 +619,13 @@
if(req_defib)
if(defib.healdisk)
H.heal_overall_damage(25, 25)
+ var/list/policies = CONFIG_GET(keyed_list/policyconfig)
+ var/timelimit = CONFIG_GET(number/defib_cmd_time_limit)
+ var/late = timelimit && (tplus > timelimit)
+ var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
+ if(policy)
+ to_chat(H, policy)
+ H.log_message("revived using a defibrillator, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = 1
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 2dabcca29f..d706f5468a 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -437,7 +437,6 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "Unable to obtain a reading.
"
else
var/datum/gas_mixture/environment = T.return_air()
- var/list/env_gases = environment.gases
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
@@ -445,12 +444,12 @@ GLOBAL_LIST_EMPTY(PDAs)
dat += "Air Pressure: [round(pressure,0.1)] kPa
"
if (total_moles)
- for(var/id in env_gases)
- var/gas_level = env_gases[id]/total_moles
+ for(var/id in environment.get_gases())
+ var/gas_level = environment.get_moles(id)/total_moles
if(gas_level > 0)
dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100, 0.01)]%
"
- dat += "Temperature: [round(environment.temperature-T0C)]°C
"
+ dat += "Temperature: [round(environment.return_temperature()-T0C)]°C
"
dat += "
"
else//Else it links to the cart menu proc. Although, it really uses menu hub 4--menu 4 doesn't really exist as it simply redirects to hub.
dat += cartridge.generate_menu()
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 28e1e1294f..bc6a721d13 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -556,41 +556,38 @@ GENETICS SCANNER
else
to_chat(user, "Pressure: [round(pressure, 0.01)] kPa")
if(total_moles)
- var/list/env_gases = environment.gases
- var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles
- var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles
- var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles
- var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles
+ var/o2_concentration = environment.get_moles(/datum/gas/oxygen)/total_moles
+ var/n2_concentration = environment.get_moles(/datum/gas/nitrogen)/total_moles
+ var/co2_concentration = environment.get_moles(/datum/gas/carbon_dioxide)/total_moles
+ var/plasma_concentration = environment.get_moles(/datum/gas/plasma)/total_moles
if(abs(n2_concentration - N2STANDARD) < 20)
- to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)")
+ to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)")
else
- to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)")
+ to_chat(user, "Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)")
if(abs(o2_concentration - O2STANDARD) < 2)
- to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)")
+ to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)")
else
- to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)")
+ to_chat(user, "Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)")
if(co2_concentration > 0.01)
- to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)")
+ to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)")
else
- to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)")
+ to_chat(user, "CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)")
if(plasma_concentration > 0.005)
- to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)")
+ to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)")
else
- to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)")
+ to_chat(user, "Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)")
- GAS_GARBAGE_COLLECT(environment.gases)
-
- for(var/id in env_gases)
+ for(var/id in environment.get_gases())
if(id in GLOB.hardcoded_gases)
continue
- var/gas_concentration = env_gases[id]/total_moles
- to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)")
- to_chat(user, "Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)")
+ var/gas_concentration = environment.get_moles(id)/total_moles
+ to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)")
+ to_chat(user, "Temperature: [round(environment.return_temperature()-T0C, 0.01)] °C ([round(environment.return_temperature(), 0.01)] K)")
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
. = ..()
@@ -669,8 +666,8 @@ GENETICS SCANNER
var/total_moles = air_contents.total_moles()
var/pressure = air_contents.return_pressure()
- var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess?
- var/temperature = air_contents.temperature
+ var/volume = air_contents.return_volume()
+ var/temperature = air_contents.return_temperature()
var/cached_scan_results = air_contents.analyzer_results
if(total_moles > 0)
@@ -678,10 +675,9 @@ GENETICS SCANNER
to_chat(user, "Volume: [volume] L")
to_chat(user, "Pressure: [round(pressure,0.01)] kPa")
- var/list/cached_gases = air_contents.gases
- for(var/id in cached_gases)
- var/gas_concentration = cached_gases[id]/total_moles
- to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)")
+ for(var/id in air_contents.get_gases())
+ var/gas_concentration = air_contents.get_moles(id)/total_moles
+ to_chat(user, "[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)")
to_chat(user, "Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)")
else
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 6124138aeb..ccf9dcd253 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -170,8 +170,8 @@
target_self = TRUE
if(change_volume)
if(!target_self)
- target.volume += tank_two.volume
- target.volume += tank_one.air_contents.volume
+ target.set_volume(target.return_volume() + tank_two.volume)
+ target.set_volume(target.return_volume() + tank_one.air_contents.return_volume())
var/datum/gas_mixture/temp
temp = tank_one.air_contents.remove_ratio(1)
target.merge(temp)
@@ -182,11 +182,11 @@
/obj/item/transfer_valve/proc/split_gases()
if (!valve_open || !tank_one || !tank_two)
return
- var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
+ var/ratio1 = tank_one.air_contents.return_volume()/tank_two.air_contents.return_volume()
var/datum/gas_mixture/temp
temp = tank_two.air_contents.remove_ratio(ratio1)
tank_one.air_contents.merge(temp)
- tank_two.air_contents.volume -= tank_one.air_contents.volume
+ tank_two.air_contents.set_volume(tank_two.air_contents.return_volume() - tank_one.air_contents.return_volume())
/*
Exadv1: I know this isn't how it's going to work, but this was just to check
diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm
index c785c22813..f293e6579a 100644
--- a/code/game/objects/items/flamethrower.dm
+++ b/code/game/objects/items/flamethrower.dm
@@ -204,11 +204,10 @@
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
- if(air_transfer.gases[/datum/gas/plasma])
- air_transfer.gases[/datum/gas/plasma] *= 5
+ air_transfer.set_moles(/datum/gas/plasma, air_transfer.get_moles(/datum/gas/plasma) * 5)
target.assume_air(air_transfer)
//Burn it based on transfered gas
- target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
+ target.hotspot_expose((ptank.air_contents.return_temperature()*2) + 380,500)
//location.hotspot_expose(1000,500,1)
SSair.add_to_active(target, 0)
diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm
index 4960474d94..8b322d20cb 100644
--- a/code/game/objects/items/pet_carrier.dm
+++ b/code/game/objects/items/pet_carrier.dm
@@ -253,7 +253,7 @@
occupant_gas_supply = new
if(isanimal(occupant))
var/mob/living/simple_animal/animal = occupant
- occupant_gas_supply.temperature = animal.minbodytemp //simple animals only care about temperature when their turf isnt a location
+ occupant_gas_supply.set_temperature(animal.minbodytemp) //simple animals only care about temperature when their turf isnt a location
else
if(ishuman(occupant)) //humans require resistance to cold/heat and living in no air while inside, and lose this when outside
ADD_TRAIT(occupant, TRAIT_RESISTCOLD, "bluespace_container_cold_resist")
diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm
index 9b5ca2b066..54824940c1 100644
--- a/code/game/objects/items/stacks/telecrystal.dm
+++ b/code/game/objects/items/stacks/telecrystal.dm
@@ -4,6 +4,7 @@
singular_name = "telecrystal"
icon = 'icons/obj/telescience.dmi'
icon_state = "telecrystal"
+ grind_results = list(/datum/reagent/telecrystal = 20)
w_class = WEIGHT_CLASS_TINY
max_amount = 50
item_flags = NOBLUDGEON
diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm
index 2831311eff..b64aa60cac 100644
--- a/code/game/objects/items/storage/bags.dm
+++ b/code/game/objects/items/storage/bags.dm
@@ -48,7 +48,8 @@
STR.max_w_class = WEIGHT_CLASS_SMALL
STR.max_combined_w_class = 30
STR.max_items = 30
- STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear))
+ STR.can_hold_extra = typecacheof(list(/obj/item/organ/lungs, /obj/item/organ/liver, /obj/item/organ/stomach, /obj/item/clothing/shoes)) - typesof(/obj/item/clothing/shoes/magboots, /obj/item/clothing/shoes/clown_shoes, /obj/item/clothing/shoes/jackboots, /obj/item/clothing/shoes/workboots)
+ STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear, /obj/item/storage/wallet, /obj/item/organ/brain))
STR.limited_random_access = TRUE
STR.limited_random_access_stack_position = 3
diff --git a/code/game/objects/items/tanks/jetpack.dm b/code/game/objects/items/tanks/jetpack.dm
index 817258d1c7..7cf25098e1 100644
--- a/code/game/objects/items/tanks/jetpack.dm
+++ b/code/game/objects/items/tanks/jetpack.dm
@@ -21,7 +21,7 @@
/obj/item/tank/jetpack/populate_gas()
if(gas_type)
- air_contents.gases[gas_type] = ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
+ air_contents.set_moles(gas_type, ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C)))
/obj/item/tank/jetpack/ui_action_click(mob/user, action)
diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm
index b4c8d8adf0..1c90a83c0a 100644
--- a/code/game/objects/items/tanks/tank_types.dm
+++ b/code/game/objects/items/tanks/tank_types.dm
@@ -18,8 +18,9 @@
force = 10
dog_fashion = /datum/dog_fashion/back
+
/obj/item/tank/internals/oxygen/populate_gas()
- air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.set_moles(/datum/gas/oxygen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
@@ -47,8 +48,9 @@
force = 10
/obj/item/tank/internals/anesthetic/populate_gas()
- air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
- air_contents.gases[/datum/gas/nitrous_oxide] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
+ air_contents.set_moles(/datum/gas/oxygen, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
+ air_contents.set_moles(/datum/gas/nitrous_oxide, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
+ return
/*
* Air
@@ -62,8 +64,9 @@
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/air/populate_gas()
- air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
- air_contents.gases[/datum/gas/nitrogen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
+ air_contents.set_moles(/datum/gas/oxygen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD)
+ air_contents.set_moles(/datum/gas/nitrogen, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
+ return
/*
@@ -79,7 +82,8 @@
/obj/item/tank/internals/plasma/populate_gas()
- air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.set_moles(/datum/gas/plasma, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
+ return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/flamethrower))
@@ -93,12 +97,16 @@
F.update_icon()
else
return ..()
+
+/obj/item/tank/internals/plasma/full/populate_gas()
+ air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
+
//Makes empty oxygen tanks spawn without gas
/obj/item/tank/internals/plasma/empty/populate_gas()
return
/obj/item/tank/internals/plasma/full/populate_gas()
- air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/*
* Plasmaman Plasma Tank
@@ -113,10 +121,11 @@
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/internals/plasmaman/populate_gas()
- air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.set_moles(/datum/gas/plasma, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
+ return
/obj/item/tank/internals/plasmaman/full/populate_gas()
- air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
@@ -129,7 +138,7 @@
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
- air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.set_moles(/datum/gas/plasma, (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
//makes empty plasma tanks spawn without gas.
@@ -152,7 +161,7 @@
/obj/item/tank/internals/emergency_oxygen/populate_gas()
- air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
+ air_contents.set_moles(/datum/gas/oxygen, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
@@ -172,4 +181,4 @@
volume = 10
/obj/item/tank/internals/emergency_oxygen/double/empty/populate_gas()
- return
\ No newline at end of file
+ return
diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm
index 399511c032..b601e4310e 100644
--- a/code/game/objects/items/tanks/tanks.dm
+++ b/code/game/objects/items/tanks/tanks.dm
@@ -64,7 +64,7 @@
. = ..()
air_contents = new(volume) //liters
- air_contents.temperature = T20C
+ air_contents.set_temperature(T20C)
populate_gas()
@@ -92,7 +92,7 @@
. += "The pressure gauge reads [round(src.air_contents.return_pressure(),0.01)] kPa."
- var/celsius_temperature = src.air_contents.temperature-T0C
+ var/celsius_temperature = src.air_contents.return_temperature()-T0C
var/descriptive
if (celsius_temperature < 20)
@@ -235,7 +235,7 @@
if(tank_pressure < distribute_pressure)
distribute_pressure = tank_pressure
- var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
+ var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.return_temperature())
return remove_air(moles_needed)
diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm
index 7ac3aba246..c49159a992 100644
--- a/code/game/objects/structures/holosign.dm
+++ b/code/game/objects/structures/holosign.dm
@@ -94,7 +94,7 @@
alpha = 150
resistance_flags = FIRE_PROOF
-/obj/structure/holosign/barrier/firelock/blocksTemperature()
+/obj/structure/holosign/barrier/firelock/BlockSuperconductivity()
return TRUE
/obj/structure/holosign/barrier/combifan
@@ -110,7 +110,7 @@
CanAtmosPass = ATMOS_PASS_NO
resistance_flags = FIRE_PROOF
-/obj/structure/holosign/barrier/combifan/blocksTemperature()
+/obj/structure/holosign/barrier/combifan/BlockSuperconductivity()
return TRUE
/obj/structure/holosign/barrier/combifan/Initialize()
diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm
index c3b388fc29..ba23878168 100644
--- a/code/game/objects/structures/transit_tubes/station.dm
+++ b/code/game/objects/structures/transit_tubes/station.dm
@@ -152,8 +152,8 @@
pod_moving = 0
if(!QDELETED(pod))
var/datum/gas_mixture/floor_mixture = loc.return_air()
- ARCHIVE(floor_mixture)
- ARCHIVE(pod.air_contents)
+ floor_mixture.archive()
+ pod.air_contents.archive()
pod.air_contents.share(floor_mixture, 1) //mix the pod's gas mixture with the tile it's on
air_update_turf()
diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
index 04f113a0c8..36539ae1e4 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm
@@ -10,9 +10,9 @@
/obj/structure/transit_tube_pod/Initialize()
. = ..()
- air_contents.gases[/datum/gas/oxygen] = MOLES_O2STANDARD
- air_contents.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD
- air_contents.temperature = T20C
+ air_contents.set_moles(/datum/gas/oxygen, MOLES_O2STANDARD)
+ air_contents.set_moles(/datum/gas/nitrogen, MOLES_N2STANDARD)
+ air_contents.set_temperature(T20C)
/obj/structure/transit_tube_pod/Destroy()
@@ -181,4 +181,4 @@
return
/obj/structure/transit_tube_pod/return_temperature()
- return air_contents.temperature
+ return air_contents.return_temperature()
diff --git a/code/game/say.dm b/code/game/say.dm
index 35a1b1d072..a5691ad11f 100644
--- a/code/game/say.dm
+++ b/code/game/say.dm
@@ -110,6 +110,8 @@ GLOBAL_LIST_INIT(freqtospan, list(
/// Quirky citadel proc for our custom sayverbs to strip the verb out. Snowflakey as hell, say rewrite 3.0 when?
/atom/movable/proc/quoteless_say_quote(input, list/spans = list(speech_span), message_mode)
+ if((input[1] == "!") && (length_char(input) > 1))
+ return ""
var/pos = findtext(input, "*")
return pos? copytext(input, pos + 1) : input
@@ -144,6 +146,8 @@ GLOBAL_LIST_INIT(freqtospan, list(
return "[copytext_char("[freq]", 1, 4)].[copytext_char("[freq]", 4, 5)]"
/atom/movable/proc/attach_spans(input, list/spans)
+ if((input[1] == "!") && (length(input) > 2))
+ return
var/customsayverb = findtext(input, "*")
if(customsayverb)
input = capitalize(copytext(input, customsayverb + length(input[customsayverb])))
diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm
index 38e0839617..66e7ebd424 100644
--- a/code/game/turfs/change_turf.dm
+++ b/code/game/turfs/change_turf.dm
@@ -148,6 +148,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
. = ..()
if (!.) // changeturf failed or didn't do anything
QDEL_NULL(stashed_air)
+ update_air_ref()
return
var/turf/open/newTurf = .
newTurf.air.copy_from(stashed_air)
@@ -308,24 +309,14 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
return
var/datum/gas_mixture/total = new//Holders to assimilate air from nearby turfs
- var/list/total_gases = total.gases
for(var/T in atmos_adjacent_turfs)
var/turf/open/S = T
if(!S.air)
continue
- var/list/S_gases = S.air.gases
- for(var/id in S_gases)
- total_gases[id] += S_gases[id]
- total.temperature += S.air.temperature
+ total.merge(S.air)
- air.copy_from(total)
-
- var/list/air_gases = air.gases
- for(var/id in air_gases)
- air_gases[id] /= turf_count //Averages contents of the turfs, ignoring walls and the like
-
- air.temperature /= turf_count
+ air.copy_from(total.remove_ratio(1/turf_count))
SSair.add_to_active(src)
/turf/proc/ReplaceWithLattice()
diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm
index 9fe23d78d7..65b487bd05 100644
--- a/code/game/turfs/closed.dm
+++ b/code/game/turfs/closed.dm
@@ -7,9 +7,14 @@
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
rad_insulation = RAD_MEDIUM_INSULATION
+/turf/closed/Initialize()
+ . = ..()
+ update_air_ref()
+
/turf/closed/AfterChange()
. = ..()
SSair.high_pressure_delta -= src
+ update_air_ref()
/turf/closed/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
return FALSE
diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm
index b81c5be44c..6552e29246 100644
--- a/code/game/turfs/open.dm
+++ b/code/game/turfs/open.dm
@@ -199,7 +199,7 @@
flash_color(L, flash_color = "#C80000", flash_time = 10)
/turf/open/Initalize_Atmos(times_fired)
- excited = 0
+ set_excited(FALSE)
update_visuals()
current_cycle = times_fired
@@ -207,19 +207,19 @@
for(var/i in atmos_adjacent_turfs)
var/turf/open/enemy_tile = i
var/datum/gas_mixture/enemy_air = enemy_tile.return_air()
- if(!excited && air.compare(enemy_air))
+ if(!get_excited() && air.compare(enemy_air))
//testing("Active turf found. Return value of compare(): [is_active]")
- excited = TRUE
+ set_excited(TRUE)
SSair.active_turfs |= src
/turf/open/proc/GetHeatCapacity()
. = air.heat_capacity()
/turf/open/proc/GetTemperature()
- . = air.temperature
+ . = air.return_temperature()
/turf/open/proc/TakeTemperature(temp)
- air.temperature += temp
+ air.set_temperature(air.return_temperature() + temp)
air_update_turf()
/turf/open/proc/freon_gas_act()
@@ -304,9 +304,8 @@
/turf/open/rad_act(pulse_strength)
. = ..()
- if (air.gases[/datum/gas/carbon_dioxide] && air.gases[/datum/gas/oxygen])
- pulse_strength = min(pulse_strength,air.gases[/datum/gas/carbon_dioxide]*1000,air.gases[/datum/gas/oxygen]*2000) //Ensures matter is conserved properly
- air.gases[/datum/gas/carbon_dioxide]=max(air.gases[/datum/gas/carbon_dioxide]-(pulse_strength/1000),0)
- air.gases[/datum/gas/oxygen]=max(air.gases[/datum/gas/oxygen]-(pulse_strength/2000),0)
- air.gases[/datum/gas/pluoxium]+=(pulse_strength/4000)
- GAS_GARBAGE_COLLECT(air.gases)
+ if (air.get_moles(/datum/gas/carbon_dioxide) && air.get_moles(/datum/gas/oxygen))
+ pulse_strength = min(pulse_strength,air.get_moles(/datum/gas/carbon_dioxide)*1000,air.get_moles(/datum/gas/oxygen)*2000) //Ensures matter is conserved properly
+ air.set_moles(/datum/gas/carbon_dioxide, max(air.get_moles(/datum/gas/carbon_dioxide)-(pulse_strength/1000),0))
+ air.set_moles(/datum/gas/oxygen, max(air.get_moles(/datum/gas/oxygen)-(pulse_strength/2000),0))
+ air.adjust_moles(/datum/gas/pluoxium, pulse_strength/4000)
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 26daa32107..b131a1ed70 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -27,6 +27,7 @@
/turf/open/space/Initialize()
icon_state = SPACE_ICON_STATE
air = space_gas
+ update_air_ref()
vis_contents.Cut() //removes inherited overlays
visibilityChanged()
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index d8a7ae45f4..b1a10c72ce 100755
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -277,7 +277,7 @@
/turf/open/Entered(atom/movable/AM)
..()
//melting
- if(isobj(AM) && air && air.temperature > T0C)
+ if(isobj(AM) && air && air.return_temperature() > T0C)
var/obj/O = AM
if(O.obj_flags & FROZEN)
O.make_unfrozen()
diff --git a/code/game/world.dm b/code/game/world.dm
index c60fb5c4d6..55333fb3e6 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -9,9 +9,8 @@ GLOBAL_LIST(topic_status_cache)
//This happens after the Master subsystem new(s) (it's a global datum)
//So subsystems globals exist, but are not initialised
/world/New()
- var/extools = world.GetConfig("env", "EXTOOLS_DLL") || "./byond-extools.dll"
- if (fexists(extools))
- call(extools, "maptick_initialize")()
+ if (fexists(EXTOOLS))
+ call(EXTOOLS, "maptick_initialize")()
enable_debugger()
world.Profile(PROFILE_START)
@@ -278,6 +277,15 @@ GLOBAL_LIST(topic_status_cache)
shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss.
..()
+/world/Del()
+ // memory leaks bad
+ var/num_deleted = 0
+ for(var/datum/gas_mixture/GM)
+ GM.__gasmixture_unregister()
+ num_deleted++
+ log_world("Deallocated [num_deleted] gas mixtures")
+ ..()
+
/world/proc/update_status()
var/list/features = list()
@@ -346,3 +354,6 @@ GLOBAL_LIST(topic_status_cache)
maxz++
SSmobs.MaxZChanged()
SSidlenpcpool.MaxZChanged()
+ world.refresh_atmos_grid()
+
+/world/proc/refresh_atmos_grid()
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index bff431a6c7..044016698c 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -909,10 +909,9 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
assoc = SDQL_expression(object, expressions_list[expression_list])
if(assoc != null)
// Need to insert the key like this to prevent duplicate keys fucking up.
- var/list/dummy = list()
- dummy[result] = assoc
- result = dummy
- val += result
+ val[result] = assoc
+ else
+ val += list(result)
else
val = world.SDQL_var(object, expression, i, object, superuser, src)
i = expression.len
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 8406248164..f068f05a4a 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -573,7 +573,7 @@
if(Rad.anchored)
if(!Rad.loaded_tank)
var/obj/item/tank/internals/plasma/Plasma = new/obj/item/tank/internals/plasma(Rad)
- Plasma.air_contents.gases[/datum/gas/plasma] = 70
+ Plasma.air_contents.set_moles(/datum/gas/plasma,70)
Rad.drainratio = 0
Rad.loaded_tank = Plasma
Plasma.forceMove(Rad)
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index 072fbaa123..b3bea2201c 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -1,15 +1,14 @@
/proc/show_air_status_to(turf/target, mob/user)
var/datum/gas_mixture/env = target.return_air()
- var/list/env_gases = env.gases
var/burning = FALSE
if(isopenturf(target))
var/turf/open/T = target
if(T.active_hotspot)
burning = TRUE
- var/list/lines = list("[AREACOORD(target)]: [env.temperature] K ([env.temperature - T0C] C), [env.return_pressure()] kPa[(burning)?(", burning"):(null)]")
- for(var/id in env_gases)
- var/moles = env_gases[id]
+ var/list/lines = list("[AREACOORD(target)]: [env.return_temperature()] K ([env.return_temperature() - T0C] C), [env.return_pressure()] kPa[(burning)?(", burning"):(null)]")
+ for(var/id in env.get_gases())
+ var/moles = env.get_moles(id)
if (moles >= 0.00001)
lines += "[GLOB.meta_gas_names[id]]: [moles] mol"
to_chat(usr, lines.Join("\n"))
diff --git a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
index 81ad7ddc26..89ed669e7b 100644
--- a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
+++ b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm
@@ -113,8 +113,7 @@
for(var/i in 1 to healseverity)
new /obj/effect/temp_visual/heal(targetturf, "#1E8CE1")
if(totaldamage)
- L.adjustBruteLoss(-brutedamage)
- L.adjustFireLoss(-burndamage)
+ L.heal_overall_damage(brutedamage, burndamage, only_organic = FALSE) //Maybe a machine god shouldn't murder augmented followers instead of healing them
L.adjustOxyLoss(-oxydamage)
L.adjustToxLoss(totaldamage * 0.5, TRUE, TRUE)
clockwork_say(ranged_ability_user, text2ratvar("[has_holy_water ? "Heal tainted" : "Mend wounded"] flesh!"))
diff --git a/code/modules/antagonists/revenant/revenant.dm b/code/modules/antagonists/revenant/revenant.dm
index 4e08ad2382..d0ef5a83ce 100644
--- a/code/modules/antagonists/revenant/revenant.dm
+++ b/code/modules/antagonists/revenant/revenant.dm
@@ -107,7 +107,7 @@
mind.add_antag_datum(/datum/antagonist/revenant)
//Life, Stat, Hud Updates, and Say
-/mob/living/simple_animal/revenant/BiologicalLife(seconds, times_fired)
+/mob/living/simple_animal/revenant/Life(seconds, times_fired)
. = ..()
if(stasis)
return
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index a40a4c1a42..36c444f02d 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -53,8 +53,8 @@
return
if(I.use_tool(src, user, 0, volume=40))
status = TRUE
- GLOB.bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
- message_admins("[ADMIN_LOOKUPFLW(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]")
+ GLOB.bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.return_temperature()-T0C]"
+ message_admins("[ADMIN_LOOKUPFLW(user)] welded a single tank bomb. Temp: [bombtank.air_contents.return_temperature()-T0C]")
to_chat(user, "A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.")
add_fingerprint(user)
return TRUE
@@ -145,8 +145,7 @@
return
/obj/item/tank/proc/ignite() //This happens when a bomb is told to explode
- var/fuel_moles = air_contents.gases[/datum/gas/plasma] + air_contents.gases[/datum/gas/oxygen]/6
- GAS_GARBAGE_COLLECT(air_contents.gases)
+ var/fuel_moles = air_contents.get_moles(/datum/gas/plasma) + air_contents.get_moles(/datum/gas/oxygen)/6
var/datum/gas_mixture/bomb_mixture = air_contents.copy()
var/strength = 1
@@ -156,7 +155,7 @@
qdel(master)
qdel(src)
- if(bomb_mixture.temperature > (T0C + 400))
+ if(bomb_mixture.return_temperature() > (T0C + 400))
strength = (fuel_moles/15)
if(strength >=1)
@@ -169,7 +168,7 @@
ground_zero.assume_air(bomb_mixture)
ground_zero.hotspot_expose(1000, 125)
- else if(bomb_mixture.temperature > (T0C + 250))
+ else if(bomb_mixture.return_temperature() > (T0C + 250))
strength = (fuel_moles/20)
if(strength >=1)
@@ -180,7 +179,7 @@
ground_zero.assume_air(bomb_mixture)
ground_zero.hotspot_expose(1000, 125)
- else if(bomb_mixture.temperature > (T0C + 100))
+ else if(bomb_mixture.return_temperature() > (T0C + 100))
strength = (fuel_moles/25)
if (strength >=1)
diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm
index 8e3c7115e9..57d8e55e07 100644
--- a/code/modules/asset_cache/asset_list_items.dm
+++ b/code/modules/asset_cache/asset_list_items.dm
@@ -172,6 +172,7 @@
/datum/asset/spritesheet/goonchat/register()
InsertAll("emoji", 'icons/emoji.dmi')
+ InsertAll("emoji", 'icons/emoji_32.dmi')
// pre-loading all lanugage icons also helps to avoid meta
InsertAll("language", 'icons/misc/language.dmi')
diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm
index 06d73867f8..81e103fba2 100644
--- a/code/modules/atmospherics/environmental/LINDA_fire.dm
+++ b/code/modules/atmospherics/environmental/LINDA_fire.dm
@@ -9,46 +9,31 @@
return
-/turf/open/hotspot_expose(exposed_temperature, exposed_volume, soh = FALSE, holo = FALSE)
- var/datum/gas_mixture/air_contents = return_air()
- if(!air_contents)
- return 0
+/turf/open/hotspot_expose(exposed_temperature, exposed_volume, soh)
+ if(!air)
+ return
- var/oxy = air_contents.gases[/datum/gas/oxygen]
- var/tox = air_contents.gases[/datum/gas/plasma]
- var/trit = air_contents.gases[/datum/gas/tritium]
+ var/oxy = air.get_moles(/datum/gas/oxygen)
+ if (oxy < 0.5)
+ return
+ var/tox = air.get_moles(/datum/gas/plasma)
+ var/trit = air.get_moles(/datum/gas/tritium)
if(active_hotspot)
if(soh)
- if((tox > 0.5 || trit > 0.5) && oxy > 0.5)
- if(active_hotspot.temperature < exposed_temperature*50)
- active_hotspot.temperature = exposed_temperature*50
+ if(tox > 0.5 || trit > 0.5)
+ if(active_hotspot.temperature < exposed_temperature)
+ active_hotspot.temperature = exposed_temperature
if(active_hotspot.volume < exposed_volume)
active_hotspot.volume = exposed_volume
- return 1
-
- var/igniting = 0
+ return
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && (tox > 0.5 || trit > 0.5))
- igniting = 1
- if(igniting)
- if(oxy < 0.5)
- return 0
-
- active_hotspot = new /obj/effect/hotspot(src, holo)
- active_hotspot.temperature = exposed_temperature*50
- active_hotspot.volume = exposed_volume*25
+ active_hotspot = new /obj/effect/hotspot(src, exposed_volume*25, exposed_temperature)
active_hotspot.just_spawned = (current_cycle < SSair.times_fired)
//remove just_spawned protection if no longer processing this cell
SSair.add_to_active(src, 0)
- else
- var/datum/gas_mixture/heating = air_contents.remove_ratio(exposed_volume/air_contents.volume)
- heating.temperature = exposed_temperature
- heating.react()
- assume_air(heating)
- air_update_turf()
- return igniting
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
/obj/effect/hotspot
@@ -67,11 +52,13 @@
var/bypassing = FALSE
var/visual_update_tick = 0
-/obj/effect/hotspot/Initialize(mapload, holo = FALSE)
+/obj/effect/hotspot/Initialize(mapload, starting_volume, starting_temperature)
. = ..()
- if(holo)
- flags_1 |= HOLOGRAM_1
SSair.hotspots += src
+ if(!isnull(starting_volume))
+ volume = starting_volume
+ if(!isnull(starting_temperature))
+ temperature = starting_temperature
perform_exposure()
setDir(pick(GLOB.cardinals))
air_update_turf()
@@ -83,22 +70,19 @@
location.active_hotspot = src
- if(volume > CELL_VOLUME*0.95)
- bypassing = TRUE
- else
- bypassing = FALSE
+ bypassing = !just_spawned && (volume > CELL_VOLUME*0.95)
if(bypassing)
- if(!just_spawned)
- volume = location.air.reaction_results["fire"]*FIRE_GROWTH_RATE
- temperature = location.air.temperature
+ volume = location.air.reaction_results["fire"]*FIRE_GROWTH_RATE
+ temperature = location.air.return_temperature()
else
- var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
- affected.temperature = temperature
- affected.react(src)
- temperature = affected.temperature
- volume = affected.reaction_results["fire"]*FIRE_GROWTH_RATE
- location.assume_air(affected)
+ var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.return_volume())
+ if(affected) //in case volume is 0
+ affected.set_temperature(temperature)
+ affected.react(src)
+ temperature = affected.return_temperature()
+ volume = affected.reaction_results["fire"]*FIRE_GROWTH_RATE
+ location.assume_air(affected)
for(var/A in location)
var/atom/AT = A
@@ -164,7 +148,7 @@
color = list(LERP(0.3, 1, 1-greyscale_fire) * heat_r,0.3 * heat_g * greyscale_fire,0.3 * heat_b * greyscale_fire, 0.59 * heat_r * greyscale_fire,LERP(0.59, 1, 1-greyscale_fire) * heat_g,0.59 * heat_b * greyscale_fire, 0.11 * heat_r * greyscale_fire,0.11 * heat_g * greyscale_fire,LERP(0.11, 1, 1-greyscale_fire) * heat_b, 0,0,0)
alpha = heat_a
-#define INSUFFICIENT(path) (location.air.gases[path] < 0.5)
+#define INSUFFICIENT(path) (location.air.get_moles(path) < 0.5)
/obj/effect/hotspot/process()
if(just_spawned)
just_spawned = FALSE
@@ -175,8 +159,7 @@
qdel(src)
return
- if(location.excited_group)
- location.excited_group.reset_cooldowns()
+ location.eg_reset_cooldowns()
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
qdel(src)
@@ -186,7 +169,8 @@
return
//Not enough to burn
- if((location.air.gases[/datum/gas/plasma] < 0.5 && location.air.gases[/datum/gas/tritium] < 0.5) || location.air.gases[/datum/gas/oxygen] < 0.5)
+ // god damn it previous coder you made the INSUFFICIENT macro for a fucking reason why didn't you use it here smh
+ if((INSUFFICIENT(/datum/gas/plasma) && INSUFFICIENT(/datum/gas/tritium)) || INSUFFICIENT(/datum/gas/oxygen))
qdel(src)
return
@@ -194,16 +178,15 @@
if(bypassing)
icon_state = "3"
- if(!(flags_1 & HOLOGRAM_1))
- location.burn_tile()
+ location.burn_tile()
//Possible spread due to radiated heat
- if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
- var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
+ if(location.air.return_temperature() > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
+ var/radiated_temperature = location.air.return_temperature()*FIRE_SPREAD_RADIOSITY_SCALE
for(var/t in location.atmos_adjacent_turfs)
var/turf/open/T = t
if(!T.active_hotspot)
- T.hotspot_expose(radiated_temperature, CELL_VOLUME/4, flags_1 & HOLOGRAM_1)
+ T.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
else
if(volume > CELL_VOLUME*0.4)
@@ -227,14 +210,13 @@
var/turf/open/T = loc
if(istype(T) && T.active_hotspot == src)
T.active_hotspot = null
- if(!(flags_1 & HOLOGRAM_1))
- DestroyTurf()
+ DestroyTurf()
return ..()
/obj/effect/hotspot/proc/DestroyTurf()
if(isturf(loc))
var/turf/T = loc
- if(T.to_be_destroyed)
+ if(T.to_be_destroyed && !T.changing_turf)
var/chance_of_deletion
if (T.heat_capacity) //beware of division by zero
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
diff --git a/code/modules/atmospherics/environmental/LINDA_system.dm b/code/modules/atmospherics/environmental/LINDA_system.dm
index 760e4e22da..4f057ca9be 100644
--- a/code/modules/atmospherics/environmental/LINDA_system.dm
+++ b/code/modules/atmospherics/environmental/LINDA_system.dm
@@ -18,7 +18,7 @@
/turf/open/CanAtmosPass(turf/T, vertical = FALSE)
var/dir = vertical? get_dir_multiz(src, T) : get_dir(src, T)
- var/opp = dir_inverse_multiz(dir)
+ var/opp = REVERSE_DIR(dir)
var/R = FALSE
if(vertical && !(zAirOut(dir, T) && T.zAirIn(dir, src)))
R = TRUE
@@ -44,25 +44,32 @@
return FALSE
/turf/proc/ImmediateCalculateAdjacentTurfs()
- var/canpass = CANATMOSPASS(src, src)
+ var/canpass = CANATMOSPASS(src, src)
var/canvpass = CANVERTICALATMOSPASS(src, src)
for(var/direction in GLOB.cardinals_multiz)
var/turf/T = get_step_multiz(src, direction)
+ var/opp_dir = REVERSE_DIR(direction)
if(!isopenturf(T))
continue
if(!(blocks_air || T.blocks_air) && ((direction & (UP|DOWN))? (canvpass && CANVERTICALATMOSPASS(T, src)) : (canpass && CANATMOSPASS(T, src))) )
LAZYINITLIST(atmos_adjacent_turfs)
LAZYINITLIST(T.atmos_adjacent_turfs)
- atmos_adjacent_turfs[T] = TRUE
- T.atmos_adjacent_turfs[src] = TRUE
+ atmos_adjacent_turfs[T] = direction
+ T.atmos_adjacent_turfs[src] = opp_dir
+ T.__update_extools_adjacent_turfs()
else
if (atmos_adjacent_turfs)
atmos_adjacent_turfs -= T
if (T.atmos_adjacent_turfs)
T.atmos_adjacent_turfs -= src
+ T.__update_extools_adjacent_turfs()
UNSETEMPTY(T.atmos_adjacent_turfs)
UNSETEMPTY(atmos_adjacent_turfs)
src.atmos_adjacent_turfs = atmos_adjacent_turfs
+ __update_extools_adjacent_turfs()
+
+/turf/proc/__update_extools_adjacent_turfs()
+
//returns a list of adjacent turfs that can share air with this one.
//alldir includes adjacent diagonal tiles that can share
@@ -111,9 +118,9 @@
SSair.add_to_active(src,command)
/atom/movable/proc/move_update_air(turf/T)
- if(isturf(T))
- T.air_update_turf(1)
- air_update_turf(1)
+ if(isturf(T))
+ T.air_update_turf(1)
+ air_update_turf(1)
/atom/proc/atmos_spawn_air(text) //because a lot of people loves to copy paste awful code lets just make an easy proc to spawn your plasma fires
var/turf/open/T = get_turf(src)
diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
index 081f0b1d28..e230ae55bb 100644
--- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
+++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
@@ -8,6 +8,7 @@
var/list/atmos_adjacent_turfs
//bitfield of dirs in which we are superconducitng
var/atmos_supeconductivity = NONE
+ var/is_openturf = FALSE // used by extools shizz.
//used to determine whether we should archive
var/archived_cycle = 0
@@ -23,21 +24,21 @@
//used for spacewind
var/pressure_difference = 0
var/pressure_direction = 0
+ var/turf/pressure_specific_target
- var/datum/excited_group/excited_group
- var/excited = FALSE
var/datum/gas_mixture/turf/air
var/obj/effect/hotspot/active_hotspot
- var/atmos_cooldown = 0
var/planetary_atmos = FALSE //air will revert to initial_gas_mix over time
var/list/atmos_overlay_types //gas IDs of current active gas overlays
+ is_openturf = TRUE
/turf/open/Initialize()
if(!blocks_air)
air = new
air.copy_from_turf(src)
+ update_air_ref()
. = ..()
/turf/open/Destroy()
@@ -48,6 +49,8 @@
SSair.add_to_active(T)
return ..()
+/turf/proc/update_air_ref()
+
/////////////////GAS MIXTURE PROCS///////////////////
/turf/open/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
@@ -89,15 +92,37 @@
temperature_archived = temperature
/turf/open/archive()
- ARCHIVE(air)
+ air.archive()
archived_cycle = SSair.times_fired
temperature_archived = temperature
+/turf/open/proc/eg_reset_cooldowns()
+/turf/open/proc/eg_garbage_collect()
+/turf/open/proc/get_excited()
+/turf/open/proc/set_excited()
+
/////////////////////////GAS OVERLAYS//////////////////////////////
+
/turf/open/proc/update_visuals()
- var/list/new_overlay_types = tile_graphic()
+
var/list/atmos_overlay_types = src.atmos_overlay_types // Cache for free performance
+ var/list/new_overlay_types = list()
+ var/static/list/nonoverlaying_gases = typecache_of_gases_with_no_overlays()
+
+ if(!air) // 2019-05-14: was not able to get this path to fire in testing. Consider removing/looking at callers -Naksu
+ if (atmos_overlay_types)
+ for(var/overlay in atmos_overlay_types)
+ vis_contents -= overlay
+ src.atmos_overlay_types = null
+ return
+
+ for(var/id in air.get_gases())
+ if (nonoverlaying_gases[id])
+ continue
+ var/gas_overlay = GLOB.meta_gas_overlays[id]
+ if(gas_overlay && air.get_moles(id) > GLOB.meta_gas_visibility[META_GAS_MOLES_VISIBLE])
+ new_overlay_types += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(air.get_moles(id) / MOLES_GAS_VISIBLE_STEP, 1))]
if (atmos_overlay_types)
for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added
@@ -112,19 +137,18 @@
UNSETEMPTY(new_overlay_types)
src.atmos_overlay_types = new_overlay_types
-/turf/open/proc/tile_graphic()
- var/static/list/nonoverlaying_gases = typecache_of_gases_with_no_overlays()
- if(!air)
- return
- . = new /list
- var/list/gases = air.gases
- for(var/id in gases)
- if (nonoverlaying_gases[id])
- continue
- var/gas = gases[id]
- var/gas_overlay = GLOB.meta_gas_overlays[id]
- if(gas_overlay && gas > GLOB.meta_gas_visibility[id])
- . += gas_overlay[min(FACTOR_GAS_VISIBLE_MAX, CEILING(gas / MOLES_GAS_VISIBLE_STEP, 1))]
+/turf/open/proc/set_visuals(list/new_overlay_types)
+ if (atmos_overlay_types)
+ for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added
+ vis_contents -= overlay
+
+ if (length(new_overlay_types))
+ if (atmos_overlay_types)
+ vis_contents += new_overlay_types - atmos_overlay_types //don't add overlays that already exist
+ else
+ vis_contents += new_overlay_types
+ UNSETEMPTY(new_overlay_types)
+ src.atmos_overlay_types = new_overlay_types
/proc/typecache_of_gases_with_no_overlays()
. = list()
@@ -135,8 +159,8 @@
/////////////////////////////SIMULATION///////////////////////////////////
-#define LAST_SHARE_CHECK \
- var/last_share = our_air.last_share;\
+/*#define LAST_SHARE_CHECK \
+ var/last_share = our_air.get_last_share();\
if(last_share > MINIMUM_AIR_TO_SUSPEND){\
our_excited_group.reset_cooldowns();\
cached_atmos_cooldown = 0;\
@@ -144,127 +168,59 @@
our_excited_group.dismantle_cooldown = 0;\
cached_atmos_cooldown = 0;\
}
-
+*/
/turf/proc/process_cell(fire_count)
SSair.remove_from_active(src)
-/turf/open/process_cell(fire_count)
- if(archived_cycle < fire_count) //archive self if not already done
- archive()
-
- current_cycle = fire_count
-
- //cache for sanic speed
- var/list/adjacent_turfs = atmos_adjacent_turfs
- var/datum/excited_group/our_excited_group = excited_group
- var/adjacent_turfs_length = LAZYLEN(adjacent_turfs)
- var/cached_atmos_cooldown = atmos_cooldown + 1
-
- var/planet_atmos = planetary_atmos
- if (planet_atmos)
- adjacent_turfs_length++
-
- var/datum/gas_mixture/our_air = air
-
- for(var/t in adjacent_turfs)
- var/turf/open/enemy_tile = t
-
- if(fire_count <= enemy_tile.current_cycle)
+/turf/open/proc/equalize_pressure_in_zone(cyclenum)
+/turf/open/proc/consider_firelocks(turf/T2)
+ var/reconsider_adj = FALSE
+ for(var/obj/machinery/door/firedoor/FD in T2)
+ if((FD.flags_1 & ON_BORDER_1) && get_dir(T2, src) != FD.dir)
continue
- enemy_tile.archive()
+ FD.emergency_pressure_stop()
+ reconsider_adj = TRUE
+ for(var/obj/machinery/door/firedoor/FD in src)
+ if((FD.flags_1 & ON_BORDER_1) && get_dir(src, T2) != FD.dir)
+ continue
+ FD.emergency_pressure_stop()
+ reconsider_adj = TRUE
+ if(reconsider_adj)
+ T2.ImmediateCalculateAdjacentTurfs() // We want those firelocks closed yesterday.
- /******************* GROUP HANDLING START *****************************************************************/
+/turf/proc/handle_decompression_floor_rip()
+/turf/open/floor/handle_decompression_floor_rip(sum)
+ if(sum > 20 && prob(clamp(sum / 10, 0, 30)))
+ remove_tile()
- var/should_share_air = FALSE
- var/datum/gas_mixture/enemy_air = enemy_tile.air
-
- //cache for sanic speed
- var/datum/excited_group/enemy_excited_group = enemy_tile.excited_group
-
- if(our_excited_group && enemy_excited_group)
- if(our_excited_group != enemy_excited_group)
- //combine groups (this also handles updating the excited_group var of all involved turfs)
- our_excited_group.merge_groups(enemy_excited_group)
- our_excited_group = excited_group //update our cache
- should_share_air = TRUE
-
- else if(our_air.compare(enemy_air))
- if(!enemy_tile.excited)
- SSair.add_to_active(enemy_tile)
- var/datum/excited_group/EG = our_excited_group || enemy_excited_group || new
- if(!our_excited_group)
- EG.add_turf(src)
- if(!enemy_excited_group)
- EG.add_turf(enemy_tile)
- our_excited_group = excited_group
- should_share_air = TRUE
-
- //air sharing
- if(should_share_air)
- var/difference = our_air.share(enemy_air, adjacent_turfs_length)
- if(difference)
- if(difference > 0)
- consider_pressure_difference(enemy_tile, difference)
- else
- enemy_tile.consider_pressure_difference(src, -difference)
- LAST_SHARE_CHECK
-
-
- /******************* GROUP HANDLING FINISH *********************************************************************/
-
- if (planet_atmos) //share our air with the "atmosphere" "above" the turf
- var/datum/gas_mixture/G = new
- G.copy_from_turf(src)
- ARCHIVE(G)
- if(our_air.compare(G))
- if(!our_excited_group)
- var/datum/excited_group/EG = new
- EG.add_turf(src)
- our_excited_group = excited_group
- our_air.share(G, adjacent_turfs_length)
- LAST_SHARE_CHECK
-
- SSair.add_to_react_queue(src)
-
- if((!our_excited_group && !(our_air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION && consider_superconductivity(starting = TRUE))) \
- || (cached_atmos_cooldown > (EXCITED_GROUP_DISMANTLE_CYCLES * 2)))
- SSair.remove_from_active(src)
-
- atmos_cooldown = cached_atmos_cooldown
-
-/turf/open/space/process_cell(fire_count) //dumb hack to prevent space pollution
- . = ..()
- var/datum/gas_mixture/immutable/I = space_gas
- I.after_process_cell()
-
-/turf/proc/process_cell_reaction()
- SSair.remove_from_react_queue(src)
-
-/turf/open/process_cell_reaction()
- air.react(src)
- update_visuals()
- SSair.remove_from_react_queue(src)
- return
+/turf/open/process_cell(fire_count)
//////////////////////////SPACEWIND/////////////////////////////
/turf/open/proc/consider_pressure_difference(turf/T, difference)
- SSair.high_pressure_delta |= src
+ SSair.high_pressure_delta[src] = TRUE
if(difference > pressure_difference)
pressure_direction = get_dir(src, T)
pressure_difference = difference
/turf/open/proc/high_pressure_movements()
var/atom/movable/M
+ var/multiplier = 1
+ if(locate(/obj/structure/rack) in src)
+ multiplier *= 0.1
+ else if(locate(/obj/structure/table) in src)
+ multiplier *= 0.2
for(var/thing in src)
M = thing
if (!M.anchored && !M.pulledby && M.last_high_pressure_movement_air_cycle < SSair.times_fired)
- M.experience_pressure_difference(pressure_difference, pressure_direction)
+ M.experience_pressure_difference(pressure_difference * multiplier, pressure_direction, 0, pressure_specific_target)
+ if(pressure_difference > 100)
+ new /obj/effect/temp_visual/dir_setting/space_wind(src, pressure_direction, clamp(round(sqrt(pressure_difference) * 2), 10, 255))
/atom/movable/var/pressure_resistance = 10
/atom/movable/var/last_high_pressure_movement_air_cycle = 0
-/atom/movable/proc/experience_pressure_difference(pressure_difference, direction, pressure_resistance_prob_delta = 0)
+/atom/movable/proc/experience_pressure_difference(pressure_difference, direction, pressure_resistance_prob_delta = 0, throw_target)
var/const/PROBABILITY_OFFSET = 25
var/const/PROBABILITY_BASE_PRECENT = 75
var/max_force = sqrt(pressure_difference)*(MOVE_FORCE_DEFAULT / 5)
@@ -275,93 +231,8 @@
move_prob += pressure_resistance_prob_delta
if (move_prob > PROBABILITY_OFFSET && prob(move_prob) && (move_resist != INFINITY) && (!anchored && (max_force >= (move_resist * MOVE_FORCE_PUSH_RATIO))) || (anchored && (max_force >= (move_resist * MOVE_FORCE_FORCEPUSH_RATIO))))
step(src, direction)
- last_high_pressure_movement_air_cycle = SSair.times_fired
-
-///////////////////////////EXCITED GROUPS/////////////////////////////
-
-/datum/excited_group
- var/list/turf_list = list()
- var/breakdown_cooldown = 0
- var/dismantle_cooldown = 0
-
-/datum/excited_group/New()
- SSair.excited_groups += src
-
-/datum/excited_group/proc/add_turf(turf/open/T)
- turf_list += T
- T.excited_group = src
- reset_cooldowns()
-
-/datum/excited_group/proc/merge_groups(datum/excited_group/E)
- if(turf_list.len > E.turf_list.len)
- SSair.excited_groups -= E
- for(var/t in E.turf_list)
- var/turf/open/T = t
- T.excited_group = src
- turf_list += T
- reset_cooldowns()
- else
- SSair.excited_groups -= src
- for(var/t in turf_list)
- var/turf/open/T = t
- T.excited_group = E
- E.turf_list += T
- E.reset_cooldowns()
-
-/datum/excited_group/proc/reset_cooldowns()
- breakdown_cooldown = 0
- dismantle_cooldown = 0
-
-//argument is so world start can clear out any turf differences quickly.
-/datum/excited_group/proc/self_breakdown(space_is_all_consuming = FALSE)
- var/datum/gas_mixture/A = new
-
- //make local for sanic speed
- var/list/A_gases = A.gases
- var/list/turf_list = src.turf_list
- var/turflen = turf_list.len
- var/space_in_group = FALSE
-
- for(var/t in turf_list)
- var/turf/open/T = t
- if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/immutable/space))
- space_in_group = TRUE
- qdel(A)
- A = new /datum/gas_mixture/immutable/space()
- A_gases = A.gases //update the cache
- break
- A.merge(T.air)
-
- for(var/id in A_gases)
- A_gases[id] /= turflen
-
- for(var/t in turf_list)
- var/turf/open/T = t
- T.air.copy_from(A)
- T.atmos_cooldown = 0
- T.update_visuals()
-
- breakdown_cooldown = 0
-
-/datum/excited_group/proc/dismantle()
- for(var/t in turf_list)
- var/turf/open/T = t
- T.excited = FALSE
- T.excited_group = null
- SSair.active_turfs -= T
- garbage_collect()
-
-/datum/excited_group/proc/garbage_collect()
- for(var/t in turf_list)
- var/turf/open/T = t
- T.excited_group = null
- turf_list.Cut()
- SSair.excited_groups -= src
////////////////////////SUPERCONDUCTIVITY/////////////////////////////
-/atom/movable/proc/blocksTemperature()
- return FALSE
-
/turf/proc/conductivity_directions()
if(archived_cycle < SSair.times_fired)
archive()
@@ -376,9 +247,6 @@
. |= direction
/turf/proc/neighbor_conduct_with_src(turf/open/other)
- for (var/atom/movable/G in src)
- if (G.blocksTemperature())
- return
if(!other.blocks_air) //Open but neighbor is solid
other.temperature_share_open_to_solid(src)
else //Both tiles are solid
@@ -389,9 +257,7 @@
if(blocks_air)
..()
return
- for (var/atom/movable/G in src)
- if (G.blocksTemperature())
- return
+
if(!other.blocks_air) //Both tiles are open
var/turf/open/T = other
T.air.temperature_share(air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
@@ -410,8 +276,10 @@
if(!neighbor.thermal_conductivity)
continue
+
if(neighbor.archived_cycle < SSair.times_fired)
neighbor.archive()
+
neighbor.neighbor_conduct_with_src(src)
neighbor.consider_superconductivity()
@@ -430,17 +298,18 @@
//Conduct with air on my tile if I have it
if(!blocks_air)
temperature = air.temperature_share(null, thermal_conductivity, temperature, heat_capacity)
- ..((blocks_air ? temperature : air.temperature))
+ ..((blocks_air ? temperature : air.return_temperature()))
/turf/proc/consider_superconductivity()
if(!thermal_conductivity)
return FALSE
- SSair.active_super_conductivity |= src
+ SSair.active_super_conductivity[src] = TRUE
+
return TRUE
/turf/open/consider_superconductivity(starting)
- if(air.temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
+ if(air.return_temperature() < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
return FALSE
if(air.heat_capacity() < M_CELL_WITH_RATIO) // Was: MOLES_CELLSTANDARD*0.1*0.05 Since there are no variables here we can make this a constant.
return FALSE
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index 58e826b36d..43e54dc2c7 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -16,90 +16,80 @@ GLOBAL_LIST_INIT(meta_gas_dangers, meta_gas_danger_list())
GLOBAL_LIST_INIT(meta_gas_ids, meta_gas_id_list())
GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
/datum/gas_mixture
- var/list/gases = list()
- var/list/gas_archive = list()
- var/temperature = 0 //kelvins
- var/tmp/temperature_archived = 0
- var/volume = CELL_VOLUME //liters
- var/last_share = 0
- var/list/reaction_results = list()
+ var/initial_volume = CELL_VOLUME //liters
+ var/list/reaction_results
var/list/analyzer_results //used for analyzer feedback - not initialized until its used
- var/gc_share = FALSE // Whether to call garbage_collect() on the sharer during shares, used for immutable mixtures
+ var/_extools_pointer_gasmixture = 0 // Contains the memory address of the shared_ptr object for this gas mixture in c++ land. Don't. Touch. This. Var.
/datum/gas_mixture/New(volume)
if (!isnull(volume))
- src.volume = volume
+ initial_volume = volume
+ ATMOS_EXTOOLS_CHECK
+ __gasmixture_register()
+ reaction_results = new
- //PV = nRT
+/datum/gas_mixture/vv_edit_var(var_name, var_value)
+ if(var_name == "_extools_pointer_gasmixture")
+ return FALSE // please no. segfaults bad.
+ return ..()
+/*
+/datum/gas_mixture/Del()
+ __gasmixture_unregister()
+ . = ..()*/
-/datum/gas_mixture/proc/heat_capacity()
+/datum/gas_mixture/proc/__gasmixture_unregister()
+/datum/gas_mixture/proc/__gasmixture_register()
-/datum/gas_mixture/proc/archived_heat_capacity()
+/proc/gas_types()
+ var/list/L = subtypesof(/datum/gas)
+ for(var/gt in L)
+ var/datum/gas/G = gt
+ L[gt] = initial(G.specific_heat)
+ return L
-/datum/gas_mixture/heat_capacity() //joules per kelvin
- var/list/cached_gases = gases
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
- . = 0
- for(var/id in cached_gases)
- . += cached_gases[id] * cached_gasheats[id]
-
-/datum/gas_mixture/archived_heat_capacity()
- // lots of copypasta but heat_capacity is the single proc called the most in a regular round, bar none, so performance loss adds up
- var/list/cached_gases = gas_archive
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
- . = 0
- for(var/id in cached_gases)
- . += cached_gases[id] * cached_gasheats[id]
-
-/datum/gas_mixture/turf/heat_capacity() // Same as above except vacuums return HEAT_CAPACITY_VACUUM
- var/list/cached_gases = gases
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
- for(var/id in cached_gases)
- . += cached_gases[id] * cached_gasheats[id]
- if(!.)
- . += HEAT_CAPACITY_VACUUM //we want vacuums in turfs to have the same heat capacity as space
-
-/datum/gas_mixture/turf/archived_heat_capacity() // Same as above except vacuums return HEAT_CAPACITY_VACUUM
- var/list/cached_gases = gas_archive
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
- for(var/id in cached_gases)
- . += cached_gases[id] * cached_gasheats[id]
- if(!.)
- . += HEAT_CAPACITY_VACUUM //we want vacuums in turfs to have the same heat capacity as space
+/datum/gas_mixture/proc/heat_capacity() //joules per kelvin
/datum/gas_mixture/proc/total_moles()
- var/cached_gases = gases
- TOTAL_MOLES(cached_gases, .)
/datum/gas_mixture/proc/return_pressure() //kilopascals
- if(volume > 0) // to prevent division by zero
- var/cached_gases = gases
- TOTAL_MOLES(cached_gases, .)
- . *= R_IDEAL_GAS_EQUATION * temperature / volume
- return
- return 0
/datum/gas_mixture/proc/return_temperature() //kelvins
- return temperature
+
+/datum/gas_mixture/proc/set_min_heat_capacity(n)
+/datum/gas_mixture/proc/set_temperature(new_temp)
+/datum/gas_mixture/proc/set_volume(new_volume)
+/datum/gas_mixture/proc/get_moles(gas_type)
+/datum/gas_mixture/proc/set_moles(gas_type, moles)
+/datum/gas_mixture/proc/scrub_into(datum/gas_mixture/target, list/gases)
+/datum/gas_mixture/proc/mark_immutable()
+/datum/gas_mixture/proc/get_gases()
+/datum/gas_mixture/proc/multiply(factor)
+/datum/gas_mixture/proc/get_last_share()
+/datum/gas_mixture/proc/clear()
+
+/datum/gas_mixture/proc/adjust_moles(gas_type, amt = 0)
+ set_moles(gas_type, get_moles(gas_type) + amt)
/datum/gas_mixture/proc/return_volume() //liters
- return max(0, volume)
/datum/gas_mixture/proc/thermal_energy() //joules
- return THERMAL_ENERGY(src) //see code/__DEFINES/atmospherics.dm; use the define in performance critical areas
/datum/gas_mixture/proc/archive()
//Update archived versions of variables
//Returns: 1 in all cases
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
- //Merges all air from giver into self. Deletes giver.
+ //Merges all air from giver into self. giver is untouched.
//Returns: 1 if we are mutable, 0 otherwise
/datum/gas_mixture/proc/remove(amount)
- //Proportionally removes amount of gas from the gas_mixture
+ //Removes amount of gas from the gas_mixture
//Returns: gas_mixture with the gases removed
+/datum/gas_mixture/proc/transfer_to(datum/gas_mixture/target, amount)
+ //Transfers amount of gas to target. Equivalent to target.merge(remove(amount)) but faster.
+ //Removes amount of gas from the gas_mixture
+
/datum/gas_mixture/proc/remove_ratio(ratio)
//Proportionally removes amount of gas from the gas_mixture
//Returns: gas_mixture with the gases removed
@@ -136,245 +126,63 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
//Performs various reactions such as combustion or fusion (LOL)
//Returns: 1 if any reaction took place; 0 otherwise
-/datum/gas_mixture/archive()
- temperature_archived = temperature
- gas_archive = gases.Copy()
- return 1
-
-/datum/gas_mixture/merge(datum/gas_mixture/giver)
- if(!giver)
- return 0
-
- //heat transfer
- 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)
- temperature = (giver.temperature * giver_heat_capacity + temperature * self_heat_capacity) / combined_heat_capacity
-
- var/list/cached_gases = gases //accessing datum vars is slower than proc vars
- var/list/giver_gases = giver.gases
- //gas transfer
- for(var/giver_id in giver_gases)
- cached_gases[giver_id] += giver_gases[giver_id]
-
- return 1
-
+/datum/gas_mixture/proc/__remove()
/datum/gas_mixture/remove(amount)
- var/sum
- var/list/cached_gases = gases
- TOTAL_MOLES(cached_gases, sum)
- amount = min(amount, sum) //Can not take more air than tile has!
- if(amount <= 0)
- return null
var/datum/gas_mixture/removed = new type
- var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
-
- removed.temperature = temperature
- for(var/id in cached_gases)
- removed_gases[id] = QUANTIZE((cached_gases[id] / sum) * amount)
- cached_gases[id] -= removed_gases[id]
- GAS_GARBAGE_COLLECT(gases)
+ __remove(removed, amount)
return removed
+/datum/gas_mixture/proc/__remove_ratio()
/datum/gas_mixture/remove_ratio(ratio)
- if(ratio <= 0)
- return null
- ratio = min(ratio, 1)
-
- var/list/cached_gases = gases
var/datum/gas_mixture/removed = new type
- var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
-
- removed.temperature = temperature
- for(var/id in cached_gases)
- removed_gases[id] = QUANTIZE(cached_gases[id] * ratio)
- cached_gases[id] -= removed_gases[id]
-
- GAS_GARBAGE_COLLECT(gases)
+ __remove_ratio(removed, ratio)
return removed
/datum/gas_mixture/copy()
- var/list/cached_gases = gases
var/datum/gas_mixture/copy = new type
- var/list/copy_gases = copy.gases
-
- copy.temperature = temperature
- for(var/id in cached_gases)
- copy_gases[id] = cached_gases[id]
+ copy.copy_from(src)
return copy
-
-/datum/gas_mixture/copy_from(datum/gas_mixture/sample)
- var/list/cached_gases = gases //accessing datum vars is slower than proc vars
- var/list/sample_gases = sample.gases
-
- temperature = sample.temperature
- for(var/id in sample_gases)
- cached_gases[id] = sample_gases[id]
-
- //remove all gases not in the sample
- cached_gases &= sample_gases
-
- return 1
-
/datum/gas_mixture/copy_from_turf(turf/model)
parse_gas_string(model.initial_gas_mix)
//acounts for changes in temperature
var/turf/model_parent = model.parent_type
if(model.temperature != initial(model.temperature) || model.temperature != initial(model_parent.temperature))
- temperature = model.temperature
+ set_temperature(model.temperature)
return 1
/datum/gas_mixture/parse_gas_string(gas_string)
- var/list/gases = src.gases
var/list/gas = params2list(gas_string)
if(gas["TEMP"])
- temperature = text2num(gas["TEMP"])
+ set_temperature(text2num(gas["TEMP"]))
gas -= "TEMP"
- gases.Cut()
+ clear()
for(var/id in gas)
var/path = id
if(!ispath(path))
path = gas_id2path(path) //a lot of these strings can't have embedded expressions (especially for mappers), so support for IDs needs to stick around
- gases[path] = text2num(gas[id])
+ set_moles(path, text2num(gas[id]))
archive()
return 1
-
-/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
-
- var/list/cached_gases = gases
- var/list/sharer_gases = sharer.gases
-
- var/temperature_delta = temperature_archived - sharer.temperature_archived
- var/abs_temperature_delta = abs(temperature_delta)
-
- var/old_self_heat_capacity = 0
- var/old_sharer_heat_capacity = 0
- if(abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
- old_self_heat_capacity = heat_capacity()
- old_sharer_heat_capacity = sharer.heat_capacity()
-
- var/heat_capacity_self_to_sharer = 0 //heat capacity of the moles transferred from us to the sharer
- var/heat_capacity_sharer_to_self = 0 //heat capacity of the moles transferred from the sharer to us
-
- var/moved_moles = 0
- var/abs_moved_moles = 0
-
- //we're gonna define these vars outside of this for loop because as it turns out, var declaration is pricy
- var/delta
- var/gas_heat_capacity
- //and also cache this shit rq because that results in sanic speed for reasons byond explanation
- var/list/cached_gasheats = GLOB.meta_gas_specific_heats
- //GAS TRANSFER
- for(var/id in cached_gases | sharer_gases) // transfer gases
-
- delta = QUANTIZE(gas_archive[id] - sharer.gas_archive[id])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures
-
- if(delta && abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
- gas_heat_capacity = delta * cached_gasheats[id]
- if(delta > 0)
- heat_capacity_self_to_sharer += gas_heat_capacity
- else
- heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative.
-
- cached_gases[id] -= delta
- sharer_gases[id] += delta
- moved_moles += delta
- abs_moved_moles += abs(delta)
-
- last_share = abs_moved_moles
-
- //THERMAL ENERGY TRANSFER
- if(abs_temperature_delta > 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
-
- //transfer of thermal energy (via changed heat capacity) between self and sharer
- 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
-
- 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
- //thermal energy of the system (self and sharer) is unchanged
-
- if(abs(old_sharer_heat_capacity) > MINIMUM_HEAT_CAPACITY)
- if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.1) // <10% change in sharer heat capacity
- temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT)
-
- if (initial(sharer.gc_share))
- GAS_GARBAGE_COLLECT(sharer.gases)
- if(temperature_delta > MINIMUM_TEMPERATURE_TO_MOVE || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
- var/our_moles
- TOTAL_MOLES(cached_gases,our_moles)
- var/their_moles
- TOTAL_MOLES(sharer_gases,their_moles)
- return (temperature_archived*(our_moles + moved_moles) - sharer.temperature_archived*(their_moles - moved_moles)) * R_IDEAL_GAS_EQUATION / volume
-
-/datum/gas_mixture/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
- //transfer of thermal energy (via conduction) between self and sharer
- if(sharer)
- sharer_temperature = sharer.temperature_archived
- var/temperature_delta = temperature_archived - sharer_temperature
- if(abs(temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
- var/self_heat_capacity = archived_heat_capacity()
- sharer_heat_capacity = sharer_heat_capacity || sharer.archived_heat_capacity()
-
- if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
- var/heat = conduction_coefficient*temperature_delta* \
- (self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity))
-
- temperature = max(temperature - heat/self_heat_capacity, TCMB)
- sharer_temperature = max(sharer_temperature + heat/sharer_heat_capacity, TCMB)
- if(sharer)
- sharer.temperature = sharer_temperature
- return sharer_temperature
- //thermal energy of the system (self and sharer) is unchanged
-
-/datum/gas_mixture/compare(datum/gas_mixture/sample)
- var/list/sample_gases = sample.gases //accessing datum vars is slower than proc vars
- var/list/cached_gases = gases
-
- for(var/id in cached_gases | sample_gases) // compare gases from either mixture
- var/gas_moles = cached_gases[id]
- var/sample_moles = sample_gases[id]
- var/delta = abs(gas_moles - sample_moles)
- if(delta > MINIMUM_MOLES_DELTA_TO_MOVE && \
- delta > gas_moles * MINIMUM_AIR_RATIO_TO_MOVE)
- return id
-
- var/our_moles
- TOTAL_MOLES(cached_gases, our_moles)
- if(our_moles > MINIMUM_MOLES_DELTA_TO_MOVE)
- var/temp = temperature
- var/sample_temp = sample.temperature
-
- var/temperature_delta = abs(temp - sample_temp)
- if(temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND)
- return "temp"
-
- return ""
-
+
/datum/gas_mixture/react(datum/holder)
. = NO_REACTION
- var/list/cached_gases = gases
- if(!length(cached_gases))
+ if(!total_moles())
return
var/list/reactions = list()
for(var/datum/gas_reaction/G in SSair.gas_reactions)
- if(cached_gases[G.major_gas])
+ if(get_moles(G.major_gas))
reactions += G
if(!length(reactions))
return
reaction_results = new
- var/temp = temperature
- var/ener = THERMAL_ENERGY(src)
+ var/temp = return_temperature()
+ var/ener = thermal_energy()
reaction_loop:
for(var/r in reactions)
@@ -388,14 +196,13 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
for(var/id in min_reqs)
if (id == "TEMP" || id == "ENER")
continue
- if(cached_gases[id] < min_reqs[id])
+ if(get_moles(id) < min_reqs[id])
continue reaction_loop
//at this point, all minimum requirements for the reaction are satisfied.
/* currently no reactions have maximum requirements, so we can leave the checks commented out for a slight performance boost
PLEASE DO NOT REMOVE THIS CODE. the commenting is here only for a performance increase.
enabling these checks should be as easy as possible and the fact that they are disabled should be as clear as possible
-
var/list/max_reqs = reaction.max_requirements
if((max_reqs["TEMP"] && temp > max_reqs["TEMP"]) \
|| (max_reqs["ENER"] && ener > max_reqs["ENER"]))
@@ -410,8 +217,6 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
. |= reaction.react(src, holder)
if (. & STOP_REACTIONS)
break
- if(.)
- GAS_GARBAGE_COLLECT(gases)
//Takes the amount of the gas you want to PP as an argument
//So I don't have to do some hacky switches/defines/magic strings
@@ -420,16 +225,50 @@ GLOBAL_LIST_INIT(meta_gas_fusions, meta_gas_fusion_list())
//O2_PP = get_partial_pressure(gas_mixture.oxygen)
/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 * return_temperature()) / BREATH_VOLUME
//inverse
/datum/gas_mixture/proc/get_true_breath_pressure(partial_pressure)
- return (partial_pressure * BREATH_VOLUME) / (R_IDEAL_GAS_EQUATION * temperature)
+ return (partial_pressure * BREATH_VOLUME) / (R_IDEAL_GAS_EQUATION * return_temperature())
//Mathematical proofs:
/*
get_breath_partial_pressure(gas_pp) --> gas_pp/total_moles()*breath_pp = pp
get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
-
10/20*5 = 2.5
10 = 2.5/5*20
*/
+
+/datum/gas_mixture/turf
+
+/*
+/mob/verb/profile_atmos()
+ /world{loop_checks = 0;}
+ var/datum/gas_mixture/A = new
+ var/datum/gas_mixture/B = new
+ A.parse_gas_string("o2=200;n2=800;TEMP=50")
+ B.parse_gas_string("co2=500;plasma=500;TEMP=5000")
+ var/pa
+ var/pb
+ pa = world.tick_usage
+ for(var/I in 1 to 100000)
+ B.transfer_to(A, 1)
+ A.transfer_to(B, 1)
+ pb = world.tick_usage
+ var/total_time = (pb-pa) * world.tick_lag
+ to_chat(src, "Total time (gas transfer): [total_time]ms")
+ to_chat(src, "Operations per second: [100000 / (total_time/1000)]")
+ pa = world.tick_usage
+ for(var/I in 1 to 100000)
+ B.total_moles();
+ pb = world.tick_usage
+ total_time = (pb-pa) * world.tick_lag
+ to_chat(src, "Total time (total_moles): [total_time]ms")
+ to_chat(src, "Operations per second: [100000 / (total_time/1000)]")
+ pa = world.tick_usage
+ for(var/I in 1 to 100000)
+ new /datum/gas_mixture
+ pb = world.tick_usage
+ total_time = (pb-pa) * world.tick_lag
+ to_chat(src, "Total time (new gas mixture): [total_time]ms")
+ to_chat(src, "Operations per second: [100000 / (total_time/1000)]")
+*/
diff --git a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
index 5527ba3fef..eefad7c970 100644
--- a/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
+++ b/code/modules/atmospherics/gasmixtures/immutable_mixtures.dm
@@ -2,73 +2,29 @@
//it can be changed, but any changes will ultimately be undone before they can have any effect
/datum/gas_mixture/immutable
- var/initial_temperature
- gc_share = TRUE
+ var/initial_temperature = 0
/datum/gas_mixture/immutable/New()
..()
- temperature = initial_temperature
- temperature_archived = initial_temperature
- gases.Cut()
+ set_temperature(initial_temperature)
+ populate()
+ mark_immutable()
-/datum/gas_mixture/immutable/merge()
- return 0 //we're immutable.
+/datum/gas_mixture/immutable/proc/populate()
+ return
-/datum/gas_mixture/immutable/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
- . = ..(sharer, 0)
- temperature = initial_temperature
- temperature_archived = initial_temperature
- gases.Cut()
-
-/datum/gas_mixture/immutable/react()
- return 0 //we're immutable.
-
-/datum/gas_mixture/immutable/copy()
- return new type //we're immutable, so we can just return a new instance.
-
-/datum/gas_mixture/immutable/copy_from()
- return 0 //we're immutable.
-
-/datum/gas_mixture/immutable/copy_from_turf()
- return 0 //we're immutable.
-
-/datum/gas_mixture/immutable/parse_gas_string()
- return 0 //we're immutable.
-
-/datum/gas_mixture/immutable/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
- . = ..()
- temperature = initial_temperature
-
-/datum/gas_mixture/immutable/proc/after_process_cell()
- temperature = initial_temperature
- temperature_archived = initial_temperature
- gases.Cut()
//used by space tiles
/datum/gas_mixture/immutable/space
initial_temperature = TCMB
-/datum/gas_mixture/immutable/space/heat_capacity()
- return HEAT_CAPACITY_VACUUM
-
-/datum/gas_mixture/immutable/space/remove()
- return copy() //we're always empty, so we can just return a copy.
-
-/datum/gas_mixture/immutable/space/remove_ratio()
- return copy() //we're always empty, so we can just return a copy.
-
+/datum/gas_mixture/immutable/space/populate()
+ set_min_heat_capacity(HEAT_CAPACITY_VACUUM)
//used by cloners
/datum/gas_mixture/immutable/cloner
initial_temperature = T20C
-/datum/gas_mixture/immutable/cloner/New()
+/datum/gas_mixture/immutable/cloner/populate()
..()
- gases[/datum/gas/nitrogen] = MOLES_O2STANDARD + MOLES_N2STANDARD
-
-/datum/gas_mixture/immutable/cloner/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
- . = ..(sharer, 0)
- gases[/datum/gas/nitrogen] = MOLES_O2STANDARD + MOLES_N2STANDARD
-
-/datum/gas_mixture/immutable/cloner/heat_capacity()
- return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20
+ set_moles(/datum/gas/nitrogen, MOLES_O2STANDARD + MOLES_N2STANDARD)
diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm
index 59ef15b4cf..c0f66be7de 100644
--- a/code/modules/atmospherics/gasmixtures/reactions.dm
+++ b/code/modules/atmospherics/gasmixtures/reactions.dm
@@ -63,11 +63,11 @@
/datum/gas_reaction/water_vapor/react(datum/gas_mixture/air, datum/holder)
var/turf/open/location = isturf(holder) ? holder : null
. = NO_REACTION
- if (air.temperature <= WATER_VAPOR_FREEZE)
+ if (air.return_temperature() <= WATER_VAPOR_FREEZE)
if(location && location.freon_gas_act())
. = REACTING
else if(location && location.water_vapor_gas_act())
- air.gases[/datum/gas/water_vapor] -= MOLES_GAS_VISIBLE
+ air.adjust_moles(/datum/gas/water_vapor,-MOLES_GAS_VISIBLE)
. = REACTING
//tritium combustion: combustion of oxygen and tritium (treated as hydrocarbons). creates hotspots. exothermic
@@ -86,38 +86,37 @@
/datum/gas_reaction/tritfire/react(datum/gas_mixture/air, datum/holder)
var/energy_released = 0
var/old_heat_capacity = air.heat_capacity()
- var/list/cached_gases = air.gases //this speeds things up because accessing datum vars is slow
- var/temperature = air.temperature
+ var/temperature = air.return_temperature()
var/list/cached_results = air.reaction_results
cached_results["fire"] = 0
var/turf/open/location = isturf(holder) ? holder : null
var/burned_fuel = 0
- if(cached_gases[/datum/gas/oxygen] < cached_gases[/datum/gas/tritium])
- burned_fuel = cached_gases[/datum/gas/oxygen]/TRITIUM_BURN_OXY_FACTOR
- cached_gases[/datum/gas/tritium] -= burned_fuel
+ if(air.get_moles(/datum/gas/oxygen) < air.get_moles(/datum/gas/tritium))
+ burned_fuel = air.get_moles(/datum/gas/oxygen)/TRITIUM_BURN_OXY_FACTOR
+ air.adjust_moles(/datum/gas/tritium, -burned_fuel)
else
- burned_fuel = cached_gases[/datum/gas/tritium]*TRITIUM_BURN_TRIT_FACTOR
- cached_gases[/datum/gas/tritium] -= cached_gases[/datum/gas/tritium]/TRITIUM_BURN_TRIT_FACTOR
- cached_gases[/datum/gas/oxygen] -= cached_gases[/datum/gas/tritium]
+ burned_fuel = air.get_moles(/datum/gas/tritium)*TRITIUM_BURN_TRIT_FACTOR
+ air.adjust_moles(/datum/gas/tritium, -air.get_moles(/datum/gas/tritium)/TRITIUM_BURN_TRIT_FACTOR)
+ air.adjust_moles(/datum/gas/oxygen,-air.get_moles(/datum/gas/tritium))
if(burned_fuel)
energy_released += (FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel)
if(location && prob(10) && burned_fuel > TRITIUM_MINIMUM_RADIATION_ENERGY) //woah there let's not crash the server
radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
- cached_gases[/datum/gas/water_vapor] += burned_fuel/TRITIUM_BURN_OXY_FACTOR
+ air.adjust_moles(/datum/gas/water_vapor, burned_fuel/TRITIUM_BURN_OXY_FACTOR)
cached_results["fire"] += burned_fuel
if(energy_released > 0)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = (temperature*old_heat_capacity + energy_released)/new_heat_capacity
+ air.set_temperature((temperature*old_heat_capacity + energy_released)/new_heat_capacity)
//let the floor know a fire is happening
if(istype(location))
- temperature = air.temperature
+ temperature = air.return_temperature()
if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
location.hotspot_expose(temperature, CELL_VOLUME)
for(var/I in location)
@@ -143,8 +142,7 @@
/datum/gas_reaction/plasmafire/react(datum/gas_mixture/air, datum/holder)
var/energy_released = 0
var/old_heat_capacity = air.heat_capacity()
- var/list/cached_gases = air.gases //this speeds things up because accessing datum vars is slow
- var/temperature = air.temperature
+ var/temperature = air.return_temperature()
var/list/cached_results = air.reaction_results
cached_results["fire"] = 0
var/turf/open/location = isturf(holder) ? holder : null
@@ -163,21 +161,21 @@
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(cached_gases[/datum/gas/oxygen] / cached_gases[/datum/gas/plasma] > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium.
+ if(air.get_moles(/datum/gas/oxygen) / air.get_moles(/datum/gas/plasma) > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium.
super_saturation = TRUE
- if(cached_gases[/datum/gas/oxygen] > cached_gases[/datum/gas/plasma]*PLASMA_OXYGEN_FULLBURN)
- plasma_burn_rate = (cached_gases[/datum/gas/plasma]*temperature_scale)/PLASMA_BURN_RATE_DELTA
+ if(air.get_moles(/datum/gas/oxygen) > air.get_moles(/datum/gas/plasma)*PLASMA_OXYGEN_FULLBURN)
+ plasma_burn_rate = (air.get_moles(/datum/gas/plasma)*temperature_scale)/PLASMA_BURN_RATE_DELTA
else
- plasma_burn_rate = (temperature_scale*(cached_gases[/datum/gas/oxygen]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
+ plasma_burn_rate = (temperature_scale*(air.get_moles(/datum/gas/oxygen)/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY)
- plasma_burn_rate = min(plasma_burn_rate,cached_gases[/datum/gas/plasma],cached_gases[/datum/gas/oxygen]/oxygen_burn_rate) //Ensures matter is conserved properly
- cached_gases[/datum/gas/plasma] = QUANTIZE(cached_gases[/datum/gas/plasma] - plasma_burn_rate)
- cached_gases[/datum/gas/oxygen] = QUANTIZE(cached_gases[/datum/gas/oxygen] - (plasma_burn_rate * oxygen_burn_rate))
+ plasma_burn_rate = min(plasma_burn_rate,air.get_moles(/datum/gas/plasma),air.get_moles(/datum/gas/oxygen)/oxygen_burn_rate) //Ensures matter is conserved properly
+ air.set_moles(/datum/gas/plasma, QUANTIZE(air.get_moles(/datum/gas/plasma) - plasma_burn_rate))
+ air.set_moles(/datum/gas/oxygen, QUANTIZE(air.get_moles(/datum/gas/oxygen) - (plasma_burn_rate * oxygen_burn_rate)))
if (super_saturation)
- cached_gases[/datum/gas/tritium] += plasma_burn_rate
+ air.adjust_moles(/datum/gas/tritium, plasma_burn_rate)
else
- cached_gases[/datum/gas/carbon_dioxide] += plasma_burn_rate
+ air.adjust_moles(/datum/gas/carbon_dioxide, plasma_burn_rate)
energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate)
@@ -186,11 +184,11 @@
if(energy_released > 0)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = (temperature*old_heat_capacity + energy_released)/new_heat_capacity
+ air.set_temperature((temperature*old_heat_capacity + energy_released)/new_heat_capacity)
//let the floor know a fire is happening
if(istype(location))
- temperature = air.temperature
+ temperature = air.return_temperature()
if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
location.hotspot_expose(temperature, CELL_VOLUME)
for(var/I in location)
@@ -218,7 +216,6 @@
/datum/gas/carbon_dioxide = FUSION_MOLE_THRESHOLD)
/datum/gas_reaction/fusion/react(datum/gas_mixture/air, datum/holder)
- var/list/cached_gases = air.gases
var/turf/open/location
if (istype(holder,/datum/pipeline)) //Find the tile the reaction is occuring on, or a random part of the network if it's a pipenet.
var/datum/pipeline/fusion_pipenet = holder
@@ -230,14 +227,14 @@
var/list/cached_scan_results = air.analyzer_results
var/old_heat_capacity = air.heat_capacity()
var/reaction_energy = 0 //Reaction energy can be negative or positive, for both exothermic and endothermic reactions.
- var/initial_plasma = cached_gases[/datum/gas/plasma]
- var/initial_carbon = cached_gases[/datum/gas/carbon_dioxide]
- var/scale_factor = (air.volume)/(PI) //We scale it down by volume/Pi because for fusion conditions, moles roughly = 2*volume, but we want it to be based off something constant between reactions.
- var/toroidal_size = (2*PI)+TORADIANS(arctan((air.volume-TOROID_VOLUME_BREAKEVEN)/TOROID_VOLUME_BREAKEVEN)) //The size of the phase space hypertorus
+ var/initial_plasma = air.get_moles(/datum/gas/plasma)
+ var/initial_carbon = air.get_moles(/datum/gas/carbon_dioxide)
+ var/scale_factor = (air.return_volume())/(PI) //We scale it down by volume/Pi because for fusion conditions, moles roughly = 2*volume, but we want it to be based off something constant between reactions.
+ var/toroidal_size = (2*PI)+TORADIANS(arctan((air.return_volume()-TOROID_VOLUME_BREAKEVEN)/TOROID_VOLUME_BREAKEVEN)) //The size of the phase space hypertorus
var/gas_power = 0
var/list/gas_fusion_powers = GLOB.meta_gas_fusions
- for (var/gas_id in cached_gases)
- gas_power += (gas_fusion_powers[gas_id]*cached_gases[gas_id])
+ for (var/gas_id in air.get_gases())
+ gas_power += (gas_fusion_powers[gas_id]*air.get_moles(gas_id))
var/instability = MODULUS((gas_power*INSTABILITY_GAS_POWER_FACTOR)**2,toroidal_size) //Instability effects how chaotic the behavior of the reaction is
cached_scan_results[id] = instability//used for analyzer feedback
@@ -249,9 +246,9 @@
carbon = MODULUS(carbon - plasma, toroidal_size)
- cached_gases[/datum/gas/plasma] = plasma*scale_factor + FUSION_MOLE_THRESHOLD //Scales the gases back up
- cached_gases[/datum/gas/carbon_dioxide] = carbon*scale_factor + FUSION_MOLE_THRESHOLD
- var/delta_plasma = initial_plasma - cached_gases[/datum/gas/plasma]
+ air.set_moles(/datum/gas/plasma, plasma*scale_factor + FUSION_MOLE_THRESHOLD) //Scales the gases back up
+ air.set_moles(/datum/gas/carbon_dioxide , carbon*scale_factor + FUSION_MOLE_THRESHOLD)
+ var/delta_plasma = initial_plasma - air.get_moles(/datum/gas/plasma)
reaction_energy += delta_plasma*PLASMA_BINDING_ENERGY //Energy is gained or lost corresponding to the creation or destruction of mass.
if(instability < FUSION_INSTABILITY_ENDOTHERMALITY)
@@ -260,17 +257,17 @@
reaction_energy *= (instability-FUSION_INSTABILITY_ENDOTHERMALITY)**0.5
if(air.thermal_energy() + reaction_energy < 0) //No using energy that doesn't exist.
- cached_gases[/datum/gas/plasma] = initial_plasma
- cached_gases[/datum/gas/carbon_dioxide] = initial_carbon
+ air.set_moles(/datum/gas/plasma,initial_plasma)
+ air.set_moles(/datum/gas/carbon_dioxide, initial_carbon)
return NO_REACTION
- cached_gases[/datum/gas/tritium] -= FUSION_TRITIUM_MOLES_USED
+ air.adjust_moles(/datum/gas/tritium, -FUSION_TRITIUM_MOLES_USED)
//The decay of the tritium and the reaction's energy produces waste gases, different ones depending on whether the reaction is endo or exothermic
if(reaction_energy > 0)
- cached_gases[/datum/gas/oxygen] += FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT)
- cached_gases[/datum/gas/nitrous_oxide] += FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT)
+ air.adjust_moles(/datum/gas/oxygen, FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT))
+ air.adjust_moles(/datum/gas/nitrous_oxide, FUSION_TRITIUM_MOLES_USED*(reaction_energy*FUSION_TRITIUM_CONVERSION_COEFFICIENT))
else
- cached_gases[/datum/gas/bz] += FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT)
- cached_gases[/datum/gas/nitryl] += FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT)
+ air.adjust_moles(/datum/gas/bz, FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT))
+ air.adjust_moles(/datum/gas/nitryl, FUSION_TRITIUM_MOLES_USED*(reaction_energy*-FUSION_TRITIUM_CONVERSION_COEFFICIENT))
if(reaction_energy)
if(location)
@@ -282,7 +279,7 @@
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = clamp(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY)
+ air.set_temperature(clamp(((air.return_temperature()*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY))
return REACTING
/datum/gas_reaction/nitrylformation //The formation of nitryl. Endothermic. Requires N2O as a catalyst.
@@ -299,22 +296,21 @@
)
/datum/gas_reaction/nitrylformation/react(datum/gas_mixture/air)
- var/list/cached_gases = air.gases
- var/temperature = air.temperature
+ var/temperature = air.return_temperature()
var/old_heat_capacity = air.heat_capacity()
- var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),cached_gases[/datum/gas/oxygen],cached_gases[/datum/gas/nitrogen])
+ var/heat_efficency = min(temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100),air.get_moles(/datum/gas/oxygen),air.get_moles(/datum/gas/nitrogen))
var/energy_used = heat_efficency*NITRYL_FORMATION_ENERGY
- if ((cached_gases[/datum/gas/oxygen] - heat_efficency < 0 )|| (cached_gases[/datum/gas/nitrogen] - heat_efficency < 0)) //Shouldn't produce gas from nothing.
+ if ((air.get_moles(/datum/gas/oxygen) - heat_efficency < 0 )|| (air.get_moles(/datum/gas/nitrogen) - heat_efficency < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
- cached_gases[/datum/gas/oxygen] -= heat_efficency
- cached_gases[/datum/gas/nitrogen] -= heat_efficency
- cached_gases[/datum/gas/nitryl] += heat_efficency*2
+ air.adjust_moles(/datum/gas/oxygen, heat_efficency)
+ air.adjust_moles(/datum/gas/nitrogen, heat_efficency)
+ air.adjust_moles(/datum/gas/nitryl, heat_efficency*2)
if(energy_used > 0)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = max(((temperature*old_heat_capacity - energy_used)/new_heat_capacity),TCMB)
+ air.set_temperature(max(((temperature*old_heat_capacity - energy_used)/new_heat_capacity),TCMB))
return REACTING
/datum/gas_reaction/bzformation //Formation of BZ by combining plasma and tritium at low pressures. Exothermic.
@@ -330,27 +326,26 @@
/datum/gas_reaction/bzformation/react(datum/gas_mixture/air)
- var/list/cached_gases = air.gases
- var/temperature = air.temperature
+ var/temperature = air.return_temperature()
var/pressure = air.return_pressure()
var/old_heat_capacity = air.heat_capacity()
- var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma]/cached_gases[/datum/gas/nitrous_oxide],1))),cached_gases[/datum/gas/nitrous_oxide],cached_gases[/datum/gas/plasma]/2)
+ var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(air.get_moles(/datum/gas/plasma)/air.get_moles(/datum/gas/nitrous_oxide),1))),air.get_moles(/datum/gas/nitrous_oxide),air.get_moles(/datum/gas/plasma)/2)
var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED
- if ((cached_gases[/datum/gas/nitrous_oxide] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma] - (2*reaction_efficency) < 0) || energy_released <= 0) //Shouldn't produce gas from nothing.
+ if ((air.get_moles(/datum/gas/nitrous_oxide) - reaction_efficency < 0 )|| (air.get_moles(/datum/gas/plasma) - (2*reaction_efficency) < 0) || energy_released <= 0) //Shouldn't produce gas from nothing.
return NO_REACTION
- cached_gases[/datum/gas/bz] += reaction_efficency
- if(reaction_efficency == cached_gases[/datum/gas/nitrous_oxide])
- cached_gases[/datum/gas/bz] -= min(pressure,1)
- cached_gases[/datum/gas/oxygen] += min(pressure,1)
- cached_gases[/datum/gas/nitrous_oxide] -= reaction_efficency
- cached_gases[/datum/gas/plasma] -= 2*reaction_efficency
+ air.adjust_moles(/datum/gas/bz, reaction_efficency)
+ if(reaction_efficency == air.get_moles(/datum/gas/nitrous_oxide))
+ air.adjust_moles(/datum/gas/bz, -min(pressure,1))
+ air.adjust_moles(/datum/gas/oxygen, min(pressure,1))
+ air.adjust_moles(/datum/gas/nitrous_oxide, -reaction_efficency)
+ air.adjust_moles(/datum/gas/plasma, -2*reaction_efficency)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, min((reaction_efficency**2)*BZ_RESEARCH_SCALE),BZ_RESEARCH_MAX_AMOUNT)
if(energy_released > 0)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = max(((temperature*old_heat_capacity + energy_released)/new_heat_capacity),TCMB)
+ air.set_temperature(max(((temperature*old_heat_capacity + energy_released)/new_heat_capacity),TCMB))
return REACTING
/datum/gas_reaction/stimformation //Stimulum formation follows a strange pattern of how effective it will be at a given temperature, having some multiple peaks and some large dropoffs. Exo and endo thermic.
@@ -367,24 +362,22 @@
"TEMP" = STIMULUM_HEAT_SCALE/2)
/datum/gas_reaction/stimformation/react(datum/gas_mixture/air)
- var/list/cached_gases = air.gases
-
var/old_heat_capacity = air.heat_capacity()
- var/heat_scale = min(air.temperature/STIMULUM_HEAT_SCALE,cached_gases[/datum/gas/tritium],cached_gases[/datum/gas/plasma],cached_gases[/datum/gas/nitryl])
+ var/heat_scale = min(air.return_temperature()/STIMULUM_HEAT_SCALE,air.get_moles(/datum/gas/tritium),air.get_moles(/datum/gas/plasma),air.get_moles(/datum/gas/nitryl))
var/stim_energy_change = heat_scale + STIMULUM_FIRST_RISE*(heat_scale**2) - STIMULUM_FIRST_DROP*(heat_scale**3) + STIMULUM_SECOND_RISE*(heat_scale**4) - STIMULUM_ABSOLUTE_DROP*(heat_scale**5)
- if ((cached_gases[/datum/gas/tritium] - heat_scale < 0 )|| (cached_gases[/datum/gas/plasma] - heat_scale < 0) || (cached_gases[/datum/gas/nitryl] - heat_scale < 0)) //Shouldn't produce gas from nothing.
+ if ((air.get_moles(/datum/gas/tritium) - heat_scale < 0 )|| (air.get_moles(/datum/gas/plasma) - heat_scale < 0) || (air.get_moles(/datum/gas/nitryl) - heat_scale < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
- cached_gases[/datum/gas/stimulum]+= heat_scale/10
- cached_gases[/datum/gas/tritium] -= heat_scale
- cached_gases[/datum/gas/plasma] -= heat_scale
- cached_gases[/datum/gas/nitryl] -= heat_scale
+ air.adjust_moles(/datum/gas/stimulum, heat_scale/10)
+ air.adjust_moles(/datum/gas/tritium, -heat_scale)
+ air.adjust_moles(/datum/gas/plasma, -heat_scale)
+ air.adjust_moles(/datum/gas/nitryl, -heat_scale)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, STIMULUM_RESEARCH_AMOUNT*max(stim_energy_change,0))
if(stim_energy_change)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = max(((air.temperature*old_heat_capacity + stim_energy_change)/new_heat_capacity),TCMB)
+ air.set_temperature(max(((air.return_temperature()*old_heat_capacity + stim_energy_change)/new_heat_capacity),TCMB))
return REACTING
/datum/gas_reaction/nobliumformation //Hyper-Noblium formation is extrememly endothermic, but requires high temperatures to start. Due to its high mass, hyper-nobelium uses large amounts of nitrogen and tritium. BZ can be used as a catalyst to make it less endothermic.
@@ -399,22 +392,21 @@
"TEMP" = 5000000)
/datum/gas_reaction/nobliumformation/react(datum/gas_mixture/air)
- var/list/cached_gases = air.gases
var/old_heat_capacity = air.heat_capacity()
- var/nob_formed = min((cached_gases[/datum/gas/nitrogen]+cached_gases[/datum/gas/tritium])/100,cached_gases[/datum/gas/tritium]/10,cached_gases[/datum/gas/nitrogen]/20)
- var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(cached_gases[/datum/gas/bz],1)))
- if ((cached_gases[/datum/gas/tritium] - 10*nob_formed < 0) || (cached_gases[/datum/gas/nitrogen] - 20*nob_formed < 0))
+ var/nob_formed = min((air.get_moles(/datum/gas/nitrogen)+air.get_moles(/datum/gas/tritium))/100,air.get_moles(/datum/gas/tritium)/10,air.get_moles(/datum/gas/nitrogen)/20)
+ var/energy_taken = nob_formed*(NOBLIUM_FORMATION_ENERGY/(max(air.get_moles(/datum/gas/bz),1)))
+ if ((air.get_moles(/datum/gas/tritium) - 10*nob_formed < 0) || (air.get_moles(/datum/gas/nitrogen) - 20*nob_formed < 0))
return NO_REACTION
- cached_gases[/datum/gas/tritium] -= 10*nob_formed
- cached_gases[/datum/gas/nitrogen] -= 20*nob_formed
- cached_gases[/datum/gas/hypernoblium]+= nob_formed
+ air.adjust_moles(/datum/gas/tritium, -10*nob_formed)
+ air.adjust_moles(/datum/gas/nitrogen, -20*nob_formed)
+ air.adjust_moles(/datum/gas/hypernoblium,nob_formed)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, nob_formed*NOBLIUM_RESEARCH_AMOUNT)
if (nob_formed)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
- air.temperature = max(((air.temperature*old_heat_capacity - energy_taken)/new_heat_capacity),TCMB)
+ air.set_temperature(max(((air.return_temperature()*old_heat_capacity - energy_taken)/new_heat_capacity),TCMB))
/datum/gas_reaction/miaster //dry heat sterilization: clears out pathogens in the air
@@ -429,16 +421,15 @@
)
/datum/gas_reaction/miaster/react(datum/gas_mixture/air, datum/holder)
- var/list/cached_gases = air.gases
// As the name says it, it needs to be dry
- if(cached_gases[/datum/gas/water_vapor] && cached_gases[/datum/gas/water_vapor]/air.total_moles() > 0.1)
+ if(air.get_moles(/datum/gas/water_vapor) && air.get_moles(/datum/gas/water_vapor)/air.total_moles() > 0.1)
return
//Replace miasma with oxygen
- var/cleaned_air = min(cached_gases[/datum/gas/miasma], 20 + (air.temperature - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20)
- cached_gases[/datum/gas/miasma] -= cleaned_air
- cached_gases[/datum/gas/oxygen] += cleaned_air
+ var/cleaned_air = min(air.get_moles(/datum/gas/miasma), 20 + (air.return_temperature() - FIRE_MINIMUM_TEMPERATURE_TO_EXIST - 70) / 20)
+ air.adjust_moles(/datum/gas/miasma, -cleaned_air)
+ air.adjust_moles(/datum/gas/oxygen, cleaned_air)
//Possibly burning a bit of organic matter through maillard reaction, so a *tiny* bit more heat would be understandable
- air.temperature += cleaned_air * 0.002
+ air.set_temperature(air.return_temperature() + cleaned_air * 0.002)
SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, cleaned_air*MIASMA_RESEARCH_AMOUNT)//Turns out the burning of miasma is kinda interesting to scientists
diff --git a/code/modules/atmospherics/gasmixtures/zextools_broke.dm b/code/modules/atmospherics/gasmixtures/zextools_broke.dm
new file mode 100644
index 0000000000..eef6933edb
--- /dev/null
+++ b/code/modules/atmospherics/gasmixtures/zextools_broke.dm
@@ -0,0 +1,304 @@
+#ifdef EXTOOLS_BROKE
+
+/datum/gas_mixture
+ var/list/gases = list()
+ var/temperature = 0 //kelvins
+ var/tmp/temperature_archived = 0
+ var/volume = CELL_VOLUME //liters
+ var/last_share = 0
+
+/datum/gas_mixture/heat_capacity() //joules per kelvin
+ var/list/cached_gases = gases
+ var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ . = 0
+ for(var/id in cached_gases)
+ . += cached_gases[id] * cached_gasheats[id]
+
+/datum/gas_mixture/turf/heat_capacity() // Same as above except vacuums return HEAT_CAPACITY_VACUUM
+ var/list/cached_gases = gases
+ var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ for(var/id in cached_gases)
+ . += cached_gases[id] * cached_gasheats[id]
+ if(!.)
+ . += HEAT_CAPACITY_VACUUM //we want vacuums in turfs to have the same heat capacity as space
+
+//prefer this to gas_mixture/total_moles in performance critical areas
+#define TOTAL_MOLES(cached_gases, out_var)\
+ out_var = 0;\
+ for(var/total_moles_id in cached_gases){\
+ out_var += cached_gases[total_moles_id];\
+ }
+
+#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
+
+/datum/gas_mixture/total_moles()
+ var/cached_gases = gases
+ TOTAL_MOLES(cached_gases, .)
+
+/datum/gas_mixture/return_pressure() //kilopascals
+ if(volume > 0) // to prevent division by zero
+ var/cached_gases = gases
+ TOTAL_MOLES(cached_gases, .)
+ . *= R_IDEAL_GAS_EQUATION * temperature / volume
+ return
+ return 0
+
+/datum/gas_mixture/return_temperature() //kelvins
+ return temperature
+
+/datum/gas_mixture/set_min_heat_capacity(n)
+ return
+/datum/gas_mixture/set_temperature(new_temp)
+ temperature = new_temp
+/datum/gas_mixture/set_volume(new_volume)
+ volume = new_volume
+/datum/gas_mixture/get_moles(gas_type)
+ return gases[gas_type]
+/datum/gas_mixture/set_moles(gas_type, moles)
+ gases[gas_type] = moles
+/datum/gas_mixture/scrub_into(datum/gas_mixture/target, list/gases)
+ if(isnull(target))
+ return FALSE
+
+ var/list/removed_gases = target.gases
+
+ //Filter it
+ var/datum/gas_mixture/filtered_out = new
+ var/list/filtered_gases = filtered_out.gases
+ filtered_out.temperature = removed.temperature
+ for(var/gas in filter_types & removed_gases)
+ filtered_gases[gas] = removed_gases[gas]
+ removed_gases[gas] = 0
+ merge(filtered_out)
+/datum/gas_mixture/mark_immutable()
+ return
+/datum/gas_mixture/get_gases()
+ return gases
+/datum/gas_mixture/multiply(factor)
+ for(var/id in gases)
+ gases[id] *= factor
+/datum/gas_mixture/get_last_share()
+ return last_share
+/datum/gas_mixture/clear()
+ gases.Cut()
+
+/datum/gas_mixture/return_volume()
+ return volume // wow!
+
+/datum/gas_mixture/thermal_energy()
+ return THERMAL_ENERGY(src)
+
+/datum/gas_mixture/archive()
+ temperature_archived = temperature
+ gas_archive = gases.Copy()
+ return 1
+
+/datum/gas_mixture/merge(datum/gas_mixture/giver)
+ if(!giver)
+ return 0
+
+ //heat transfer
+ 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)
+ temperature = (giver.temperature * giver_heat_capacity + temperature * self_heat_capacity) / combined_heat_capacity
+
+ var/list/cached_gases = gases //accessing datum vars is slower than proc vars
+ var/list/giver_gases = giver.gases
+ //gas transfer
+ for(var/giver_id in giver_gases)
+ cached_gases[giver_id] += giver_gases[giver_id]
+
+ return 1
+
+/datum/gas_mixture/remove(amount)
+ var/sum
+ var/list/cached_gases = gases
+ TOTAL_MOLES(cached_gases, sum)
+ amount = min(amount, sum) //Can not take more air than tile has!
+ if(amount <= 0)
+ return null
+ var/datum/gas_mixture/removed = new type
+ var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
+
+ removed.temperature = temperature
+ for(var/id in cached_gases)
+ removed_gases[id] = QUANTIZE((cached_gases[id] / sum) * amount)
+ cached_gases[id] -= removed_gases[id]
+ GAS_GARBAGE_COLLECT(gases)
+
+ return removed
+
+/datum/gas_mixture/remove_ratio(ratio)
+ if(ratio <= 0)
+ return null
+ ratio = min(ratio, 1)
+
+ var/list/cached_gases = gases
+ var/datum/gas_mixture/removed = new type
+ var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
+
+ removed.temperature = temperature
+ for(var/id in cached_gases)
+ removed_gases[id] = QUANTIZE(cached_gases[id] * ratio)
+ cached_gases[id] -= removed_gases[id]
+
+ GAS_GARBAGE_COLLECT(gases)
+
+ return removed
+
+/datum/gas_mixture/copy()
+ var/list/cached_gases = gases
+ var/datum/gas_mixture/copy = new type
+ var/list/copy_gases = copy.gases
+
+ copy.temperature = temperature
+ for(var/id in cached_gases)
+ copy_gases[id] = cached_gases[id]
+
+ return copy
+
+
+/datum/gas_mixture/copy_from(datum/gas_mixture/sample)
+ var/list/cached_gases = gases //accessing datum vars is slower than proc vars
+ var/list/sample_gases = sample.gases
+
+ temperature = sample.temperature
+ for(var/id in sample_gases)
+ cached_gases[id] = sample_gases[id]
+
+ //remove all gases not in the sample
+ cached_gases &= sample_gases
+
+ return 1
+
+/datum/gas_mixture/copy_from_turf(turf/model)
+ parse_gas_string(model.initial_gas_mix)
+
+ //acounts for changes in temperature
+ var/turf/model_parent = model.parent_type
+ if(model.temperature != initial(model.temperature) || model.temperature != initial(model_parent.temperature))
+ temperature = model.temperature
+
+ return 1
+
+/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
+
+ var/list/cached_gases = gases
+ var/list/sharer_gases = sharer.gases
+
+ var/temperature_delta = temperature_archived - sharer.temperature_archived
+ var/abs_temperature_delta = abs(temperature_delta)
+
+ var/old_self_heat_capacity = 0
+ var/old_sharer_heat_capacity = 0
+ if(abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
+ old_self_heat_capacity = heat_capacity()
+ old_sharer_heat_capacity = sharer.heat_capacity()
+
+ var/heat_capacity_self_to_sharer = 0 //heat capacity of the moles transferred from us to the sharer
+ var/heat_capacity_sharer_to_self = 0 //heat capacity of the moles transferred from the sharer to us
+
+ var/moved_moles = 0
+ var/abs_moved_moles = 0
+
+ //we're gonna define these vars outside of this for loop because as it turns out, var declaration is pricy
+ var/delta
+ var/gas_heat_capacity
+ //and also cache this shit rq because that results in sanic speed for reasons byond explanation
+ var/list/cached_gasheats = GLOB.meta_gas_specific_heats
+ //GAS TRANSFER
+ for(var/id in cached_gases | sharer_gases) // transfer gases
+
+ delta = QUANTIZE(gas_archive[id] - sharer.gas_archive[id])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures
+
+ if(delta && abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
+ gas_heat_capacity = delta * cached_gasheats[id]
+ if(delta > 0)
+ heat_capacity_self_to_sharer += gas_heat_capacity
+ else
+ heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative.
+
+ cached_gases[id] -= delta
+ sharer_gases[id] += delta
+ moved_moles += delta
+ abs_moved_moles += abs(delta)
+
+ last_share = abs_moved_moles
+
+ //THERMAL ENERGY TRANSFER
+ if(abs_temperature_delta > 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
+
+ //transfer of thermal energy (via changed heat capacity) between self and sharer
+ 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
+
+ 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
+ //thermal energy of the system (self and sharer) is unchanged
+
+ if(abs(old_sharer_heat_capacity) > MINIMUM_HEAT_CAPACITY)
+ if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.1) // <10% change in sharer heat capacity
+ temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT)
+
+ if (initial(sharer.gc_share))
+ GAS_GARBAGE_COLLECT(sharer.gases)
+ if(temperature_delta > MINIMUM_TEMPERATURE_TO_MOVE || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
+ var/our_moles
+ TOTAL_MOLES(cached_gases,our_moles)
+ var/their_moles
+ TOTAL_MOLES(sharer_gases,their_moles)
+ return (temperature_archived*(our_moles + moved_moles) - sharer.temperature_archived*(their_moles - moved_moles)) * R_IDEAL_GAS_EQUATION / volume
+
+/datum/gas_mixture/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
+ //transfer of thermal energy (via conduction) between self and sharer
+ if(sharer)
+ sharer_temperature = sharer.temperature_archived
+ var/temperature_delta = temperature_archived - sharer_temperature
+ if(abs(temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
+ var/self_heat_capacity = archived_heat_capacity()
+ sharer_heat_capacity = sharer_heat_capacity || sharer.archived_heat_capacity()
+
+ if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
+ var/heat = conduction_coefficient*temperature_delta* \
+ (self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity))
+
+ temperature = max(temperature - heat/self_heat_capacity, TCMB)
+ sharer_temperature = max(sharer_temperature + heat/sharer_heat_capacity, TCMB)
+ if(sharer)
+ sharer.temperature = sharer_temperature
+ return sharer_temperature
+ //thermal energy of the system (self and sharer) is unchanged
+
+/datum/gas_mixture/compare(datum/gas_mixture/sample)
+ var/list/sample_gases = sample.gases //accessing datum vars is slower than proc vars
+ var/list/cached_gases = gases
+
+ for(var/id in cached_gases | sample_gases) // compare gases from either mixture
+ var/gas_moles = cached_gases[id]
+ var/sample_moles = sample_gases[id]
+ var/delta = abs(gas_moles - sample_moles)
+ if(delta > MINIMUM_MOLES_DELTA_TO_MOVE && \
+ delta > gas_moles * MINIMUM_AIR_RATIO_TO_MOVE)
+ return id
+
+ var/our_moles
+ TOTAL_MOLES(cached_gases, our_moles)
+ if(our_moles > MINIMUM_MOLES_DELTA_TO_MOVE)
+ var/temp = temperature
+ var/sample_temp = sample.temperature
+
+ var/temperature_delta = abs(temp - sample_temp)
+ if(temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND)
+ return "temp"
+
+ return ""
+
+/datum/gas_mixture/transfer_to(datum/gas_mixture/target, amount)
+ return merge(target.remove(amount))
+
+#endif
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index 3a8d2c5620..6b89deeb80 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -269,7 +269,7 @@
"unit" = "kPa",
"danger_level" = cur_tlv.get_danger_level(pressure)
))
- var/temperature = environment.temperature
+ var/temperature = environment.return_temperature()
cur_tlv = TLV["temperature"]
data["environment_data"] += list(list(
"name" = "Temperature",
@@ -278,16 +278,16 @@
"danger_level" = cur_tlv.get_danger_level(temperature)
))
var/total_moles = environment.total_moles()
- var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume
- for(var/gas_id in environment.gases)
+ var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.return_temperature() / environment.return_volume()
+ for(var/gas_id in environment.get_gases())
if(!(gas_id in TLV)) // We're not interested in this gas, it seems.
continue
cur_tlv = TLV[gas_id]
data["environment_data"] += list(list(
"name" = GLOB.meta_gas_names[gas_id],
- "value" = environment.gases[gas_id] / total_moles * 100,
+ "value" = environment.get_moles(gas_id) / total_moles * 100,
"unit" = "%",
- "danger_level" = cur_tlv.get_danger_level(environment.gases[gas_id] * partial_pressure)
+ "danger_level" = cur_tlv.get_danger_level(environment.get_moles(gas_id) * partial_pressure)
))
if(!locked || hasSiliconAccessInArea(user, PRIVILEDGES_SILICON|PRIVILEDGES_DRONE))
@@ -684,24 +684,21 @@
var/datum/tlv/cur_tlv
var/datum/gas_mixture/environment = location.return_air()
- var/list/env_gases = environment.gases
- var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.temperature / environment.volume
+ var/partial_pressure = R_IDEAL_GAS_EQUATION * environment.return_temperature() / environment.return_volume()
cur_tlv = TLV["pressure"]
var/environment_pressure = environment.return_pressure()
var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure)
cur_tlv = TLV["temperature"]
- var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.temperature)
+ var/temperature_dangerlevel = cur_tlv.get_danger_level(environment.return_temperature())
var/gas_dangerlevel = 0
- for(var/gas_id in env_gases)
+ for(var/gas_id in environment.get_gases())
if(!(gas_id in TLV)) // We're not interested in this gas, it seems.
continue
cur_tlv = TLV[gas_id]
- gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(env_gases[gas_id] * partial_pressure))
-
- GAS_GARBAGE_COLLECT(environment.gases)
+ gas_dangerlevel = max(gas_dangerlevel, cur_tlv.get_danger_level(environment.get_moles(gas_id) * partial_pressure))
var/old_danger_level = danger_level
danger_level = max(pressure_dangerlevel, temperature_dangerlevel, gas_dangerlevel)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm
index 6b685d4bc1..39a99148c2 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/circulator.dm
@@ -52,10 +52,10 @@
return null
//Calculate necessary moles to transfer using PV = nRT
- if(air2.temperature>0)
+ if(air2.return_temperature()>0)
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
- var/transfer_moles = pressure_delta*air1.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
+ var/transfer_moles = pressure_delta*air1.return_volume()/(air2.return_temperature() * R_IDEAL_GAS_EQUATION)
last_pressure_delta = pressure_delta
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
index 2dc0afac26..d1bb58b99a 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm
@@ -66,8 +66,8 @@
pressure_delta = min(pressure_delta, (air1.return_pressure() - input_pressure_min))
if(pressure_delta > 0)
- if(air1.temperature > 0)
- var/transfer_moles = pressure_delta*environment.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
+ if(air1.return_temperature() > 0)
+ var/transfer_moles = pressure_delta*environment.return_volume()/(air1.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
//Removed can be null if there is no atmosphere in air1
@@ -81,20 +81,17 @@
parent1.update = 1
else //external -> output
- var/pressure_delta = 10000
+ if(environment.return_pressure() > 0)
+ var/our_multiplier = air2.return_volume() / (environment.return_temperature() * R_IDEAL_GAS_EQUATION)
+ var/moles_delta = 10000 * our_multiplier
+ if(pressure_checks&EXT_BOUND)
+ moles_delta = min(moles_delta, (environment_pressure - output_pressure_max) * environment.return_volume() / (environment.return_temperature() * R_IDEAL_GAS_EQUATION))
+ if(pressure_checks&INPUT_MIN)
+ moles_delta = min(moles_delta, (input_pressure_min - air2.return_pressure()) * our_multiplier)
- if(pressure_checks&EXT_BOUND)
- pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
- if(pressure_checks&INPUT_MIN)
- pressure_delta = min(pressure_delta, (output_pressure_max - air2.return_pressure()))
-
- if(pressure_delta > 0)
- if(environment.temperature > 0)
- var/transfer_moles = pressure_delta*air2.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
-
- var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
- //removed can be null if there is no air in the location
- if(!removed)
+ if(moles_delta > 0)
+ var/datum/gas_mixture/removed = loc.remove_air(moles_delta)
+ if (isnull(removed)) // in space
return
air2.merge(removed)
@@ -182,8 +179,8 @@
..()
var/datum/gas_mixture/air1 = airs[1]
var/datum/gas_mixture/air2 = airs[2]
- air1.volume = 1000
- air2.volume = 1000
+ air1.set_volume(1000)
+ air2.set_volume(1000)
// Mapping
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
index 2e2d68c35e..9e1908a500 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm
@@ -68,11 +68,11 @@ Passive gate is similar to the regular pump except:
return
//Calculate necessary moles to transfer using PV = nRT
- if((air1.total_moles() > 0) && (air1.temperature>0))
+ if((air1.total_moles() > 0) && (air1.return_temperature()>0))
var/pressure_delta = min(target_pressure - output_starting_pressure, (input_starting_pressure - output_starting_pressure)/2)
//Can not have a pressure delta that would cause output_pressure > input_pressure
- var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
+ var/transfer_moles = pressure_delta*air2.return_volume()/(air1.return_temperature() * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
@@ -187,4 +187,4 @@ Passive gate is similar to the regular pump except:
/obj/machinery/atmospherics/components/binary/passive_gate/layer3
piping_layer = 3
- icon_state = "passgate_map-3"
\ No newline at end of file
+ icon_state = "passgate_map-3"
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
index ede416f67c..d41df83e12 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm
@@ -77,9 +77,9 @@
return
//Calculate necessary moles to transfer using PV=nRT
- if((air1.total_moles() > 0) && (air1.temperature>0))
+ if((air1.total_moles() > 0) && (air1.return_temperature()>0))
var/pressure_delta = target_pressure - output_starting_pressure
- var/transfer_moles = pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
+ var/transfer_moles = pressure_delta*air2.return_volume()/(air1.return_temperature() * R_IDEAL_GAS_EQUATION)
//Actually transfer the gas
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
index 926cacf8e2..d95e4ec123 100644
--- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
+++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm
@@ -65,7 +65,7 @@
if((input_starting_pressure < 0.01) || (output_starting_pressure > 9000))
return
- var/transfer_ratio = transfer_rate/air1.volume
+ var/transfer_ratio = transfer_rate/air1.return_volume()
var/datum/gas_mixture/removed = air1.remove_ratio(transfer_ratio)
@@ -153,7 +153,7 @@
if("set_transfer_rate" in signal.data)
var/datum/gas_mixture/air1 = airs[1]
- transfer_rate = clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume)
+ transfer_rate = clamp(text2num(signal.data["set_transfer_rate"]),0,air1.return_volume())
if(on != old_on)
investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS)
diff --git a/code/modules/atmospherics/machinery/components/components_base.dm b/code/modules/atmospherics/machinery/components/components_base.dm
index 33fd160b1a..dc7c106035 100644
--- a/code/modules/atmospherics/machinery/components/components_base.dm
+++ b/code/modules/atmospherics/machinery/components/components_base.dm
@@ -15,8 +15,7 @@
..()
for(var/i in 1 to device_type)
- var/datum/gas_mixture/A = new
- A.volume = 200
+ var/datum/gas_mixture/A = new(200)
airs[i] = A
// Iconnery
@@ -117,7 +116,7 @@
var/times_lost = 0
for(var/i in 1 to device_type)
var/datum/gas_mixture/air = airs[i]
- lost += pressures*environment.volume/(air.temperature * R_IDEAL_GAS_EQUATION)
+ lost += pressures*environment.return_volume()/(air.return_temperature() * R_IDEAL_GAS_EQUATION)
times_lost++
var/shared_loss = lost/times_lost
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
index a31e3e3c36..dd6952dfc6 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm
@@ -94,7 +94,7 @@
//Calculate necessary moles to transfer using PV=nRT
- var/transfer_ratio = transfer_rate/air1.volume
+ var/transfer_ratio = transfer_rate/air1.return_volume()
//Actually transfer the gas
@@ -111,14 +111,13 @@
else
filtering = FALSE
- if(filtering && removed.gases[filter_type])
+ if(filtering && removed.get_moles(filter_type))
var/datum/gas_mixture/filtered_out = new
- filtered_out.temperature = removed.temperature
- filtered_out.gases[filter_type] = removed.gases[filter_type]
+ filtered_out.set_temperature(removed.return_temperature())
+ filtered_out.set_moles(filter_type, removed.get_moles(filter_type))
- removed.gases[filter_type] = 0
- GAS_GARBAGE_COLLECT(removed.gases)
+ removed.set_moles(filter_type, 0)
var/datum/gas_mixture/target = (air2.return_pressure() < 9000 ? air2 : air1)
target.merge(filtered_out)
diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
index 1eb1375724..758d27ab61 100644
--- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
+++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm
@@ -57,7 +57,7 @@
/obj/machinery/atmospherics/components/trinary/mixer/New()
..()
var/datum/gas_mixture/air3 = airs[3]
- air3.volume = 300
+ air3.set_volume(300)
airs[3] = air3
/obj/machinery/atmospherics/components/trinary/mixer/process_atmos()
@@ -81,26 +81,26 @@
return
//Calculate necessary moles to transfer using PV=nRT
- var/general_transfer = (target_pressure - output_starting_pressure) * air3.volume / R_IDEAL_GAS_EQUATION
+ var/general_transfer = (target_pressure - output_starting_pressure) * air3.return_volume() / R_IDEAL_GAS_EQUATION
- var/transfer_moles1 = air1.temperature ? node1_concentration * general_transfer / air1.temperature : 0
- var/transfer_moles2 = air2.temperature ? node2_concentration * general_transfer / air2.temperature : 0
+ var/transfer_moles1 = air1.return_temperature() ? node1_concentration * general_transfer / air1.return_temperature() : 0
+ var/transfer_moles2 = air2.return_temperature() ? node2_concentration * general_transfer / air2.return_temperature() : 0
var/air1_moles = air1.total_moles()
var/air2_moles = air2.total_moles()
if(!node2_concentration)
- if(air1.temperature <= 0)
+ if(air1.return_temperature() <= 0)
return
transfer_moles1 = min(transfer_moles1, air1_moles)
transfer_moles2 = 0
else if(!node1_concentration)
- if(air2.temperature <= 0)
+ if(air2.return_temperature() <= 0)
return
transfer_moles2 = min(transfer_moles2, air2_moles)
transfer_moles1 = 0
else
- if(air1.temperature <= 0 || air2.temperature <= 0)
+ if(air1.return_temperature() <= 0 || air2.return_temperature() <= 0)
return
if((transfer_moles2 <= 0) || (transfer_moles1 <= 0))
return
@@ -248,4 +248,4 @@
/obj/machinery/atmospherics/components/trinary/mixer/airmix/flipped/inverse
node1_concentration = O2STANDARD
- node2_concentration = N2STANDARD
\ No newline at end of file
+ node2_concentration = N2STANDARD
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
index cdeb8e701d..d6cae58079 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm
@@ -186,7 +186,7 @@
var/datum/gas_mixture/air1 = airs[1]
- if(air1.gases.len)
+ if(air1.total_moles())
if(mob_occupant.bodytemperature < T0C) // Sleepytime. Why? More cryo magic.
// temperature factor goes from 1 to about 2.5
var/amount = max(1, (4 * log(T0C - mob_occupant.bodytemperature)) - 20) * knockout_factor * base_knockout
@@ -196,8 +196,7 @@
if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic.
beaker.reagents.trans_to(occupant, 1, efficiency * 0.25) // Transfer reagents.
beaker.reagents.reaction(occupant, VAPOR)
- air1.gases[/datum/gas/oxygen] -= max(0,air1.gases[/datum/gas/oxygen] - 2 / efficiency) //Let's use gas for this
- GAS_GARBAGE_COLLECT(air1.gases)
+ air1.adjust_moles(/datum/gas/oxygen, -max(0,air1.get_moles(/datum/gas/oxygen) - 2 / efficiency)) //Let's use gas for this
if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker).
reagent_transfer = 0
@@ -211,7 +210,7 @@
var/datum/gas_mixture/air1 = airs[1]
- if(!nodes[1] || !airs[1] || !air1.gases.len || air1.gases[/datum/gas/oxygen] < 5) // Turn off if the machine won't work.
+ if(!nodes[1] || !airs[1] || air1.get_moles(/datum/gas/oxygen) < 5) // Turn off if the machine won't work.
on = FALSE
update_icon()
return
@@ -219,22 +218,21 @@
if(occupant)
var/mob/living/mob_occupant = occupant
var/cold_protection = 0
- var/temperature_delta = air1.temperature - mob_occupant.bodytemperature // The only semi-realistic thing here: share temperature between the cell and the occupant.
+ var/temperature_delta = air1.return_temperature() - mob_occupant.bodytemperature // The only semi-realistic thing here: share temperature between the cell and the occupant.
if(ishuman(occupant))
var/mob/living/carbon/human/H = occupant
- cold_protection = H.get_thermal_protection(air1.temperature, TRUE)
+ cold_protection = H.get_thermal_protection(air1.return_temperature(), TRUE)
if(abs(temperature_delta) > 1)
var/air_heat_capacity = air1.heat_capacity()
var/heat = ((1 - cold_protection) * 0.1 + conduction_coefficient) * temperature_delta * (air_heat_capacity * heat_capacity / (air_heat_capacity + heat_capacity))
- air1.temperature = max(air1.temperature - heat / air_heat_capacity, TCMB)
+ air1.set_temperature(max(air1.return_temperature() - heat / air_heat_capacity, TCMB))
mob_occupant.adjust_bodytemperature(heat / heat_capacity, TCMB)
- air1.gases[/datum/gas/oxygen] = max(0,air1.gases[/datum/gas/oxygen] - 0.5 / efficiency) // Magically consume gas? Why not, we run on cryo magic.
- GAS_GARBAGE_COLLECT(air1.gases)
+ air1.set_temperature(max(air1.return_temperature() - 0.5 / efficiency)) // Magically consume gas? Why not, we run on cryo magic.
/obj/machinery/atmospherics/components/unary/cryo_cell/power_change()
..()
@@ -369,7 +367,7 @@
data["occupant"]["temperaturestatus"] = "bad"
var/datum/gas_mixture/air1 = airs[1]
- data["cellTemperature"] = round(air1.temperature, 1)
+ data["cellTemperature"] = round(air1.return_temperature(), 1)
data["isBeakerLoaded"] = beaker ? TRUE : FALSE
var/beakerContents = list()
@@ -439,7 +437,7 @@
var/datum/gas_mixture/G = airs[1]
if(G.total_moles() > 10)
- return G.temperature
+ return G.return_temperature()
return ..()
/obj/machinery/atmospherics/components/unary/cryo_cell/default_change_direction_wrench(mob/user, obj/item/wrench/W)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm
index a856ea1f3f..c0dfc5633e 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/heat_exchanger.dm
@@ -59,18 +59,18 @@
var/other_air_heat_capacity = partner_air_contents.heat_capacity()
var/combined_heat_capacity = other_air_heat_capacity + air_heat_capacity
- var/old_temperature = air_contents.temperature
- var/other_old_temperature = partner_air_contents.temperature
+ var/old_temperature = air_contents.return_temperature()
+ var/other_old_temperature = partner_air_contents.return_temperature()
if(combined_heat_capacity > 0)
- var/combined_energy = partner_air_contents.temperature*other_air_heat_capacity + air_heat_capacity*air_contents.temperature
+ var/combined_energy = partner_air_contents.return_temperature()*other_air_heat_capacity + air_heat_capacity*air_contents.return_temperature()
var/new_temperature = combined_energy/combined_heat_capacity
- air_contents.temperature = new_temperature
- partner_air_contents.temperature = new_temperature
+ air_contents.set_temperature(new_temperature)
+ partner_air_contents.set_temperature(new_temperature)
- if(abs(old_temperature-air_contents.temperature) > 1)
+ if(abs(old_temperature-air_contents.return_temperature()) > 1)
update_parents()
- if(abs(other_old_temperature-partner_air_contents.temperature) > 1)
+ if(abs(other_old_temperature-partner_air_contents.return_temperature()) > 1)
partner.update_parents()
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
index 6a33bb5463..70672418a1 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm
@@ -67,8 +67,8 @@
var/datum/gas_mixture/air_contents = airs[1]
- if(air_contents.temperature > 0)
- var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
+ if(air_contents.return_temperature() > 0)
+ var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
@@ -86,8 +86,8 @@
injecting = 1
- if(air_contents.temperature > 0)
- var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
+ if(air_contents.return_temperature() > 0)
+ var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
loc.assume_air(removed)
update_parents()
@@ -138,7 +138,7 @@
if("set_volume_rate" in signal.data)
var/number = text2num(signal.data["set_volume_rate"])
var/datum/gas_mixture/air_contents = airs[1]
- volume_rate = clamp(number, 0, air_contents.volume)
+ volume_rate = clamp(number, 0, air_contents.return_volume())
if("status" in signal.data)
spawn(2)
@@ -256,4 +256,4 @@
id = ATMOS_GAS_MONITOR_INPUT_INCINERATOR
/obj/machinery/atmospherics/components/unary/outlet_injector/atmos/toxins_mixing_input
name = "toxins mixing input injector"
- id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB
\ No newline at end of file
+ id = ATMOS_GAS_MONITOR_INPUT_TOXINS_LAB
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
index a113484d20..3f5bb818ce 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
@@ -30,14 +30,14 @@
if(pressure_delta > 0.5)
if(external_pressure < internal_pressure)
- var/air_temperature = (external.temperature > 0) ? external.temperature : internal.temperature
- var/transfer_moles = (pressure_delta * external.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
+ var/air_temperature = (external.return_temperature() > 0) ? external.return_temperature() : internal.return_temperature()
+ var/transfer_moles = (pressure_delta * external.return_volume()) / (air_temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = internal.remove(transfer_moles)
external.merge(removed)
else
- var/air_temperature = (internal.temperature > 0) ? internal.temperature : external.temperature
- var/transfer_moles = (pressure_delta * internal.volume) / (air_temperature * R_IDEAL_GAS_EQUATION)
- transfer_moles = min(transfer_moles, external.total_moles() * internal.volume / external.volume)
+ var/air_temperature = (internal.return_temperature() > 0) ? internal.return_temperature() : external.return_temperature()
+ var/transfer_moles = (pressure_delta * internal.return_volume()) / (air_temperature * R_IDEAL_GAS_EQUATION)
+ transfer_moles = min(transfer_moles, external.total_moles() * internal.return_volume() / external.return_volume())
var/datum/gas_mixture/removed = external.remove(transfer_moles)
if(isnull(removed))
return
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm
index 81ca14a828..6188c919ac 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/portables_connector.dm
@@ -16,7 +16,7 @@
..()
var/datum/gas_mixture/air_contents = airs[1]
- air_contents.volume = 0
+ air_contents.set_volume(0)
/obj/machinery/atmospherics/components/unary/portables_connector/Destroy()
if(connected_device)
@@ -64,4 +64,4 @@
/obj/machinery/atmospherics/components/unary/portables_connector/visible/layer3
piping_layer = 3
- icon_state = "connector_map-3"
\ No newline at end of file
+ icon_state = "connector_map-3"
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
index 1d8b875528..0893d2b9e6 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm
@@ -49,10 +49,10 @@
else if(!opened && our_pressure >= open_pressure)
opened = TRUE
update_icon_nopipes()
- if(opened && air_contents.temperature > 0)
+ if(opened && air_contents.return_temperature() > 0)
var/datum/gas_mixture/environment = loc.return_air()
var/pressure_delta = our_pressure - environment.return_pressure()
- var/transfer_moles = pressure_delta*200/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
+ var/transfer_moles = pressure_delta*200/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
if(transfer_moles > 0)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
index 79ff24e8b7..2f3372462d 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/tank.dm
@@ -1,4 +1,4 @@
-#define AIR_CONTENTS ((25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature))
+#define AIR_CONTENTS ((25*ONE_ATMOSPHERE)*(air_contents.return_volume())/(R_IDEAL_GAS_EQUATION*air_contents.return_temperature()))
/obj/machinery/atmospherics/components/unary/tank
icon = 'icons/obj/atmospherics/pipes/pressure_tank.dmi'
icon_state = "generic"
@@ -15,10 +15,10 @@
/obj/machinery/atmospherics/components/unary/tank/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
- air_contents.volume = volume
- air_contents.temperature = T20C
+ air_contents.set_volume(volume)
+ air_contents.set_temperature(T20C)
if(gas_type)
- air_contents.gases[gas_type] = AIR_CONTENTS
+ air_contents.set_moles(AIR_CONTENTS)
name = "[name] ([GLOB.meta_gas_names[gas_type]])"
/obj/machinery/atmospherics/components/unary/tank/air
@@ -28,8 +28,8 @@
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
- air_contents.gases[/datum/gas/oxygen] = AIR_CONTENTS * 0.2
- air_contents.gases[/datum/gas/nitrogen] = AIR_CONTENTS * 0.8
+ air_contents.set_moles(/datum/gas/oxygen, AIR_CONTENTS * 0.2)
+ air_contents.set_moles(/datum/gas/nitrogen, AIR_CONTENTS * 0.8)
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
gas_type = /datum/gas/carbon_dioxide
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
index 1dbf067114..c6168a6c9c 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm
@@ -74,13 +74,13 @@
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = heat_capacity + air_heat_capacity
- var/old_temperature = air_contents.temperature
+ var/old_temperature = air_contents.return_temperature()
if(combined_heat_capacity > 0)
- var/combined_energy = heat_capacity * target_temperature + air_heat_capacity * air_contents.temperature
- air_contents.temperature = combined_energy/combined_heat_capacity
+ var/combined_energy = heat_capacity * target_temperature + air_heat_capacity * air_contents.return_temperature()
+ air_contents.set_temperature(combined_energy/combined_heat_capacity)
- var/temperature_delta= abs(old_temperature - air_contents.temperature)
+ var/temperature_delta= abs(old_temperature - air_contents.return_temperature())
if(temperature_delta > 1)
active_power_usage = (heat_capacity * temperature_delta) / 10 + idle_power_usage
update_parents()
@@ -142,7 +142,7 @@
data["initial"] = initial(target_temperature)
var/datum/gas_mixture/air1 = airs[1]
- data["temperature"] = air1.temperature
+ data["temperature"] = air1.return_temperature()
data["pressure"] = air1.return_pressure()
return data
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
index 9788bcb4ee..1a86898f1f 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
@@ -104,8 +104,8 @@
pressure_delta = min(pressure_delta, (air_contents.return_pressure() - internal_pressure_bound))
if(pressure_delta > 0)
- if(air_contents.temperature > 0)
- var/transfer_moles = pressure_delta*environment.volume/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
+ if(air_contents.return_temperature() > 0)
+ var/transfer_moles = pressure_delta*environment.return_volume()/(air_contents.return_temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
@@ -113,21 +113,21 @@
air_update_turf()
else // external -> internal
- var/pressure_delta = 10000
- if(pressure_checks&EXT_BOUND)
- pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
- if(pressure_checks&INT_BOUND)
- pressure_delta = min(pressure_delta, (internal_pressure_bound - air_contents.return_pressure()))
+ if(environment.return_pressure() > 0)
+ var/our_multiplier = air_contents.return_volume() / (environment.return_temperature() * R_IDEAL_GAS_EQUATION)
+ var/moles_delta = 10000 * our_multiplier
+ if(pressure_checks&EXT_BOUND)
+ moles_delta = min(moles_delta, (environment_pressure - external_pressure_bound) * environment.return_volume() / (environment.return_temperature() * R_IDEAL_GAS_EQUATION))
+ if(pressure_checks&INT_BOUND)
+ moles_delta = min(moles_delta, (internal_pressure_bound - air_contents.return_pressure()) * our_multiplier)
- if(pressure_delta > 0 && environment.temperature > 0)
- var/transfer_moles = pressure_delta * air_contents.volume / (environment.temperature * R_IDEAL_GAS_EQUATION)
+ if(moles_delta > 0)
+ var/datum/gas_mixture/removed = loc.remove_air(moles_delta)
+ if (isnull(removed)) // in space
+ return
- var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
- if (isnull(removed)) // in space
- return
-
- air_contents.merge(removed)
- air_update_turf()
+ air_contents.merge(removed)
+ air_update_turf()
update_parents()
//Radio remote control
@@ -295,7 +295,7 @@
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume/New()
..()
var/datum/gas_mixture/air_contents = airs[1]
- air_contents.volume = 1000
+ air_contents.set_volume(1000)
// mapping
diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
index 10eac9c717..025c9734ca 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_scrubber.dm
@@ -149,43 +149,29 @@
return FALSE
var/datum/gas_mixture/environment = tile.return_air()
var/datum/gas_mixture/air_contents = airs[1]
- var/list/env_gases = environment.gases
if(air_contents.return_pressure() >= 50*ONE_ATMOSPHERE)
return FALSE
if(scrubbing & SCRUBBING)
- if(length(env_gases & filter_types))
- var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
+ var/transfer_moles = min(1, volume_rate/environment.return_volume())*environment.total_moles()
- //Take a gas sample
- var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
+ //Take a gas sample
+ var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
- //Nothing left to remove from the tile
- if(isnull(removed))
- return FALSE
+ //Nothing left to remove from the tile
+ if(isnull(removed))
+ return FALSE
- var/list/removed_gases = removed.gases
+ removed.scrub_into(air_contents, filter_types)
- //Filter it
- var/datum/gas_mixture/filtered_out = new
- var/list/filtered_gases = filtered_out.gases
- filtered_out.temperature = removed.temperature
-
- for(var/gas in filter_types & removed_gases)
- filtered_gases[gas] = removed_gases[gas]
- removed_gases[gas] = 0
-
- GAS_GARBAGE_COLLECT(removed.gases)
-
- //Remix the resulting gases
- air_contents.merge(filtered_out)
- tile.assume_air(removed)
- tile.air_update_turf()
+ //Remix the resulting gases
+ tile.assume_air(removed)
+ tile.air_update_turf()
else //Just siphoning all air
- var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
+ var/transfer_moles = environment.total_moles()*(volume_rate/environment.return_volume())
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm
index 565bbb7b3c..098df67321 100644
--- a/code/modules/atmospherics/machinery/datum_pipeline.dm
+++ b/code/modules/atmospherics/machinery/datum_pipeline.dm
@@ -15,7 +15,7 @@
/datum/pipeline/Destroy()
SSair.networks -= src
- if(air && air.volume)
+ if(air && air.return_volume())
temporarily_store_air()
for(var/obj/machinery/atmospherics/pipe/P in members)
P.parent = null
@@ -76,7 +76,7 @@
possible_expansions -= borderline
- air.volume = volume
+ air.set_volume(volume)
/datum/pipeline/proc/addMachineryMember(obj/machinery/atmospherics/components/C)
other_atmosmch |= C
@@ -99,7 +99,7 @@
merge(E)
if(!members.Find(P))
members += P
- air.volume += P.volume
+ air.set_volume(air.return_volume() + P.volume)
else
A.setPipenet(src, N)
addMachineryMember(A)
@@ -107,7 +107,7 @@
/datum/pipeline/proc/merge(datum/pipeline/E)
if(E == src)
return
- air.volume += E.air.volume
+ air.set_volume(air.return_volume() + E.air.return_volume())
members.Add(E.members)
for(var/obj/machinery/atmospherics/pipe/S in E.members)
S.parent = src
@@ -139,18 +139,16 @@
for(var/obj/machinery/atmospherics/pipe/member in members)
member.air_temporary = new
- member.air_temporary.volume = member.volume
+ member.air_temporary.set_volume(member.volume)
member.air_temporary.copy_from(air)
- var/member_gases = member.air_temporary.gases
- for(var/id in member_gases)
- member_gases[id] *= member.volume/air.volume
+ member.air_temporary.multiply(member.volume/air.return_volume())
- member.air_temporary.temperature = air.temperature
+ member.air_temporary.set_temperature(air.return_temperature())
/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)
+ var/partial_heat_capacity = total_heat_capacity*(share_volume/air.return_volume())
var/target_temperature
var/target_heat_capacity
@@ -163,19 +161,19 @@
if(modeled_location.blocks_air)
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
- var/delta_temperature = air.temperature - target_temperature
+ var/delta_temperature = air.return_temperature() - target_temperature
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*target_heat_capacity/(partial_heat_capacity+target_heat_capacity))
- air.temperature -= heat/total_heat_capacity
+ air.set_temperature(air.return_temperature() - heat/total_heat_capacity)
modeled_location.TakeTemperature(heat/target_heat_capacity)
else
var/delta_temperature = 0
var/sharer_heat_capacity = 0
- delta_temperature = (air.temperature - target_temperature)
+ delta_temperature = (air.return_temperature() - target_temperature)
sharer_heat_capacity = target_heat_capacity
var/self_temperature_delta = 0
@@ -190,18 +188,18 @@
else
return 1
- air.temperature += self_temperature_delta
+ air.set_temperature(air.return_temperature() + self_temperature_delta)
modeled_location.TakeTemperature(sharer_temperature_delta)
else
if((target.heat_capacity>0) && (partial_heat_capacity>0))
- var/delta_temperature = air.temperature - target.temperature
+ var/delta_temperature = air.return_temperature() - target.return_temperature()
var/heat = thermal_conductivity*delta_temperature* \
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
- air.temperature -= heat/total_heat_capacity
+ air.set_temperature(air.return_temperature() - heat/total_heat_capacity)
update = TRUE
/datum/pipeline/proc/return_air()
@@ -242,20 +240,18 @@
for(var/i in GL)
var/datum/gas_mixture/G = i
- total_gas_mixture.volume += G.volume
+ total_gas_mixture.set_volume(total_gas_mixture.return_volume() + G.return_volume())
total_gas_mixture.merge(G)
- total_thermal_energy += THERMAL_ENERGY(G)
+ total_thermal_energy += G.thermal_energy()
total_heat_capacity += G.heat_capacity()
- total_gas_mixture.temperature = total_heat_capacity ? total_thermal_energy/total_heat_capacity : 0
+ total_gas_mixture.set_temperature(total_heat_capacity ? total_thermal_energy/total_heat_capacity : 0)
- if(total_gas_mixture.volume > 0)
+ if(total_gas_mixture.return_volume() > 0)
//Update individual gas_mixtures by volume ratio
for(var/i in GL)
var/datum/gas_mixture/G = i
G.copy_from(total_gas_mixture)
- var/list/G_gases = G.gases
- for(var/id in G_gases)
- G_gases[id] *= G.volume/total_gas_mixture.volume
+ G.multiply(G.return_volume()/total_gas_mixture.return_volume())
diff --git a/code/modules/atmospherics/machinery/other/meter.dm b/code/modules/atmospherics/machinery/other/meter.dm
index fab70cc168..c17c93ab95 100644
--- a/code/modules/atmospherics/machinery/other/meter.dm
+++ b/code/modules/atmospherics/machinery/other/meter.dm
@@ -103,7 +103,7 @@
if (target)
var/datum/gas_mixture/environment = target.return_air()
if(environment)
- . = "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)] K ([round(environment.temperature-T0C,0.01)]°C)."
+ . = "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.return_temperature(),0.01)] K ([round(environment.return_temperature()-T0C,0.01)]°C)."
else
. = "The sensor error light is blinking."
else
diff --git a/code/modules/atmospherics/machinery/other/miner.dm b/code/modules/atmospherics/machinery/other/miner.dm
index c90d388a1d..1842211fd2 100644
--- a/code/modules/atmospherics/machinery/other/miner.dm
+++ b/code/modules/atmospherics/machinery/other/miner.dm
@@ -131,8 +131,8 @@
if(!isopenturf(O))
return FALSE
var/datum/gas_mixture/merger = new
- merger.gases[spawn_id] = (spawn_mol)
- merger.temperature = spawn_temp
+ merger.set_moles(spawn_id, spawn_mol)
+ merger.set_temperature(spawn_temp)
O.assume_air(merger)
O.air_update_turf(TRUE)
diff --git a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm
index 4da053d3c8..7c170f8afc 100644
--- a/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm
+++ b/code/modules/atmospherics/machinery/pipes/heat_exchange/he_pipes.dm
@@ -28,14 +28,14 @@
if(islava(T))
environment_temperature = 5000
else if(T.blocks_air)
- environment_temperature = T.temperature
+ environment_temperature = T.return_temperature()
else
var/turf/open/OT = T
environment_temperature = OT.GetTemperature()
else
- environment_temperature = T.temperature
+ environment_temperature = T.return_temperature()
- if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
+ if(abs(environment_temperature-pipe_air.return_temperature()) > minimum_temperature_difference)
parent.temperature_interact(T, volume, thermal_conductivity)
@@ -44,11 +44,11 @@
var/hc = pipe_air.heat_capacity()
var/mob/living/heat_source = buckled_mobs[1]
//Best guess-estimate of the total bodytemperature of all the mobs, since they share the same environment it's ~ok~ to guess like this
- var/avg_temp = (pipe_air.temperature * hc + (heat_source.bodytemperature * buckled_mobs.len) * 3500) / (hc + (buckled_mobs ? buckled_mobs.len * 3500 : 0))
+ var/avg_temp = (pipe_air.return_temperature() * hc + (heat_source.bodytemperature * buckled_mobs.len) * 3500) / (hc + (buckled_mobs ? buckled_mobs.len * 3500 : 0))
for(var/m in buckled_mobs)
var/mob/living/L = m
L.bodytemperature = avg_temp
- pipe_air.temperature = avg_temp
+ pipe_air.set_temperature(avg_temp)
/obj/machinery/atmospherics/pipe/heat_exchanging/process()
if(!parent)
@@ -57,9 +57,9 @@
var/datum/gas_mixture/pipe_air = return_air()
//Heat causes pipe to glow
- if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //glow starts at 500K
- if(abs(pipe_air.temperature - icon_temperature) > 10)
- icon_temperature = pipe_air.temperature
+ if(pipe_air.return_temperature() && (icon_temperature > 500 || pipe_air.return_temperature() > 500)) //glow starts at 500K
+ if(abs(pipe_air.return_temperature() - icon_temperature) > 10)
+ icon_temperature = pipe_air.return_temperature()
var/h_r = heat2colour_r(icon_temperature)
var/h_g = heat2colour_g(icon_temperature)
@@ -76,7 +76,7 @@
//burn any mobs buckled based on temperature
if(has_buckled_mobs())
var/heat_limit = 1000
- if(pipe_air.temperature > heat_limit + 1)
+ if(pipe_air.return_temperature() > heat_limit + 1)
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
- buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BODY_ZONE_CHEST)
+ buckled_mob.apply_damage(4 * log(pipe_air.return_temperature() - heat_limit), BURN, BODY_ZONE_CHEST)
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 3d969e1a77..12ba7e79b9 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -205,14 +205,14 @@
/obj/machinery/portable_atmospherics/canister/proc/create_gas()
if(gas_type)
if(starter_temp)
- air_contents.temperature = starter_temp
- air_contents.gases[gas_type] = (maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
+ air_contents.set_temperature(starter_temp)
+ air_contents.set_moles(gas_type,(maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
if(starter_temp)
- air_contents.temperature = starter_temp
+ air_contents.set_temperature(starter_temp)
/obj/machinery/portable_atmospherics/canister/air/create_gas()
- air_contents.gases[/datum/gas/oxygen] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
- air_contents.gases[/datum/gas/nitrogen] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
+ air_contents.set_moles(/datum/gas/oxygen, (O2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
+ air_contents.set_moles(/datum/gas/nitrogen, (N2STANDARD * maximum_pressure * filled) * air_contents.return_volume() / (R_IDEAL_GAS_EQUATION * air_contents.return_temperature()))
/obj/machinery/portable_atmospherics/canister/update_icon_state()
if(stat & BROKEN)
@@ -401,8 +401,8 @@ obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/ite
logmsg = "Valve was opened by [key_name(usr)], starting a transfer into \the [holding || "air"].
"
if(!holding)
var/list/danger = list()
- for(var/id in air_contents.gases)
- var/gas = air_contents.gases[id]
+ for(var/id in air_contents.get_gases())
+ var/gas = air_contents.get_moles(id)
if(!GLOB.meta_gas_dangers[id])
continue
if(gas > (GLOB.meta_gas_visibility[id] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
index 952db8315a..445cc686f3 100644
--- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
+++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
@@ -18,9 +18,8 @@
..()
SSair.atmos_machinery += src
- air_contents = new
- air_contents.volume = volume
- air_contents.temperature = T20C
+ air_contents = new(volume)
+ air_contents.set_temperature(T20C)
return 1
diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm
index 11dd4c5a60..7f1dc4d20f 100644
--- a/code/modules/atmospherics/machinery/portable/pump.dm
+++ b/code/modules/atmospherics/machinery/portable/pump.dm
@@ -116,8 +116,8 @@
if("power")
on = !on
if(on && !holding)
- var/plasma = air_contents.gases[/datum/gas/plasma]
- var/n2o = air_contents.gases[/datum/gas/nitrous_oxide]
+ var/plasma = air_contents.get_moles(/datum/gas/plasma)
+ var/n2o = air_contents.get_moles(/datum/gas/nitrous_oxide)
if(n2o || plasma)
message_admins("[ADMIN_LOOKUPFLW(usr)] turned on a pump that contains [n2o ? "N2O" : ""][n2o && plasma ? " & " : ""][plasma ? "Plasma" : ""] at [ADMIN_VERBOSEJMP(src)]")
log_admin("[key_name(usr)] turned on a pump that contains [n2o ? "N2O" : ""][n2o && plasma ? " & " : ""][plasma ? "Plasma" : ""] at [AREACOORD(src)]")
diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm
index f4556750c8..bc703b8bbd 100644
--- a/code/modules/atmospherics/machinery/portable/scrubber.dm
+++ b/code/modules/atmospherics/machinery/portable/scrubber.dm
@@ -42,20 +42,13 @@
scrub(T.return_air())
/obj/machinery/portable_atmospherics/scrubber/proc/scrub(var/datum/gas_mixture/mixture)
- var/transfer_moles = min(1, volume_rate / mixture.volume) * mixture.total_moles()
+ var/transfer_moles = min(1, volume_rate / mixture.return_volume()) * mixture.total_moles()
var/datum/gas_mixture/filtering = mixture.remove(transfer_moles) // Remove part of the mixture to filter.
- var/datum/gas_mixture/filtered = new
if(!filtering)
return
- filtered.temperature = filtering.temperature
- for(var/gas in filtering.gases & scrubbing)
- filtered.gases[gas] = filtering.gases[gas] // Shuffle the "bad" gasses to the filtered mixture.
- filtering.gases[gas] = 0
- GAS_GARBAGE_COLLECT(filtering.gases)
-
- air_contents.merge(filtered) // Store filtered out gasses.
+ filtering.scrub_into(air_contents,scrubbing)
mixture.merge(filtering) // Returned the cleaned gas.
if(!holding)
air_update_turf()
diff --git a/code/modules/cargo/bounties/engineering.dm b/code/modules/cargo/bounties/engineering.dm
index 99e6aa2bdc..b84fd2ca2c 100644
--- a/code/modules/cargo/bounties/engineering.dm
+++ b/code/modules/cargo/bounties/engineering.dm
@@ -10,9 +10,7 @@
if(!..())
return FALSE
var/obj/item/tank/T = O
- if(!T.air_contents.gases[gas_type])
- return FALSE
- return T.air_contents.gases[gas_type] >= moles_required
+ return T.air_contents.get_moles(gas_type) >= moles_required
//datum/bounty/item/engineering/gas/nitryl_tank
// name = "Full Tank of Nitryl"
diff --git a/code/modules/cargo/exports/large_objects.dm b/code/modules/cargo/exports/large_objects.dm
index 695dab8133..2943130a19 100644
--- a/code/modules/cargo/exports/large_objects.dm
+++ b/code/modules/cargo/exports/large_objects.dm
@@ -169,15 +169,13 @@
/datum/export/large/gas_canister/get_cost(obj/O)
var/obj/machinery/portable_atmospherics/canister/C = O
var/worth = 10
- var/gases = C.air_contents.gases
-
- worth += gases[/datum/gas/bz]*3
- worth += gases[/datum/gas/stimulum]*25
- worth += gases[/datum/gas/hypernoblium]*1000
- worth += gases[/datum/gas/miasma]*2
- worth += gases[/datum/gas/tritium]*7
- worth += gases[/datum/gas/pluoxium]*6
- worth += gases[/datum/gas/nitryl]*30
+ worth += C.air_contents.get_moles(/datum/gas/bz)*3
+ worth += C.air_contents.get_moles(/datum/gas/stimulum)*25
+ worth += C.air_contents.get_moles(/datum/gas/hypernoblium)*1000
+ worth += C.air_contents.get_moles(/datum/gas/miasma)*2
+ worth += C.air_contents.get_moles(/datum/gas/tritium)*7
+ worth += C.air_contents.get_moles(/datum/gas/pluoxium)*6
+ worth += C.air_contents.get_moles(/datum/gas/nitryl)*30
return worth
diff --git a/code/modules/cargo/exports/sheets.dm b/code/modules/cargo/exports/sheets.dm
index 120bfbe5e4..a562210164 100644
--- a/code/modules/cargo/exports/sheets.dm
+++ b/code/modules/cargo/exports/sheets.dm
@@ -155,3 +155,10 @@
cost = 30
message = "of paperframes"
export_types = list(/obj/item/stack/sheet/paperframes)
+
+/datum/export/stack/telecrystal
+ unit_name = "raw"
+ cost = 1000
+ message = "telecrystals"
+ export_types = list(/obj/item/stack/telecrystal)
+
diff --git a/code/modules/cargo/packs/costumes_toys.dm b/code/modules/cargo/packs/costumes_toys.dm
index c181d6fb74..08f9a927c6 100644
--- a/code/modules/cargo/packs/costumes_toys.dm
+++ b/code/modules/cargo/packs/costumes_toys.dm
@@ -301,3 +301,36 @@
/obj/item/clothing/head/wizard/fake)
crate_name = "wizard costume crate"
crate_type = /obj/structure/closet/crate/wooden
+
+/datum/supply_pack/costumes_toys/wedding
+ name = "Wedding Crate"
+ desc = "Tie the knot IN SPACE! Hold your own extravagant wedding with this crate of suits and bridal gowns. Complete with champagne, cake, and the luxurious cost you would expect for an event to remember."
+ cost = 10000 // weddings are absurdly expensive and so is this crate
+ contains = list(/obj/item/clothing/under/suit/black_really, //we don't actually need suits since you can vend them but the crate should feel "complete"
+ /obj/item/clothing/under/suit/black_really,
+ /obj/item/clothing/under/suit/charcoal,
+ /obj/item/clothing/under/suit/charcoal,
+ /obj/item/clothing/under/suit/navy,
+ /obj/item/clothing/under/suit/navy,
+ /obj/item/clothing/under/suit/burgundy,
+ /obj/item/clothing/under/suit/burgundy, // A pair of each "fancy suit" color for variety
+ /obj/item/clothing/under/suit/white,
+ /obj/item/clothing/under/suit/white, // white is a weird color for a groom but some people are weird
+ /obj/item/clothing/under/suit/polychromic,
+ /obj/item/clothing/under/suit/polychromic, // in case you can't be satisfied with the most fitting choices, of course.
+ /obj/item/clothing/under/dress/wedding,
+ /obj/item/clothing/under/dress/wedding, // this is what you actually bought the crate for. You can't get these anywhere else.
+ /obj/item/clothing/under/dress/wedding/orange,
+ /obj/item/clothing/under/dress/wedding/orange,
+ /obj/item/clothing/under/dress/wedding/purple,
+ /obj/item/clothing/under/dress/wedding/purple,
+ /obj/item/clothing/under/dress/wedding/blue,
+ /obj/item/clothing/under/dress/wedding/blue,
+ /obj/item/clothing/under/dress/wedding/red,
+ /obj/item/clothing/under/dress/wedding/red, // two of each
+ /obj/item/reagent_containers/food/drinks/bottle/champagne, //appropriate booze for a wedding
+ /obj/item/reagent_containers/food/snacks/store/cake/vanilla_cake, // we don't have a full wedding cake but this will do
+ /obj/item/storage/fancy/ringbox/silver,
+ /obj/item/storage/fancy/ringbox/silver) //diamond rings cost the same price as this crate via cargo so we're not giving you two for free. Wedding rings are traditionally less valuable anyway.
+ crate_name = "wedding crate"
+
diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm
index 7f670e756f..7f1ba86ff5 100644
--- a/code/modules/client/client_defines.dm
+++ b/code/modules/client/client_defines.dm
@@ -119,6 +119,8 @@
/// Messages currently seen by this client
var/list/seen_messages
+ ///A lazy list of atoms we've examined in the last EXAMINE_MORE_TIME (default 1.5) seconds, so that we will call [atom/proc/examine_more()] instead of [atom/proc/examine()] on them when examining
+ var/list/recent_examines
///When was the last time we warned them about not cryoing without an ahelp, set to -5 minutes so that rounstart cryo still warns
var/cryo_warned = -5 MINUTES
diff --git a/code/modules/emoji/emoji_parse.dm b/code/modules/emoji/emoji_parse.dm
index 65e8063ce0..33d32227e1 100644
--- a/code/modules/emoji/emoji_parse.dm
+++ b/code/modules/emoji/emoji_parse.dm
@@ -2,7 +2,8 @@
. = text
if(!CONFIG_GET(flag/emojis))
return
- var/static/list/emojis = icon_states(icon('icons/emoji.dmi'))
+ var/list/emojis = icon_states(icon('icons/emoji.dmi'))
+ emojis |= icon_states(icon('icons/emoji_32.dmi'))
var/parsed = ""
var/pos = 1
var/search = 0
@@ -18,7 +19,7 @@
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/goonchat)
var/tag = sheet.icon_tag("emoji-[emoji]")
if(tag)
- parsed += tag
+ parsed += "[tag]" //evil way of enforcing 16x16
pos = search + length(text[pos])
else
parsed += copytext(text, pos, search)
@@ -34,7 +35,8 @@
. = text
if(!CONFIG_GET(flag/emojis))
return
- var/static/list/emojis = icon_states(icon('icons/emoji.dmi'))
+ var/list/emojis = icon_states(icon('icons/emoji.dmi'))
+ emojis |= icon_states(icon('icons/emoji_32.dmi'))
var/final = "" //only tags are added to this
var/pos = 1
var/search = 0
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index c592e06e0e..a17df4db9a 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -171,10 +171,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- if(!GM.gases[/datum/gas/oxygen])
- return
- GM.gases[/datum/gas/oxygen] = max(GM.gases[/datum/gas/oxygen] - severity * holder.energy, 0)
- GAS_GARBAGE_COLLECT(GM.gases)
+ GM.set_moles(/datum/gas/oxygen, max(GM.get_moles(/datum/gas/oxygen) - severity * holder.energy, 0))
/datum/spacevine_mutation/nitro_eater
name = "nitrogen consuming"
@@ -186,10 +183,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- if(!GM.gases[/datum/gas/nitrogen])
- return
- GM.gases[/datum/gas/nitrogen] = max(GM.gases[/datum/gas/nitrogen] - severity * holder.energy, 0)
- GAS_GARBAGE_COLLECT(GM.gases)
+ GM.set_moles(/datum/gas/nitrogen, max(GM.get_moles(/datum/gas/nitrogen) - severity * holder.energy, 0))
/datum/spacevine_mutation/carbondioxide_eater
name = "CO2 consuming"
@@ -201,10 +195,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- if(!GM.gases[/datum/gas/carbon_dioxide])
- return
- GM.gases[/datum/gas/carbon_dioxide] = max(GM.gases[/datum/gas/carbon_dioxide] - severity * holder.energy, 0)
- GAS_GARBAGE_COLLECT(GM.gases)
+ GM.set_moles(/datum/gas/carbon_dioxide, max(GM.get_moles(/datum/gas/carbon_dioxide) - severity * holder.energy, 0))
/datum/spacevine_mutation/plasma_eater
name = "toxins consuming"
@@ -216,10 +207,7 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
- if(!GM.gases[/datum/gas/plasma])
- return
- GM.gases[/datum/gas/plasma] = max(GM.gases[/datum/gas/plasma] - severity * holder.energy, 0)
- GAS_GARBAGE_COLLECT(GM.gases)
+ GM.set_moles(/datum/gas/plasma, max(GM.get_moles(/datum/gas/plasma) - severity * holder.energy, 0))
/datum/spacevine_mutation/thorns
name = "thorny"
diff --git a/code/modules/events/wisdomcow.dm b/code/modules/events/wisdomcow.dm
index 4a50ccb306..553dd8f309 100644
--- a/code/modules/events/wisdomcow.dm
+++ b/code/modules/events/wisdomcow.dm
@@ -2,7 +2,7 @@
name = "Wisdom cow"
typepath = /datum/round_event/wisdomcow
max_occurrences = 1
- weight = 20
+ weight = 10
/datum/round_event/wisdomcow/announce(fake)
priority_announce("A wise cow has been spotted in the area. Be sure to ask for her advice.", "Nanotrasen Cow Ranching Agency")
diff --git a/code/modules/goonchat/browserOutput.dm b/code/modules/goonchat/browserOutput.dm
index 6d9e141309..ce27dccb74 100644
--- a/code/modules/goonchat/browserOutput.dm
+++ b/code/modules/goonchat/browserOutput.dm
@@ -2,18 +2,30 @@
For the main html chat area
*********************************/
-//Precaching a bunch of shit
+/// Should match the value set in the browser js
+#define MAX_COOKIE_LENGTH 5
+
+//Precaching a bunch of shit. Someone ship this out of here
GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of icons for the browser output
-//On client, created on login
+//lazy renaming to chat_output, instead renamed to old chatOutput
+/**
+ * The chatOutput datum exists to handle the goonchat browser.
+ * On client, created on Client/New()
+ */
/datum/chatOutput
- var/client/owner //client ref
+ /// The client that owns us.
+ var/client/owner
+ /// How many times client data has been checked
var/total_checks = 0
- var/last_check = 0
- var/loaded = FALSE // Has the client loaded the browser output area?
- var/list/messageQueue //If they haven't loaded chat, this is where messages will go until they do
- var/cookieSent = FALSE // Has the client sent a cookie for analysis
- var/broken = FALSE
+ /// When to next clear the client data checks counter
+ var/next_time_to_clear = 0
+ /// Has the client loaded the browser output area?
+ var/loaded = FALSE
+ /// If they haven't loaded chat, this is where messages will go until they do
+ var/list/messageQueue
+ var/cookieSent = FALSE // Has the client sent a cookie for analysis
+ var/broken = FALSE
var/list/connectionHistory //Contains the connection history passed from chat cookie
var/adminMusicVolume = 25 //This is for the Play Global Sound verb
@@ -22,13 +34,18 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
messageQueue = list()
connectionHistory = list()
+/**
+ * start: Tries to load the chat browser
+ * Aborts if a problem is encountered.
+ * Async because this is called from Client/New.
+ */
/datum/chatOutput/proc/start()
+ set waitfor = FALSE
//Check for existing chat
if(!owner)
return FALSE
if(!winexists(owner, "browseroutput")) // Oh goddamnit.
- set waitfor = FALSE
broken = TRUE
message_admins("Couldn't start chat for [key_name_admin(owner)]!")
. = FALSE
@@ -43,6 +60,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
return TRUE
+/// Loads goonchat and sends assets.
/datum/chatOutput/proc/load()
set waitfor = FALSE
if(!owner)
@@ -53,6 +71,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
owner << browse(file('code/modules/goonchat/browserassets/html/browserOutput.html'), "window=browseroutput")
+/// Interprets input from the client. Will send data back if required.
/datum/chatOutput/Topic(href, list/href_list)
if(usr.client != owner)
return TRUE
@@ -83,20 +102,22 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
if("setMusicVolume")
data = setMusicVolume(arglist(params))
-
if("colorPresetPost") //User just swapped color presets in their goonchat preferences. Do we do anything else?
switch(href_list["preset"])
if("light")
owner.force_white_theme()
if("dark" || "normal")
owner.force_dark_theme()
-
+ // if("swaptodarkmode")
+ // swaptodarkmode()
+ // if("swaptolightmode")
+ // swaptolightmode()
if(data)
ehjax_send(data = data)
-//Called on chat output done-loading by JS.
+/// Called on chat output done-loading by JS.
/datum/chatOutput/proc/doneLoading()
if(loaded)
return
@@ -113,34 +134,75 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
messageQueue = null
sendClientData()
+ syncRegex()
+
//do not convert to to_chat()
SEND_TEXT(owner, "Failed to load fancy chat, reverting to old chat. Certain features won't work.")
+/// Hides the standard output and makes the browser visible.
/datum/chatOutput/proc/showChat()
winset(owner, "output", "is-visible=false")
winset(owner, "browseroutput", "is-disabled=false;is-visible=true")
+/// Calls syncRegex on all currently owned chatOutput datums
+/proc/syncChatRegexes()
+ for (var/user in GLOB.clients)
+ var/client/C = user
+ var/datum/chatOutput/Cchat = C.chatOutput
+ if (Cchat && !Cchat.broken && Cchat.loaded)
+ Cchat.syncRegex()
+
+/// Used to dynamically add regexes to the browser output. Currently only used by the IC filter.
+/datum/chatOutput/proc/syncRegex()
+ var/list/regexes = list()
+ /*
+ if (config.ic_filter_regex)
+ regexes["show_filtered_ic_chat"] = list(
+ config.ic_filter_regex.name,
+ "ig",
+ "$1"
+ )
+ */
+ if (regexes.len)
+ ehjax_send(data = list("syncRegex" = regexes))
+
+/// Sends json encoded data to the browser.
/datum/chatOutput/proc/ehjax_send(client/C = owner, window = "browseroutput", data)
if(islist(data))
data = json_encode(data)
C << output("[data]", "[window]:ehjaxCallback")
-/datum/chatOutput/proc/sendMusic(music, pitch)
+/**
+ * Sends music data to the browser. If enabled by the browser, it will start playing.
+ * Arguments:
+ * music must be a https adress.
+ * extra_data is a list. The keys "pitch", "start" and "end" are used.
+ ** "pitch" determines the playback rate
+ ** "start" determines the start time of the sound
+ ** "end" determines when the musics stops playing
+ */
+/datum/chatOutput/proc/sendMusic(music, pitch, list/extra_data) //someone remove pitch
if(!findtext(music, GLOB.is_http_protocol))
return
var/list/music_data = list("adminMusic" = url_encode(url_encode(music)))
- if(pitch)
- music_data["musicRate"] = pitch
+
+ if(extra_data?.len)
+ music_data["musicRate"] = extra_data["pitch"] || pitch
+ music_data["musicSeek"] = extra_data["start"]
+ music_data["musicHalt"] = extra_data["end"]
+
ehjax_send(data = music_data)
+/// Stops music playing throw the browser.
/datum/chatOutput/proc/stopMusic()
ehjax_send(data = "stopMusic")
+/// Setter for adminMusicVolume. Sanitizes the value to between 0 and 100.
/datum/chatOutput/proc/setMusicVolume(volume = "")
if(volume)
adminMusicVolume = clamp(text2num(volume), 0, 100)
-//Sends client connection details to the chat to handle and save
+/// Sends client connection details to the chat to handle and save
/datum/chatOutput/proc/sendClientData()
//Get dem deets
var/list/deets = list("clientData" = list())
@@ -150,11 +212,11 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
var/data = json_encode(deets)
ehjax_send(data = data)
-//Called by client, sent data to investigate (cookie history so far)
+/// Called by client, sent data to investigate (cookie history so far)
/datum/chatOutput/proc/analyzeClientData(cookie = "")
//Spam check
- if(world.time > last_check + (3 SECONDS))
- last_check = world.time
+ if(world.time > next_time_to_clear)
+ next_time_to_clear = world.time + (3 SECONDS)
total_checks = 0
total_checks += 1
@@ -172,12 +234,13 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
if (connData && islist(connData) && connData.len > 0 && connData["connData"])
connectionHistory = connData["connData"] //lol fuck
var/list/found = new()
- if(connectionHistory.len > 5)
+
+ if(connectionHistory.len > MAX_COOKIE_LENGTH)
message_admins("[key_name(src.owner)] was kicked for an invalid ban cookie)")
qdel(owner)
return
- for(var/i in min(connectionHistory.len, 5) to 1 step -1)
+ for(var/i in connectionHistory.len to 1 step -1)
if(QDELETED(owner))
//he got cleaned up before we were done
return
@@ -191,45 +254,33 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
//Uh oh this fucker has a history of playing on a banned account!!
if (found.len > 0)
- //TODO: add a new evasion ban for the CURRENT client details, using the matched row details
message_admins("[key_name(src.owner)] has a cookie from a banned account! (Matched: [found["ckey"]], [found["ip"]], [found["compid"]])")
log_admin_private("[key_name(owner)] has a cookie from a banned account! (Matched: [found["ckey"]], [found["ip"]], [found["compid"]])")
cookieSent = TRUE
-//Called by js client every 60 seconds
+/// Called by js client every 60 seconds
/datum/chatOutput/proc/ping()
return "pong"
-//Called by js client on js error
+/// Called by js client on js error
/datum/chatOutput/proc/debug(error)
log_world("\[[time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")]\] Client: [(src.owner.key ? src.owner.key : src.owner)] triggered JS error: [error]")
-//Global chat procs
-/proc/to_chat_immediate(target, message, handle_whitespace=TRUE)
+/// Global chat proc. to_chat_immediate will circumvent SSchat and send data as soon as possible.
+/proc/to_chat_immediate(target, message, handle_whitespace = TRUE, trailing_newline = TRUE, confidential = FALSE)
if(!target || !message)
return
- //Ok so I did my best but I accept that some calls to this will be for shit like sound and images
- //It stands that we PROBABLY don't want to output those to the browser output so just handle them here
- if (istype(target, /savefile))
- CRASH("Invalid message! [message]")
-
- if(!istext(message))
- if (istype(message, /image) || istype(message, /sound))
- CRASH("Invalid message! [message]")
- return
-
if(target == world)
target = GLOB.clients
var/original_message = message
- //Some macros remain in the string even after parsing and fuck up the eventual output
- message = replacetext(message, "\improper", "")
- message = replacetext(message, "\proper", "")
if(handle_whitespace)
message = replacetext(message, "\n", "
")
- message = replacetext(message, "\t", "[FOURSPACES][FOURSPACES]")
+ message = replacetext(message, "\t", "[FOURSPACES][FOURSPACES]") //EIGHT SPACES IN TOTAL!!
+ if(trailing_newline)
+ message += "
"
if(islist(target))
// Do the double-encoding outside the loop to save nanoseconds
@@ -272,14 +323,19 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico
// url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript.
C << output(url_encode(url_encode(message)), "browseroutput:output")
-/proc/to_chat(target, message, handle_whitespace = TRUE)
+/// Sends a text message to the target.
+/proc/to_chat(target, message, handle_whitespace = TRUE, trailing_newline = TRUE, confidential = FALSE)
if(Master.current_runlevel == RUNLEVEL_INIT || !SSchat?.initialized)
- to_chat_immediate(target, message, handle_whitespace)
+ to_chat_immediate(target, message, handle_whitespace, trailing_newline, confidential)
return
- SSchat.queue(target, message, handle_whitespace)
+ SSchat.queue(target, message, handle_whitespace, trailing_newline, confidential)
-/datum/chatOutput/proc/swaptolightmode() //Dark mode light mode stuff. Yell at KMC if this breaks! (See darkmode.dm for documentation)
+/// Dark mode light mode stuff. Yell at KMC if this breaks! (See darkmode.dm for documentation)
+/datum/chatOutput/proc/swaptolightmode()
owner.force_white_theme()
+/// Light mode stuff. (See darkmode.dm for documentation)
/datum/chatOutput/proc/swaptodarkmode()
owner.force_dark_theme()
+
+#undef MAX_COOKIE_LENGTH
diff --git a/code/modules/goonchat/browserassets/html/browserOutput.html b/code/modules/goonchat/browserassets/html/browserOutput.html
index 0acb127517..ce51cd8de8 100644
--- a/code/modules/goonchat/browserassets/html/browserOutput.html
+++ b/code/modules/goonchat/browserassets/html/browserOutput.html
@@ -38,10 +38,10 @@