diff --git a/.github/workflows/build_rust.yml b/.github/workflows/build_rust.yml
index 6039d640df8e..ea3cf500eab5 100644
--- a/.github/workflows/build_rust.yml
+++ b/.github/workflows/build_rust.yml
@@ -72,7 +72,7 @@ jobs:
rustup target add i686-pc-windows-gnu
sudo dpkg --add-architecture i386
sudo apt-get update
- sudo apt-get install zlib1g-dev:i386 lib32gcc-11-dev mingw-w64 mingw-w64-i686-dev
+ sudo apt-get install zlib1g-dev:i386 lib32gcc-13-dev mingw-w64 mingw-w64-i686-dev
# Build it.
cargo build --release --target i686-unknown-linux-gnu
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 20ca21d4a900..11b5bc952837 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -104,7 +104,7 @@ jobs:
'/datum/map/cerestation',
'/datum/map/emeraldstation',
]
- byondtype: ['STABLE']
+ byondtype: ['STABLE', 'BETA']
services:
mariadb:
image: mariadb:latest
diff --git a/_build_dependencies.sh b/_build_dependencies.sh
index 552b2f4d155c..480502ecd419 100644
--- a/_build_dependencies.sh
+++ b/_build_dependencies.sh
@@ -8,9 +8,9 @@ export STABLE_BYOND_MAJOR=515
# Stable Byond Minor
export STABLE_BYOND_MINOR=1633
# Beta Byond Major - Uncomment and update if beta cycle active
-#export BETA_BYOND_MAJOR=515
+export BETA_BYOND_MAJOR=516
# Beta Byond Minor - Uncomment and update if beta cycle active
-#export BETA_BYOND_MINOR=1633
+export BETA_BYOND_MINOR=1648
# Python version for mapmerge and other tools
export PYTHON_VERSION=3.11.6
# RUSTG version
diff --git a/_maps/__MAP_DEFINES.dm b/_maps/__MAP_DEFINES.dm
index f006f823bd78..8f55a0aea114 100644
--- a/_maps/__MAP_DEFINES.dm
+++ b/_maps/__MAP_DEFINES.dm
@@ -29,6 +29,8 @@
#define SPAWN_RUINS "Spawn Ruins"
/// A level that can be navigated to through space, but for real this time.
#define REACHABLE_SPACE_ONLY "Reachable Space Only"
+ /// A level used for spawning map areas in tests
+ #define GAME_TEST_LEVEL "Game Test Level"
// Level names
#define MAIN_STATION "Main Station"
diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_greed.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_greed.dmm
index b701d975b9d8..2b6384947624 100644
--- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_greed.dmm
+++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_greed.dmm
@@ -14,7 +14,7 @@
/area/ruin/powered/greed)
"e" = (
/obj/structure/table/wood/poker,
-/obj/item/gun/projectile/revolver/russian/soul,
+/obj/item/toy/russian_revolver/soul,
/obj/machinery/light/small{
dir = 1
},
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/debris1.dmm b/_maps/map_files/RandomRuins/SpaceRuins/debris1.dmm
index 160a2e7dc741..354deb775f47 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/debris1.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/debris1.dmm
@@ -43,7 +43,7 @@
/turf/template_noop,
/area/template_noop)
"ao" = (
-/obj/random/tool,
+/obj/effect/spawner/random/engineering/tools,
/turf/template_noop,
/area/template_noop)
"ap" = (
@@ -85,7 +85,7 @@
/turf/simulated/floor/plating/airless,
/area/template_noop)
"aG" = (
-/obj/random/toolbox,
+/obj/effect/spawner/random/engineering/toolbox,
/turf/simulated/floor/plating/burnt/airless,
/area/template_noop)
"aI" = (
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/debris3.dmm b/_maps/map_files/RandomRuins/SpaceRuins/debris3.dmm
index e4796d69108f..419dbd23ad01 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/debris3.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/debris3.dmm
@@ -36,7 +36,7 @@
/turf/template_noop,
/area/template_noop)
"k" = (
-/obj/random/plushie,
+/obj/effect/spawner/random/plushies,
/turf/template_noop,
/area/template_noop)
"l" = (
@@ -83,7 +83,7 @@
/turf/simulated/floor/plating/damaged/airless,
/area/template_noop)
"A" = (
-/obj/random/tool,
+/obj/effect/spawner/random/engineering/tools,
/turf/template_noop,
/area/template_noop)
"B" = (
@@ -95,7 +95,7 @@
/turf/template_noop,
/area/template_noop)
"F" = (
-/obj/random/tool,
+/obj/effect/spawner/random/engineering/tools,
/turf/simulated/floor/plating/damaged/airless,
/area/template_noop)
"G" = (
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm b/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm
index 4435ee1f2c52..a57154509b6a 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/derelict5.dmm
@@ -172,7 +172,7 @@
/area/ruin/space/unpowered)
"xQ" = (
/obj/structure/table,
-/obj/item/gun/projectile/revolver/russian,
+/obj/item/toy/russian_revolver,
/turf/simulated/floor/plasteel,
/area/ruin/space/unpowered)
"yq" = (
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm b/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm
index 4c19b607278f..f63dd9362487 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm
@@ -19,11 +19,7 @@
/turf/simulated/floor/engine,
/area/ruin/unpowered/bmp_ship/delta)
"af" = (
-/obj/machinery/porta_turret{
- installation = /obj/item/gun/energy/gun;
- lethal = 1;
- name = "ship defense turret"
- },
+/obj/machinery/porta_turret/meatpacker_ship,
/turf/simulated/floor/engine,
/area/ruin/unpowered/bmp_ship/delta)
"ag" = (
@@ -1827,12 +1823,7 @@
/turf/simulated/floor/plasteel,
/area/ruin/unpowered/bmp_ship/aft)
"go" = (
-/obj/machinery/porta_turret{
- check_synth = 1;
- installation = /obj/item/gun/energy/gun;
- lethal = 1;
- name = "ship defense turret"
- },
+/obj/machinery/porta_turret/meatpacker_ship,
/turf/simulated/floor/engine,
/area/ruin/unpowered/bmp_ship/fore)
"gp" = (
@@ -2118,12 +2109,7 @@
/turf/simulated/floor/engine,
/area/ruin/unpowered/bmp_ship/aft)
"hp" = (
-/obj/machinery/porta_turret{
- check_synth = 1;
- installation = /obj/item/gun/energy/gun;
- lethal = 1;
- name = "ship defense turret"
- },
+/obj/machinery/porta_turret/meatpacker_ship,
/turf/simulated/floor/engine,
/area/ruin/unpowered/bmp_ship/aft)
"hq" = (
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm b/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm
index dea5f39dc337..525d34dae908 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/moonoutpost19.dmm
@@ -9964,7 +9964,7 @@
pixel_y = 7;
pixel_x = -3
},
-/obj/item/clothing/accessory/horrible{
+/obj/item/clothing/neck/tie/horrible{
pixel_y = -2;
pixel_x = 2
},
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm
index bf7c80ce1d9a..af97fb7f18aa 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm
@@ -1127,7 +1127,7 @@
icon_state = "0-8"
},
/obj/structure/closet/crate/medical,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/healthanalyzer,
/obj/item/reagent_containers/iv_bag/blood/o_minus,
/obj/item/reagent_containers/iv_bag/blood/o_minus,
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm b/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm
index bb84e387a3f0..e72adf279475 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/spacebar.dmm
@@ -223,7 +223,7 @@
},
/area/ruin/space/powered/bar)
"aY" = (
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/stack/medical/bruise_pack/advanced,
/obj/item/scalpel,
/obj/structure/table,
@@ -323,7 +323,7 @@
/area/ruin/space/powered/bar)
"bn" = (
/obj/effect/mapping_helpers/turfs/damage,
-/obj/item/stack/tile/mineral,
+/obj/item/stack/tile/plasteel,
/turf/simulated/floor/plating,
/area/ruin/space/powered/bar)
"bo" = (
@@ -484,7 +484,7 @@
/turf/simulated/floor/plating/asteroid/ancient,
/area/space/nearstation)
"pb" = (
-/obj/item/stack/tile/mineral,
+/obj/item/stack/tile/plasteel,
/obj/machinery/door_control{
id = "SpaceBar";
name = "Public Shutters";
@@ -895,7 +895,7 @@
/area/ruin/space/powered)
"QU" = (
/obj/effect/mapping_helpers/turfs/damage,
-/obj/item/stack/tile/mineral,
+/obj/item/stack/tile/plasteel,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
@@ -949,7 +949,7 @@
},
/area/ruin/space/powered/bar)
"VR" = (
-/obj/item/stack/tile/mineral,
+/obj/item/stack/tile/plasteel,
/turf/simulated/floor/plating,
/area/ruin/space/powered/bar)
"VU" = (
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/syndie_space_base.dmm b/_maps/map_files/RandomRuins/SpaceRuins/syndie_space_base.dmm
index 843dad6c0147..8a778e8388e2 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/syndie_space_base.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/syndie_space_base.dmm
@@ -3435,7 +3435,7 @@
},
/area/ruin/unpowered/syndicate_space_base/storage)
"uy" = (
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/turf/simulated/floor/plasteel{
dir = 4;
icon_state = "darkred"
@@ -7950,7 +7950,7 @@
/obj/item/storage/belt/medical,
/obj/item/crowbar,
/obj/item/clothing/glasses/hud/health,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/structure/table,
/turf/simulated/floor/plasteel{
icon_state = "whiteblue"
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm b/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm
index d6fe33d80a74..0fef45873213 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/syndiecakesfactory.dmm
@@ -551,7 +551,7 @@
/area/ruin/space/syndicakefactory)
"uU" = (
/obj/structure/rack,
-/obj/random/tool,
+/obj/effect/spawner/random/engineering/tools,
/turf/simulated/floor/engine,
/area/ruin/space/syndicakefactory)
"vo" = (
diff --git a/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm b/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm
index afa2641c1ef1..72b05081d8cc 100644
--- a/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm
+++ b/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm
@@ -3173,7 +3173,7 @@
},
/area/ruin/space/derelict/crew_quarters)
"iq" = (
-/obj/item/stack/tile,
+/obj/item/stack/tile/plasteel,
/turf/template_noop,
/area/space/nearstation)
"ir" = (
@@ -5147,7 +5147,7 @@
},
/area/ruin/space/derelict/arrival)
"nM" = (
-/obj/item/stack/tile,
+/obj/item/stack/tile/plasteel,
/turf/simulated/floor/plating/airless,
/area/ruin/space/derelict/hallway/primary)
"nN" = (
@@ -5344,7 +5344,7 @@
},
/area/ruin/space/derelict/crew_quarters)
"on" = (
-/obj/item/stack/tile,
+/obj/item/stack/tile/plasteel,
/turf/template_noop,
/area/ruin/space/derelict/arrival)
"op" = (
diff --git a/_maps/map_files/generic/Lavaland.dmm b/_maps/map_files/generic/Lavaland.dmm
index f5f407d79ccf..0356b3cf14b1 100644
--- a/_maps/map_files/generic/Lavaland.dmm
+++ b/_maps/map_files/generic/Lavaland.dmm
@@ -1416,7 +1416,7 @@
/area/mine/outpost/hallway/west)
"dU" = (
/obj/structure/rack,
-/obj/random/tool,
+/obj/effect/spawner/random/engineering/tools,
/turf/simulated/floor/plating,
/area/mine/outpost/maintenance/south)
"dV" = (
diff --git a/_maps/map_files/generic/centcomm.dmm b/_maps/map_files/generic/centcomm.dmm
index 41ef9d6a4b42..74893a0466a7 100644
--- a/_maps/map_files/generic/centcomm.dmm
+++ b/_maps/map_files/generic/centcomm.dmm
@@ -6403,8 +6403,7 @@
/area/admin)
"vJ" = (
/obj/structure/table,
-/obj/random/toolbox,
-/obj/random/bomb_supply,
+/obj/effect/spawner/random/engineering/toolbox,
/obj/machinery/syndicatebomb/badmin/clown,
/turf/simulated/floor/plasteel/dark,
/area/admin)
@@ -6602,7 +6601,6 @@
"wx" = (
/obj/structure/table,
/obj/item/tank/internals/oxygen/yellow,
-/obj/random/bomb_supply,
/obj/item/clothing/under/costume/rebeloutfit,
/obj/item/clothing/suit/poncho/ponchoshame,
/obj/item/clothing/head/sombrero/shamebrero,
@@ -6746,7 +6744,7 @@
/area/admin)
"wT" = (
/obj/structure/table,
-/obj/random/tool,
+/obj/effect/spawner/random/engineering/tools,
/obj/item/clothing/gloves/color/yellow,
/obj/item/pinpointer/advpinpointer,
/turf/simulated/floor/plasteel/dark,
@@ -12325,7 +12323,10 @@
/area/centcom/control)
"Rh" = (
/obj/structure/table,
-/obj/random/powercell,
+/obj/item/stock_parts/cell,
+/obj/item/stock_parts/cell/high,
+/obj/item/stock_parts/cell/super,
+/obj/item/stock_parts/cell/hyper,
/turf/simulated/floor/plasteel,
/area/admin)
"Ri" = (
@@ -12365,8 +12366,7 @@
/area/centcom/evac)
"Rn" = (
/obj/structure/table,
-/obj/random/tool,
-/obj/random/bomb_supply,
+/obj/effect/spawner/random/engineering/tools,
/turf/simulated/floor/plasteel,
/area/admin)
"Ro" = (
@@ -12824,8 +12824,6 @@
/area/admin)
"To" = (
/obj/structure/table,
-/obj/random/technology_scanner,
-/obj/random/tech_supply,
/turf/simulated/floor/plasteel,
/area/admin)
"Tp" = (
@@ -13609,7 +13607,6 @@
"Wt" = (
/obj/structure/table,
/obj/item/clothing/gloves/color/yellow,
-/obj/random/bomb_supply,
/turf/simulated/floor/plasteel,
/area/admin)
"Wu" = (
diff --git a/_maps/map_files/shuttles/emergency_shadow.dmm b/_maps/map_files/shuttles/emergency_shadow.dmm
index a7d91591e328..f5aa7fa5d8f9 100644
--- a/_maps/map_files/shuttles/emergency_shadow.dmm
+++ b/_maps/map_files/shuttles/emergency_shadow.dmm
@@ -154,7 +154,8 @@
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 5
},
-/turf/simulated/floor/engine/plasma,
+/obj/structure/plasmafire_generator/shadow,
+/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"ge" = (
/obj/structure/table/glass/reinforced/plastitanium,
@@ -230,9 +231,6 @@
},
/turf/simulated/floor/catwalk,
/area/shuttle/escape)
-"jR" = (
-/turf/simulated/floor/engine/o2,
-/area/shuttle/escape)
"kx" = (
/obj/structure/chair/comfy/shuttle,
/turf/simulated/floor/mineral/plastitanium/red/brig,
@@ -354,7 +352,8 @@
/obj/machinery/atmospherics/pipe/manifold/hidden{
dir = 4
},
-/turf/simulated/floor/engine/plasma,
+/obj/structure/plasmafire_generator/shadow,
+/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"pi" = (
/obj/effect/turf_decal/stripes/white/line{
@@ -565,7 +564,8 @@
},
/area/shuttle/escape)
"zj" = (
-/turf/simulated/floor/engine/plasma,
+/obj/structure/plasmafire_generator/shadow,
+/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"zs" = (
/obj/structure/reagent_dispensers/fueltank,
@@ -639,7 +639,8 @@
/area/template_noop)
"CD" = (
/obj/machinery/igniter/shadow,
-/turf/simulated/floor/engine/plasma,
+/obj/structure/plasmafire_generator/shadow,
+/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"CK" = (
/obj/structure/shuttle/engine/propulsion/burst{
@@ -680,7 +681,8 @@
/area/shuttle/escape)
"DY" = (
/obj/machinery/atmospherics/pipe/simple/hidden/universal,
-/turf/simulated/floor/engine/plasma,
+/obj/structure/plasmafire_generator/shadow,
+/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"DZ" = (
/obj/effect/turf_decal/stripes/red/corner{
@@ -739,7 +741,8 @@
dir = 4;
invisibility = 99
},
-/turf/simulated/floor/engine/plasma,
+/obj/structure/plasmafire_generator/shadow,
+/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"Gx" = (
/obj/structure/extinguisher_cabinet{
@@ -1151,7 +1154,8 @@
dir = 9
},
/obj/machinery/atmospherics/meter,
-/turf/simulated/floor/engine/plasma,
+/obj/structure/plasmafire_generator/shadow,
+/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"Xp" = (
/obj/structure/marker_beacon/dock_marker/collision,
@@ -1357,9 +1361,9 @@ Lv
OL
Bu
tb
-jR
+zj
CD
-jR
+zj
cX
wF
cH
diff --git a/_maps/map_files/stations/boxstation.dmm b/_maps/map_files/stations/boxstation.dmm
index d1c3d5b0ea70..a6b710cfb132 100644
--- a/_maps/map_files/stations/boxstation.dmm
+++ b/_maps/map_files/stations/boxstation.dmm
@@ -5271,6 +5271,24 @@
icon_state = "darkredcorners"
},
/area/station/security/brig)
+"atD" = (
+/obj/structure/chair/comfy/brown,
+/obj/machinery/door/window/classic/normal{
+ name = "Glass Door"
+ },
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/obj/machinery/door_control{
+ id = "nct";
+ name = "Office Door";
+ normaldoorcontrol = 1;
+ pixel_x = -25;
+ req_access = list(80);
+ pixel_y = -1
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreenfull"
+ },
+/area/station/procedure/trainer_office)
"atE" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -12915,14 +12933,12 @@
/turf/simulated/wall,
/area/station/hallway/secondary/garden)
"aTv" = (
-/obj/effect/turf_decal/delivery/blue/hollow,
-/obj/effect/decal/cleanable/dirt,
-/obj/structure/rack,
-/obj/effect/spawner/random/maintenance,
+/obj/machinery/economy/vending/traindrobe,
/turf/simulated/floor/plasteel{
- icon_state = "darkbluefull"
+ dir = 9;
+ icon_state = "darkgreen"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"aTw" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -12930,20 +12946,15 @@
/turf/simulated/floor/plating,
/area/station/maintenance/fpmaint)
"aTx" = (
-/obj/effect/turf_decal/delivery/blue/hollow,
-/obj/effect/decal/cleanable/blood/old,
-/obj/effect/decal/remains/xeno,
/turf/simulated/floor/plasteel{
- icon_state = "darkbluefull"
+ icon_state = "dark"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"aTy" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/effect/decal/cleanable/blood/old,
/turf/simulated/floor/plasteel{
- icon_state = "darkbluefull"
+ icon_state = "darkgreenfull"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"aTz" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -13373,11 +13384,8 @@
/turf/simulated/wall/r_wall,
/area/station/command/vault)
"aUF" = (
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
- },
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"aUG" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
@@ -13391,10 +13399,20 @@
},
/area/station/public/dorms)
"aUH" = (
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/effect/mapping_helpers/airlock/windoor/access/all/procedure/trainer,
+/obj/machinery/door/window/reinforced/normal{
+ name = "NCT"
+ },
/turf/simulated/floor/plasteel{
- icon_state = "darkbluefull"
+ dir = 4;
+ icon_state = "darkgreen"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"aUI" = (
/obj/structure/window/reinforced{
dir = 1
@@ -15235,17 +15253,24 @@
/area/station/public/storage/tools)
"bam" = (
/obj/machinery/atmospherics/unary/vent_pump/on,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
+/obj/effect/turf_decal/woodsiding{
+ dir = 8
},
-/area/station/maintenance/fpmaint)
+/obj/structure/chair/comfy/black{
+ dir = 1
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"ban" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on,
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
+/obj/effect/turf_decal/woodsiding{
+ dir = 4
},
-/area/station/maintenance/fpmaint)
+/obj/structure/chair/comfy/black{
+ dir = 1
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"bao" = (
/obj/machinery/status_display{
layer = 4;
@@ -16762,11 +16787,13 @@
},
/area/station/public/dorms)
"bfe" = (
-/obj/effect/decal/cleanable/dirt,
+/obj/machinery/photocopier,
+/obj/structure/window/reinforced,
/turf/simulated/floor/plasteel{
- icon_state = "darkbluefull"
+ dir = 8;
+ icon_state = "darkgreen"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"bfi" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -17302,20 +17329,15 @@
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/port/east)
"bgK" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/effect/decal/cleanable/blood/old,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkbluecorners"
+/obj/structure/chair/comfy/brown,
+/obj/machinery/door/window/classic/normal{
+ name = "Glass Door"
},
-/area/station/maintenance/fpmaint)
-"bgL" = (
-/mob/living/simple_animal/cockroach,
+/obj/effect/landmark/start/nanotrasen_career_trainer,
/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "darkbluecorners"
+ icon_state = "darkgreenfull"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"bgM" = (
/obj/structure/table/glass,
/obj/item/hatchet,
@@ -17619,33 +17641,30 @@
/turf/simulated/floor/plasteel,
/area/station/public/storage/office)
"bhG" = (
-/obj/structure/rack,
-/obj/effect/spawner/random/maintenance,
+/obj/item/flag/nt,
+/obj/machinery/camera{
+ c_tag = "Career Trainer's Office"
+ },
/turf/simulated/floor/plasteel{
- icon_state = "darkbluefull"
+ dir = 9;
+ icon_state = "darkgreen"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"bhH" = (
/obj/machinery/status_display{
layer = 4;
pixel_x = -32
},
-/obj/machinery/light/small{
- dir = 8
- },
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkblue"
- },
-/area/station/maintenance/fpmaint)
+/obj/structure/filingcabinet,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"bhI" = (
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkblue"
+/obj/structure/table/wood,
+/obj/effect/turf_decal/woodsiding{
+ dir = 9
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"bhK" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 5
@@ -17696,13 +17715,13 @@
/obj/machinery/ai_status_display{
pixel_x = 32
},
-/obj/effect/turf_decal/delivery/hollow,
-/obj/structure/ore_box,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkblue"
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"bhQ" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 10
@@ -17996,6 +18015,12 @@
"biH" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/structure/disposalpipe/segment,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "blue"
@@ -18909,14 +18934,8 @@
},
/area/station/service/hydroponics)
"blf" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/structure/ore_box,
-/obj/effect/turf_decal/delivery/hollow,
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "darkbluecorners"
- },
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"blg" = (
/obj/machinery/hologram/holopad,
/turf/simulated/floor/plasteel,
@@ -19231,13 +19250,13 @@
/area/station/service/kitchen)
"bmk" = (
/obj/machinery/firealarm/directional/east,
-/obj/effect/turf_decal/delivery/hollow,
-/obj/structure/ore_box,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkbluecorners"
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"bmm" = (
/turf/simulated/floor/plasteel,
/area/station/hallway/secondary/exit)
@@ -19426,14 +19445,6 @@
},
/turf/simulated/floor/wood,
/area/station/service/bar)
-"bmN" = (
-/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,
-/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers,
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/nw)
"bmO" = (
/turf/simulated/floor/plasteel{
icon_state = "chapel"
@@ -20311,6 +20322,7 @@
},
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/nw)
"bpn" = (
@@ -20684,6 +20696,7 @@
"bqq" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel{
icon_state = "stairs-m"
},
@@ -21145,6 +21158,7 @@
"brJ" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/nw)
"brK" = (
@@ -21295,7 +21309,7 @@
},
/area/station/hallway/secondary/entry)
"bsi" = (
-/obj/random/plushie,
+/obj/effect/spawner/random/plushies,
/turf/simulated/floor/plating,
/area/station/maintenance/apmaint)
"bsk" = (
@@ -21951,6 +21965,7 @@
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
dir = 4
},
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/nw)
"bun" = (
@@ -22592,6 +22607,7 @@
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
dir = 8
},
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/nw)
"bwC" = (
@@ -23840,6 +23856,7 @@
/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/nw)
"bCu" = (
@@ -24164,14 +24181,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/supply/sorting)
-"bDO" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/structure/cable{
- icon_state = "2-4"
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/west)
"bDP" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 10
@@ -24956,16 +24965,6 @@
/obj/structure/closet/crate/freezer,
/turf/simulated/floor/plasteel,
/area/station/supply/warehouse)
-"bGZ" = (
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
- dir = 8
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/west)
"bHc" = (
/obj/structure/disposaloutlet{
dir = 4
@@ -25691,12 +25690,28 @@
},
/area/station/medical/reception)
"bJC" = (
-/obj/structure/rack,
-/obj/item/poster/random_contraband,
+/obj/machinery/power/apc/directional/north,
+/obj/structure/cable{
+ d2 = 2;
+ icon_state = "0-2"
+ },
+/obj/machinery/button/windowtint{
+ id = "NCT";
+ pixel_x = 24;
+ dir = 8;
+ pixel_y = 5
+ },
+/obj/machinery/light_switch{
+ dir = 8;
+ name = "east bump";
+ pixel_x = 24;
+ pixel_y = -5
+ },
/turf/simulated/floor/plasteel{
- icon_state = "darkbluefull"
+ dir = 5;
+ icon_state = "darkgreen"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"bJE" = (
/obj/machinery/light{
dir = 8
@@ -26321,16 +26336,6 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on,
/turf/simulated/floor/plasteel,
/area/station/supply/sorting)
-"bMm" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
- dir = 4
- },
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/west)
"bMn" = (
/obj/machinery/firealarm/directional/west,
/obj/machinery/atmospherics/unary/vent_scrubber/on{
@@ -26790,14 +26795,6 @@
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/supply/sorting)
-"bNY" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/west)
"bOd" = (
/obj/machinery/door/poddoor{
id_tag = "trash";
@@ -27336,6 +27333,7 @@
/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/sw)
"bQo" = (
@@ -27846,11 +27844,11 @@
/area/station/medical/reception)
"bSy" = (
/obj/structure/table,
-/obj/item/clothing/accessory/stethoscope,
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope,
+/obj/item/clothing/neck/stethoscope{
pixel_y = 6
},
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 3
},
/obj/item/flashlight/pen{
@@ -28507,6 +28505,9 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 6
},
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
/turf/simulated/floor/plasteel,
/area/station/supply/lobby)
"bUW" = (
@@ -28517,6 +28518,9 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
},
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
/turf/simulated/floor/plasteel,
/area/station/supply/lobby)
"bUX" = (
@@ -28526,6 +28530,9 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
},
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
/turf/simulated/floor/plasteel,
/area/station/supply/lobby)
"bUY" = (
@@ -28535,6 +28542,9 @@
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
dir = 4
},
+/obj/structure/disposalpipe/segment/corner{
+ dir = 8
+ },
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/sw)
"bUZ" = (
@@ -28544,6 +28554,9 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
},
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "browncorner"
@@ -38203,32 +38216,36 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 5
},
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
+/obj/effect/turf_decal/woodsiding{
+ dir = 10
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"cGV" = (
/obj/item/radio/intercom{
name = "west bump";
pixel_x = -28
},
-/obj/effect/turf_decal/delivery/hollow,
-/obj/structure/ore_box,
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "darkbluecorners"
+/obj/machinery/light{
+ dir = 8
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cGX" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 10
},
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
+/obj/effect/turf_decal/woodsiding{
+ dir = 6
},
-/area/station/maintenance/fpmaint)
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 4;
+ icon_state = "2-4"
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"cGY" = (
/obj/structure/chair{
dir = 8
@@ -38249,11 +38266,9 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
},
-/mob/living/simple_animal/mouse/gray,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
- },
-/area/station/maintenance/fpmaint)
+/obj/effect/turf_decal/woodsiding,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"cHb" = (
/obj/machinery/status_display{
layer = 4;
@@ -39783,9 +39798,7 @@
/area/station/engineering/break_room)
"cMX" = (
/obj/machinery/alarm/directional/east,
-/obj/structure/table,
-/obj/item/storage/toolbox/mechanical,
-/obj/item/t_scanner,
+/obj/machinery/autolathe,
/turf/simulated/floor/plasteel,
/area/station/engineering/break_room)
"cNb" = (
@@ -39978,7 +39991,8 @@
/area/station/engineering/break_room)
"cNP" = (
/obj/structure/table,
-/obj/item/folder/yellow,
+/obj/item/storage/toolbox/mechanical,
+/obj/item/t_scanner,
/turf/simulated/floor/plasteel,
/area/station/engineering/break_room)
"cNS" = (
@@ -42854,11 +42868,9 @@
/area/station/engineering/smes)
"cYN" = (
/obj/machinery/alarm/directional/west,
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "darkbluecorners"
- },
-/area/station/maintenance/fpmaint)
+/obj/item/kirbyplants,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cYO" = (
/obj/machinery/hologram/holopad,
/turf/simulated/floor/plasteel{
@@ -42882,10 +42894,16 @@
"cYS" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
-/area/station/maintenance/fpmaint)
+/obj/structure/disposalpipe/segment/corner{
+ dir = 4
+ },
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cYT" = (
/obj/machinery/atmospherics/trinary/tvalve/digital/flipped,
/turf/simulated/floor/plasteel,
@@ -45645,10 +45663,6 @@
/obj/machinery/camera{
c_tag = "Central Hallway North-West"
},
-/obj/structure/extinguisher_cabinet{
- name = "north bump";
- pixel_y = 30
- },
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "bluecorner"
@@ -45663,6 +45677,10 @@
/obj/machinery/light{
dir = 1
},
+/obj/structure/extinguisher_cabinet{
+ name = "north bump";
+ pixel_y = 30
+ },
/turf/simulated/floor/plasteel{
dir = 4;
icon_state = "bluecorner"
@@ -50004,6 +50022,17 @@
icon_state = "bar"
},
/area/station/security/permabrig)
+"eum" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/west)
"euu" = (
/obj/machinery/atmospherics/pipe/manifold/visible{
dir = 8
@@ -50340,6 +50369,16 @@
},
/turf/simulated/floor/plasteel,
/area/station/security/main)
+"eDU" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-4"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"eDZ" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 6
@@ -51723,7 +51762,7 @@
/turf/simulated/floor/carpet/arcade,
/area/station/public/arcade)
"fmT" = (
-/obj/item/stack/tile/mineral,
+/obj/item/stack/tile/plasteel,
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
dir = 4
@@ -54353,6 +54392,9 @@
},
/turf/simulated/floor/engine,
/area/station/engineering/engine/supermatter)
+"gHr" = (
+/turf/simulated/wall,
+/area/station/procedure/trainer_office)
"gHJ" = (
/obj/machinery/door/window/brigdoor{
dir = 1;
@@ -54627,11 +54669,12 @@
/turf/space,
/area/space/nearstation)
"gNX" = (
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkblue"
+/obj/structure/table/wood,
+/obj/effect/turf_decal/woodsiding{
+ dir = 5
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"gOd" = (
/obj/structure/chair{
dir = 1
@@ -55314,6 +55357,22 @@
},
/turf/simulated/floor/grass/jungle/no_creep,
/area/station/command/bridge)
+"hdm" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/disposalpipe/segment,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,
+/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers,
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/nw)
"hdr" = (
/turf/simulated/floor/plasteel{
dir = 8;
@@ -56700,7 +56759,7 @@
"hRq" = (
/obj/machinery/firealarm/directional/north,
/obj/structure/table,
-/obj/random/plushie,
+/obj/effect/spawner/random/plushies,
/obj/machinery/light/small{
dir = 1
},
@@ -57185,6 +57244,19 @@
/obj/machinery/power/apc/directional/north,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/starboard/east)
+"igI" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
+ dir = 4
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/west)
"igR" = (
/obj/machinery/door/airlock/public/glass,
/obj/effect/mapping_helpers/airlock/autoname,
@@ -57505,14 +57577,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/maintenance/turbine)
-"ioq" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/west)
"iot" = (
/obj/effect/decal/cleanable/ash,
/obj/effect/decal/cleanable/dirt,
@@ -59835,6 +59899,16 @@
/obj/machinery/atmospherics/pipe/simple/hidden,
/turf/simulated/floor/engine/xenobio,
/area/station/science/xenobiology)
+"jAU" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-8"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"jCr" = (
/obj/structure/table,
/obj/item/storage/firstaid/adv{
@@ -59981,6 +60055,16 @@
/obj/structure/shelf/service,
/turf/simulated/floor/plasteel,
/area/station/service/janitor)
+"jFW" = (
+/obj/structure/table/wood,
+/obj/item/flashlight/lamp/green{
+ pixel_y = 8
+ },
+/obj/effect/turf_decal/woodsiding{
+ dir = 1
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"jGd" = (
/obj/effect/spawner/window/reinforced/grilled,
/obj/structure/cable{
@@ -60897,6 +60981,12 @@
/obj/structure/closet/emcloset,
/turf/simulated/floor/plating,
/area/station/maintenance/asmaint)
+"kgz" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/sw)
"khl" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/structure/cable{
@@ -61495,12 +61585,35 @@
"kwE" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/door/airlock/maintenance,
-/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
+/obj/machinery/door/airlock/command/glass{
+ name = "Trainer's Office";
+ id_tag = "nct"
+ },
+/obj/structure/disposalpipe/segment,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer,
+/obj/machinery/door/firedoor,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/obj/effect/mapping_helpers/airlock/polarized{
+ id = "NCT"
+ },
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"kwG" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/landmark/spawner/nukedisc_respawn,
@@ -62612,12 +62725,20 @@
/turf/simulated/floor/plating,
/area/station/maintenance/asmaint2)
"kYq" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/effect/decal/cleanable/blood/old,
+/obj/structure/table/wood,
+/obj/item/paper_bin{
+ pixel_y = 4;
+ pixel_x = -5
+ },
+/obj/item/pen{
+ pixel_x = 8;
+ pixel_y = 8
+ },
+/obj/structure/window/reinforced,
/turf/simulated/floor/plasteel{
- icon_state = "dark"
+ icon_state = "darkgreenfull"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"kYB" = (
/obj/machinery/atmospherics/pipe/simple/visible/cyan,
/obj/machinery/atmospherics/pipe/simple/visible/yellow{
@@ -63982,9 +64103,9 @@
icon_state = "4-8"
},
/obj/machinery/camera{
- c_tag = "Prison Solitary Confinement 2";
dir = 6;
- network = list("Prison","SS13")
+ network = list("Engineering","SS13");
+ c_tag = "Power Transmission Laser"
},
/turf/simulated/floor/plasteel,
/area/station/engineering/transmission_laser)
@@ -64324,7 +64445,7 @@
/obj/structure/safe/floor{
known_by = list("captain")
},
-/obj/item/gun/projectile/revolver/russian,
+/obj/item/toy/russian_revolver,
/obj/item/reagent_containers/drinks/bottle/absinthe/premium,
/obj/item/lighter/zippo/nt_rep,
/obj/item/storage/fancy/cigarettes/cigpack_robustgold,
@@ -66361,6 +66482,12 @@
icon_state = "whiteblue"
},
/area/station/medical/medbay2)
+"mUR" = (
+/turf/simulated/floor/plasteel{
+ dir = 5;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"mVd" = (
/obj/structure/disposalpipe/segment,
/obj/structure/cable{
@@ -67210,6 +67337,12 @@
/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
/turf/simulated/floor/plasteel,
/area/station/maintenance/asmaint)
+"nxW" = (
+/obj/structure/disposalpipe/junction{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel,
+/area/station/supply/lobby)
"nxX" = (
/obj/structure/cable{
icon_state = "1-4"
@@ -71423,7 +71556,7 @@
"pAM" = (
/obj/structure/table,
/obj/item/soap/deluxe,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
/area/station/maintenance/aft)
@@ -73282,14 +73415,16 @@
/turf/simulated/floor/carpet/green,
/area/station/command/bridge)
"qvo" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/effect/decal/cleanable/dirt,
-/obj/structure/ore_box,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkbluecorners"
+/obj/machinery/light{
+ dir = 4
},
-/area/station/maintenance/fpmaint)
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"qvO" = (
/obj/structure/table,
/obj/item/paper_bin{
@@ -74508,12 +74643,12 @@
/turf/simulated/floor/plating,
/area/station/maintenance/fore)
"qZX" = (
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "darkbluecorners"
+/obj/machinery/disposal,
+/obj/structure/disposalpipe/trunk{
+ dir = 8
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"rac" = (
/obj/structure/bed,
/obj/item/bedsheet/medical,
@@ -75038,10 +75173,11 @@
/turf/simulated/floor/plating,
/area/station/maintenance/aft)
"rmK" = (
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
+/obj/structure/chair/sofa/left{
+ dir = 1
},
-/area/station/maintenance/fpmaint)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"rmT" = (
/obj/machinery/atmospherics/pipe/manifold/visible/cyan{
dir = 1
@@ -75680,6 +75816,19 @@
/obj/effect/mapping_helpers/turfs/damage,
/turf/simulated/floor/wood,
/area/station/maintenance/apmaint2)
+"rFd" = (
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
+ dir = 8
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/west)
"rFe" = (
/obj/structure/chair/sofa/bench{
dir = 4
@@ -76309,6 +76458,12 @@
},
/turf/simulated/floor/engine,
/area/station/engineering/control)
+"rWJ" = (
+/obj/structure/chair/sofa/right{
+ dir = 1
+ },
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"rWS" = (
/obj/machinery/camera{
c_tag = "Engineering Supermatter Port";
@@ -77785,7 +77940,7 @@
/turf/simulated/floor/plasteel,
/area/station/public/dorms)
"sPu" = (
-/obj/item/clothing/suit/mantle/old,
+/obj/item/clothing/neck/cloak/old,
/turf/simulated/floor/carpet,
/area/station/maintenance/asmaint)
"sPw" = (
@@ -79446,7 +79601,7 @@
"tMs" = (
/obj/effect/turf_decal/stripes/line,
/obj/effect/spawner/random/blood/often,
-/obj/random/mech,
+/obj/effect/spawner/random/toy/mech_figure,
/turf/simulated/floor/plating,
/area/station/maintenance/disposal)
"tMC" = (
@@ -79828,7 +79983,7 @@
/area/station/hallway/primary/aft/south)
"tUd" = (
/obj/structure/closet/cabinet,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/crowbar,
/obj/effect/landmark/spawner/nukedisc_respawn,
/obj/effect/spawner/random/cobweb/left/frequent,
@@ -84406,6 +84561,17 @@
},
/turf/simulated/floor/plating,
/area/station/science/robotics)
+"wxi" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/west)
"wxp" = (
/obj/machinery/alarm/directional/north,
/obj/machinery/light{
@@ -84991,11 +85157,32 @@
icon_state = "dark"
},
/area/station/aisat/service)
+"wNl" = (
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 4;
+ icon_state = "2-4"
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/west)
"wNM" = (
/obj/structure/sign/vacuum/external,
/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
/area/station/supply/storage)
+"wNQ" = (
+/obj/structure/closet,
+/obj/machinery/light{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"wNT" = (
/obj/structure/sign/bobross{
pixel_y = 32
@@ -86614,13 +86801,14 @@
/turf/simulated/floor/plasteel,
/area/station/supply/miningdock)
"xHw" = (
-/obj/structure/barricade/wooden/crude,
-/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
-/obj/machinery/door/airlock/maintenance,
+/obj/machinery/door/airlock/maintenance{
+ name = "Trainer's Office Maintenance"
+ },
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"xHy" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
@@ -87313,7 +87501,7 @@
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/starboard/east)
"xWz" = (
-/obj/item/stack/tile/mineral,
+/obj/item/stack/tile/plasteel,
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
dir = 9
@@ -111601,7 +111789,7 @@ bNX
kOU
bzF
fTS
-bzF
+nxW
rJJ
bXk
bYD
@@ -111827,14 +112015,14 @@ aPi
nvO
aMA
bac
-aSu
-aSu
-aSu
-aSu
-aSu
-aSu
-aSu
-aSu
+gHr
+gHr
+gHr
+gHr
+gHr
+gHr
+gHr
+gHr
gIc
dmx
bkg
@@ -112083,15 +112271,15 @@ aMY
aPi
aRr
aMA
-aSu
-aSu
+gHr
+gHr
bhG
bfe
bhH
blf
cGV
cYN
-aSu
+gHr
djO
bmC
bks
@@ -112340,7 +112528,7 @@ uJq
aPw
aVE
aQj
-aSu
+gHr
aTv
aTx
bgK
@@ -112348,8 +112536,8 @@ bhI
bam
cGT
rmK
-aSu
-bgP
+gHr
+qZp
yhp
bkq
blQ
@@ -112597,16 +112785,16 @@ aMY
aPi
aRr
aQl
-aSu
-aTy
+gHr
+wNQ
aTy
kYq
-aUF
+jFW
aUF
cGZ
-rmK
-aSu
-qZp
+rWJ
+eDU
+bgP
yhp
gsf
dnN
@@ -112855,16 +113043,16 @@ lQx
ffD
aPi
xHw
-aUH
-bfe
-bgL
+mUR
+aTx
+atD
gNX
ban
cGX
cYS
kwE
biH
-bmN
+hdm
bpm
bqq
brJ
@@ -112874,18 +113062,18 @@ brJ
bwB
brJ
bCt
-bDO
-ioq
-bGZ
-ioq
-ioq
-ioq
-ioq
-bMm
-bNY
+wNl
+wxi
+rFd
+wxi
+wxi
+wxi
+wxi
+igI
+eum
bQn
-bST
-bST
+kgz
+kgz
bUY
bST
rSd
@@ -113111,15 +113299,15 @@ aRP
aEl
ffD
biE
-aSu
-aSu
+gHr
+gHr
bJC
aUH
bhP
bmk
qvo
qZX
-aSu
+jAU
djW
yhp
bgS
@@ -113369,14 +113557,14 @@ aEl
aRr
aQl
aPi
-aSu
-aSu
-aSu
-aSu
-aSu
-aSu
-aSu
-aSu
+gHr
+gHr
+gHr
+gHr
+gHr
+gHr
+gHr
+gHr
djV
bmW
bkv
diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm
index e9b0dedd1c68..96444a5334d8 100644
--- a/_maps/map_files/stations/cerestation.dmm
+++ b/_maps/map_files/stations/cerestation.dmm
@@ -1187,9 +1187,6 @@
/obj/effect/mapping_helpers/airlock/windoor/access/any/medical/general{
dir = 1
},
-/obj/effect/mapping_helpers/airlock/windoor/access/any/medical/genetics{
- dir = 1
- },
/obj/machinery/door/window/classic/normal{
name = "Chemistry Desk"
},
@@ -1236,6 +1233,13 @@
/obj/effect/spawner/random/dirt/frequent,
/turf/simulated/floor/plating,
/area/station/maintenance/starboard)
+"aji" = (
+/obj/machinery/atmospherics/unary/vent_scrubber/on{
+ dir = 1
+ },
+/obj/machinery/alarm/directional/east,
+/turf/simulated/floor/wood,
+/area/station/public/pet_store)
"ajq" = (
/obj/machinery/hologram/holopad,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
@@ -1553,6 +1557,18 @@
icon_state = "cafeteria"
},
/area/station/command/office/rd)
+"alH" = (
+/obj/effect/turf_decal/stripes/corner{
+ dir = 1
+ },
+/obj/machinery/door_control{
+ id = "scieva";
+ name = "Science EVA shutter control";
+ pixel_y = 24;
+ req_one_access = list(19,41)
+ },
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/aft/west)
"alM" = (
/obj/effect/turf_decal/stripes/corner{
dir = 4
@@ -2287,12 +2303,6 @@
/obj/structure/girder,
/turf/simulated/floor/plating,
/area/station/maintenance/fore)
-"atH" = (
-/obj/structure/closet/crate/freezer,
-/obj/machinery/power/apc/directional/west,
-/obj/structure/cable/orange,
-/turf/simulated/floor/wood,
-/area/station/public/pet_store)
"atI" = (
/obj/structure/disposalpipe/segment{
color = "#954535"
@@ -2744,10 +2754,11 @@
/obj/structure/safe/floor{
known_by = list("captain")
},
+/obj/item/toy/russian_revolver,
+/obj/item/reagent_containers/drinks/bottle/absinthe/premium,
/obj/item/lighter/zippo/nt_rep,
-/obj/item/toy/figure/crew/captain,
-/obj/item/gun/projectile/revolver/russian,
/obj/item/storage/fancy/cigarettes/cigpack_robustgold,
+/obj/item/toy/figure/crew/captain,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/turf/simulated/floor/carpet/royalblack,
/area/station/command/office/captain)
@@ -3522,6 +3533,10 @@
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/wood,
/area/station/service/chapel)
+"aDM" = (
+/obj/machinery/ai_status_display,
+/turf/simulated/wall/r_wall,
+/area/station/science/toxins/launch)
"aDZ" = (
/obj/machinery/conveyor/counterclockwise{
dir = 4;
@@ -3625,6 +3640,10 @@
"aEU" = (
/turf/simulated/floor/carpet/black,
/area/station/command/office/captain)
+"aFb" = (
+/obj/machinery/ai_status_display,
+/turf/simulated/wall,
+/area/station/science/genetics)
"aFd" = (
/obj/structure/marker_beacon/dock_marker/collision,
/obj/structure/lattice/catwalk,
@@ -3911,6 +3930,17 @@
icon_state = "redcorner"
},
/area/station/security/prison/cell_block/a)
+"aJa" = (
+/obj/machinery/camera/autoname{
+ dir = 9
+ },
+/obj/machinery/door_control{
+ id = "pet_shop";
+ name = "Storefront Shutters";
+ pixel_x = 24
+ },
+/turf/simulated/floor/wood,
+/area/station/public/pet_store)
"aJc" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
dir = 8
@@ -4166,6 +4196,10 @@
/obj/effect/mapping_helpers/turfs/rust,
/turf/simulated/wall,
/area/station/maintenance/starboard)
+"aLO" = (
+/obj/item/clothing/head/cone,
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/aft/west)
"aLQ" = (
/obj/machinery/door/airlock/command{
name = "Captain's Quarters"
@@ -4204,15 +4238,6 @@
icon_state = "darkblue"
},
/area/station/command/bridge)
-"aMw" = (
-/obj/machinery/light/small{
- dir = 4
- },
-/obj/structure/cable/yellow{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plating,
-/area/station/hallway/primary/fore/north)
"aMx" = (
/obj/machinery/light_switch{
dir = 1;
@@ -5045,12 +5070,6 @@
/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/east)
-"aUB" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/turf/simulated/floor/plasteel{
- icon_state = "darkgreenfull"
- },
-/area/station/service/hydroponics)
"aUE" = (
/obj/machinery/light{
dir = 8
@@ -6105,6 +6124,22 @@
/obj/structure/dispenser/oxygen,
/turf/simulated/floor/plating,
/area/station/hallway/primary/central/north)
+"bcJ" = (
+/obj/structure/extinguisher_cabinet{
+ name = "west bump";
+ pixel_x = -30
+ },
+/obj/structure/table/glass,
+/obj/item/storage/box/disks{
+ pixel_x = 6;
+ pixel_y = 16
+ },
+/obj/item/book/manual/wiki/sop_science,
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"bcK" = (
/obj/structure/rack,
/obj/structure/window/reinforced{
@@ -6433,14 +6468,6 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/starboard/south)
-"bfg" = (
-/obj/item/clothing/head/cone,
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 6
- },
-/area/station/maintenance/apmaint)
"bfh" = (
/obj/effect/spawner/window/reinforced,
/turf/simulated/floor/plating,
@@ -7261,6 +7288,15 @@
icon_state = "asteroidplating"
},
/area/station/maintenance/fore)
+"bjI" = (
+/obj/machinery/light/small{
+ dir = 4
+ },
+/obj/item/clothing/head/cone,
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/apmaint)
"bjJ" = (
/obj/machinery/disposal,
/obj/structure/disposalpipe/trunk,
@@ -8294,19 +8330,6 @@
/obj/item/instrument/harmonica,
/turf/simulated/floor/plasteel,
/area/station/security/permabrig)
-"bqh" = (
-/obj/structure/chair/sofa/corp/left{
- dir = 8
- },
-/obj/item/radio/intercom{
- name = "east bump";
- pixel_x = 28
- },
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "blue"
- },
-/area/station/hallway/primary/fore/north)
"bqn" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 4
@@ -9509,6 +9532,29 @@
},
/turf/simulated/floor/plating,
/area/station/security/processing)
+"bwc" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/railing/corner{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "bluecorner"
+ },
+/area/station/hallway/primary/fore/north)
"bwe" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -10074,7 +10120,7 @@
/obj/structure/window/reinforced{
dir = 8
},
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/storage/box/gloves,
/turf/simulated/floor/plasteel{
icon_state = "white"
@@ -10273,7 +10319,6 @@
name = "Medbay Entrance"
},
/obj/effect/mapping_helpers/airlock/access/any/medical/general,
-/obj/effect/mapping_helpers/airlock/access/any/medical/genetics,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
},
@@ -11016,9 +11061,8 @@
/turf/simulated/wall,
/area/station/science/genetics)
"bDF" = (
-/obj/item/trash/spentcasing/shotgun/beanbag,
-/obj/item/trash/spentcasing/shotgun/beanbag,
-/turf/simulated/floor/plating,
+/obj/machinery/kitchen_machine/grill,
+/turf/simulated/floor/wood,
/area/station/maintenance/asmaint)
"bDH" = (
/obj/machinery/firealarm/directional/north,
@@ -12032,15 +12076,18 @@
/turf/simulated/floor/plating,
/area/station/maintenance/storage)
"bHy" = (
-/obj/machinery/alarm/directional/north,
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 8
},
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/light/small{
+ dir = 1
+ },
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"bHC" = (
/turf/simulated/floor/plasteel{
dir = 8;
@@ -12555,11 +12602,12 @@
/turf/simulated/floor/plasteel,
/area/station/security/processing)
"bKf" = (
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
dir = 4;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"bKg" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -12727,63 +12775,34 @@
},
/area/station/medical/morgue)
"bLe" = (
-/obj/structure/table/glass,
-/obj/item/storage/box/disks{
- pixel_x = 2;
- pixel_y = 2
- },
-/obj/item/dest_tagger,
-/obj/item/stack/package_wrap,
-/obj/item/hand_labeler,
+/obj/effect/decal/cleanable/dirt,
+/obj/effect/decal/cleanable/blood/old,
/turf/simulated/floor/plasteel{
dir = 10;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"bLh" = (
-/obj/structure/chair/office/light{
- dir = 4
- },
-/obj/effect/landmark/start/geneticist,
-/obj/structure/cable/orange{
- icon_state = "0-8"
- },
-/obj/machinery/power/apc/directional/south,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"bLi" = (
-/obj/machinery/dna_scannernew,
/obj/effect/turf_decal/delivery,
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/machine_frame,
/turf/simulated/floor/plasteel{
dir = 6;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"bLj" = (
/obj/structure/window/reinforced{
dir = 8
},
-/obj/machinery/light,
-/obj/item/radio/intercom{
- pixel_y = -28;
- name = "custom placement"
- },
-/turf/simulated/floor/grass,
-/area/station/science/genetics)
-"bLk" = (
-/obj/machinery/firealarm/directional/south,
-/turf/simulated/floor/grass,
-/area/station/science/genetics)
-"bLl" = (
-/obj/structure/flora/tree/palm,
-/obj/machinery/camera{
- c_tag = "Genetics Monkey Dome";
- dir = 9
- },
-/turf/simulated/floor/grass,
-/area/station/science/genetics)
+/turf/simulated/floor/plating/asteroid/ancient,
+/area/station/maintenance/starboard)
"bLz" = (
/obj/effect/spawner/random/dirt/frequent,
/obj/structure/disposalpipe/segment/corner{
@@ -12901,6 +12920,16 @@
icon_state = "darkyellow"
},
/area/station/engineering/control)
+"bMm" = (
+/obj/structure/filingcabinet,
+/obj/machinery/light{
+ dir = 8
+ },
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"bMv" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -13004,7 +13033,7 @@
layer = 4
},
/turf/simulated/wall,
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"bMP" = (
/obj/machinery/light/small{
dir = 4
@@ -14166,7 +14195,7 @@
"bSv" = (
/obj/structure/table,
/obj/item/storage/firstaid/o2,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "whitepurple"
@@ -15168,6 +15197,9 @@
icon_state = "darkyellow"
},
/area/station/engineering/atmos/distribution)
+"bWk" = (
+/turf/simulated/wall/r_wall,
+/area/station/hallway/primary/aft/west)
"bWn" = (
/obj/effect/spawner/window/reinforced,
/turf/simulated/floor/plating,
@@ -16149,6 +16181,20 @@
/obj/effect/spawner/random/dirt/frequent,
/turf/simulated/floor/plasteel,
/area/station/service/janitor)
+"cdZ" = (
+/obj/structure/chair/comfy/brown{
+ dir = 4
+ },
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/obj/machinery/light_switch{
+ pixel_y = 24;
+ name = "north bump"
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"ceb" = (
/obj/machinery/cryopod/robot,
/turf/simulated/floor/plasteel{
@@ -16845,14 +16891,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/public/locker)
-"cjN" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/toxins,
-/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 8
- },
-/area/station/science/storage)
"cjR" = (
/turf/simulated/wall,
/area/station/public/quantum/security)
@@ -17245,22 +17283,16 @@
/turf/simulated/wall/r_wall,
/area/station/science/toxins/mixing)
"cmJ" = (
-/obj/effect/turf_decal/stripes/line{
- dir = 8
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkpurple"
},
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/area/station/science/genetics)
"cmL" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/structure/cable/orange{
- icon_state = "1-2"
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 10
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
},
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/area/station/science/genetics)
"cmW" = (
/obj/machinery/status_display{
layer = 4
@@ -17445,10 +17477,18 @@
/turf/simulated/floor/plasteel/white,
/area/station/science/hallway)
"coy" = (
-/obj/effect/spawner/window/reinforced,
-/obj/structure/sign/explosives,
+/obj/structure/table/reinforced,
+/obj/effect/mapping_helpers/airlock/windoor/autoname/desk{
+ dir = 1
+ },
+/obj/effect/mapping_helpers/airlock/windoor/access/any/medical/genetics{
+ dir = 1
+ },
+/obj/machinery/door/window/classic/reversed{
+ dir = 1
+ },
/turf/simulated/floor/plating,
-/area/station/science/storage)
+/area/station/science/genetics)
"coE" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -18287,9 +18327,6 @@
icon_state = "darkyellow"
},
/area/station/engineering/break_room)
-"cvg" = (
-/turf/simulated/mineral/ancient,
-/area/station/hallway/primary/aft/west)
"cvq" = (
/obj/machinery/door_control{
id = "arrivalseva";
@@ -18527,15 +18564,11 @@
/turf/simulated/floor/grass,
/area/station/service/hydroponics)
"cxM" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 10
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 10
- },
/obj/structure/cable/orange{
icon_state = "2-8"
},
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -18786,12 +18819,6 @@
icon_state = "chapel"
},
/area/station/service/chapel)
-"czu" = (
-/obj/machinery/light/small{
- dir = 4
- },
-/turf/simulated/floor/plating/asteroid/ancient,
-/area/station/maintenance/fore)
"czG" = (
/obj/structure/closet/l3closet/scientist,
/turf/simulated/floor/plasteel{
@@ -19446,9 +19473,6 @@
icon_state = "cafeteria"
},
/area/station/medical/break_room)
-"cFA" = (
-/turf/simulated/mineral/ancient/outer,
-/area/station/science/genetics)
"cFE" = (
/obj/structure/plasticflaps{
opacity = 1
@@ -19476,14 +19500,22 @@
/turf/simulated/floor/mineral/titanium/blue,
/area/shuttle/pod_2)
"cFP" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/oxygen,
+/obj/item/radio/intercom{
+ name = "south bump";
+ pixel_y = -28
+ },
+/obj/structure/chair/comfy/purp{
+ dir = 1
+ },
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 10
+ dir = 10;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"cFQ" = (
+/obj/machinery/atmospherics/unary/portables_connector{
+ dir = 8
+ },
/turf/simulated/floor/plasteel{
dir = 4;
icon_state = "whitepurple"
@@ -19651,13 +19683,21 @@
},
/area/station/command/meeting_room)
"cGW" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/toxins,
+/obj/machinery/door_control{
+ id = "genetics";
+ name = "Genetics Privacy Shutters";
+ pixel_y = -23;
+ req_access = list(9);
+ pixel_x = 24
+ },
+/obj/structure/table/glass,
+/obj/item/paper_bin,
+/obj/item/pen,
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 9
+ dir = 4;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"cGY" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -20742,7 +20782,7 @@
/area/shuttle/pod_1)
"cOC" = (
/obj/structure/table/glass,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/folder,
/turf/simulated/floor/plasteel{
icon_state = "dark"
@@ -21473,19 +21513,6 @@
},
/turf/simulated/floor/transparent/glass/reinforced,
/area/station/maintenance/fore)
-"cRV" = (
-/obj/machinery/door/airlock/maintenance{
- name = "Aft Asteroid Maintenance"
- },
-/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/turf/simulated/floor/plating,
-/area/station/hallway/primary/aft/west)
"cRZ" = (
/obj/structure/closet,
/obj/effect/spawner/random/maintenance,
@@ -23026,6 +23053,10 @@
icon_state = "darkfull"
},
/area/station/supply/sorting)
+"dcD" = (
+/obj/effect/turf_decal/stripes/line,
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"dcG" = (
/obj/structure/lattice,
/obj/machinery/atmospherics/pipe/simple/heat_exchanging{
@@ -23059,11 +23090,6 @@
/obj/item/lightreplacer,
/turf/simulated/floor/catwalk,
/area/station/service/janitor)
-"dcR" = (
-/obj/structure/table,
-/obj/effect/spawner/random/maintenance,
-/turf/simulated/floor/plating/asteroid/ancient,
-/area/station/maintenance/port)
"dda" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 8
@@ -23486,6 +23512,25 @@
},
/turf/simulated/floor/plasteel,
/area/station/engineering/atmos)
+"der" = (
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/disposalpipe/sortjunction{
+ dir = 8;
+ sort_type_txt = "23"
+ },
+/turf/simulated/floor/plasteel/white,
+/area/station/science/hallway)
"det" = (
/obj/machinery/atmospherics/pipe/manifold/visible/yellow{
dir = 8
@@ -24013,6 +24058,12 @@
icon_state = "dark"
},
/area/station/hallway/primary/fore/north)
+"diW" = (
+/obj/effect/turf_decal/stripes/line{
+ dir = 1
+ },
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/aft/west)
"diY" = (
/turf/simulated/floor/plating,
/area/station/hallway/secondary/entry/north)
@@ -24331,6 +24382,13 @@
/obj/machinery/economy/vending/snack,
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/fore/north)
+"dmm" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"dmo" = (
/obj/structure/disposalpipe/segment,
/obj/machinery/door/poddoor/preopen{
@@ -24392,6 +24450,12 @@
/obj/machinery/atmospherics/pipe/simple/visible{
dir = 9
},
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 10
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 10
+ },
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -24762,6 +24826,12 @@
},
/turf/simulated/floor/plating,
/area/station/engineering/tech_storage)
+"dqK" = (
+/obj/structure/cable/orange{
+ icon_state = "1-4"
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"dqL" = (
/obj/structure/cable/orange{
icon_state = "1-2"
@@ -24798,16 +24868,6 @@
/obj/machinery/door/firedoor,
/turf/simulated/floor/plating,
/area/station/security/permabrig)
-"dqT" = (
-/obj/machinery/hydroponics/constructable{
- desc = "These are connected with an irrigation tube. You see a little pipe connecting the trays.";
- name = "Prison hydroponics tray";
- using_irrigation = 1
- },
-/obj/item/seeds/corn,
-/obj/item/seeds/corn,
-/turf/simulated/floor/grass,
-/area/station/security/permabrig)
"dqU" = (
/obj/machinery/camera{
c_tag = "Library North";
@@ -25114,27 +25174,6 @@
icon_state = "neutralfull"
},
/area/station/hallway/primary/fore/north)
-"duJ" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
- dir = 1
- },
-/obj/structure/railing{
- dir = 1
- },
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "blue"
- },
-/area/station/hallway/primary/fore/north)
"duL" = (
/obj/effect/turf_decal/stripes/corner,
/obj/structure/closet/wardrobe/pjs,
@@ -25342,6 +25381,12 @@
icon_state = "neutralcorner"
},
/area/station/hallway/secondary/entry/north)
+"dwy" = (
+/obj/structure/disposalpipe/junction{
+ dir = 4
+ },
+/turf/simulated/floor/plating,
+/area/station/maintenance/disposal/south)
"dwz" = (
/turf/simulated/wall,
/area/station/hallway/primary/central/east)
@@ -25705,9 +25750,17 @@
},
/area/station/hallway/primary/fore/north)
"dzr" = (
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"dzs" = (
/obj/structure/disposalpipe/trunk,
/obj/structure/disposaloutlet{
@@ -26161,9 +26214,13 @@
},
/area/station/medical/medbay)
"dBB" = (
-/obj/machinery/atmospherics/unary/vent_pump/on{
- dir = 1
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -26222,6 +26279,17 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/aft/west)
+"dBX" = (
+/obj/structure/cable/orange{
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "white"
+ },
+/area/station/science/toxins/mixing)
"dBY" = (
/obj/structure/table,
/obj/item/reagent_containers/condiment/peppermill{
@@ -26433,6 +26501,13 @@
icon_state = "asteroidplating"
},
/area/station/maintenance/port2)
+"dEg" = (
+/obj/structure/sink{
+ pixel_y = 24
+ },
+/mob/living/carbon/human/monkey,
+/turf/simulated/floor/grass,
+/area/station/science/genetics)
"dEi" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
dir = 4
@@ -26711,7 +26786,14 @@
/obj/structure/cable/orange{
icon_state = "4-8"
},
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
+/obj/structure/cable/orange{
+ d1 = 2;
+ d2 = 4;
+ icon_state = "2-4"
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
+ dir = 1
+ },
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -26802,6 +26884,23 @@
icon_state = "dark"
},
/area/station/engineering/gravitygenerator)
+"dJu" = (
+/obj/structure/fence{
+ dir = 4
+ },
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/cable/orange{
+ d2 = 2;
+ icon_state = "0-2"
+ },
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/asmaint)
"dJA" = (
/obj/structure/dispenser/oxygen,
/turf/simulated/floor/plating,
@@ -27418,6 +27517,29 @@
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/carpet/green,
/area/station/service/library)
+"dQW" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/railing{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "blue"
+ },
+/area/station/hallway/primary/fore/north)
"dQX" = (
/obj/machinery/atmospherics/portable/canister/air,
/obj/machinery/atmospherics/unary/portables_connector{
@@ -28013,6 +28135,13 @@
/obj/effect/spawner/random/maintenance,
/turf/simulated/floor/wood,
/area/station/maintenance/gambling_den)
+"dXR" = (
+/obj/machinery/atmospherics/portable/canister/toxins,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"dXV" = (
/turf/simulated/wall/r_wall,
/area/station/hallway/primary/aft/east)
@@ -28507,6 +28636,13 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/westalt)
+"egx" = (
+/obj/machinery/camera{
+ c_tag = "Genetics Monkey Dome";
+ dir = 9
+ },
+/turf/simulated/floor/grass,
+/area/station/science/genetics)
"egy" = (
/obj/structure/window/reinforced{
dir = 4
@@ -29626,8 +29762,8 @@
/area/station/medical/medbay)
"evS" = (
/obj/structure/table/wood,
-/obj/item/clothing/accessory/necklace/skullcodpiece,
-/obj/item/clothing/accessory/necklace/talisman,
+/obj/item/clothing/accessory/skullcodpiece,
+/obj/item/clothing/accessory/talisman,
/obj/item/clothing/gloves/bracer,
/obj/item/clothing/head/helmet/skull,
/turf/simulated/floor/plating/asteroid/ancient,
@@ -29757,11 +29893,8 @@
/turf/simulated/wall,
/area/station/security/processing)
"exL" = (
-/obj/structure/disposalpipe/sortjunction/reversed{
- dir = 1;
- sort_type_txt = "9"
- },
/obj/item/wrench,
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/east)
"exY" = (
@@ -29862,9 +29995,9 @@
/area/station/maintenance/fore2)
"ezn" = (
/obj/machinery/camera{
- c_tag = "AI Satellite Service Bay";
dir = 8;
- network = list("SS13","MiniSat")
+ network = list("Engineering","SS13");
+ c_tag = "Power Transmission Laser"
},
/obj/machinery/atmospherics/unary/vent_pump/on,
/turf/simulated/floor/plasteel{
@@ -30918,6 +31051,13 @@
icon_state = "darkyellowfull"
},
/area/station/command/bridge)
+"eMe" = (
+/obj/machinery/firealarm/directional/north,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"eMA" = (
/obj/machinery/light{
dir = 8
@@ -31208,6 +31348,9 @@
icon_state = "darkblue"
},
/area/station/maintenance/disposal/northeast)
+"eQg" = (
+/turf/simulated/wall/r_wall,
+/area/station/procedure/trainer_office)
"eQs" = (
/turf/simulated/mineral/ancient,
/area/station/turret_protected/aisat/interior)
@@ -31376,12 +31519,6 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/port)
-"eTe" = (
-/obj/machinery/hologram/holopad,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
- },
-/area/station/service/hydroponics)
"eTg" = (
/obj/machinery/recharge_station,
/turf/simulated/floor/plasteel{
@@ -31423,7 +31560,8 @@
/turf/simulated/floor/grass,
/area/station/hallway/spacebridge/scidock)
"eTI" = (
-/obj/effect/decal/cleanable/blood/splatter,
+/obj/structure/table,
+/obj/effect/spawner/random/maintenance,
/turf/simulated/floor/plating/asteroid/ancient,
/area/station/maintenance/port)
"eTJ" = (
@@ -31785,13 +31923,14 @@
/turf/simulated/floor/engine,
/area/station/engineering/control)
"eZR" = (
-/obj/machinery/dna_scannernew,
/obj/effect/turf_decal/delivery,
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/machine_frame,
/turf/simulated/floor/plasteel{
dir = 5;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"eZW" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -31895,13 +32034,6 @@
icon_state = "grimy"
},
/area/station/maintenance/fore2)
-"faV" = (
-/obj/machinery/atmospherics/pipe/simple/visible{
- dir = 4
- },
-/obj/item/clothing/head/cone,
-/turf/simulated/floor/plating,
-/area/station/hallway/primary/aft/west)
"fbs" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
@@ -32060,6 +32192,21 @@
slowdown = -0.3
},
/area/station/hallway/spacebridge/servsci)
+"feB" = (
+/obj/structure/cable/orange{
+ icon_state = "1-2"
+ },
+/obj/machinery/atmospherics/unary/vent_scrubber/on,
+/obj/machinery/light{
+ dir = 4
+ },
+/obj/machinery/alarm/directional/east,
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"feG" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -32136,12 +32283,12 @@
/turf/simulated/floor/transparent/glass/reinforced,
/area/station/maintenance/port)
"ffy" = (
-/obj/machinery/alarm/directional/east,
+/obj/machinery/economy/vending/genedrobe,
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 4
+ dir = 5;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"ffJ" = (
/obj/structure/disposalpipe/segment{
dir = 4;
@@ -32217,6 +32364,22 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/port)
+"fgU" = (
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/apmaint)
"fgV" = (
/obj/structure/disposalpipe/segment,
/obj/structure/cable{
@@ -32443,25 +32606,21 @@
},
/area/station/supply/lobby)
"fkc" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/computer/area_atmos{
- dir = 8
- },
-/obj/machinery/light{
- dir = 4
+/obj/machinery/newscaster/directional/east,
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkpurple"
},
-/obj/effect/turf_decal/delivery/hollow,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/area/station/science/genetics)
"fkk" = (
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
/obj/machinery/light/small{
dir = 8
},
/obj/structure/closet/firecloset/full,
/obj/item/coin/silver,
+/obj/structure/disposalpipe/junction/reversed{
+ dir = 4
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/south)
"fkn" = (
@@ -32504,20 +32663,6 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/port/south)
-"fkQ" = (
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/turf/simulated/floor/plating{
- icon_state = "asteroidplating"
- },
-/area/station/maintenance/apmaint)
"fkR" = (
/obj/machinery/mass_driver{
dir = 8;
@@ -32600,6 +32745,21 @@
icon_state = "solarpanel"
},
/area/station/engineering/solar/aft_starboard)
+"fmq" = (
+/obj/structure/table/glass,
+/obj/item/roller{
+ pixel_x = 4;
+ pixel_y = 6
+ },
+/obj/item/roller{
+ pixel_x = -2;
+ pixel_y = 10
+ },
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"fmz" = (
/obj/structure/closet/firecloset/full,
/turf/simulated/floor/plating,
@@ -32856,6 +33016,19 @@
icon_state = "whitepurple"
},
/area/station/science/toxins/mixing)
+"fqD" = (
+/obj/structure/cable/orange{
+ d2 = 2;
+ icon_state = "0-2"
+ },
+/obj/machinery/power/apc/directional/north,
+/obj/machinery/disposal,
+/obj/structure/disposalpipe/trunk,
+/turf/simulated/floor/plasteel{
+ dir = 5;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"fqM" = (
/obj/machinery/light/small{
dir = 1
@@ -33253,6 +33426,17 @@
},
/turf/simulated/floor/plasteel,
/area/station/security/permabrig)
+"fvu" = (
+/obj/structure/table/glass,
+/obj/item/toy/figure/crew/geneticist{
+ pixel_y = 10;
+ pixel_x = -10
+ },
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"fvz" = (
/obj/structure/disposalpipe/segment/corner{
dir = 4
@@ -33297,17 +33481,24 @@
},
/turf/simulated/floor/plating,
/area/station/hallway/primary/central/west)
+"fvV" = (
+/obj/structure/chair/office/dark{
+ dir = 4
+ },
+/obj/effect/landmark/start/detective,
+/turf/simulated/floor/carpet,
+/area/station/security/detective)
"fwd" = (
/obj/effect/decal/cleanable/crayon,
/turf/simulated/floor/wood,
/area/station/maintenance/asmaint)
"fwe" = (
-/obj/structure/disposalpipe/junction{
- dir = 1
- },
/obj/structure/cable/orange{
icon_state = "4-8"
},
+/obj/structure/disposalpipe/segment/corner{
+ dir = 1
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/east)
"fwi" = (
@@ -33541,6 +33732,15 @@
/obj/item/screwdriver,
/turf/simulated/floor/plating,
/area/station/maintenance/fore2)
+"fAf" = (
+/obj/structure/cable/orange{
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 6
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"fAx" = (
/obj/effect/spawner/random/dirt/frequent,
/obj/effect/decal/cleanable/generic,
@@ -33821,12 +34021,6 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/west)
-"fFu" = (
-/obj/structure/cable/orange{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
"fFx" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -34201,20 +34395,12 @@
},
/area/station/command/meeting_room)
"fKo" = (
-/obj/structure/extinguisher_cabinet{
- pixel_y = -28;
- name = "custom placement"
- },
-/obj/machinery/camera{
- c_tag = "Genetics";
- dir = 10;
- network = list("SS13","CMO")
- },
-/obj/structure/closet/secure_closet/medical1,
+/obj/effect/decal/cleanable/dirt,
+/obj/effect/decal/cleanable/blood/old,
/turf/simulated/floor/plasteel{
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"fKz" = (
/obj/structure/disposalpipe/segment/corner{
dir = 8;
@@ -34545,6 +34731,30 @@
icon_state = "cafeteria"
},
/area/station/science/hallway)
+"fOr" = (
+/obj/machinery/door/airlock/command/glass{
+ name = "Trainer's Office";
+ id_tag = "nct"
+ },
+/obj/effect/mapping_helpers/airlock/polarized{
+ id = "NCT"
+ },
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer,
+/obj/structure/cable/orange{
+ icon_state = "1-2"
+ },
+/obj/structure/cable/orange{
+ icon_state = "2-8"
+ },
+/obj/effect/mapping_helpers/airlock/autoname,
+/obj/machinery/door/firedoor,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/procedure/trainer_office)
"fOt" = (
/obj/structure/sign/poster/contraband/clown{
pixel_y = 32
@@ -34616,6 +34826,12 @@
icon_state = "dark"
},
/area/station/engineering/control)
+"fPD" = (
+/obj/structure/reagent_dispensers/fueltank,
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/port)
"fPE" = (
/obj/structure/disposalpipe/segment/corner{
dir = 4
@@ -35434,13 +35650,24 @@
/turf/simulated/floor/transparent/glass/reinforced,
/area/station/maintenance/fpmaint)
"gbz" = (
-/obj/effect/spawner/window/reinforced,
+/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
/area/station/maintenance/abandonedbar)
"gbC" = (
/obj/effect/mapping_helpers/turfs/damage,
/turf/simulated/floor/plating,
/area/station/maintenance/port2)
+"gbD" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "white"
+ },
+/area/station/science/toxins/mixing)
"gbF" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -35486,6 +35713,12 @@
icon_state = "dark"
},
/area/station/legal/courtroom)
+"gbR" = (
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"gch" = (
/turf/simulated/wall,
/area/station/command/office/ntrep)
@@ -36298,6 +36531,10 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/starboard)
+"gpZ" = (
+/obj/effect/mapping_helpers/turfs/damage,
+/turf/simulated/floor/wood,
+/area/station/maintenance/asmaint)
"gqQ" = (
/obj/structure/table/wood,
/obj/effect/landmark/spawner/nukedisc_respawn,
@@ -36398,6 +36635,24 @@
/obj/effect/spawner/random/barrier/grille_maybe,
/turf/simulated/floor/plating,
/area/station/maintenance/fsmaint)
+"gsu" = (
+/obj/structure/table/wood,
+/obj/item/paper_bin{
+ pixel_y = 4;
+ pixel_x = -5
+ },
+/obj/item/pen{
+ pixel_x = 8;
+ pixel_y = 8
+ },
+/obj/machinery/light{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"gsx" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -36450,12 +36705,6 @@
/mob/living/simple_animal/mouse/brown,
/turf/simulated/floor/plating/asteroid/ancient,
/area/station/maintenance/port2)
-"gtz" = (
-/obj/structure/machine_frame,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
- },
-/area/station/engineering/break_room)
"gtH" = (
/obj/structure/cable/orange{
icon_state = "1-2"
@@ -36472,6 +36721,13 @@
/obj/effect/spawner/airlock/s_to_n,
/turf/simulated/wall,
/area/station/hallway/primary/aft/west)
+"gtY" = (
+/obj/machinery/atmospherics/portable/canister/oxygen,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"gtZ" = (
/obj/effect/spawner/random/fungus/probably,
/obj/effect/mapping_helpers/turfs/rust,
@@ -36684,9 +36940,6 @@
/turf/simulated/floor/plating,
/area/station/supply/expedition)
"gwO" = (
-/obj/structure/disposalpipe/segment/corner{
- dir = 1
- },
/obj/effect/spawner/grouped_spawner{
group_id = "tunnelbats";
max_per_spawner = 1;
@@ -37240,35 +37493,6 @@
icon_state = "dark"
},
/area/station/turret_protected/aisat/interior)
-"gEz" = (
-/obj/structure/chair/office/light{
- dir = 4
- },
-/obj/effect/landmark/start/geneticist,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "whitepurple"
- },
-/area/station/science/genetics)
-"gEI" = (
-/obj/machinery/door/airlock/public/glass{
- name = "Walkway"
- },
-/obj/machinery/door/firedoor,
-/obj/machinery/door/poddoor/preopen{
- id_tag = "servlockdown";
- layer = 2.6;
- name = "Service Lockdown"
- },
-/obj/structure/disposalpipe/segment{
- color = "#954535"
- },
-/obj/effect/turf_decal/caution/red,
-/turf/simulated/floor/plasteel{
- dir = 8;
- icon_state = "neutralcorner"
- },
-/area/station/hallway/spacebridge/sercom)
"gEJ" = (
/obj/machinery/light/small,
/obj/machinery/atmospherics/unary/vent_pump/on{
@@ -37596,6 +37820,16 @@
},
/turf/simulated/floor/plasteel,
/area/station/service/janitor)
+"gJq" = (
+/obj/structure/extinguisher_cabinet{
+ name = "west bump";
+ pixel_x = -30
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 8
+ },
+/area/station/science/storage)
"gJw" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -37767,19 +38001,6 @@
},
/turf/simulated/floor/transparent/glass/reinforced,
/area/station/maintenance/starboard)
-"gLW" = (
-/obj/effect/turf_decal/stripes/line{
- dir = 8
- },
-/obj/structure/extinguisher_cabinet{
- name = "north bump";
- pixel_y = 30
- },
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "purple"
- },
-/area/station/science/storage)
"gLX" = (
/mob/living/simple_animal/mouse/brown,
/turf/simulated/floor/plating{
@@ -38411,22 +38632,13 @@
},
/area/station/supply/lobby)
"gVx" = (
-/obj/machinery/camera{
- c_tag = "Toxins Storage";
- dir = 9;
- network = list("SS13","RD")
- },
-/obj/machinery/light_switch{
- dir = 8;
- pixel_x = 24;
- name = "east bump"
- },
-/obj/effect/decal/cleanable/dirt,
+/obj/machinery/firealarm/directional/east,
+/obj/structure/closet/secure_closet/medical1,
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 4
+ dir = 4;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"gVK" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -38504,6 +38716,14 @@
/obj/structure/closet/firecloset/full,
/turf/simulated/floor/plating,
/area/station/hallway/primary/fore/north)
+"gXM" = (
+/obj/machinery/atmospherics/portable/canister/oxygen,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 4
+ },
+/area/station/science/storage)
"gXW" = (
/obj/machinery/light/small{
dir = 8
@@ -38538,8 +38758,6 @@
dir = 4
},
/obj/structure/cable/orange{
- d1 = 4;
- d2 = 8;
icon_state = "4-8"
},
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
@@ -38613,13 +38831,13 @@
/turf/simulated/floor/plasteel,
/area/station/hallway/secondary/entry/west)
"gZc" = (
-/obj/structure/disposalpipe/sortjunction/reversed{
- dir = 1;
- sort_type_txt = "11"
- },
/obj/structure/cable/orange{
icon_state = "1-8"
},
+/obj/structure/disposalpipe/sortjunction/reversed{
+ dir = 1;
+ sort_type_txt = "9"
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/east)
"gZu" = (
@@ -38669,6 +38887,16 @@
"gZI" = (
/turf/simulated/floor/wood,
/area/station/command/office/blueshield)
+"gZM" = (
+/obj/structure/table/wood,
+/obj/item/flashlight/lamp/green{
+ pixel_y = 8
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkfull"
+ },
+/area/station/procedure/trainer_office)
"gZS" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 9
@@ -38816,14 +39044,6 @@
/obj/item/reagent_containers/spray/cleaner,
/turf/simulated/floor/plasteel,
/area/station/service/janitor)
-"hcm" = (
-/obj/machinery/hologram/holopad,
-/obj/effect/decal/cleanable/dirt,
-/obj/effect/turf_decal/stripes/corner{
- dir = 1
- },
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
"hco" = (
/mob/living/carbon/human/monkey/teeny,
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
@@ -39121,6 +39341,17 @@
icon_state = "floorgrime"
},
/area/station/security/permabrig)
+"hhl" = (
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/effect/decal/cleanable/blood/old,
+/obj/item/toy/russian_revolver,
+/obj/effect/landmark/spawner/rev,
+/turf/simulated/floor/wood,
+/area/station/maintenance/gambling_den)
"hhs" = (
/obj/structure/fence{
dir = 4
@@ -39918,12 +40149,13 @@
},
/area/station/hallway/primary/fore/east)
"hrj" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/structure/cable/orange{
- icon_state = "1-2"
+/obj/machinery/atmospherics/unary/vent_scrubber/on{
+ dir = 8
},
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"hrm" = (
/obj/effect/turf_decal/stripes/red/line{
dir = 1
@@ -40326,13 +40558,6 @@
slowdown = -0.3
},
/area/station/hallway/spacebridge/servsci)
-"hwg" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/atmospherics/unary/vent_pump/on{
- dir = 4
- },
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
"hwm" = (
/obj/structure/chair/comfy{
dir = 8
@@ -40619,6 +40844,9 @@
pixel_x = 24;
name = "east bump"
},
+/obj/machinery/atmospherics/unary/portables_connector{
+ dir = 8
+ },
/turf/simulated/floor/plasteel{
dir = 4;
icon_state = "whitepurple"
@@ -40866,6 +41094,14 @@
icon_state = "asteroidplating"
},
/area/station/hallway/secondary/exit)
+"hDQ" = (
+/obj/structure/cable/orange{
+ icon_state = "4-8"
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "white"
+ },
+/area/station/science/toxins/mixing)
"hEe" = (
/obj/machinery/disposal,
/obj/structure/disposalpipe/trunk,
@@ -41455,6 +41691,11 @@
},
/turf/simulated/floor/plasteel/white,
/area/station/science/hallway)
+"hKn" = (
+/obj/effect/spawner/window/reinforced,
+/obj/structure/sign/nosmoking_2,
+/turf/simulated/floor/plating,
+/area/station/science/storage)
"hKu" = (
/obj/structure/cable/orange{
icon_state = "1-4"
@@ -42014,6 +42255,13 @@
},
/turf/simulated/floor/wood,
/area/station/public/pet_store)
+"hRi" = (
+/obj/machinery/atmospherics/portable/canister/sleeping_agent,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"hRk" = (
/obj/structure/cable/orange{
icon_state = "1-2"
@@ -42433,15 +42681,6 @@
icon_state = "whiteblue"
},
/area/station/medical/surgery/secondary)
-"hXo" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/atmospherics/portable/canister/carbon_dioxide,
-/obj/effect/turf_decal/stripes/line{
- dir = 1
- },
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
"hXC" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 9
@@ -43694,6 +43933,21 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/port)
+"inl" = (
+/obj/structure/fence,
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/cable/orange{
+ d2 = 8;
+ icon_state = "0-8"
+ },
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/asmaint)
"inn" = (
/turf/simulated/floor/plasteel{
dir = 8;
@@ -43726,6 +43980,13 @@
icon_state = "browncorner"
},
/area/station/hallway/primary/fore/east)
+"inP" = (
+/obj/structure/rack,
+/obj/effect/spawner/random/maintenance,
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/port)
"inQ" = (
/obj/machinery/door/airlock/maintenance{
name = "Port Asteroid Maintenance"
@@ -45071,17 +45332,6 @@
"iFs" = (
/turf/simulated/wall,
/area/mine/unexplored/cere/research)
-"iFv" = (
-/obj/machinery/door/window/classic/normal{
- name = "Monkey Pen";
- dir = 8
- },
-/obj/effect/mapping_helpers/airlock/windoor/access/any/medical/genetics{
- dir = 8
- },
-/mob/living/carbon/human/monkey,
-/turf/simulated/floor/grass,
-/area/station/science/genetics)
"iFG" = (
/obj/structure/cable/orange{
icon_state = "1-2"
@@ -45115,6 +45365,17 @@
slowdown = -0.3
},
/area/station/hallway/spacebridge/cargocom)
+"iFT" = (
+/obj/effect/turf_decal/delivery/hollow,
+/obj/machinery/atmospherics/portable/canister/carbon_dioxide,
+/obj/effect/turf_decal/stripes/line{
+ dir = 8
+ },
+/obj/machinery/light,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"iFV" = (
/obj/structure/cable{
icon_state = "1-4"
@@ -45778,6 +46039,18 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plating,
/area/station/maintenance/fore)
+"iNX" = (
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 4
+ },
+/obj/machinery/camera{
+ c_tag = "Blueshield's Office";
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"iOd" = (
/obj/structure/railing{
dir = 6
@@ -45912,6 +46185,17 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/fpmaint)
+"iPQ" = (
+/obj/machinery/light{
+ dir = 8
+ },
+/obj/structure/table/glass,
+/obj/item/storage/box/disks,
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"iPT" = (
/obj/effect/spawner/window/reinforced/grilled,
/obj/structure/cable/orange{
@@ -46508,11 +46792,9 @@
/obj/structure/window/reinforced{
dir = 8
},
-/obj/structure/sink{
- pixel_y = 24
- },
-/turf/simulated/floor/grass,
-/area/station/science/genetics)
+/mob/living/simple_animal/mouse/gray,
+/turf/simulated/floor/plating/asteroid/ancient,
+/area/station/maintenance/starboard)
"iXK" = (
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 10
@@ -46555,9 +46837,8 @@
/area/station/maintenance/disposal)
"iYc" = (
/obj/effect/spawner/window/reinforced,
-/obj/structure/sign/nosmoking_1,
/turf/simulated/floor/plating,
-/area/station/science/storage)
+/area/station/science/genetics)
"iYg" = (
/obj/effect/mapping_helpers/turfs/rust,
/turf/simulated/wall/r_wall,
@@ -46904,10 +47185,6 @@
icon_state = "redcorner"
},
/area/station/maintenance/fpmaint)
-"jce" = (
-/obj/effect/mapping_helpers/turfs/damage,
-/turf/simulated/floor/wood,
-/area/station/maintenance/asmaint)
"jch" = (
/obj/structure/disposalpipe/segment,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
@@ -46977,12 +47254,6 @@
icon_state = "dark"
},
/area/station/security/brig)
-"jdf" = (
-/obj/machinery/atmospherics/unary/vent_scrubber/on,
-/turf/simulated/floor/plasteel{
- icon_state = "white"
- },
-/area/station/science/toxins/mixing)
"jdC" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
/obj/structure/disposalpipe/junction/reversed{
@@ -47019,6 +47290,20 @@
/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
/area/station/maintenance/solar_maintenance/port)
+"jdL" = (
+/obj/structure/cable/orange{
+ icon_state = "1-2"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 10
+ },
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel{
+ dir = 6;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"jdN" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -47212,13 +47497,9 @@
},
/area/station/security/lobby)
"jgc" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/toxins,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "purple"
- },
-/area/station/science/storage)
+/obj/structure/window/reinforced,
+/turf/simulated/floor/grass,
+/area/station/science/genetics)
"jgl" = (
/obj/machinery/atmospherics/binary/valve,
/obj/machinery/camera{
@@ -47284,7 +47565,10 @@
dir = 1
},
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 10
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 6
},
/turf/simulated/floor/plasteel{
dir = 1;
@@ -47446,12 +47730,19 @@
/turf/simulated/floor/plating,
/area/station/service/bar)
"jiv" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/oxygen,
+/obj/machinery/camera/autoname{
+ dir = 10
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 5
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 5
+ },
/turf/simulated/floor/plasteel{
- icon_state = "purple"
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"jiw" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 1
@@ -48399,10 +48690,15 @@
},
/area/station/hallway/primary/fore/east)
"jum" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/oxygen,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"juH" = (
/obj/machinery/power/terminal{
dir = 1
@@ -49450,7 +49746,7 @@
"jFG" = (
/obj/structure/closet/secure_closet/blueshield,
/obj/machinery/camera{
- c_tag = "Blueshield's Office";
+ c_tag = "Trainer's Office";
dir = 1
},
/turf/simulated/floor/wood,
@@ -49841,6 +50137,14 @@
},
/turf/simulated/floor/plating,
/area/station/hallway/primary/aft/west)
+"jKe" = (
+/obj/structure/chair/sofa/bench{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "purplefull"
+ },
+/area/station/hallway/primary/aft/west)
"jKg" = (
/obj/structure/cable/yellow{
icon_state = "1-2"
@@ -50167,6 +50471,16 @@
icon_state = "whitepurplefull"
},
/area/station/science/xenobiology)
+"jOt" = (
+/obj/structure/chair/office/light{
+ dir = 4
+ },
+/obj/effect/landmark/start/geneticist,
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"jOE" = (
/obj/structure/disposalpipe/segment/corner,
/turf/simulated/floor/plating{
@@ -50352,6 +50666,13 @@
},
/turf/simulated/floor/plating,
/area/station/hallway/primary/starboard/south)
+"jQT" = (
+/obj/item/reagent_containers/drinks/drinkingglass/shotglass,
+/obj/structure/closet/crate/freezer,
+/obj/machinery/power/apc/directional/west,
+/obj/structure/cable/orange,
+/turf/simulated/floor/wood,
+/area/station/public/pet_store)
"jQZ" = (
/obj/effect/spawner/airlock,
/turf/simulated/wall,
@@ -50473,6 +50794,15 @@
icon_state = "dark"
},
/area/station/science/toxins/launch)
+"jSi" = (
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/unary/vent_scrubber/on{
+ dir = 8
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "white"
+ },
+/area/station/science/toxins/mixing)
"jSk" = (
/obj/structure/railing{
dir = 10
@@ -50597,11 +50927,13 @@
/turf/simulated/floor/plating,
/area/station/engineering/tech_storage)
"jTr" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/atmospherics/portable/canister/toxins,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/obj/machinery/dna_scannernew,
+/obj/effect/turf_decal/delivery,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"jTA" = (
/obj/structure/disposalpipe/sortjunction{
dir = 4;
@@ -50930,14 +51262,11 @@
icon_state = "1-2"
},
/obj/structure/disposalpipe/segment,
-/obj/effect/spawner/random/dirt/frequent,
-/obj/structure/cable/orange{
- icon_state = "1-4"
- },
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"jYR" = (
/obj/structure/chair/office/light,
/turf/simulated/floor/plasteel{
@@ -50953,12 +51282,6 @@
icon_state = "vault"
},
/area/station/command/vault)
-"jZe" = (
-/obj/machinery/atmospherics/pipe/simple/visible{
- dir = 4
- },
-/turf/simulated/floor/plating,
-/area/station/hallway/primary/fore/north)
"jZl" = (
/obj/structure/cable/orange{
icon_state = "1-2"
@@ -51014,12 +51337,6 @@
/obj/structure/cable/orange{
icon_state = "4-8"
},
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
/obj/effect/mapping_helpers/airlock/access/all/science/tox,
/obj/machinery/door/airlock/research,
/obj/effect/mapping_helpers/airlock/autoname,
@@ -51111,6 +51428,13 @@
icon_state = "whitepurple"
},
/area/station/science/toxins/mixing)
+"kam" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "whitepurplecorner"
+ },
+/area/station/science/toxins/mixing)
"kao" = (
/obj/machinery/door_timer/cell_4{
pixel_y = -32
@@ -51133,6 +51457,12 @@
/obj/structure/cable,
/turf/simulated/floor/plating,
/area/station/maintenance/solar_maintenance/aft)
+"kaP" = (
+/obj/machinery/atmospherics/pipe/simple/visible{
+ dir = 4
+ },
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/fore/north)
"kbd" = (
/obj/machinery/power/terminal{
dir = 4
@@ -51344,6 +51674,21 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/turf/simulated/floor/plating,
/area/station/turret_protected/aisat/interior/secondary)
+"kem" = (
+/obj/machinery/light{
+ dir = 8
+ },
+/obj/structure/sign/directions/security{
+ dir = 1;
+ pixel_x = -32
+ },
+/obj/structure/chair/sofa/bench/right{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "purplefull"
+ },
+/area/station/hallway/primary/aft/west)
"ken" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/cyan,
/obj/machinery/atmospherics/meter,
@@ -51420,10 +51765,6 @@
},
/turf/simulated/floor/engine,
/area/station/engineering/control)
-"kfA" = (
-/obj/machinery/kitchen_machine/grill,
-/turf/simulated/floor/wood,
-/area/station/maintenance/asmaint)
"kfK" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
@@ -51761,6 +52102,17 @@
/obj/effect/spawner/random/dirt/frequent,
/turf/simulated/floor/plasteel,
/area/station/supply/miningdock)
+"kkn" = (
+/obj/structure/table,
+/obj/item/paper_bin,
+/obj/item/pen{
+ pixel_x = 4;
+ pixel_y = 4
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "purplefull"
+ },
+/area/station/hallway/primary/aft/west)
"kkq" = (
/obj/structure/table/flipped{
dir = 4
@@ -51777,14 +52129,11 @@
/turf/simulated/floor/plating,
/area/station/maintenance/fore2)
"kkD" = (
-/obj/structure/table/glass,
-/obj/item/storage/box/rxglasses,
-/obj/machinery/firealarm/directional/south,
-/obj/item/folder/white,
-/turf/simulated/floor/plasteel{
- icon_state = "whitepurple"
- },
-/area/station/science/genetics)
+/obj/effect/decal/cleanable/dirt,
+/obj/effect/decal/remains/xeno,
+/obj/effect/decal/cleanable/blood/old,
+/turf/simulated/floor/plating,
+/area/station/maintenance/starboard)
"kkS" = (
/obj/structure/cable{
icon_state = "2-4"
@@ -52964,6 +53313,11 @@
icon_state = "darkbrown"
},
/area/station/supply/expedition)
+"kzi" = (
+/mob/living/carbon/human/monkey,
+/obj/structure/flora/tree/palm,
+/turf/simulated/floor/grass,
+/area/station/science/genetics)
"kzo" = (
/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
dir = 6
@@ -53101,6 +53455,12 @@
icon_state = "white"
},
/area/station/medical/medbay)
+"kAT" = (
+/obj/machinery/hologram/holopad,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/service/hydroponics)
"kAX" = (
/obj/machinery/door/airlock/glass{
id_tag = "magistrateofficedoor"
@@ -53129,6 +53489,9 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/aft/west)
+"kAZ" = (
+/turf/simulated/wall,
+/area/station/procedure/trainer_office)
"kBa" = (
/obj/machinery/door/airlock/maintenance{
name = "Central Asteroid Maintenance"
@@ -53752,6 +54115,9 @@
/obj/machinery/light/small{
dir = 4
},
+/obj/structure/cable/yellow{
+ icon_state = "1-2"
+ },
/turf/simulated/floor/plating,
/area/station/hallway/primary/fore/north)
"kKp" = (
@@ -54488,6 +54854,15 @@
},
/turf/simulated/floor/plating,
/area/station/turret_protected/aisat/interior/secondary)
+"kTR" = (
+/obj/structure/chair/office/light,
+/obj/effect/landmark/start/geneticist,
+/obj/machinery/requests_console/directional/west,
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"kUi" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 5
@@ -54582,8 +54957,6 @@
/area/station/maintenance/apmaint)
"kVq" = (
/obj/structure/cable/orange{
- d1 = 4;
- d2 = 8;
icon_state = "4-8"
},
/obj/structure/disposalpipe/segment{
@@ -55588,6 +55961,15 @@
},
/turf/simulated/floor/plasteel/freezer,
/area/station/service/kitchen)
+"ljz" = (
+/obj/effect/decal/cleanable/blood/splatter,
+/turf/simulated/floor/plating/asteroid/ancient,
+/area/station/maintenance/port)
+"ljK" = (
+/obj/item/trash/spentcasing/shotgun/beanbag,
+/obj/item/trash/spentcasing/shotgun/beanbag,
+/turf/simulated/floor/plating,
+/area/station/maintenance/asmaint)
"ljL" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/disposalpipe/segment,
@@ -55711,7 +56093,7 @@
pixel_x = 7;
pixel_y = -3
},
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "whiteblue"
@@ -55876,6 +56258,15 @@
/obj/machinery/firealarm/directional/west,
/turf/simulated/floor/wood,
/area/station/service/bar)
+"lmd" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "bs"
+ },
+/obj/structure/cable/orange{
+ icon_state = "0-4"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"lme" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 8
@@ -56521,6 +56912,29 @@
},
/turf/space,
/area/station/engineering/solar/fore_port)
+"ltY" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
+ dir = 1
+ },
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/railing{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "blue"
+ },
+/area/station/hallway/primary/fore/north)
"lux" = (
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plating{
@@ -56672,6 +57086,12 @@
icon_state = "escape"
},
/area/station/hallway/secondary/exit)
+"lwF" = (
+/obj/machinery/light/small{
+ dir = 4
+ },
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/fore/north)
"lwM" = (
/obj/effect/spawner/window/reinforced/grilled,
/obj/structure/disposalpipe/segment,
@@ -57225,13 +57645,13 @@
},
/area/station/maintenance/apmaint)
"lDh" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/sleeping_agent,
+/obj/machinery/alarm/directional/west,
+/obj/structure/chair/comfy/purp,
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 8
+ dir = 8;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"lDm" = (
/obj/structure/disposalpipe/segment{
color = "#954535"
@@ -57395,13 +57815,15 @@
},
/turf/space,
/area/space/nearstation)
-"lFm" = (
-/obj/structure/window/reinforced{
- dir = 8
+"lFo" = (
+/obj/structure/cable/orange{
+ icon_state = "4-8"
},
-/mob/living/carbon/human/monkey,
-/turf/simulated/floor/grass,
-/area/station/science/genetics)
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"lFz" = (
/obj/structure/toilet{
pixel_y = 6
@@ -57748,17 +58170,6 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/fsmaint)
-"lKF" = (
-/obj/machinery/camera/autoname{
- dir = 9
- },
-/obj/machinery/door_control{
- id = "pet_shop";
- name = "Storefront Shutters Control";
- pixel_x = 24
- },
-/turf/simulated/floor/wood,
-/area/station/public/pet_store)
"lKI" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 10
@@ -57772,18 +58183,22 @@
/turf/simulated/floor/wood,
/area/station/command/office/hos)
"lKN" = (
-/obj/effect/mapping_helpers/airlock/access/all/science/tox_storage,
-/obj/machinery/door/firedoor,
+/obj/structure/disposalpipe/segment,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 2;
icon_state = "1-2"
},
-/obj/machinery/door/airlock/research/glass{
- name = "Toxins Storage"
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/door/firedoor,
+/obj/effect/mapping_helpers/airlock/access/all/medical/genetics,
+/obj/machinery/door/airlock/medical/glass,
+/obj/effect/mapping_helpers/airlock/autoname,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
},
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/area/station/science/genetics)
"lKW" = (
/obj/structure/disposalpipe/segment/corner{
dir = 4
@@ -58770,14 +59185,6 @@
icon_state = "asteroidplating"
},
/area/station/maintenance/starboard)
-"lWM" = (
-/obj/machinery/atmospherics/portable/scrubber/huge/stationary,
-/obj/effect/turf_decal/delivery/hollow,
-/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 5
- },
-/area/station/science/storage)
"lWT" = (
/turf/simulated/wall,
/area/station/hallway/secondary/garden)
@@ -59141,13 +59548,13 @@
/obj/structure/cable/orange{
icon_state = "4-8"
},
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+/obj/structure/disposalpipe/segment/corner{
dir = 4
},
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
},
-/obj/structure/disposalpipe/segment/corner{
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
},
/turf/simulated/floor/plasteel{
@@ -59480,12 +59887,6 @@
/obj/effect/mapping_helpers/turfs/damage,
/turf/simulated/floor/plating,
/area/station/maintenance/port)
-"mgq" = (
-/obj/structure/reagent_dispensers/fueltank,
-/turf/simulated/floor/plating{
- icon_state = "asteroidplating"
- },
-/area/station/maintenance/port)
"mgu" = (
/obj/docking_port/stationary{
dir = 4;
@@ -60925,9 +61326,6 @@
/turf/simulated/floor/wood,
/area/station/service/bar)
"mAe" = (
-/obj/machinery/atmospherics/pipe/simple/visible{
- dir = 9
- },
/obj/item/radio/intercom{
pixel_y = -28;
name = "custom placement"
@@ -61181,6 +61579,10 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
},
+/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
+/obj/machinery/door/airlock/maintenance{
+ name = "Aft Asteroid Maintenance"
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/apmaint)
"mDy" = (
@@ -61268,20 +61670,6 @@
/obj/machinery/door/firedoor,
/turf/simulated/floor/plating,
/area/station/supply/miningdock)
-"mEp" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/turf/simulated/floor/plating{
- icon_state = "asteroidplating"
- },
-/area/station/maintenance/apmaint)
"mEq" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/wall,
@@ -62319,12 +62707,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/supply/lobby)
-"mTp" = (
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "whitepurplecorner"
- },
-/area/station/science/genetics)
"mTy" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
@@ -62820,6 +63202,17 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/north)
+"mZk" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment,
+/turf/simulated/floor/plasteel/white,
+/area/station/science/hallway)
"mZu" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 5
@@ -62914,6 +63307,10 @@
icon_state = "redcorner"
},
/area/station/hallway/primary/fore/west)
+"naB" = (
+/obj/machinery/suit_storage_unit/standard_unit,
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/aft/west)
"naI" = (
/obj/structure/closet/wardrobe/white,
/obj/machinery/atmospherics/unary/vent_scrubber/on{
@@ -63053,12 +63450,9 @@
"ncF" = (
/obj/structure/fence,
/obj/structure/cable/orange{
- d1 = 4;
- d2 = 8;
icon_state = "4-8"
},
/obj/structure/cable/orange{
- d2 = 8;
icon_state = "0-8"
},
/turf/simulated/floor/plating{
@@ -63503,6 +63897,7 @@
dir = 1
},
/obj/machinery/atmospherics/portable/canister/air,
+/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/south)
"njC" = (
@@ -63870,10 +64265,6 @@
/area/station/legal/courtroom)
"nop" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/machinery/atmospherics/pipe/simple/visible{
- dir = 9
- },
-/obj/effect/spawner/random/dirt/often,
/obj/structure/sign/securearea{
desc = "A warning sign which reads 'EXTERNAL AIRLOCK'";
icon_state = "space";
@@ -63881,6 +64272,10 @@
name = "EXTERNAL AIRLOCK";
pixel_x = 32
},
+/obj/effect/spawner/random/dirt/often,
+/obj/machinery/atmospherics/pipe/simple/visible{
+ dir = 9
+ },
/turf/simulated/floor/plating,
/area/station/hallway/primary/aft/west)
"noy" = (
@@ -64104,6 +64499,14 @@
},
/turf/simulated/floor/plating,
/area/station/engineering/tech_storage)
+"nsy" = (
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/service/hydroponics)
"nsC" = (
/obj/structure/sign/poster/official/random{
pixel_y = 32
@@ -64200,6 +64603,22 @@
icon_state = "grimy"
},
/area/station/maintenance/fore2)
+"ntN" = (
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/apmaint)
"ntP" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
@@ -64400,15 +64819,14 @@
},
/area/station/hallway/primary/fore/west)
"nvF" = (
-/obj/machinery/door/airlock/maintenance{
- name = "Genetics Research"
- },
-/obj/effect/mapping_helpers/airlock/access/all/medical/genetics,
/obj/structure/cable/orange{
icon_state = "1-2"
},
/obj/structure/disposalpipe/segment,
-/obj/effect/spawner/random/dirt/frequent,
+/obj/machinery/door/airlock/maintenance{
+ name = "Medbay Maintenance"
+ },
+/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
/turf/simulated/floor/plating,
/area/station/maintenance/starboard)
"nvI" = (
@@ -64700,6 +65118,9 @@
icon_state = "asteroidplating"
},
/area/station/hallway/spacebridge/scidock)
+"nzo" = (
+/turf/simulated/wall/r_wall,
+/area/station/science/genetics)
"nzH" = (
/obj/effect/turf_decal/stripes/line{
dir = 9
@@ -64786,6 +65207,18 @@
icon_state = "darkbrown"
},
/area/station/supply/office)
+"nCa" = (
+/obj/structure/cable/orange{
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 6
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"nCd" = (
/obj/structure/cable/orange{
icon_state = "1-2"
@@ -65328,6 +65761,12 @@
/obj/effect/mapping_helpers/airlock/access/all/science/tox,
/obj/machinery/door/airlock/research,
/obj/effect/mapping_helpers/airlock/autoname,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
@@ -65521,19 +65960,11 @@
/turf/simulated/floor/plating,
/area/station/maintenance/solar_maintenance/aft_starboard)
"nLc" = (
-/obj/machinery/light{
- dir = 8
- },
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/carbon_dioxide,
-/obj/effect/turf_decal/stripes/line{
- dir = 1
- },
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 8
+ dir = 8;
+ icon_state = "darkpurplecorners"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"nLd" = (
/obj/machinery/door/firedoor,
/obj/effect/mapping_helpers/airlock/autoname,
@@ -66278,15 +66709,6 @@
},
/turf/simulated/floor/plating,
/area/station/security/brig)
-"nWm" = (
-/obj/machinery/atmospherics/unary/vent_scrubber/on{
- dir = 4
- },
-/obj/effect/turf_decal/stripes/line{
- dir = 8
- },
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
"nWq" = (
/obj/item/cigbutt/roach,
/obj/effect/decal/cleanable/dirt,
@@ -66763,15 +67185,6 @@
/obj/effect/spawner/random/dirt/often,
/turf/simulated/floor/plating,
/area/station/hallway/primary/aft/west)
-"odu" = (
-/obj/machinery/atmospherics/unary/portables_connector{
- dir = 4
- },
-/turf/simulated/floor/plasteel{
- dir = 8;
- icon_state = "whitepurple"
- },
-/area/station/science/toxins/mixing)
"odF" = (
/obj/effect/spawner/window/reinforced/grilled,
/obj/machinery/door/poddoor/preopen{
@@ -66983,12 +67396,17 @@
},
/area/station/service/chapel)
"ogJ" = (
-/obj/effect/decal/cleanable/dirt,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
/turf/simulated/floor/plasteel{
dir = 8;
- icon_state = "purplecorner"
+ icon_state = "darkpurplecorners"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"ogV" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
@@ -67092,18 +67510,6 @@
},
/turf/simulated/floor/transparent/glass/reinforced,
/area/station/maintenance/port)
-"oii" = (
-/obj/structure/disposalpipe/segment{
- color = "#954535"
- },
-/obj/effect/turf_decal/stripes/line{
- dir = 8
- },
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "neutralcorner"
- },
-/area/station/hallway/primary/aft/west)
"oip" = (
/obj/machinery/status_display{
layer = 4
@@ -67115,18 +67521,16 @@
icon_state = "1-2"
},
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/structure/disposalpipe/sortjunction{
- dir = 2;
- sort_type_txt = "23"
- },
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 5
},
+/obj/structure/disposalpipe/junction,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"oiD" = (
/obj/structure/table/wood,
/obj/item/folder/blue,
@@ -67201,15 +67605,6 @@
icon_state = "bcircuit"
},
/area/station/turret_protected/ai)
-"ojL" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 10
- },
-/obj/structure/cable/orange{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
"ojN" = (
/turf/simulated/wall,
/area/station/maintenance/turbine)
@@ -67442,13 +67837,21 @@
},
/area/station/maintenance/asmaint)
"omL" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/oxygen,
+/obj/machinery/power/apc/directional/west,
+/obj/structure/cable/orange{
+ icon_state = "0-4"
+ },
+/obj/structure/table/glass,
+/obj/item/ashtray/glass,
+/obj/item/storage/fancy/cigarettes/cigpack_carp{
+ pixel_x = 9;
+ pixel_y = 6
+ },
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 8
+ dir = 8;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"omT" = (
/obj/structure/reagent_dispensers/peppertank{
pixel_y = 32
@@ -67526,29 +67929,6 @@
},
/turf/simulated/floor/plasteel/white,
/area/station/science/hallway)
-"oop" = (
-/obj/machinery/light{
- dir = 8
- },
-/obj/structure/disposalpipe/segment{
- color = "#954535"
- },
-/obj/machinery/door_control{
- id = "scieva";
- name = "Science EVA shutter control";
- pixel_x = -25;
- pixel_y = 24;
- req_one_access = list(19,41)
- },
-/obj/structure/sign/directions/security{
- dir = 1;
- pixel_x = -32
- },
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "neutralcorner"
- },
-/area/station/hallway/primary/aft/west)
"ooq" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
@@ -67609,18 +67989,19 @@
},
/area/station/medical/virology)
"ooJ" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
/obj/structure/cable/orange{
icon_state = "4-8"
},
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
- dir = 1
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/disposalpipe/junction{
+ dir = 8
},
+/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
/turf/simulated/floor/plasteel{
dir = 4;
icon_state = "bluecorner"
@@ -67690,6 +68071,13 @@
},
/turf/simulated/floor/plating/asteroid/ancient,
/area/space/nearstation/disposals)
+"oqg" = (
+/obj/effect/mapping_helpers/airlock/windoor/access/any/medical/genetics,
+/obj/machinery/door/window/classic/normal{
+ name = "Monkey Pen"
+ },
+/turf/simulated/floor/grass,
+/area/station/science/genetics)
"oql" = (
/obj/structure/lattice,
/obj/machinery/camera{
@@ -67969,6 +68357,17 @@
/obj/effect/mapping_helpers/turfs/rust,
/turf/simulated/wall,
/area/station/maintenance/apmaint)
+"otc" = (
+/obj/effect/turf_decal/stripes/line,
+/obj/item/radio/intercom{
+ name = "west bump";
+ pixel_x = -28
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 8
+ },
+/area/station/science/storage)
"oth" = (
/obj/machinery/light_switch{
dir = 4;
@@ -68261,6 +68660,12 @@
},
/turf/simulated/floor/plating,
/area/station/command/bridge)
+"oxM" = (
+/obj/machinery/atmospherics/unary/vent_pump/on,
+/turf/simulated/floor/plasteel{
+ icon_state = "white"
+ },
+/area/station/science/toxins/mixing)
"oxO" = (
/obj/machinery/door/airlock/maintenance{
name = "Aft Asteroid Maintenance"
@@ -68629,6 +69034,12 @@
icon_state = "darkyellow"
},
/area/station/engineering/control)
+"oCr" = (
+/obj/machinery/autolathe,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/engineering/break_room)
"oCu" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/engine{
@@ -68886,6 +69297,23 @@
icon_state = "darkfull"
},
/area/station/supply/office)
+"oFY" = (
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/structure/cable/orange{
+ icon_state = "4-8"
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "neutralfull"
+ },
+/area/station/hallway/primary/fore/north)
"oGk" = (
/obj/structure/disposalpipe/segment{
color = "#954535"
@@ -68984,6 +69412,13 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/north)
+"oIe" = (
+/obj/machinery/economy/vending/traindrobe,
+/turf/simulated/floor/plasteel{
+ dir = 9;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"oIs" = (
/obj/structure/table,
/obj/item/storage/fancy/cigarettes/cigpack_robust{
@@ -69609,6 +70044,12 @@
},
/turf/simulated/floor/transparent/glass/reinforced,
/area/station/maintenance/fpmaint)
+"oPy" = (
+/obj/machinery/light/small{
+ dir = 4
+ },
+/turf/simulated/floor/plating/asteroid/ancient,
+/area/station/maintenance/fore)
"oPG" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -69654,6 +70095,12 @@
/obj/structure/sign/custodian,
/turf/simulated/wall,
/area/station/maintenance/port2)
+"oPZ" = (
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkpurplecorners"
+ },
+/area/station/science/genetics)
"oQc" = (
/obj/machinery/light/small,
/turf/simulated/floor/bluegrid{
@@ -71673,6 +72120,18 @@
icon_state = "white"
},
/area/station/science/test_chamber)
+"pqq" = (
+/obj/machinery/computer/scan_consolenew,
+/obj/effect/turf_decal/delivery/hollow,
+/obj/item/radio/intercom{
+ name = "west bump";
+ pixel_x = -28
+ },
+/turf/simulated/floor/plasteel{
+ dir = 9;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"pqv" = (
/obj/structure/closet/crate/freezer,
/obj/item/reagent_containers/iv_bag/blood/random,
@@ -71864,13 +72323,6 @@
icon_state = "cafeteria"
},
/area/station/supply/break_room)
-"ptm" = (
-/obj/item/radio/intercom{
- pixel_y = 28;
- name = "custom placement"
- },
-/turf/simulated/floor/grass,
-/area/station/science/genetics)
"pts" = (
/obj/effect/mapping_helpers/turfs/rust,
/turf/simulated/wall,
@@ -71906,6 +72358,21 @@
/obj/effect/spawner/random/dirt/often,
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/external/southeast)
+"ptU" = (
+/obj/machinery/door/window/classic/normal{
+ name = "Glass Door";
+ dir = 8
+ },
+/obj/effect/mapping_helpers/airlock/windoor/access/all/procedure/trainer{
+ dir = 8
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"ptZ" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -71977,13 +72444,15 @@
/turf/simulated/floor/plating,
/area/station/maintenance/port2)
"puz" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/firealarm/directional/east,
-/turf/simulated/floor/plasteel{
- icon_state = "purple";
+/obj/structure/closet/secure_closet/genetics,
+/obj/machinery/light{
dir = 4
},
-/area/station/science/storage)
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"puD" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -72081,6 +72550,19 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/port)
+"pvY" = (
+/obj/structure/chair/sofa/corp/left{
+ dir = 8
+ },
+/obj/item/radio/intercom{
+ name = "east bump";
+ pixel_x = 28
+ },
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "blue"
+ },
+/area/station/hallway/primary/fore/north)
"pwq" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/structure/flora/grass/jungle,
@@ -72524,12 +73006,11 @@
},
/area/station/maintenance/electrical_shop)
"pCN" = (
-/obj/machinery/door/poddoor/multi_tile/two_tile_ver{
- name = "Science Emergency EVA Storage";
- id_tag = "scieva"
+/obj/structure/chair/sofa/bench/left{
+ dir = 4
},
/turf/simulated/floor/plasteel{
- icon_state = "neutralfull"
+ icon_state = "purplefull"
},
/area/station/hallway/primary/aft/west)
"pCW" = (
@@ -73471,14 +73952,6 @@
icon_state = "neutralfull"
},
/area/station/hallway/primary/port/south)
-"pOU" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/structure/cable/orange{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel/white,
-/area/station/science/hallway)
"pOW" = (
/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
dir = 1
@@ -73654,10 +74127,13 @@
/turf/simulated/floor/plating,
/area/station/hallway/secondary/entry/north)
"pQM" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/sleeping_agent,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"pQN" = (
/turf/simulated/wall,
/area/station/hallway/primary/aft/east)
@@ -73905,6 +74381,20 @@
icon_state = "whiteblue"
},
/area/station/medical/medbay)
+"pTu" = (
+/obj/machinery/atmospherics/pipe/simple/visible{
+ dir = 5
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "white"
+ },
+/area/station/science/toxins/mixing)
"pTz" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/structure/cable/orange{
@@ -74392,14 +74882,15 @@
},
/area/station/maintenance/asmaint)
"pZK" = (
-/obj/machinery/computer/scan_consolenew{
+/obj/effect/turf_decal/delivery/hollow,
+/obj/machinery/computer/nonfunctional{
dir = 8
},
-/obj/effect/turf_decal/delivery/hollow,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"pZQ" = (
/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
/obj/machinery/door/airlock/maintenance{
@@ -74596,11 +75087,6 @@
icon_state = "neutralfull"
},
/area/station/hallway/primary/starboard/south)
-"qcW" = (
-/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/atmospherics/portable/canister/toxins,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
"qdb" = (
/obj/machinery/door/airlock/maintenance{
name = "Aft Asteroid Maintenance"
@@ -74849,6 +75335,16 @@
icon_state = "neutralfull"
},
/area/station/hallway/primary/central/north)
+"qgi" = (
+/obj/structure/chair/comfy/brown{
+ dir = 4
+ },
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkfull"
+ },
+/area/station/procedure/trainer_office)
"qgm" = (
/obj/structure/disposalpipe/segment,
/obj/structure/cable/orange{
@@ -75063,6 +75559,11 @@
/obj/effect/spawner/window/reinforced,
/turf/simulated/floor/plating,
/area/station/supply/sorting)
+"qiq" = (
+/obj/machinery/atmospherics/portable/canister/sleeping_agent,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"qir" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
@@ -75136,12 +75637,12 @@
},
/area/station/supply/office)
"qkb" = (
-/obj/structure/disposalpipe/segment/corner{
- dir = 4
- },
/obj/structure/cable/orange{
icon_state = "4-8"
},
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/south)
"qkc" = (
@@ -75190,12 +75691,9 @@
dir = 4
},
/obj/structure/cable/orange{
- d1 = 1;
- d2 = 2;
icon_state = "1-2"
},
/obj/structure/cable/orange{
- d2 = 2;
icon_state = "0-2"
},
/turf/simulated/floor/plating{
@@ -75617,18 +76115,6 @@
/obj/effect/spawner/random/fungus/maybe,
/turf/simulated/wall,
/area/station/maintenance/port2)
-"qpD" = (
-/obj/structure/fence,
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/obj/structure/cable/orange{
- icon_state = "0-8"
- },
-/turf/simulated/floor/plating{
- icon_state = "asteroidplating"
- },
-/area/station/maintenance/asmaint)
"qpK" = (
/obj/machinery/firealarm/directional/west,
/turf/simulated/floor/plasteel{
@@ -76075,6 +76561,13 @@
/obj/structure/lattice/catwalk,
/turf/space,
/area/station/engineering/solar/port)
+"qvK" = (
+/obj/effect/turf_decal/stripes/corner{
+ dir = 8
+ },
+/obj/machinery/hologram/holopad,
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"qvL" = (
/obj/effect/spawner/random/fungus/frequent,
/turf/simulated/wall,
@@ -76683,8 +77176,9 @@
},
/area/station/maintenance/port)
"qDH" = (
-/obj/structure/disposalpipe/junction/reversed{
- dir = 4
+/obj/structure/disposalpipe/sortjunction/reversed{
+ dir = 4;
+ sort_type_txt = "23"
},
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/south)
@@ -76714,6 +77208,11 @@
icon_state = "whiteblue"
},
/area/station/medical/medbay)
+"qEv" = (
+/obj/machinery/atmospherics/portable/canister/toxins,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"qEx" = (
/obj/structure/bookcase{
name = "bookcase (Fiction)"
@@ -76784,6 +77283,17 @@
icon_state = "dark"
},
/area/station/legal/courtroom)
+"qFH" = (
+/obj/machinery/computer/area_atmos,
+/obj/effect/turf_decal/delivery/hollow,
+/obj/machinery/light{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"qFM" = (
/obj/machinery/hologram/holopad,
/obj/structure/disposalpipe/segment{
@@ -76826,6 +77336,15 @@
icon_state = "tranquillite"
},
/area/station/service/mime)
+"qGr" = (
+/obj/structure/chair/comfy/black{
+ dir = 8
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkfull"
+ },
+/area/station/procedure/trainer_office)
"qGC" = (
/obj/structure/lattice/catwalk,
/obj/structure/cable{
@@ -77703,8 +78222,16 @@
/turf/simulated/floor/wood/nitrogen,
/area/station/maintenance/abandonedbar)
"qRL" = (
-/obj/machinery/atmospherics/trinary/mixer/flipped{
- dir = 1
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 9
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 9
},
/turf/simulated/floor/plasteel{
icon_state = "white"
@@ -77813,6 +78340,7 @@
dir = 4;
color = "#954535"
},
+/obj/machinery/newscaster/directional/south,
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "purplecorner"
@@ -78302,6 +78830,10 @@
icon_state = "whitepurplecorner"
},
/area/station/science/xenobiology)
+"qZL" = (
+/obj/machinery/light,
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/aft/west)
"qZT" = (
/obj/machinery/atmospherics/unary/vent_pump/on{
dir = 4
@@ -78362,18 +78894,17 @@
},
/turf/simulated/floor/plasteel,
/area/station/service/janitor)
-"raH" = (
-/obj/machinery/suit_storage_unit/standard_unit,
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
- },
-/area/station/hallway/primary/aft/west)
"raP" = (
/obj/machinery/floodlight{
light_power = 1
},
/turf/simulated/floor/plating,
/area/station/maintenance/port)
+"raR" = (
+/obj/machinery/atmospherics/portable/canister/oxygen,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"raS" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
@@ -78547,6 +79078,14 @@
},
/turf/simulated/wall/r_wall,
/area/station/engineering/break_room/secondary)
+"rcQ" = (
+/obj/machinery/atmospherics/portable/canister/oxygen,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 6
+ },
+/area/station/science/storage)
"rcT" = (
/obj/machinery/computer/security/mining{
dir = 1
@@ -78696,6 +79235,12 @@
/turf/simulated/floor/engine,
/area/station/medical/chemistry)
"rgy" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
@@ -79376,6 +79921,13 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/fore/east)
+"rrI" = (
+/obj/machinery/door/poddoor/multi_tile/two_tile_hor{
+ name = "Science Emergency EVA Storage";
+ id_tag = "scieva"
+ },
+/turf/simulated/floor/plating,
+/area/station/hallway/primary/aft/west)
"rrN" = (
/obj/effect/turf_decal/stripes/line{
dir = 4
@@ -79477,6 +80029,15 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plating/asteroid/ancient,
/area/station/maintenance/apmaint)
+"rtu" = (
+/obj/machinery/door/poddoor/shutters{
+ name = "Storefront Shutters";
+ id_tag = "pet_shop";
+ dir = 1
+ },
+/obj/structure/table/reinforced,
+/turf/simulated/floor/plasteel,
+/area/station/public/pet_store)
"rtB" = (
/obj/machinery/door/airlock/public/glass{
name = "Garden"
@@ -79528,8 +80089,6 @@
dir = 4
},
/obj/structure/cable/orange{
- d1 = 4;
- d2 = 8;
icon_state = "4-8"
},
/turf/simulated/floor/plating{
@@ -79844,6 +80403,13 @@
icon_state = "escape"
},
/area/station/hallway/secondary/exit)
+"rys" = (
+/obj/effect/turf_decal/stripes/line,
+/obj/machinery/atmospherics/unary/vent_scrubber/on{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"ryw" = (
/obj/machinery/power/apc/directional/north,
/obj/structure/cable/orange{
@@ -79893,20 +80459,6 @@
/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
/turf/simulated/floor/plating,
/area/station/maintenance/fore2)
-"rzr" = (
-/obj/structure/fence{
- dir = 4
- },
-/obj/structure/cable/orange{
- icon_state = "1-2"
- },
-/obj/structure/cable/orange{
- icon_state = "0-2"
- },
-/turf/simulated/floor/plating{
- icon_state = "asteroidplating"
- },
-/area/station/maintenance/asmaint)
"rzL" = (
/obj/structure/cable/orange{
icon_state = "2-8"
@@ -80092,13 +80644,13 @@
},
/area/station/security/storage)
"rCJ" = (
-/obj/structure/disposalpipe/sortjunction/reversed{
- dir = 1;
- sort_type_txt = "23"
- },
/obj/structure/cable/orange{
icon_state = "1-2"
},
+/obj/structure/disposalpipe/sortjunction/reversed{
+ dir = 1;
+ sort_type_txt = "11"
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/east)
"rCK" = (
@@ -81086,6 +81638,14 @@
icon_state = "cafeteria"
},
/area/station/science/hallway)
+"rOZ" = (
+/obj/machinery/atmospherics/portable/scrubber/huge/stationary,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 9
+ },
+/area/station/science/storage)
"rPc" = (
/obj/machinery/door/airlock/public/glass,
/obj/effect/mapping_helpers/airlock/autoname,
@@ -81317,6 +81877,16 @@
icon_state = "dark"
},
/area/station/engineering/atmos)
+"rRF" = (
+/obj/machinery/hydroponics/constructable{
+ desc = "These are connected with an irrigation tube. You see a little pipe connecting the trays.";
+ name = "Prison hydroponics tray";
+ using_irrigation = 1
+ },
+/obj/item/seeds/corn,
+/obj/item/seeds/corn,
+/turf/simulated/floor/grass,
+/area/station/security/permabrig)
"rRJ" = (
/obj/structure/cable/orange{
icon_state = "1-2"
@@ -82858,15 +83428,6 @@
icon_state = "arrival"
},
/area/station/hallway/secondary/entry/east)
-"sls" = (
-/obj/structure/cable/orange{
- icon_state = "1-2"
- },
-/obj/effect/decal/cleanable/blood/old,
-/obj/item/gun/projectile/revolver/russian,
-/obj/effect/landmark/spawner/rev,
-/turf/simulated/floor/wood,
-/area/station/maintenance/gambling_den)
"slw" = (
/obj/structure/gunrack,
/obj/item/gun/projectile/shotgun/riot{
@@ -82935,6 +83496,24 @@
icon_state = "dark"
},
/area/station/engineering/gravitygenerator)
+"slY" = (
+/obj/structure/chair/comfy/black{
+ dir = 8
+ },
+/obj/machinery/door_control{
+ id = "nct";
+ name = "Office Door";
+ normaldoorcontrol = 1;
+ pixel_x = -25;
+ req_access = list(80);
+ pixel_y = -1
+ },
+/obj/machinery/firealarm/directional/north,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"slZ" = (
/obj/machinery/economy/vending/cigarette,
/obj/machinery/camera{
@@ -83172,19 +83751,6 @@
icon_state = "escape"
},
/area/station/hallway/secondary/exit)
-"sqB" = (
-/obj/machinery/atmospherics/unary/portables_connector{
- dir = 4
- },
-/obj/machinery/atmospherics/portable/canister,
-/obj/machinery/light{
- dir = 8
- },
-/turf/simulated/floor/plasteel{
- dir = 8;
- icon_state = "whitepurple"
- },
-/area/station/science/toxins/mixing)
"sqG" = (
/obj/effect/turf_decal/delivery/hollow,
/turf/simulated/floor/plasteel,
@@ -83311,20 +83877,6 @@
/obj/effect/mapping_helpers/airlock/access/all/engineering/maintenance,
/turf/simulated/floor/plating,
/area/station/maintenance/port2)
-"ssD" = (
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
-/obj/structure/cable/orange{
- icon_state = "1-4"
- },
-/turf/simulated/floor/plasteel/white,
-/area/station/science/hallway)
"ssE" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -83401,6 +83953,12 @@
/obj/machinery/atmospherics/binary/pump{
dir = 4
},
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -83924,6 +84482,7 @@
/obj/structure/disposalpipe/trunk{
dir = 1
},
+/obj/machinery/light,
/turf/simulated/floor/plasteel{
icon_state = "whitepurple"
},
@@ -84069,14 +84628,6 @@
icon_state = "redcorner"
},
/area/station/hallway/primary/fore/west)
-"sAJ" = (
-/obj/structure/table/wood,
-/obj/random/carp_plushie,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/turf/simulated/floor/wood,
-/area/station/public/pet_store)
"sAQ" = (
/obj/machinery/light/small{
dir = 1
@@ -84505,14 +85056,12 @@
},
/area/station/aisat/service)
"sFd" = (
-/obj/effect/spawner/random/dirt/often,
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/light/small,
/turf/simulated/floor/plasteel{
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"sFj" = (
/obj/structure/disposalpipe/segment{
dir = 4;
@@ -84740,6 +85289,14 @@
icon_state = "white"
},
/area/station/science/misc_lab)
+"sJe" = (
+/obj/machinery/atmospherics/portable/canister/toxins,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 10
+ },
+/area/station/science/storage)
"sJk" = (
/obj/machinery/status_display{
layer = 4
@@ -84781,6 +85338,13 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/port/north)
+"sJW" = (
+/obj/structure/closet,
+/turf/simulated/floor/plasteel{
+ dir = 10;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"sJX" = (
/obj/effect/spawner/window/reinforced/polarized/grilled{
id = "rd"
@@ -84933,16 +85497,6 @@
icon_state = "dark"
},
/area/station/service/chapel/office)
-"sLK" = (
-/obj/structure/disposalpipe/segment{
- color = "#954535"
- },
-/obj/machinery/newscaster/directional/west,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "neutralcorner"
- },
-/area/station/hallway/primary/aft/west)
"sLO" = (
/obj/structure/curtain/open/shower,
/obj/machinery/alarm/directional/north,
@@ -85045,14 +85599,6 @@
icon_state = "asteroidplating"
},
/area/station/maintenance/port)
-"sNb" = (
-/obj/machinery/atmospherics/unary/vent_pump/on{
- dir = 1
- },
-/turf/simulated/floor/plasteel{
- icon_state = "dark"
- },
-/area/station/service/hydroponics)
"sNm" = (
/obj/structure/disposalpipe/segment,
/obj/effect/turf_decal/stripes/line{
@@ -85434,6 +85980,13 @@
/obj/effect/turf_decal/caution,
/turf/simulated/floor/plasteel,
/area/station/engineering/transmission_laser)
+"sQN" = (
+/obj/item/cigbutt,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"sQV" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plating,
@@ -85493,8 +86046,12 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -85836,6 +86393,14 @@
icon_state = "asteroidplating"
},
/area/station/maintenance/starboard)
+"sWu" = (
+/obj/effect/spawner/window/reinforced,
+/obj/machinery/door/poddoor/shutters/preopen{
+ id_tag = "genetics";
+ name = "Genetics Privacy Shutters"
+ },
+/turf/simulated/floor/plating,
+/area/station/science/genetics)
"sWz" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/unary/vent_pump/on,
@@ -86186,9 +86751,6 @@
},
/turf/simulated/floor/plating/asteroid/ancient,
/area/station/maintenance/storage)
-"tba" = (
-/turf/simulated/mineral/ancient/outer,
-/area/station/maintenance/abandonedbar)
"tbe" = (
/turf/simulated/floor/plating{
icon_state = "asteroidplating"
@@ -86851,9 +87413,6 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
/obj/effect/spawner/random/dirt/often,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
@@ -86861,6 +87420,7 @@
/obj/structure/cable/orange{
icon_state = "2-4"
},
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -87229,6 +87789,14 @@
icon_state = "bar"
},
/area/station/security/permabrig)
+"toj" = (
+/obj/structure/table/wood,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/effect/spawner/random/toy/carp_plushie,
+/turf/simulated/floor/wood,
+/area/station/public/pet_store)
"top" = (
/obj/machinery/light/small,
/obj/effect/decal/cleanable/dirt,
@@ -87263,6 +87831,28 @@
"tpl" = (
/turf/simulated/floor/plating/airless,
/area/station/science/toxins/test)
+"tpo" = (
+/obj/structure/table/reinforced,
+/obj/machinery/door/poddoor/shutters/preopen{
+ id_tag = "genetics";
+ name = "Genetics Privacy Shutters"
+ },
+/obj/item/desk_bell{
+ pixel_x = 7;
+ pixel_y = 7;
+ anchored = 1
+ },
+/obj/machinery/door/window/classic/reversed{
+ dir = 8
+ },
+/obj/effect/mapping_helpers/airlock/windoor/autoname/desk{
+ dir = 8
+ },
+/obj/effect/mapping_helpers/airlock/windoor/access/any/medical/genetics{
+ dir = 8
+ },
+/turf/simulated/floor/plating,
+/area/station/science/genetics)
"tpp" = (
/obj/structure/sink{
dir = 8;
@@ -87350,6 +87940,9 @@
},
/turf/simulated/floor/plating,
/area/station/hallway/primary/aft/west)
+"tql" = (
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"tqm" = (
/obj/structure/disposalpipe/sortjunction/reversed{
dir = 1;
@@ -87472,12 +88065,7 @@
/obj/structure/cable/orange{
icon_state = "4-8"
},
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 6
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 5
- },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plasteel{
icon_state = "dark"
},
@@ -87527,27 +88115,6 @@
},
/turf/simulated/floor/engine,
/area/station/medical/chemistry)
-"ttl" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/structure/railing{
- dir = 1
- },
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "blue"
- },
-/area/station/hallway/primary/fore/north)
"ttn" = (
/obj/effect/spawner/random/dirt/frequent,
/turf/simulated/floor/plasteel{
@@ -87586,27 +88153,6 @@
icon_state = "dark"
},
/area/station/security/execution)
-"ttT" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/structure/railing/corner{
- dir = 4
- },
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "bluecorner"
- },
-/area/station/hallway/primary/fore/north)
"ttV" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
@@ -88443,6 +88989,11 @@
icon_state = "neutralfull"
},
/area/station/hallway/primary/starboard/south)
+"tFc" = (
+/turf/simulated/floor/plasteel{
+ icon_state = "purplecorner"
+ },
+/area/station/science/storage)
"tFd" = (
/obj/machinery/door/airlock/public/glass{
name = "Central Access"
@@ -89003,6 +89554,12 @@
icon_state = "redcorner"
},
/area/station/maintenance/fpmaint)
+"tMD" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreenfull"
+ },
+/area/station/service/hydroponics)
"tMM" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -89546,12 +90103,9 @@
},
/area/station/hallway/spacebridge/engmed)
"tUh" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+/obj/machinery/atmospherics/pipe/simple/visible{
dir = 6
},
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 10
- },
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -90733,7 +91287,7 @@
pixel_y = -3
},
/obj/item/flashlight/pen,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "whiteblue"
@@ -90912,6 +91466,12 @@
dir = 4
},
/area/station/supply/lobby)
+"ujd" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/turf/simulated/floor/plasteel{
+ icon_state = "white"
+ },
+/area/station/science/toxins/mixing)
"ujl" = (
/obj/structure/shelf/engineering,
/obj/effect/spawner/random/engineering/materials,
@@ -91157,11 +91717,11 @@
/turf/simulated/floor/wood,
/area/station/legal/courtroom)
"ull" = (
-/obj/effect/spawner/random/dirt/often,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"ulo" = (
/obj/machinery/light/small{
dir = 1
@@ -91209,11 +91769,7 @@
},
/area/station/security/prison/cell_block/a)
"umy" = (
-/obj/machinery/atmospherics/unary/portables_connector{
- dir = 4
- },
/turf/simulated/floor/plasteel{
- dir = 10;
icon_state = "whitepurple"
},
/area/station/science/toxins/mixing)
@@ -91794,14 +92350,15 @@
},
/area/station/hallway/spacebridge/engmed)
"uuU" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/atmospherics/portable/scrubber/huge/stationary,
-/obj/effect/turf_decal/delivery/hollow,
+/obj/machinery/disposal,
+/obj/structure/disposalpipe/trunk{
+ dir = 8
+ },
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 6
+ dir = 4;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"uuV" = (
/obj/machinery/atmospherics/unary/vent_pump/on{
dir = 1
@@ -92276,6 +92833,18 @@
dir = 1
},
/area/station/supply/lobby)
+"uzh" = (
+/obj/structure/cable/orange{
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"uzv" = (
/obj/structure/disposalpipe/segment{
dir = 4;
@@ -93700,7 +94269,7 @@
/turf/simulated/floor/plating,
/area/station/engineering/tech_storage)
"uQB" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/turf/simulated/floor/plasteel{
icon_state = "darkgreenfull"
},
@@ -94103,9 +94672,16 @@
/turf/simulated/floor/plating,
/area/station/maintenance/apmaint)
"uVh" = (
-/obj/machinery/atmospherics/pipe/simple/visible{
- dir = 10
+/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
+ dir = 8;
+ initialize_directions = 11
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -94120,13 +94696,12 @@
/turf/simulated/floor/plating,
/area/station/hallway/primary/starboard/south)
"uVC" = (
-/obj/machinery/requests_console/directional/west,
-/obj/structure/closet/secure_closet/genetics,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
dir = 9;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"uWc" = (
/obj/machinery/light/small{
dir = 8
@@ -94318,10 +94893,11 @@
/area/station/maintenance/port)
"uYD" = (
/obj/machinery/hologram/holopad,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"uYF" = (
/obj/structure/table,
/obj/item/reagent_containers/dropper,
@@ -94363,6 +94939,14 @@
icon_state = "asteroidplating"
},
/area/station/maintenance/apmaint)
+"uZq" = (
+/obj/machinery/atmospherics/portable/canister/toxins,
+/obj/effect/turf_decal/delivery/hollow,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 8
+ },
+/area/station/science/storage)
"uZw" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -95474,20 +96058,6 @@
"vpg" = (
/turf/simulated/floor/plating/asteroid/ancient,
/area/station/maintenance/fore)
-"vps" = (
-/obj/structure/cable/orange{
- icon_state = "4-8"
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/turf/simulated/floor/plating{
- icon_state = "asteroidplating"
- },
-/area/station/maintenance/apmaint)
"vpt" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -96219,6 +96789,9 @@
name = "custom placement"
},
/obj/effect/decal/cleanable/dirt,
+/obj/structure/disposalpipe/segment/corner{
+ dir = 4
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/disposal/south)
"vxP" = (
@@ -96626,12 +97199,12 @@
},
/area/station/medical/reception)
"vCS" = (
-/obj/machinery/economy/vending/genedrobe,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"vDm" = (
/obj/machinery/alarm/directional/south,
/turf/simulated/floor/plasteel{
@@ -96909,11 +97482,12 @@
/obj/structure/disposalpipe/trunk{
dir = 4
},
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
dir = 9;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"vFA" = (
/obj/machinery/door/airlock{
id_tag = "fb2";
@@ -97149,6 +97723,17 @@
icon_state = "whitegreen"
},
/area/station/medical/virology)
+"vJd" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 10
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 6
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"vJh" = (
/obj/effect/turf_decal/stripes/line{
dir = 4
@@ -97287,12 +97872,6 @@
/obj/structure/cable/orange{
icon_state = "2-4"
},
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
/obj/structure/cable/orange{
icon_state = "4-8"
},
@@ -97514,6 +98093,19 @@
icon_state = "whitegreen"
},
/area/station/medical/virology)
+"vOp" = (
+/obj/structure/shelf/science,
+/obj/item/healthanalyzer/advanced,
+/obj/item/healthanalyzer/advanced,
+/obj/item/reagent_containers/glass/bottle/potassium_iodide,
+/obj/item/reagent_containers/glass/bottle/potassium_iodide,
+/obj/item/hand_labeler,
+/obj/item/reagent_containers/spray/cleaner,
+/turf/simulated/floor/plasteel{
+ dir = 10;
+ icon_state = "darkpurple"
+ },
+/area/station/science/genetics)
"vOq" = (
/obj/machinery/atmospherics/pipe/simple/hidden/universal,
/turf/simulated/floor/plating,
@@ -97584,23 +98176,14 @@
icon_state = "white"
},
/area/station/science/test_chamber)
-"vPr" = (
-/obj/effect/mapping_helpers/turfs/rust,
-/turf/simulated/wall,
-/area/station/maintenance/asmaint)
"vPs" = (
-/obj/machinery/light{
- dir = 8
- },
-/obj/item/radio/intercom{
- pixel_x = -28;
- name = "custom placement"
- },
+/obj/effect/decal/cleanable/dirt,
+/obj/effect/decal/cleanable/blood/old,
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"vPt" = (
/turf/simulated/wall,
/area/station/maintenance/fore2)
@@ -97659,14 +98242,24 @@
},
/area/station/security/detective)
"vQk" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/structure/cable/orange{
+ d1 = 1;
+ d2 = 2;
icon_state = "1-2"
},
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/obj/structure/disposalpipe/segment/corner{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 10
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 10
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"vQl" = (
/obj/structure/reagent_dispensers/fueltank,
/turf/simulated/floor/plating,
@@ -97804,18 +98397,6 @@
/obj/item/analyzer,
/turf/simulated/floor/plating,
/area/station/engineering/tech_storage)
-"vRu" = (
-/obj/structure/disposalpipe/segment{
- color = "#954535"
- },
-/obj/effect/turf_decal/stripes/corner{
- dir = 1
- },
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "neutralcorner"
- },
-/area/station/hallway/primary/aft/west)
"vRH" = (
/obj/structure/cable/orange{
icon_state = "1-4"
@@ -98351,6 +98932,14 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/port/north)
+"vZQ" = (
+/obj/effect/turf_decal/delivery/hollow,
+/obj/machinery/atmospherics/portable/canister/carbon_dioxide,
+/obj/effect/turf_decal/stripes/line{
+ dir = 8
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"waa" = (
/obj/item/instrument/violin,
/obj/machinery/power/apc/directional/north,
@@ -98452,16 +99041,6 @@
/obj/structure/grille,
/turf/simulated/floor/plating,
/area/station/security/execution)
-"waT" = (
-/obj/machinery/light,
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/turf/simulated/floor/plating,
-/area/station/hallway/primary/aft/west)
"waZ" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/plasteel{
@@ -98893,10 +99472,6 @@
icon_state = "asteroidplating"
},
/area/station/maintenance/fpmaint)
-"whS" = (
-/obj/machinery/ai_status_display,
-/turf/simulated/wall/r_wall,
-/area/station/science/storage)
"wig" = (
/obj/structure/cable/orange{
icon_state = "4-8"
@@ -100222,7 +100797,6 @@
name = "Genetics Cloning"
},
/obj/effect/mapping_helpers/airlock/access/any/medical/general,
-/obj/effect/mapping_helpers/airlock/access/any/medical/genetics,
/obj/machinery/door/firedoor,
/obj/effect/mapping_helpers/airlock/unres{
dir = 4
@@ -100400,6 +100974,11 @@
/obj/effect/spawner/airlock/w_to_e,
/turf/simulated/wall,
/area/station/maintenance/port2)
+"wxY" = (
+/obj/effect/spawner/window/reinforced,
+/obj/structure/sign/fire,
+/turf/simulated/floor/plating,
+/area/station/science/storage)
"wyn" = (
/obj/machinery/requests_console/directional/east,
/turf/simulated/floor/plasteel{
@@ -100929,14 +101508,13 @@
},
/area/station/maintenance/fore2)
"wEK" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/structure/cable/orange{
- icon_state = "1-2"
+ icon_state = "2-8"
},
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/science/storage)
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/science/genetics)
"wES" = (
/obj/effect/spawner/random/fungus/frequent,
/turf/simulated/wall,
@@ -100961,9 +101539,10 @@
pixel_x = 28;
name = "custom placement"
},
-/obj/machinery/atmospherics/unary/vent_scrubber/on{
+/obj/machinery/atmospherics/unary/portables_connector{
dir = 8
},
+/obj/machinery/atmospherics/portable/canister,
/turf/simulated/floor/plasteel{
dir = 4;
icon_state = "whitepurple"
@@ -101429,7 +102008,6 @@
name = "Medbay Entrance"
},
/obj/effect/mapping_helpers/airlock/access/any/medical/general,
-/obj/effect/mapping_helpers/airlock/access/any/medical/genetics,
/obj/machinery/door/poddoor{
density = 0;
icon_state = "open";
@@ -101442,6 +102020,10 @@
},
/turf/simulated/floor/plasteel/white,
/area/station/medical/medbay)
+"wLr" = (
+/obj/effect/mapping_helpers/turfs/rust,
+/turf/simulated/wall,
+/area/station/maintenance/asmaint)
"wLu" = (
/obj/machinery/camera{
c_tag = "Xenobiology East";
@@ -101635,6 +102217,14 @@
icon_state = "purplecorner"
},
/area/station/hallway/primary/aft/west)
+"wNY" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"wOc" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 1
@@ -102464,9 +103054,7 @@
/turf/simulated/wall/r_wall,
/area/station/science/server/coldroom)
"wYa" = (
-/obj/machinery/atmospherics/unary/vent_pump/on{
- dir = 4
- },
+/obj/machinery/atmospherics/unary/vent_scrubber/on,
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "whitepurple"
@@ -103246,10 +103834,13 @@
/turf/simulated/floor/engine,
/area/station/science/test_chamber)
"xhG" = (
+/obj/effect/decal/cleanable/dirt,
+/mob/living/simple_animal/cockroach,
+/obj/effect/decal/cleanable/blood/old,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"xhH" = (
/obj/effect/turf_decal/stripes/line,
/obj/effect/turf_decal/caution/red{
@@ -103386,8 +103977,9 @@
},
/area/station/maintenance/starboard)
"xjA" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/trinary/mixer{
+ dir = 1
+ },
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -103533,11 +104125,11 @@
icon_state = "1-2"
},
/obj/structure/disposalpipe/segment,
-/obj/effect/spawner/random/dirt/often,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"xno" = (
/obj/structure/table,
/obj/effect/spawner/random/maintenance,
@@ -103601,10 +104193,11 @@
dir = 1
},
/obj/structure/disposalpipe/segment,
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"xoU" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -104754,6 +105347,41 @@
icon_state = "redcorner"
},
/area/station/hallway/primary/fore/west)
+"xCl" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/structure/cable/orange{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/turf/simulated/floor/plating{
+ icon_state = "asteroidplating"
+ },
+/area/station/maintenance/apmaint)
+"xCu" = (
+/obj/machinery/door/airlock/public/glass{
+ name = "Walkway"
+ },
+/obj/machinery/door/firedoor,
+/obj/machinery/door/poddoor/preopen{
+ id_tag = "servlockdown";
+ layer = 2.6;
+ name = "Service Lockdown"
+ },
+/obj/structure/disposalpipe/segment{
+ color = "#954535"
+ },
+/obj/effect/turf_decal/caution/red,
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "neutralcorner"
+ },
+/area/station/hallway/spacebridge/sercom)
"xCz" = (
/obj/effect/spawner/random/dirt/frequent,
/obj/structure/cable/yellow{
@@ -104763,13 +105391,6 @@
icon_state = "neutralfull"
},
/area/station/hallway/primary/fore/north)
-"xCH" = (
-/obj/structure/rack,
-/obj/effect/spawner/random/maintenance,
-/turf/simulated/floor/plating{
- icon_state = "asteroidplating"
- },
-/area/station/maintenance/port)
"xCR" = (
/obj/machinery/computer/security/telescreen/entertainment,
/turf/simulated/mineral/ancient,
@@ -104984,7 +105605,11 @@
/area/station/maintenance/starboard)
"xFi" = (
/obj/structure/grille/broken,
-/turf/simulated/floor/plating,
+/obj/effect/decal/cleanable/dirt,
+/turf/simulated/floor/plasteel{
+ icon_state = "purple";
+ dir = 6
+ },
/area/station/maintenance/apmaint)
"xFj" = (
/obj/structure/table/glass,
@@ -105221,13 +105846,6 @@
/obj/machinery/light/small,
/turf/simulated/floor/plating/asteroid/ancient,
/area/station/maintenance/port)
-"xHt" = (
-/obj/structure/chair/office/dark{
- dir = 4
- },
-/obj/effect/landmark/start/detective,
-/turf/simulated/floor/carpet,
-/area/station/security/detective)
"xHu" = (
/obj/machinery/atmospherics/unary/portables_connector,
/turf/simulated/floor/plating,
@@ -105255,6 +105873,18 @@
icon_state = "darkfull"
},
/area/station/supply/expedition)
+"xHK" = (
+/obj/machinery/atmospherics/portable/scrubber/huge/stationary,
+/obj/effect/turf_decal/delivery/hollow,
+/obj/machinery/camera{
+ c_tag = "Toxins Storage";
+ network = list("SS13","RD")
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"xHN" = (
/obj/structure/table,
/obj/item/stack/sheet/metal{
@@ -105688,15 +106318,13 @@
},
/area/station/engineering/transmission_laser)
"xOm" = (
-/obj/item/radio/intercom{
- pixel_x = 28;
- name = "custom placement"
- },
+/obj/machinery/computer/scan_consolenew,
+/obj/effect/turf_decal/delivery/hollow,
/turf/simulated/floor/plasteel{
- icon_state = "purple";
- dir = 4
+ dir = 5;
+ icon_state = "darkpurple"
},
-/area/station/science/storage)
+/area/station/science/genetics)
"xOp" = (
/obj/machinery/light{
dir = 1
@@ -106514,9 +107142,7 @@
/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
dir = 1
},
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
- dir = 1
- },
+/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers,
/turf/simulated/floor/plasteel{
icon_state = "white"
},
@@ -106657,19 +107283,16 @@
},
/area/station/service/hydroponics)
"yai" = (
-/obj/machinery/computer/scan_consolenew{
- dir = 8
- },
/obj/effect/turf_decal/delivery/hollow,
-/obj/machinery/light_switch{
- pixel_y = 24;
- name = "north bump"
+/obj/machinery/computer/nonfunctional{
+ dir = 8
},
+/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "whitepurple"
},
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"yau" = (
/obj/structure/table/wood/fancy/red,
/turf/simulated/floor/plasteel{
@@ -106827,6 +107450,13 @@
icon_state = "neutralfull"
},
/area/station/hallway/primary/central/north)
+"ydB" = (
+/obj/machinery/alarm/directional/north,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "purple"
+ },
+/area/station/science/storage)
"ydE" = (
/obj/machinery/hologram/holopad,
/turf/simulated/floor/plasteel{
@@ -107102,6 +107732,23 @@
icon_state = "white"
},
/area/station/medical/patients_rooms)
+"ygQ" = (
+/obj/effect/mapping_helpers/airlock/access/all/science/tox_storage,
+/obj/machinery/door/firedoor,
+/obj/machinery/door/airlock/research/glass{
+ name = "Toxins Storage"
+ },
+/obj/structure/cable/orange{
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel,
+/area/station/science/storage)
"ygS" = (
/obj/structure/table,
/obj/machinery/light{
@@ -107115,19 +107762,6 @@
icon_state = "whitepurple"
},
/area/station/science/rnd)
-"ygT" = (
-/obj/effect/spawner/window/reinforced/polarized{
- id = "private"
- },
-/obj/machinery/door/poddoor{
- density = 0;
- icon_state = "open";
- id_tag = "Biohazard_medi";
- name = "Quarantine Lockdown";
- opacity = 0
- },
-/turf/simulated/floor/plating,
-/area/station/medical/patients_rooms)
"yhg" = (
/obj/item/t_scanner/adv_mining_scanner/lesser,
/obj/structure/rack,
@@ -107151,13 +107785,6 @@
icon_state = "darkfull"
},
/area/station/supply/storage)
-"yhn" = (
-/obj/machinery/alarm/directional/east,
-/obj/machinery/atmospherics/unary/vent_scrubber/on{
- dir = 1
- },
-/turf/simulated/floor/wood,
-/area/station/public/pet_store)
"yhw" = (
/obj/structure/chair/office/dark{
dir = 8
@@ -107209,31 +107836,15 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/central/west)
-"yhU" = (
-/obj/effect/spawner/window/reinforced,
-/obj/machinery/door/poddoor{
- density = 0;
- icon_state = "open";
- id_tag = "Biohazard_medi";
- name = "Quarantine Lockdown";
- opacity = 0
- },
-/turf/simulated/floor/plating,
-/area/station/science/genetics)
"yhW" = (
/turf/simulated/wall,
/area/station/maintenance/fpmaint)
"yie" = (
-/obj/machinery/door/airlock/glass{
- name = "Genetics Research"
- },
-/obj/effect/mapping_helpers/airlock/access/any/medical/genetics,
/obj/structure/cable/orange{
icon_state = "1-2"
},
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/structure/disposalpipe/segment,
-/obj/machinery/door/firedoor,
/obj/machinery/door/poddoor{
density = 0;
icon_state = "open";
@@ -107242,8 +107853,13 @@
opacity = 0
},
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/door/airlock/maintenance{
+ name = "Medbay Maintenance"
+ },
+/obj/effect/spawner/random/dirt/often,
+/obj/effect/mapping_helpers/airlock/access/all/medical/general,
/turf/simulated/floor/plasteel/white,
-/area/station/science/genetics)
+/area/station/maintenance/starboard)
"yii" = (
/turf/simulated/mineral/ancient/outer,
/area/station/hallway/primary/central/west)
@@ -115952,12 +116568,12 @@ hUU
hUU
aXn
stw
-tba
+qUT
gbz
gbz
gbz
gbz
-tba
+qUT
stw
sMZ
qIF
@@ -116029,14 +116645,14 @@ rNK
rNK
rNK
rNK
-rNK
-rNK
-cdb
+rWw
+rWw
cdb
cdb
ccW
ccW
ccW
+ccW
rNK
rNK
rNK
@@ -116205,7 +116821,7 @@ rNK
rNK
bhO
hUU
-aXn
+hUU
aXn
aXn
stw
@@ -116245,7 +116861,7 @@ rho
uSf
ygl
wzC
-mgq
+fPD
aXn
aXn
aXn
@@ -116283,18 +116899,18 @@ ylg
lzH
rNK
rNK
-rNK
-rNK
-rNK
-rNK
-rNK
+rWw
+rWw
+rWw
+rWw
+ccW
+cdb
+cdb
+cdb
+cdb
cdb
cdb
cdb
-ccW
-ccW
-rNK
-rNK
rNK
rNK
rNK
@@ -116502,7 +117118,7 @@ aXn
wGX
ygl
wzC
-xCH
+inP
aXn
aXn
aXn
@@ -116539,19 +117155,19 @@ lzH
ylg
lzH
rWw
-rNK
-rNK
-rNK
-rNK
-rNK
+rWw
+rWw
+ccW
+ccW
+ccW
+ccW
+cdb
cdb
cdb
cdb
cdb
cdb
cdb
-rNK
-rNK
rNK
rNK
rNK
@@ -116796,15 +117412,18 @@ vTR
kTd
vTR
mjo
-rNK
-rNK
-rNK
+ccW
+ccW
+ccW
+ccW
+ccW
+ccW
+ccW
+ccW
cdb
cdb
cdb
ccW
-ccW
-cdb
cdb
cdb
rNK
@@ -116812,9 +117431,6 @@ rNK
rNK
rNK
rNK
-rNK
-rNK
-rNK
vxH
cZN
gAG
@@ -117053,25 +117669,25 @@ fdX
iNa
cqi
mjo
-rNK
-rNK
-cdb
+cxg
+cxg
+cxg
+cxg
+cxg
+cxg
+ccW
+ccW
cdb
cdb
ccW
ccW
ccW
-ccW
cdb
cdb
rNK
rNK
rNK
rNK
-rNK
-rNK
-rNK
-rNK
vxH
lez
fwi
@@ -117309,10 +117925,15 @@ eBL
jSc
wLz
ldL
-mjo
-rWw
-rWw
-rWw
+aDM
+rOZ
+gJq
+otc
+uZq
+sJe
+cxg
+ccW
+cdb
cdb
cdb
ccW
@@ -117320,12 +117941,7 @@ ccW
ccW
cdb
cdb
-ccW
-rNK
-rNK
-rNK
-rNK
-rNK
+cdb
rNK
rNK
rNK
@@ -117538,7 +118154,7 @@ eHn
eCI
gUw
xZV
-eTI
+ljz
iuf
mkL
aXn
@@ -117567,21 +118183,21 @@ eHZ
qHZ
nTW
mjo
-rWw
+owX
+dqK
+dcD
+qEv
+dXR
+cxg
ccW
-rWw
cdb
cdb
cdb
ccW
-ccW
cdb
cdb
-rNK
-rNK
-rNK
-rNK
-rNK
+cdb
+cdb
rNK
rNK
rNK
@@ -117824,21 +118440,21 @@ jgE
tst
slx
mjo
-rWw
+sQN
+fAf
+rys
+qEv
+dXR
+cxg
ccW
-rWw
cdb
cdb
cdb
-ccW
-ccW
cdb
cdb
cdb
-rNK
-rNK
-rNK
-rNK
+cdb
+cdb
rNK
rNK
rNK
@@ -118055,7 +118671,7 @@ aXn
aXn
dLa
hwS
-eTI
+ljz
kad
uCK
aXn
@@ -118081,20 +118697,20 @@ rgy
vLe
eSI
mjo
+qFH
+lFo
+qvK
+vZQ
+iFT
+cxg
ccW
-ccW
-rWw
-rWw
cdb
cdb
-ccW
-ccW
-ccW
cdb
cdb
-rNK
-rNK
-rNK
+cdb
+cdb
+ccW
rNK
rNK
rNK
@@ -118338,10 +118954,12 @@ nIZ
jZN
uCu
uCu
-ccW
-ccW
-ccW
-rWw
+ydB
+nCa
+gbR
+qiq
+hRi
+cxg
cdb
cdb
cdb
@@ -118349,9 +118967,7 @@ cdb
ccW
ccW
ccW
-rNK
-rNK
-rNK
+ccW
rNK
rNK
rNK
@@ -118591,24 +119207,24 @@ hCt
txK
vid
rBV
-qll
-xcs
+gbD
+hDQ
cqn
uCu
-ccW
-ccW
-ccW
-rWw
-cdb
+eMe
+uzh
+tql
+raR
+gtY
+cxg
cdb
cdb
cdb
ccW
ccW
ccW
-rNK
-rNK
-rNK
+ccW
+cdb
rNK
rNK
rNK
@@ -118848,24 +119464,24 @@ wbF
xbh
liC
vwy
-pgO
-xcs
+pTu
+dBX
cqn
uCu
-ccW
-ccW
-ccW
-rWw
-rWw
-rWw
+xHK
+uzh
+tFc
+gXM
+rcQ
+cxg
cdb
cdb
cdb
ccW
ccW
cdb
-rNK
-rNK
+cdb
+cdb
rNK
rNK
rNK
@@ -119037,7 +119653,7 @@ eHu
aXn
aXn
aXn
-xCH
+inP
eCI
ltk
wzC
@@ -119106,22 +119722,22 @@ clQ
vid
oJg
stk
-xcs
+hDQ
qVM
uCu
-uCu
-uCu
-uCu
-uCu
-ccW
-rWw
+wxY
+ygQ
+hKn
+hjh
+cxg
+cxg
+cdb
+cdb
cdb
cdb
cdb
cdb
cdb
-rNK
-rNK
rNK
rNK
rNK
@@ -119366,8 +119982,8 @@ dmB
cxM
enx
okt
-sqB
-odu
+hsQ
+xcs
umy
uCu
ccW
@@ -119377,7 +119993,7 @@ cdb
cdb
cdb
cdb
-rNK
+cdb
rNK
rNK
rNK
@@ -119620,7 +120236,7 @@ lws
uCu
pLo
qll
-jdf
+ydE
dIo
dBB
uVh
@@ -119877,10 +120493,10 @@ clR
cmF
saR
dqY
-ydE
+qll
mbN
uaP
-uaP
+jSi
uaP
syZ
uCu
@@ -120132,9 +120748,9 @@ owN
sCy
iSo
wYa
-hsQ
-qll
-qll
+kam
+ujd
+ujd
xYd
mpM
fUZ
@@ -120390,8 +121006,8 @@ pgO
qll
tUh
xjA
-xjA
-xjA
+pgO
+qll
sRN
nxf
nxf
@@ -120648,7 +121264,7 @@ xbQ
wFa
hAn
cFQ
-qll
+oxM
tjx
aqh
wzE
@@ -120826,7 +121442,7 @@ uCK
aXn
aXn
hvI
-dcR
+eTI
pAV
pXy
dHZ
@@ -121142,7 +121758,7 @@ aXn
aXn
aXn
aXn
-ccW
+wIq
azv
bGB
ccW
@@ -121398,8 +122014,8 @@ aXn
aXn
aXn
aXn
-ccW
-ccW
+aXn
+wIq
wsR
rSX
sKh
@@ -121654,9 +122270,9 @@ hUU
hUU
hUU
hUU
-ccW
-ccW
-ccW
+aXn
+wIq
+wIq
wsR
wsR
sKh
@@ -121910,28 +122526,28 @@ rNK
rNK
rNK
rNK
-rWw
-ccW
-ccW
+hUU
+aXn
+wIq
czP
wsR
wsR
-sKh
+bjI
uuf
xFi
-ftr
-ftr
-ftr
-wIq
-wIq
-wIq
-wIq
+cGd
+cGd
+cGd
+cGd
+cGd
+cGd
+cGd
+cGd
+cGd
+cGd
+cGd
vNV
rhw
-wIq
-wIq
-sKh
-sKh
sKo
twp
iBC
@@ -122167,29 +122783,29 @@ rNK
rNK
rNK
rNK
-rWw
-rWw
-ccW
-ccW
-ccW
-ccW
-fmF
-mDv
-bfg
+hUU
+hUU
+wIq
+wIq
+wIq
ftr
-ccW
-ccW
-ccW
-ccW
-cxg
-cxg
-cxg
-cxg
-cxg
-cxg
-cxg
-cxg
-cxg
+ftr
+mDv
+sKo
+cGd
+fFi
+fFi
+jgc
+pqq
+kTR
+iPQ
+bcJ
+fvu
+vOp
+cGd
+cGd
+cGd
+cGd
tHG
ptZ
tHG
@@ -122213,7 +122829,7 @@ sKo
ftr
bbw
qkb
-xxU
+mrh
qDH
dXN
eBJ
@@ -122425,28 +123041,28 @@ rNK
rNK
rNK
rNK
-rWw
-ccW
-ccW
-ccW
-ccW
-vkl
-cRV
-vkl
-ftr
-ccW
-ccW
-ccW
-ccW
-cxg
-cGW
-cjN
-cjN
+hUU
+aXn
+aXn
+naB
+rrI
+diW
+wHE
+rFq
+bWk
+gbJ
+gbJ
+jgc
+jTr
+cmL
+cmL
+cmL
+pQM
nLc
lDh
omL
cFP
-cxg
+bDA
bSv
ahD
bsR
@@ -122470,7 +123086,7 @@ uVg
czI
wqE
oyp
-mrh
+dwy
ira
xhB
xdw
@@ -122682,28 +123298,28 @@ rNK
rNK
rNK
rNK
-rWw
-rWw
-ccW
-ccW
-ccW
-xtM
+hUU
+hUU
+aXn
+naB
+chQ
+diW
tqh
tuK
-ccW
-ccW
-ccW
-ccW
-ccW
-cxg
-jgc
-jTr
-qcW
-hXo
-pQM
-jum
+bWk
+dEg
+gbJ
+oqg
+cmJ
+cmL
+cmL
+cmL
+vJd
+dmm
+dmm
+dzr
jiv
-cxg
+bDA
pqv
xAU
jOi
@@ -122873,7 +123489,7 @@ aXn
aXn
eCI
pDl
-xCH
+inP
aXn
aXn
ock
@@ -122940,25 +123556,25 @@ rNK
rNK
rNK
rNK
-rWw
-ccW
-ccW
-ayp
-rFq
-waT
+hUU
+aXn
vkl
-cvg
-ccW
-ccW
-ccW
-ccW
-cxg
-gLW
-cmJ
-nWm
-hcm
-hwg
-dzr
+vkl
+alH
+wHE
+qZL
+bWk
+qRZ
+kzi
+jgc
+jTr
+cmL
+cmL
+cmL
+hrj
+cmL
+cmL
+jum
ogJ
coy
sjC
@@ -122969,7 +123585,7 @@ llN
wrJ
hEz
wXW
-fkQ
+gYw
wsR
stR
wsR
@@ -123107,7 +123723,7 @@ nRx
poS
qwd
pPN
-xHt
+fvV
jiW
dkb
yhW
@@ -123200,33 +123816,33 @@ rNK
fxg
nOP
yez
-faV
+ayp
qNj
wHE
-bSc
-vkl
-vkl
-vkl
-ccW
-ccW
-cxg
-owX
-fFu
-ojL
-hrj
+aLO
+bWk
+gbJ
+egx
+jgc
+xOm
+jOt
+cGW
+fmq
+oPZ
+cmL
cmL
wEK
vQk
lKN
-pOU
-ssD
+mZk
+der
buE
xnA
gMb
jvJ
tlj
xnA
-vps
+kVq
wsR
wIq
wIq
@@ -123460,15 +124076,15 @@ hEC
nop
nNd
xNu
-vkl
-raH
-raH
-vkl
-ccW
-ccW
-hjh
-lWM
-xOm
+xtM
+bWk
+nzo
+nzo
+nzo
+sWu
+tpo
+sWu
+nzo
ffy
fkc
puz
@@ -123483,7 +124099,7 @@ eQA
tFf
rbj
xnA
-vps
+kVq
wsR
wsR
wIq
@@ -123718,20 +124334,20 @@ vkl
vkl
tjL
vkl
-xEd
-pCN
vkl
-ccW
-ccW
-cxg
-cxg
-cxg
-cxg
-whS
-cxg
-cxg
-cxg
-cxg
+pCN
+jKe
+kem
+jRs
+alw
+kkn
+nzo
+aFb
+bDA
+bDA
+bDA
+bDA
+bDA
lTB
tBR
sLQ
@@ -123740,7 +124356,7 @@ rId
fmH
kPy
xnA
-mEp
+rux
wsR
wsR
wIq
@@ -123975,12 +124591,12 @@ pEi
qbD
fKX
qDv
-oii
-oii
-vRu
-oop
gwg
-sLK
+gwg
+gwg
+gwg
+gwg
+gwg
aTi
tHG
xRh
@@ -123997,7 +124613,7 @@ dCe
ctF
jyL
xnA
-rux
+xCl
wsR
wsR
wsR
@@ -124771,7 +125387,7 @@ uzI
lil
mas
sKh
-gYw
+fgU
wIq
wIq
wIq
@@ -125028,7 +125644,7 @@ cuM
jvN
mas
rza
-gYw
+fgU
wsR
wsR
wIq
@@ -125542,7 +126158,7 @@ hDv
iEl
mas
wIq
-kVq
+ntN
wsR
wsR
wsR
@@ -125949,7 +126565,7 @@ bpf
pbY
pbY
pbY
-gEI
+xCu
abT
jSU
grv
@@ -126005,7 +126621,7 @@ mcu
pcu
jeu
jKU
-sNb
+nsy
biB
hqe
btd
@@ -126061,7 +126677,7 @@ wIq
wIq
bsU
qlW
-vps
+kVq
wsR
ccW
ccW
@@ -126318,7 +126934,7 @@ pon
pon
pon
sKh
-vps
+kVq
wsR
ccW
ccW
@@ -126391,7 +127007,7 @@ cRv
afd
aTz
jfC
-dqT
+rRF
opy
tcX
pGX
@@ -126575,7 +127191,7 @@ wei
iqy
pon
sKh
-vps
+kVq
dKd
ccW
uyl
@@ -126780,7 +127396,7 @@ biB
biB
xNP
biB
-eTe
+kAT
kDy
biB
etV
@@ -126832,7 +127448,7 @@ wRF
idU
pon
sKh
-vps
+kVq
llL
ccW
uyl
@@ -127089,7 +127705,7 @@ uFu
nLk
iYx
sKh
-vps
+kVq
ahI
ccW
uyl
@@ -128315,11 +128931,11 @@ muv
lYO
riS
mcu
-aUB
-aUB
-aUB
-hpP
uQB
+uQB
+uQB
+hpP
+tMD
haI
lUc
xAS
@@ -130380,7 +130996,7 @@ dgP
dgP
dgP
jyM
-sls
+hhl
nmx
eMb
hUU
@@ -138786,7 +139402,7 @@ dJc
waL
pmi
ghZ
-atH
+jQT
fse
abE
abE
@@ -138829,7 +139445,7 @@ bxv
byx
bzv
jpU
-gtz
+oCr
bCK
nGm
bFi
@@ -139296,9 +139912,9 @@ qsv
jlm
ugQ
oBw
-jmo
+rtu
nXW
-sAJ
+toj
nXW
nXW
fse
@@ -139550,13 +140166,13 @@ chb
vuY
vuY
vuY
-jlm
+oFY
ugQ
oBw
-jmo
-lKF
+rtu
+aJa
ukg
-yhn
+aji
qcC
fse
abE
@@ -139807,7 +140423,7 @@ koP
jMO
iwu
iwu
-ttT
+bwc
vQu
oBw
eNW
@@ -140064,16 +140680,16 @@ hgc
obC
gOi
duU
-ttl
+dQW
ugQ
oBw
-npV
-npV
-npV
-npV
-npV
-npV
-npV
+abW
+abW
+abW
+abW
+abW
+abW
+abW
cRv
rNK
rNK
@@ -140321,7 +140937,7 @@ oPo
obC
cof
iJf
-ttl
+dQW
ugQ
uzv
aKp
@@ -140578,7 +141194,7 @@ lrs
obC
mkx
gYx
-duJ
+ltY
lfg
gDa
lNu
@@ -140586,7 +141202,7 @@ kpu
kpu
kpu
iwG
-jZe
+kaP
cgt
wCG
ecz
@@ -140841,11 +141457,11 @@ nhG
aKp
cSj
jZE
-kKk
+lwF
nAG
lhg
ksP
-aMw
+kKk
ddm
cHz
cHz
@@ -142376,7 +142992,7 @@ ixI
vDu
tcY
wRm
-bqh
+pvY
csj
tiu
bTq
@@ -142629,11 +143245,11 @@ mWm
sSz
xPy
wfN
-cMz
-npV
-npV
-npV
-npV
+eQg
+kAZ
+kAZ
+kAZ
+kAZ
vrW
dTd
dMB
@@ -142642,7 +143258,7 @@ uIx
wSy
uIx
aWI
-jZe
+kaP
gYL
ezU
xZI
@@ -142886,11 +143502,11 @@ wSb
xBD
cRT
wNf
-cMz
-abW
-abW
-abW
-npV
+eQg
+oIe
+bMm
+sJW
+kAZ
rPB
tRn
cjE
@@ -143143,11 +143759,11 @@ biA
vVQ
cRT
qHg
-cMz
-abW
-abW
-abW
-aKp
+eQg
+cdZ
+qgi
+iNX
+kAZ
rHS
lHB
daj
@@ -143400,11 +144016,11 @@ hgK
vHG
lak
bIl
-cMz
-abW
-abW
-abW
-npV
+eQg
+gsu
+gZM
+ptU
+kAZ
eFt
fEK
gDZ
@@ -143657,11 +144273,11 @@ sqW
dIt
ctm
bIl
-cMz
-abW
-abW
-abW
-npV
+eQg
+slY
+qGr
+wNY
+lmd
cUk
dTI
tze
@@ -143914,11 +144530,11 @@ cMz
mOy
vfU
cMz
-cMz
-abW
-abW
-abW
-npV
+eQg
+fqD
+feB
+jdL
+fOr
ooJ
nTd
tze
@@ -144171,11 +144787,11 @@ ryJ
ghU
fPl
xSb
-pls
-pls
-pls
-pls
-cDp
+kAZ
+kAZ
+kAZ
+kAZ
+kAZ
tLh
dWE
qyR
@@ -145195,7 +145811,7 @@ pls
pls
cpQ
vpg
-czu
+oPy
gKc
eUJ
gKc
@@ -146312,7 +146928,7 @@ fLk
fbs
fbs
hfl
-bDF
+ljK
fLk
tVP
aXn
@@ -146326,7 +146942,7 @@ eVY
dLb
nKY
plQ
-vPr
+wLr
vpJ
aXn
aXn
@@ -146586,7 +147202,7 @@ jUZ
cdj
ctC
vRX
-vPr
+wLr
vpJ
vWF
aXn
@@ -146845,7 +147461,7 @@ mJk
mJk
cdj
fbs
-vPr
+wLr
aXn
aXn
aXn
@@ -147356,7 +147972,7 @@ mBq
rIn
mLO
psg
-vPr
+wLr
vpJ
cdO
ppd
@@ -147616,8 +148232,8 @@ aXn
aXn
aXn
vpJ
-vPr
-vPr
+wLr
+wLr
cAU
qSl
imG
@@ -148117,9 +148733,9 @@ mHF
vRX
cxh
niM
-qkF
-qkF
-qkF
+dJu
+dJu
+dJu
fcY
imG
fdD
@@ -148134,7 +148750,7 @@ aXn
aXn
chX
jfo
-vPr
+wLr
vWF
vWF
bCU
@@ -148372,7 +148988,7 @@ aXn
tSz
kzO
fLk
-ncF
+inl
gMv
uCy
tbN
@@ -148384,8 +149000,8 @@ rIn
gTo
aXn
mpB
-vPr
-vPr
+wLr
+wLr
mpB
mpB
ixC
@@ -148629,7 +149245,7 @@ aXn
imG
imG
aus
-ncF
+inl
sif
xrN
vCG
@@ -148886,22 +149502,22 @@ aXn
aXn
wNT
kzq
-ncF
+inl
qqd
lkA
neh
gPa
-qpD
+ncF
goH
imG
imG
imG
aXn
-vPr
+wLr
dQc
wGZ
xZK
-vPr
+wLr
foP
tXf
dYD
@@ -149143,18 +149759,18 @@ aXn
mic
ebJ
kzq
-ncF
+inl
fuH
mGK
mGK
mnl
-qpD
+ncF
fbs
imG
-jce
+gpZ
vRX
aXn
-vPr
+wLr
vSy
lhA
ojy
@@ -149403,15 +150019,15 @@ kzq
jik
sPp
hhs
-rzr
-rzr
+qkF
+qkF
uxS
-jce
+gpZ
kzq
kzq
kzq
aXn
-vPr
+wLr
mpB
ftG
ldH
@@ -149658,7 +150274,7 @@ aXn
kzq
qhy
kzq
-jce
+gpZ
kzq
kzq
fbs
@@ -149920,7 +150536,7 @@ vjB
tWA
pfe
fbs
-jce
+gpZ
lTC
per
kEQ
@@ -149929,7 +150545,7 @@ aXn
aXn
aXn
aXn
-vPr
+wLr
imG
wZA
cdG
@@ -150186,7 +150802,7 @@ aXn
aXn
aXn
aXn
-vPr
+wLr
uir
wZA
cdG
@@ -150436,7 +151052,7 @@ aXn
aXn
aXn
rNo
-kfA
+bDF
opD
qGF
aXn
@@ -151215,7 +151831,7 @@ tZz
aXn
aXn
aXn
-vPr
+wLr
eST
lhz
cgr
@@ -151472,7 +152088,7 @@ gzv
aXn
aXn
aXn
-vPr
+wLr
gah
pXf
yep
@@ -151730,7 +152346,7 @@ dhm
diY
aXn
vpJ
-vPr
+wLr
wIS
vqi
xSo
@@ -153779,7 +154395,7 @@ aXn
aXn
aXn
aXn
-vPr
+wLr
vpJ
vpJ
vpJ
@@ -154293,7 +154909,7 @@ aXn
aXn
aXn
aXn
-vPr
+wLr
ogk
vRX
imG
@@ -154550,7 +155166,7 @@ aXn
aXn
aXn
aXn
-vPr
+wLr
cdx
vRX
vWF
@@ -155566,8 +156182,8 @@ rNK
hUU
aXn
aXn
-vPr
-vPr
+wLr
+wLr
aXn
aXn
aXn
@@ -155823,10 +156439,10 @@ rNK
hUU
hUU
aXn
-vPr
+wLr
xvx
nKr
-vPr
+wLr
aXn
vpJ
aXn
@@ -156092,7 +156708,7 @@ imG
vRX
tVf
djo
-vPr
+wLr
ceK
vRX
bGh
@@ -158625,7 +159241,7 @@ ygF
udk
uhF
uhF
-bME
+uhF
uhF
aMC
pkQ
@@ -158879,11 +159495,11 @@ xdJ
xAz
rjp
dlk
-udk
+fqw
uVC
vPs
bLe
-bDA
+fqw
vHH
bAn
yfZ
@@ -159135,12 +159751,12 @@ wPK
xeq
xeq
xeq
-ygT
-udk
+fqw
+fqw
vCS
xhG
kkD
-bDA
+fqw
vHH
wtg
yfZ
@@ -159392,12 +160008,12 @@ wQf
fuD
xDY
naI
-yhU
+fqw
vFy
-mTp
+wyL
ull
fKo
-bDA
+fqw
wyL
xZe
gjb
@@ -159906,9 +160522,9 @@ pDM
dAn
ybb
gjD
-bDA
+fqw
bHy
-xhG
+ull
uYD
sFd
bMN
@@ -160163,12 +160779,12 @@ kre
xhW
bDw
wxv
-bDA
-gEz
-xhG
-xhG
+fqw
+wyL
+wyL
+ull
bLh
-bDA
+fqw
itf
tlJ
pps
@@ -160420,12 +161036,12 @@ biN
biN
nql
biN
-bDA
+fqw
yai
-xhG
-xhG
+ull
+ull
pZK
-bDA
+fqw
itf
xuJ
bvb
@@ -160677,12 +161293,12 @@ bBt
sfZ
dBx
uyn
-bDA
+fqw
eZR
bKf
-bKf
+wyL
bLi
-bDA
+fqw
fqw
tBW
sWr
@@ -160934,12 +161550,12 @@ bkH
bCq
bkH
qhP
-bDA
+fqw
iXy
-iFv
-lFm
+gSQ
+bLj
bLj
-cFA
+xiQ
itf
mqf
bvb
@@ -161191,12 +161807,12 @@ bBv
bCt
uyn
uyn
-bDA
-ptm
-gbJ
-gbJ
-bLk
-cFA
+fqw
+gSQ
+gSQ
+gSQ
+gSQ
+xiQ
abH
tvJ
xjx
@@ -161448,12 +162064,12 @@ bkH
bCt
bkH
giJ
-bDA
-qRZ
-fFi
-bLl
-fFi
-cFA
+fqw
+gSQ
+rtW
+gSQ
+gSQ
+xiQ
itf
mqf
bPZ
@@ -161705,12 +162321,12 @@ bkH
bCt
bLc
bkH
-bDA
-bDA
-bDA
-bDA
-cFA
-cFA
+fqw
+fqw
+fqw
+fqw
+xiQ
+xiQ
cQy
tvJ
trc
diff --git a/_maps/map_files/stations/deltastation.dmm b/_maps/map_files/stations/deltastation.dmm
index 19e2fe2d79ce..8565f0c9fa44 100644
--- a/_maps/map_files/stations/deltastation.dmm
+++ b/_maps/map_files/stations/deltastation.dmm
@@ -1998,7 +1998,7 @@
/area/station/maintenance/fore2)
"aoe" = (
/obj/structure/table,
-/obj/random/toolbox,
+/obj/effect/spawner/random/engineering/toolbox,
/obj/machinery/newscaster/directional/east,
/obj/effect/turf_decal/delivery,
/turf/simulated/floor/plasteel{
@@ -2159,7 +2159,7 @@
/area/station/maintenance/fore)
"aoS" = (
/obj/structure/table,
-/obj/random/toolbox,
+/obj/effect/spawner/random/engineering/toolbox,
/obj/item/wrench,
/turf/simulated/floor/plating,
/area/station/maintenance/fore)
@@ -20555,6 +20555,26 @@
icon_state = "red"
},
/area/station/security/storage)
+"bug" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/disposalpipe/junction/reversed{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
+/turf/simulated/floor/plasteel{
+ icon_state = "bluecorner"
+ },
+/area/station/hallway/primary/central/south)
"buh" = (
/obj/machinery/door/airlock/security/glass,
/obj/machinery/door/firedoor,
@@ -24782,26 +24802,6 @@
icon_state = "neutralfull"
},
/area/station/engineering/break_room)
-"bGG" = (
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/obj/structure/cable{
- icon_state = "2-4"
- },
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
- dir = 8
- },
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
- dir = 8
- },
-/obj/structure/disposalpipe/junction/reversed{
- dir = 2
- },
-/turf/simulated/floor/plasteel{
- icon_state = "neutralfull"
- },
-/area/station/engineering/break_room)
"bGH" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -36373,12 +36373,12 @@
},
/area/station/hallway/primary/central)
"csV" = (
-/obj/structure/closet/secure_closet/explorer,
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "browncorner"
+/obj/machinery/disposal,
+/obj/structure/disposalpipe/trunk{
+ dir = 8
},
-/area/station/supply/expedition)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"csW" = (
/turf/simulated/floor/plasteel{
dir = 1;
@@ -36711,11 +36711,10 @@
},
/area/station/hallway/primary/central)
"cuk" = (
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "browncorner"
- },
-/area/station/supply/expedition)
+/obj/machinery/alarm/directional/west,
+/obj/item/flag/nt,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cul" = (
/obj/structure/cable{
icon_state = "0-4"
@@ -36725,6 +36724,7 @@
},
/obj/machinery/power/apc/directional/north,
/obj/effect/landmark/start/explorer,
+/obj/effect/spawner/random/dirt/often,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "brown"
@@ -36845,6 +36845,28 @@
icon_state = "neutralfull"
},
/area/station/public/locker)
+"cuB" = (
+/obj/machinery/hologram/holopad,
+/obj/machinery/door/window/classic/normal{
+ name = "Glass Door"
+ },
+/obj/structure/chair/comfy/brown,
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 5
+ },
+/obj/machinery/door_control{
+ id = "nct";
+ name = "Office Door";
+ normaldoorcontrol = 1;
+ pixel_x = -25;
+ req_access = list(80);
+ pixel_y = -1
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"cuC" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/turf/simulated/floor/plasteel{
@@ -37276,17 +37298,14 @@
},
/area/station/hallway/primary/central)
"cvJ" = (
-/obj/structure/extinguisher_cabinet{
- name = "east bump";
- pixel_x = 30
- },
-/obj/machinery/suit_storage_unit/expedition,
+/obj/structure/dispenser/oxygen,
/turf/simulated/floor/plasteel{
dir = 5;
icon_state = "brown"
},
/area/station/supply/expedition)
"cvK" = (
+/obj/structure/closet/secure_closet/explorer,
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "brown"
@@ -37301,9 +37320,12 @@
/obj/machinery/status_display{
pixel_y = 32
},
-/obj/machinery/mineral/equipment_vendor/explorer,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
+/obj/structure/filingcabinet,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"cvT" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
@@ -37343,14 +37365,6 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/starboard/south)
-"cvY" = (
-/obj/effect/spawner/random/dirt/often,
-/obj/machinery/suit_storage_unit/expedition,
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "browncorner"
- },
-/area/station/supply/expedition)
"cvZ" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
@@ -37739,28 +37753,27 @@
icon_state = "neutralfull"
},
/area/station/supply/expedition)
-"cxh" = (
-/obj/effect/spawner/random/dirt/often,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"cxk" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
+/obj/effect/spawner/random/dirt/often,
/turf/simulated/floor/plasteel{
icon_state = "browncorner"
},
/area/station/supply/expedition)
"cxl" = (
-/obj/machinery/recharge_station,
+/obj/machinery/power/apc/directional/north,
+/obj/item/kirbyplants,
+/obj/machinery/light{
+ dir = 8
+ },
+/obj/structure/cable{
+ d2 = 2;
+ icon_state = "0-2"
+ },
/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "browncorner"
+ dir = 9;
+ icon_state = "darkgreen"
},
-/area/station/supply/expedition)
+/area/station/procedure/trainer_office)
"cxm" = (
/obj/machinery/camera{
c_tag = "Central Ring Hallway East";
@@ -38146,24 +38159,13 @@
icon_state = "darkblue"
},
/area/station/ai_monitored/storage/eva)
-"cyr" = (
-/obj/machinery/camera{
- c_tag = "Expedition Access";
- dir = 4
- },
-/obj/machinery/computer/security/telescreen/entertainment{
- pixel_x = -32
- },
-/obj/effect/spawner/random/dirt/often,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"cys" = (
/obj/machinery/hologram/holopad,
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
- dir = 4
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 9
},
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
- dir = 8
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 5
},
/turf/simulated/floor/plasteel{
icon_state = "neutralfull"
@@ -38185,14 +38187,21 @@
/turf/simulated/wall,
/area/station/supply/expedition)
"cyw" = (
-/obj/machinery/light{
- dir = 8
+/obj/structure/window/reinforced,
+/obj/structure/table/wood,
+/obj/item/paper_bin{
+ pixel_y = 4;
+ pixel_x = -5
+ },
+/obj/item/pen{
+ pixel_x = 8;
+ pixel_y = 8
},
/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "browncorner"
+ dir = 10;
+ icon_state = "darkgreen"
},
-/area/station/supply/expedition)
+/area/station/procedure/trainer_office)
"cyx" = (
/obj/structure/chair{
dir = 4
@@ -38202,15 +38211,26 @@
/area/station/supply/expedition)
"cyy" = (
/obj/machinery/camera{
- c_tag = "Expedition";
+ c_tag = "Career Trainer's Office";
dir = 8
},
-/obj/structure/closet/secure_closet/explorer,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 10
+ },
+/obj/effect/mapping_helpers/airlock/windoor/access/all/procedure/trainer,
+/obj/machinery/door/window/reinforced/normal{
+ name = "NCT"
+ },
/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "brown"
+ dir = 6;
+ icon_state = "darkgreen"
},
-/area/station/supply/expedition)
+/area/station/procedure/trainer_office)
"cyz" = (
/obj/item/radio/intercom{
name = "west bump";
@@ -38276,15 +38296,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/public/toilet/lockerroom)
-"cyI" = (
-/obj/item/radio/intercom{
- name = "east bump";
- pixel_x = 28
- },
-/obj/effect/spawner/random/dirt/often,
-/obj/machinery/suit_storage_unit/expedition,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"cyJ" = (
/obj/structure/urinal{
pixel_y = 28
@@ -38747,19 +38758,9 @@
/turf/simulated/floor/plasteel,
/area/station/public/toilet/lockerroom)
"czV" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/structure/chair/stool/bar,
-/turf/simulated/floor/plasteel{
- icon_state = "neutralfull"
- },
-/area/station/supply/expedition)
-"czW" = (
/obj/effect/spawner/random/dirt/often,
-/obj/machinery/requests_console/directional/west,
/turf/simulated/floor/plasteel{
- dir = 8;
- icon_state = "browncorner"
+ icon_state = "neutralfull"
},
/area/station/supply/expedition)
"czY" = (
@@ -38769,9 +38770,9 @@
},
/area/station/hallway/primary/central/south)
"cAb" = (
-/obj/machinery/atmospherics/unary/vent_pump/on,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
+/obj/structure/table/wood,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cAc" = (
/turf/simulated/floor/plasteel/freezer,
/area/station/public/toilet/lockerroom)
@@ -39241,54 +39242,41 @@
},
/turf/simulated/floor/carpet,
/area/station/science/robotics/showroom)
-"cBv" = (
-/obj/structure/table/reinforced,
-/obj/item/pizzabox/firecracker,
-/obj/effect/spawner/random/dirt/often,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"cBw" = (
/obj/machinery/firealarm/directional/west,
+/obj/structure/chair/stool/bar,
/obj/effect/landmark/start/explorer,
/turf/simulated/floor/plasteel{
dir = 8;
icon_state = "brown"
},
/area/station/supply/expedition)
-"cBy" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 5
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 5
- },
-/obj/structure/chair/stool/bar,
-/obj/effect/landmark/start/explorer,
-/obj/effect/spawner/random/dirt/often,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"cBC" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+/obj/machinery/firealarm/directional/west,
+/obj/structure/chair/comfy/black{
dir = 4
},
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 4
},
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "browncorner"
- },
-/area/station/supply/expedition)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cBD" = (
-/obj/machinery/hologram/holopad,
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 4;
+ icon_state = "2-4"
+ },
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 9
+ dir = 6
},
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 10
},
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
+/obj/machinery/hologram/holopad,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cBE" = (
/turf/simulated/floor/plating,
/area/station/public/toilet/lockerroom)
@@ -39653,6 +39641,8 @@
/turf/simulated/floor/carpet,
/area/station/science/robotics/showroom)
"cCV" = (
+/obj/structure/table/reinforced,
+/obj/item/pizzabox/firecracker,
/turf/simulated/floor/plasteel{
dir = 10;
icon_state = "brown"
@@ -39664,18 +39654,20 @@
name = "south bump";
pixel_y = -24
},
-/obj/structure/table/reinforced,
+/obj/structure/chair/stool/bar,
+/obj/effect/landmark/start/explorer,
+/obj/effect/spawner/random/dirt/often,
/turf/simulated/floor/plasteel{
icon_state = "brown"
},
/area/station/supply/expedition)
"cCX" = (
-/obj/machinery/economy/vending/exploredrobe,
-/turf/simulated/floor/plasteel{
- dir = 1;
- icon_state = "browncorner"
+/obj/item/kirbyplants,
+/obj/machinery/light{
+ dir = 8
},
-/area/station/supply/expedition)
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cCY" = (
/obj/machinery/door/firedoor,
/obj/machinery/door/airlock/public/glass{
@@ -39698,11 +39690,18 @@
/turf/simulated/floor/plasteel,
/area/station/supply/expedition)
"cDc" = (
-/obj/machinery/atmospherics/unary/vent_scrubber/on{
- dir = 1
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/structure/disposalpipe/segment/corner{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cDd" = (
/obj/effect/landmark/lightsout,
/turf/simulated/floor/plasteel{
@@ -39714,12 +39713,16 @@
/turf/simulated/wall,
/area/station/public/toilet/lockerroom)
"cDf" = (
-/obj/structure/closet/secure_closet/explorer,
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "brown"
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
},
-/area/station/supply/expedition)
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 9
+ },
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"cDg" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -45811,7 +45814,7 @@
/area/station/maintenance/starboard)
"cZc" = (
/obj/structure/rack,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/effect/spawner/random/maintenance,
/turf/simulated/floor/plasteel{
dir = 8;
@@ -50477,8 +50480,9 @@
/turf/simulated/floor/plating,
/area/station/science/genetics)
"dte" = (
-/obj/item/kirbyplants,
/obj/machinery/alarm/directional/south,
+/obj/machinery/mineral/equipment_vendor/explorer,
+/obj/effect/spawner/random/dirt/often,
/turf/simulated/floor/plasteel{
icon_state = "brown"
},
@@ -56110,7 +56114,7 @@
/obj/item/reagent_containers/iv_bag/blood/random,
/obj/item/reagent_containers/syringe/epinephrine,
/obj/item/reagent_containers/syringe,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/machinery/status_display{
pixel_y = -32
},
@@ -56673,6 +56677,17 @@
icon_state = "yellow"
},
/area/station/engineering/transmission_laser)
+"eeT" = (
+/obj/machinery/atmospherics/unary/vent_pump/on,
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/procedure/trainer_office)
"eeX" = (
/obj/structure/closet,
/obj/effect/spawner/random/maintenance,
@@ -57233,6 +57248,28 @@
},
/turf/simulated/floor/plasteel,
/area/station/security/permabrig)
+"etC" = (
+/obj/structure/safe/floor{
+ known_by = list("captain")
+ },
+/obj/item/toy/russian_revolver,
+/obj/item/reagent_containers/drinks/bottle/absinthe/premium,
+/obj/item/lighter/zippo/nt_rep,
+/obj/item/storage/fancy/cigarettes/cigpack_robustgold,
+/obj/item/toy/figure/crew/captain,
+/obj/effect/mapping_helpers/airlock/windoor/access/any/security/doors{
+ dir = 8
+ },
+/obj/machinery/door/window{
+ dir = 8
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/turf/simulated/floor/carpet/black,
+/area/station/command/office/captain/bedroom)
"etR" = (
/obj/structure/extinguisher_cabinet{
name = "east bump";
@@ -58283,12 +58320,12 @@
/turf/simulated/floor/carpet/red,
/area/station/command/office/hos)
"eXJ" = (
-/obj/structure/dispenser/oxygen,
-/obj/effect/turf_decal/delivery/hollow,
+/obj/machinery/economy/vending/traindrobe,
/turf/simulated/floor/plasteel{
- icon_state = "browncorner"
+ dir = 5;
+ icon_state = "darkgreen"
},
-/area/station/supply/expedition)
+/area/station/procedure/trainer_office)
"eXP" = (
/obj/structure/closet/l3closet/security,
/obj/machinery/firealarm/directional/east,
@@ -59130,15 +59167,6 @@
icon_state = "redyellowfull"
},
/area/station/medical/break_room)
-"fys" = (
-/obj/structure/table/reinforced,
-/obj/item/reagent_containers/drinks/bottle/beer,
-/obj/item/reagent_containers/drinks/bottle/beer,
-/obj/item/reagent_containers/drinks/bottle/beer,
-/obj/item/reagent_containers/drinks/bottle/beer,
-/obj/effect/spawner/random/dirt/often,
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"fzd" = (
/obj/machinery/access_button{
autolink_id = "virolab_btn_int";
@@ -59342,6 +59370,19 @@
icon_state = "dark"
},
/area/station/security/armory/secure)
+"fFu" = (
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/turf/simulated/floor/plasteel{
+ icon_state = "neutralfull"
+ },
+/area/station/hallway/primary/central/south)
"fFy" = (
/obj/machinery/camera{
dir = 6;
@@ -60191,6 +60232,14 @@
icon_state = "red"
},
/area/station/security/storage)
+"fZa" = (
+/obj/structure/table/reinforced,
+/obj/item/reagent_containers/drinks/bottle/beer,
+/obj/item/reagent_containers/drinks/bottle/beer,
+/obj/item/reagent_containers/drinks/bottle/beer,
+/obj/item/reagent_containers/drinks/bottle/beer,
+/turf/simulated/floor/plasteel,
+/area/station/supply/expedition)
"fZc" = (
/obj/machinery/light{
dir = 1
@@ -60305,9 +60354,7 @@
/turf/simulated/floor/plating,
/area/station/engineering/controlroom)
"gdm" = (
-/obj/effect/turf_decal/stripes/line{
- dir = 2
- },
+/obj/effect/turf_decal/stripes/line,
/obj/structure/railing,
/turf/simulated/floor/engine,
/area/station/science/testrange)
@@ -64633,20 +64680,6 @@
/obj/effect/mapping_helpers/turfs/damage,
/turf/simulated/floor/wood,
/area/station/maintenance/abandonedbar)
-"iFr" = (
-/obj/machinery/door/firedoor,
-/obj/effect/mapping_helpers/airlock/access/all/supply/expedition,
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/machinery/door/airlock/mining{
- name = "Expedition Headquarters"
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"iFv" = (
/obj/machinery/atmospherics/pipe/simple/visible/yellow{
dir = 4
@@ -67492,6 +67525,10 @@
},
/turf/simulated/floor/plasteel,
/area/station/science/testrange)
+"kol" = (
+/obj/effect/decal/cleanable/dirt,
+/turf/simulated/floor/plasteel,
+/area/station/maintenance/port)
"kot" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 5
@@ -67716,6 +67753,36 @@
icon_state = "dark"
},
/area/station/security/execution)
+"kwm" = (
+/obj/machinery/door/airlock/command/glass{
+ name = "Trainer's Office";
+ id_tag = "nct"
+ },
+/obj/effect/mapping_helpers/airlock/polarized{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer,
+/obj/machinery/door/firedoor,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"kxj" = (
/obj/structure/mirror{
pixel_y = 28
@@ -68556,6 +68623,20 @@
},
/turf/simulated/floor/carpet/black,
/area/station/service/chapel)
+"kWp" = (
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "neutralcorner"
+ },
+/area/station/hallway/primary/central/south)
"kWF" = (
/obj/machinery/light,
/turf/simulated/floor/engine,
@@ -69554,13 +69635,13 @@
/area/station/science/research)
"lwY" = (
/obj/structure/table/glass,
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 6
},
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 3
},
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/reagent_containers/spray/cleaner,
/obj/structure/sign/poster/official/random{
pixel_x = 32
@@ -70666,12 +70747,14 @@
name = "east bump";
pixel_x = 28
},
-/obj/structure/closet/secure_closet/explorer,
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "brown"
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
-/area/station/supply/expedition)
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/turf/simulated/floor/wood,
+/area/station/procedure/trainer_office)
"miQ" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -71905,6 +71988,14 @@
/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
/area/station/command/bridge)
+"mSW" = (
+/obj/machinery/requests_console/directional/west,
+/obj/structure/closet/secure_closet/explorer,
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "browncorner"
+ },
+/area/station/supply/expedition)
"mTd" = (
/obj/machinery/door/poddoor/preopen{
id_tag = "xeno5";
@@ -72088,6 +72179,11 @@
icon_state = "dark"
},
/area/station/security/warden)
+"mWq" = (
+/obj/machinery/economy/vending/exploredrobe,
+/obj/effect/spawner/random/dirt/often,
+/turf/simulated/floor/plasteel,
+/area/station/supply/expedition)
"mWz" = (
/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
@@ -72954,13 +73050,6 @@
/obj/structure/sink/puddle,
/turf/simulated/floor/grass,
/area/station/medical/medbay)
-"nsD" = (
-/obj/structure/chair/stool/bar,
-/obj/effect/spawner/random/dirt/often,
-/turf/simulated/floor/plasteel{
- icon_state = "brown"
- },
-/area/station/supply/expedition)
"ntt" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 6
@@ -73959,26 +74048,6 @@
},
/turf/simulated/floor/plasteel/dark,
/area/station/engineering/gravitygenerator)
-"nYv" = (
-/obj/machinery/door/window{
- dir = 8
- },
-/obj/effect/mapping_helpers/airlock/windoor/access/any/security/doors{
- dir = 8
- },
-/obj/structure/safe/floor{
- known_by = list("captain")
- },
-/obj/item/gun/projectile/revolver/russian,
-/obj/item/reagent_containers/drinks/bottle/absinthe/premium,
-/obj/item/lighter/zippo/nt_rep,
-/obj/item/storage/fancy/cigarettes/cigpack_robustgold,
-/obj/item/toy/figure/crew/captain,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/carpet/black,
-/area/station/command/office/captain/bedroom)
"nYw" = (
/turf/simulated/floor/plasteel,
/area/station/maintenance/fore)
@@ -75174,6 +75243,16 @@
/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
/area/station/hallway/primary/central)
+"oHi" = (
+/obj/machinery/light{
+ dir = 8
+ },
+/obj/structure/closet/secure_closet/explorer,
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "browncorner"
+ },
+/area/station/supply/expedition)
"oHk" = (
/obj/machinery/door/firedoor,
/obj/machinery/door/window,
@@ -75993,9 +76072,9 @@
dir = 8
},
/obj/machinery/camera{
- c_tag = "Research Lobby";
+ c_tag = "Power Transmission Laser";
dir = 1;
- network = list("Research","SS13")
+ network = list("Engineering","SS13")
},
/turf/simulated/floor/plasteel{
icon_state = "caution"
@@ -76122,6 +76201,16 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/fore/north)
+"pec" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-8"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"peB" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/cable/yellow{
@@ -76250,6 +76339,11 @@
icon_state = "yellow"
},
/area/station/engineering/transmission_laser)
+"piL" = (
+/obj/machinery/suit_storage_unit/expedition,
+/obj/effect/spawner/random/dirt/often,
+/turf/simulated/floor/plasteel,
+/area/station/supply/expedition)
"pjk" = (
/turf/simulated/floor/engine,
/area/station/science/test_chamber)
@@ -76664,10 +76758,6 @@
},
/turf/simulated/floor/plating,
/area/station/security/armory/secure)
-"pvo" = (
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/maintenance/port)
"pvv" = (
/obj/structure/table/reinforced,
/obj/machinery/door/window/reinforced/normal,
@@ -77031,9 +77121,9 @@
"pFX" = (
/obj/structure/rack,
/obj/item/storage/belt/utility,
-/obj/random/tool,
-/obj/random/tool,
-/obj/random/tool,
+/obj/effect/spawner/random/engineering/tools,
+/obj/effect/spawner/random/engineering/tools,
+/obj/effect/spawner/random/engineering/tools,
/obj/effect/spawner/random/maintenance,
/turf/simulated/floor/plating,
/area/station/maintenance/fsmaint)
@@ -77232,15 +77322,6 @@
/obj/effect/turf_decal/delivery,
/turf/simulated/floor/plasteel,
/area/station/supply/miningdock)
-"pLm" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/turf/simulated/floor/plasteel,
-/area/station/supply/expedition)
"pLq" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 8
@@ -80865,6 +80946,10 @@
/obj/machinery/alarm/directional/south,
/turf/simulated/floor/carpet/black,
/area/station/security/detective)
+"rIu" = (
+/obj/effect/landmark/start/explorer,
+/turf/simulated/floor/plasteel,
+/area/station/supply/expedition)
"rIE" = (
/obj/structure/table/wood,
/obj/item/storage/bible,
@@ -81092,6 +81177,18 @@
icon_state = "whiteyellowcorner"
},
/area/station/medical/medbay)
+"rPd" = (
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/closet,
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"rPH" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -83871,6 +83968,13 @@
/obj/structure/morgue,
/turf/simulated/floor/plasteel/dark,
/area/station/medical/morgue)
+"ten" = (
+/obj/machinery/suit_storage_unit/expedition,
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "browncorner"
+ },
+/area/station/supply/expedition)
"tep" = (
/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
@@ -84069,6 +84173,18 @@
icon_state = "darkbluecorners"
},
/area/station/medical/morgue)
+"tlb" = (
+/obj/machinery/computer/security/telescreen/entertainment{
+ pixel_x = -32
+ },
+/obj/structure/closet/secure_closet/explorer,
+/obj/machinery/camera{
+ c_tag = "Expedition Access";
+ dir = 4
+ },
+/obj/effect/spawner/random/dirt/often,
+/turf/simulated/floor/plasteel,
+/area/station/supply/expedition)
"tls" = (
/obj/effect/turf_decal/delivery/hollow,
/obj/effect/mapping_helpers/airlock/access/all/engineering/construction,
@@ -86449,7 +86565,7 @@
"uud" = (
/obj/structure/rack,
/obj/effect/spawner/random/maintenance,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/turf/simulated/floor/plating,
/area/station/maintenance/aft)
"uuh" = (
@@ -86953,6 +87069,31 @@
},
/turf/simulated/floor/engine/n20,
/area/station/engineering/atmos)
+"uJP" = (
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 4;
+ icon_state = "2-4"
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
+ dir = 8
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
+ dir = 8
+ },
+/obj/structure/disposalpipe/junction/reversed{
+ dir = 2
+ },
+/obj/machinery/autolathe,
+/turf/simulated/floor/plasteel{
+ icon_state = "neutralfull"
+ },
+/area/station/engineering/break_room)
"uJQ" = (
/obj/structure/table,
/obj/machinery/photocopier/faxmachine{
@@ -89304,6 +89445,12 @@
icon_state = "whiteblue"
},
/area/station/medical/reception)
+"vZf" = (
+/obj/machinery/recharge_station,
+/turf/simulated/floor/plasteel{
+ icon_state = "brown"
+ },
+/area/station/supply/expedition)
"vZx" = (
/obj/effect/turf_decal/delivery/hollow,
/obj/structure/closet/walllocker/emerglocker/east,
@@ -89372,7 +89519,7 @@
/area/station/hallway/primary/central)
"waJ" = (
/obj/structure/table/glass,
-/obj/random/plushie,
+/obj/effect/spawner/random/plushies,
/obj/machinery/light{
dir = 1
},
@@ -90221,6 +90368,9 @@
icon_state = "neutralfull"
},
/area/station/hallway/secondary/entry/east)
+"wwx" = (
+/turf/simulated/wall,
+/area/station/procedure/trainer_office)
"wwK" = (
/obj/machinery/hologram/holopad,
/obj/structure/cable{
@@ -90820,6 +90970,16 @@
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
/area/station/science/storage)
+"wOM" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 4;
+ icon_state = "0-4"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"wOW" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -90990,11 +91150,28 @@
/turf/simulated/floor/plasteel/dark,
/area/station/engineering/controlroom)
"wUm" = (
+/obj/machinery/button/windowtint{
+ id = "NCT";
+ pixel_x = 24;
+ dir = 8;
+ pixel_y = 5
+ },
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 8;
+ icon_state = "2-8"
+ },
+/obj/machinery/light_switch{
+ dir = 8;
+ name = "east bump";
+ pixel_x = 24;
+ pixel_y = -5
+ },
/turf/simulated/floor/plasteel{
dir = 4;
- icon_state = "brown"
+ icon_state = "darkgreen"
},
-/area/station/supply/expedition)
+/area/station/procedure/trainer_office)
"wUq" = (
/obj/machinery/economy/vending/hydronutrients,
/obj/effect/turf_decal/delivery/hollow,
@@ -91814,6 +91991,15 @@
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel/white,
/area/station/science/lobby)
+"xpZ" = (
+/obj/item/radio/intercom{
+ name = "east bump";
+ pixel_x = 28
+ },
+/obj/machinery/suit_storage_unit/expedition,
+/obj/effect/spawner/random/dirt/often,
+/turf/simulated/floor/plasteel,
+/area/station/supply/expedition)
"xql" = (
/obj/machinery/light{
dir = 8
@@ -119976,7 +120162,7 @@ bzV
bBH
bDx
bEZ
-bGG
+uJP
bIC
nhh
bMt
@@ -127466,7 +127652,7 @@ tik
xjh
mQi
rLQ
-pvo
+kol
drn
dhG
fBk
@@ -134907,9 +135093,9 @@ bIX
cyv
cxe
cvK
-cyw
-cyr
-czW
+oHi
+tlb
+mSW
cBw
cCV
cyv
@@ -135166,8 +135352,8 @@ cul
cDa
cDa
cyt
-fys
-cBv
+fZa
+cDa
cCW
cyv
cEZ
@@ -135424,8 +135610,8 @@ cvM
cxf
cys
czV
-cBy
-nsD
+rIu
+vZf
cyv
csW
qZt
@@ -135678,10 +135864,10 @@ bIX
cyv
cuX
cyx
-cxh
+cDa
cyu
cDa
-pLm
+cDa
dte
cyv
csW
@@ -135934,12 +136120,12 @@ sHD
crO
cyv
cvJ
-cvY
+ten
+piL
+xpZ
cxJ
-cyI
-cDa
cxk
-cDa
+mWq
cyv
rfw
ckv
@@ -136190,14 +136376,14 @@ coG
wat
bIX
cyv
-cyv
-oVl
-oVl
-cyv
-oVl
-iFr
-oVl
-cyv
+wwx
+wwx
+wwx
+wwx
+wwx
+wwx
+wwx
+wwx
jdr
dLT
njU
@@ -136435,7 +136621,7 @@ bYD
bYD
bYD
car
-nYv
+etC
cdY
bYD
chy
@@ -136447,14 +136633,14 @@ cht
sqO
bIX
uaS
-cyv
+wwx
cxl
-cuk
+rPd
cyw
cuk
cBC
cCX
-cyv
+wOM
csW
ckv
jfG
@@ -136704,17 +136890,17 @@ xmE
ygv
bIX
rVL
-cyv
+wwx
cvQ
-cDa
-cDa
+eeT
+cuB
cAb
cBD
cDc
-cyv
-csW
-ckv
-cHN
+kwm
+kWp
+fFu
+bug
ppu
cKW
nQF
@@ -136961,14 +137147,14 @@ cht
ygv
bIX
nSv
-cyv
+wwx
eXJ
wUm
cyy
mhU
cDf
csV
-cyv
+pec
csW
ckv
cHN
@@ -137217,15 +137403,15 @@ cht
cht
vAP
bSz
-cyv
-cyv
-cyv
-cyv
-cyv
-cyv
-cyv
-cyv
-cyv
+bsv
+wwx
+wwx
+wwx
+wwx
+wwx
+wwx
+wwx
+wwx
lXi
tIa
njo
diff --git a/_maps/map_files/stations/emeraldstation.dmm b/_maps/map_files/stations/emeraldstation.dmm
index 03624246e040..78097402b526 100644
--- a/_maps/map_files/stations/emeraldstation.dmm
+++ b/_maps/map_files/stations/emeraldstation.dmm
@@ -7298,7 +7298,7 @@
/obj/structure/cable{
icon_state = "0-4"
},
-/obj/item/solar_assembly,
+/obj/machinery/power/tracker,
/turf/space,
/area/station/engineering/solar/fore_port)
"bwP" = (
@@ -9633,6 +9633,16 @@
icon_state = "redyellowfull"
},
/area/station/maintenance/apmaint)
+"bSp" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-8"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"bSq" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -10970,6 +10980,12 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/turf/simulated/floor/wood,
/area/station/maintenance/abandoned_office)
+"cfS" = (
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"cfV" = (
/obj/item/food/grown/harebell,
/turf/simulated/floor/grass,
@@ -11034,16 +11050,20 @@
/turf/simulated/floor/plating,
/area/station/maintenance/starboard)
"cgE" = (
-/obj/structure/table,
-/obj/item/paper_bin/nanotrasen{
- pixel_y = -2
- },
/obj/machinery/camera{
c_tag = "Paper Supplies";
dir = 8
},
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/obj/machinery/power/apc/important/directional/east,
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-8"
+ },
+/obj/effect/turf_decal/woodsiding{
+ dir = 4
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"cgK" = (
/obj/structure/rack{
dir = 1
@@ -11125,19 +11145,6 @@
icon_state = "darkgrey"
},
/area/station/security/permabrig)
-"chI" = (
-/obj/structure/table,
-/obj/item/stack/package_wrap,
-/obj/item/hand_labeler{
- pixel_y = 3;
- pixel_x = 2
- },
-/obj/item/hand_labeler,
-/obj/machinery/light{
- dir = 1
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
"chK" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
@@ -13542,6 +13549,20 @@
"cHG" = (
/turf/simulated/wall,
/area/station/medical/patients_rooms_secondary)
+"cHH" = (
+/obj/structure/cable{
+ icon_state = "0-8"
+ },
+/obj/machinery/power/solar{
+ name = "Fore-Port Solar Array"
+ },
+/obj/machinery/power/solar{
+ name = "Fore-Port Solar Array"
+ },
+/turf/simulated/floor/plasteel/airless{
+ icon_state = "solarpanel"
+ },
+/area/station/engineering/solar/fore_port)
"cHI" = (
/obj/effect/spawner/random/maintenance,
/obj/effect/decal/cleanable/dirt,
@@ -17683,6 +17704,13 @@
icon_state = "cult"
},
/area/station/service/chapel/office)
+"dzM" = (
+/obj/structure/filingcabinet,
+/turf/simulated/floor/plasteel{
+ dir = 9;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"dzR" = (
/turf/simulated/floor/plasteel{
dir = 4;
@@ -19137,6 +19165,9 @@
/obj/structure/cable{
icon_state = "0-4"
},
+/obj/machinery/power/solar{
+ name = "Fore-Port Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -19151,18 +19182,24 @@
},
/area/station/science/lobby)
"dOH" = (
-/obj/structure/rack,
-/obj/item/folder/red{
- pixel_x = 8;
- pixel_y = 6
+/obj/structure/table/wood,
+/obj/effect/turf_decal/woodsiding{
+ dir = 10
},
-/obj/item/folder/blue{
- pixel_x = 4;
- pixel_y = 3
+/obj/item/flashlight/lamp/green{
+ pixel_y = 8;
+ pixel_x = 5
},
-/obj/item/folder,
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/obj/machinery/door_control{
+ id = "nct";
+ name = "Office Door";
+ normaldoorcontrol = 1;
+ req_access = list(80);
+ pixel_y = -2;
+ pixel_x = -7
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"dOQ" = (
/obj/machinery/atmospherics/pipe/simple/visible/yellow{
dir = 4
@@ -19822,40 +19859,6 @@
},
/area/station/medical/break_room)
"dXx" = (
-/obj/structure/closet/crate,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/tracker_electronics,
-/obj/item/stack/cable_coil{
- pixel_x = 3;
- pixel_y = -4
- },
-/obj/item/stack/sheet/glass{
- amount = 50;
- pixel_x = -4;
- pixel_y = 4
- },
-/obj/item/stack/sheet/glass{
- amount = 50
- },
/turf/simulated/floor/plating,
/area/station/maintenance/solar_maintenance/fore_port)
"dXC" = (
@@ -22489,6 +22492,19 @@
icon_state = "caution"
},
/area/station/engineering/break_room)
+"ezi" = (
+/obj/structure/table/glass,
+/obj/item/clothing/neck/stethoscope{
+ pixel_y = 6
+ },
+/obj/machinery/light{
+ dir = 1
+ },
+/obj/machinery/newscaster/directional/north,
+/turf/simulated/floor/plasteel{
+ icon_state = "whitebluefull"
+ },
+/area/station/medical/sleeper)
"ezp" = (
/obj/structure/disposalpipe/segment/corner{
dir = 1
@@ -23263,9 +23279,9 @@
"eHd" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/camera{
- c_tag = "AI Satellite Exterior West";
dir = 8;
- network = list("SS13","MiniSat")
+ network = list("Engineering","SS13");
+ c_tag = "Power Transmission Laser"
},
/obj/machinery/power/apc/directional/east,
/obj/structure/cable{
@@ -26680,17 +26696,6 @@
icon_state = "darkred"
},
/area/station/security/brig)
-"fop" = (
-/obj/structure/rack,
-/obj/item/clothing/suit/corgisuit,
-/obj/item/clothing/head/corgi{
- pixel_y = 7
- },
-/obj/structure/sign/poster/official/love_ian{
- pixel_y = -32
- },
-/turf/simulated/floor/plating,
-/area/station/maintenance/fpmaint)
"fot" = (
/obj/machinery/light/small,
/turf/simulated/floor/plating,
@@ -27522,7 +27527,7 @@
dir = 1;
icon_state = "yellowcorner"
},
-/area/station/hallway/primary/central/nw)
+/area/station/hallway/primary/central/sw)
"fvK" = (
/obj/machinery/atmospherics/pipe/manifold/visible/yellow,
/turf/simulated/floor/plasteel,
@@ -30327,6 +30332,23 @@
icon_state = "freezerfloor"
},
/area/station/security/brig)
+"fZt" = (
+/obj/machinery/button/windowtint{
+ id = "NCT";
+ pixel_y = 24;
+ pixel_x = 5
+ },
+/obj/machinery/light_switch{
+ pixel_y = 24;
+ name = "north bump";
+ pixel_x = -5
+ },
+/obj/structure/closet,
+/turf/simulated/floor/plasteel{
+ dir = 5;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"fZK" = (
/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
@@ -31387,12 +31409,12 @@
/turf/simulated/floor/plating,
/area/station/maintenance/security/fore)
"gjA" = (
-/obj/machinery/power/solar{
- name = "Starboard Solar Array"
- },
/obj/structure/cable{
icon_state = "0-8"
},
+/obj/machinery/power/solar{
+ name = "Aft-Starboard Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -31418,7 +31440,7 @@
/area/station/service/hydroponics)
"gkj" = (
/obj/machinery/power/solar{
- name = "Starboard Solar Array"
+ name = "Fore-Starboard Solar Array"
},
/obj/structure/cable{
icon_state = "0-2"
@@ -32270,6 +32292,10 @@
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
/area/station/public/storage/office)
+"gsr" = (
+/obj/item/flag/ian,
+/turf/simulated/floor/wood,
+/area/station/maintenance/fpmaint)
"gsu" = (
/obj/structure/closet/secure_closet/freezer/fridge/open,
/obj/item/organ/internal/liver/nian,
@@ -33752,20 +33778,6 @@
icon_state = "whiteblue"
},
/area/station/medical/surgery/primary)
-"gHY" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/structure/cable{
- icon_state = "2-8"
- },
-/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,
-/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers,
-/obj/structure/disposalpipe/junction{
- dir = 4
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
"gId" = (
/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
@@ -35282,15 +35294,6 @@
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
/area/station/hallway/secondary/entry)
-"gYN" = (
-/obj/item/solar_assembly,
-/obj/structure/cable{
- icon_state = "0-4"
- },
-/turf/simulated/floor/plasteel/airless{
- icon_state = "solarpanel"
- },
-/area/station/engineering/solar/fore_port)
"gYO" = (
/obj/structure/chair{
dir = 4
@@ -35787,15 +35790,6 @@
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
/area/station/maintenance/aft2)
-"hde" = (
-/obj/item/kitchen/sushimat{
- name = "Prayer Mat"
- },
-/obj/item/clothing/suit/ianshirt{
- desc = "A worn out, curiously comfortable t-shirt with a picture of Ian. You wouldn't go so far as to say it feels like being hugged when you wear it but it's pretty close. Good for sleeping in. This one in particular looks like it wasnt washed in months"
- },
-/turf/simulated/floor/wood,
-/area/station/maintenance/fpmaint)
"hdi" = (
/obj/structure/sign/poster/official/random{
pixel_x = -32
@@ -36966,6 +36960,14 @@
"hoM" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment/corner{
+ dir = 1
+ },
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "blue"
@@ -37354,7 +37356,7 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/nw)
+/area/station/hallway/primary/central/sw)
"hsN" = (
/obj/structure/chair{
dir = 4
@@ -37503,8 +37505,8 @@
layer = 2.9
},
/obj/structure/rack,
-/obj/item/clothing/accessory/stripedbluescarf,
-/obj/item/clothing/accessory/blue,
+/obj/item/clothing/neck/scarf/stripedblue,
+/obj/item/clothing/neck/tie/blue,
/turf/simulated/floor/plating,
/area/station/maintenance/starboard)
"huB" = (
@@ -37891,6 +37893,14 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/asmaint)
+"hxK" = (
+/obj/structure/rack,
+/obj/item/clothing/suit/corgisuit,
+/obj/item/clothing/head/corgi{
+ pixel_y = 7
+ },
+/turf/simulated/floor/wood,
+/area/station/maintenance/fpmaint)
"hxL" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 4
@@ -37945,8 +37955,8 @@
/obj/machinery/atmospherics/unary/vent_pump/on{
dir = 4
},
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"hye" = (
/obj/item/clothing/under/misc/swimsuit/blue,
/turf/simulated/floor/beach/away/sand,
@@ -39427,10 +39437,10 @@
/turf/simulated/floor/plating,
/area/station/maintenance/apmaint2)
"hMY" = (
+/obj/structure/cable,
/obj/machinery/power/solar{
- name = "Starboard Solar Array"
+ name = "Aft-Starboard Solar Array"
},
-/obj/structure/cable,
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -39878,7 +39888,7 @@
/area/station/maintenance/incinerator)
"hTk" = (
/obj/structure/table,
-/obj/random/plushie,
+/obj/effect/spawner/random/plushies,
/obj/machinery/light{
dir = 4
},
@@ -39923,10 +39933,6 @@
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
/area/station/maintenance/fsmaint2)
-"hTO" = (
-/obj/item/flag/ian,
-/turf/simulated/floor/plating,
-/area/station/maintenance/fpmaint)
"hUe" = (
/obj/effect/spawner/random/blood/maybe,
/obj/structure/cable{
@@ -41747,6 +41753,15 @@
/obj/machinery/atmospherics/portable/canister/air,
/turf/simulated/floor/plating,
/area/station/maintenance/security/fore)
+"imy" = (
+/obj/structure/disposalpipe/segment/corner{
+ dir = 2
+ },
+/turf/simulated/floor/plasteel{
+ dir = 1;
+ icon_state = "blue"
+ },
+/area/station/hallway/primary/fore/north)
"imB" = (
/obj/item/kirbyplants,
/turf/simulated/floor/plasteel,
@@ -43125,12 +43140,12 @@
/turf/simulated/floor/plating,
/area/station/maintenance/aft2)
"iAv" = (
-/obj/machinery/power/solar{
- name = "Starboard Solar Array"
- },
/obj/structure/cable{
icon_state = "0-2"
},
+/obj/machinery/power/solar{
+ name = "Aft-Starboard Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -43905,32 +43920,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/maintenance/starboard)
-"iHX" = (
-/obj/structure/closet/crate,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/stack/sheet/metal/fifty,
-/obj/item/circuitboard/solar_control,
-/turf/simulated/floor/plating,
-/area/station/maintenance/solar_maintenance/fore_port)
"iHY" = (
/obj/machinery/atmospherics/pipe/simple/hidden/cyan,
/obj/structure/table,
@@ -44647,6 +44636,9 @@
/obj/structure/flora/grass/jungle,
/turf/simulated/floor/grass,
/area/station/public/dorms)
+"iPs" = (
+/turf/simulated/wall,
+/area/station/procedure/trainer_office)
"iPw" = (
/obj/structure/lattice/catwalk,
/obj/machinery/camera{
@@ -46205,7 +46197,7 @@
known_by = list("captain")
},
/obj/item/reagent_containers/drinks/bottle/absinthe/premium,
-/obj/item/gun/projectile/revolver/russian,
+/obj/item/toy/russian_revolver,
/obj/item/lighter/zippo/nt_rep,
/obj/item/storage/fancy/cigarettes/cigpack_robustgold,
/obj/item/toy/figure/crew/captain,
@@ -46624,6 +46616,23 @@
/obj/structure/cable,
/turf/simulated/floor/plating,
/area/station/engineering/atmos/asteroid_maint)
+"jjE" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/structure/disposalpipe/junction/reversed{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/fore/north)
"jjJ" = (
/obj/effect/spawner/window/reinforced,
/turf/simulated/floor/plating,
@@ -48112,8 +48121,12 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 4
},
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/obj/structure/chair/comfy/black{
+ dir = 8
+ },
+/obj/effect/turf_decal/woodsiding,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"jzo" = (
/obj/machinery/turretid/stun{
control_area = "\improper AI Satellite Atmospherics";
@@ -49250,9 +49263,7 @@
pixel_y = 2;
pixel_x = -9
},
-/obj/random/carp_plushie{
- pixel_y = -8
- },
+/obj/effect/spawner/random/toy/carp_plushie,
/obj/structure/table,
/turf/simulated/floor/plating,
/area/station/maintenance/apmaint2)
@@ -49449,14 +49460,6 @@
},
/turf/simulated/floor/plating,
/area/station/turret_protected/aisat/interior)
-"jLq" = (
-/obj/structure/chair/office,
-/obj/item/restraints/handcuffs/cable/red,
-/obj/effect/decal/cleanable/blood/old,
-/obj/effect/spawner/random/cobweb/right/rare,
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plating,
-/area/station/maintenance/fpmaint)
"jLr" = (
/obj/machinery/firealarm/directional/east,
/turf/simulated/floor/plasteel,
@@ -50193,6 +50196,17 @@
/obj/effect/spawner/window/reinforced,
/turf/simulated/floor/plating,
/area/station/engineering/atmos/distribution)
+"jSa" = (
+/obj/machinery/light{
+ dir = 1
+ },
+/obj/structure/chair/sofa/left,
+/obj/effect/turf_decal/woodsiding{
+ dir = 1
+ },
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"jSe" = (
/obj/structure/closet/emcloset,
/turf/simulated/floor/plating,
@@ -53178,51 +53192,15 @@
/turf/simulated/floor/plating,
/area/station/maintenance/starboard)
"kyS" = (
-/obj/machinery/door/airlock/engineering{
- name = "Aft Starboard Solar Access"
- },
/obj/structure/cable{
icon_state = "1-2"
},
/obj/effect/mapping_helpers/airlock/access/all/engineering/general,
-/turf/simulated/floor/plating,
-/area/station/maintenance/solar_maintenance/aft_port)
-"kyY" = (
-/obj/structure/closet/crate,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/solar_assembly,
-/obj/item/stack/sheet/glass{
- amount = 50
- },
-/obj/item/stack/sheet/glass{
- amount = 50;
- pixel_x = -4;
- pixel_y = 4
- },
-/obj/item/stack/cable_coil{
- pixel_x = 3;
- pixel_y = -4
+/obj/machinery/door/airlock/engineering{
+ name = "Aft Port Solar Access"
},
/turf/simulated/floor/plating,
-/area/station/maintenance/solar_maintenance/fore_port)
+/area/station/maintenance/solar_maintenance/aft_port)
"kzl" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on,
/turf/simulated/floor/plasteel{
@@ -54072,7 +54050,7 @@
name = "Central Access"
},
/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/nw)
+/area/station/hallway/primary/central/sw)
"kJn" = (
/obj/structure/table/wood,
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims,
@@ -61595,6 +61573,9 @@
/area/station/maintenance/aft2)
"mlB" = (
/obj/structure/cable,
+/obj/machinery/power/solar{
+ name = "Fore-Port Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -62563,13 +62544,15 @@
/turf/simulated/floor/plasteel,
/area/station/maintenance/apmaint)
"muP" = (
-/obj/structure/table,
-/obj/item/paper_bin,
-/obj/item/paper_bin{
- pixel_y = 15
+/obj/machinery/disposal,
+/obj/structure/disposalpipe/trunk{
+ dir = 8
},
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/obj/effect/turf_decal/woodsiding{
+ dir = 6
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"muR" = (
/obj/structure/cable{
icon_state = "2-4"
@@ -62779,12 +62762,12 @@
},
/area/station/hallway/primary/starboard/south)
"mxT" = (
-/obj/machinery/power/solar{
- name = "Starboard Solar Array"
- },
/obj/structure/cable{
icon_state = "0-8"
},
+/obj/machinery/power/solar{
+ name = "Aft-Port Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -63732,6 +63715,17 @@
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plating,
/area/station/maintenance/security/fore)
+"mJo" = (
+/obj/item/radio/intercom{
+ name = "west bump";
+ pixel_x = -28
+ },
+/obj/machinery/economy/vending/traindrobe,
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"mJr" = (
/obj/structure/flora/ausbushes/lavendergrass,
/obj/structure/flora/ausbushes/sparsegrass,
@@ -64053,9 +64047,15 @@
/turf/simulated/wall/r_wall,
/area/station/science/toxins/mixing)
"mMY" = (
-/obj/effect/spawner/window/reinforced,
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-4"
+ },
/turf/simulated/floor/plating,
-/area/station/hallway/primary/fore/north)
+/area/station/procedure/trainer_office)
"mNe" = (
/obj/structure/table,
/obj/item/multitool,
@@ -64065,6 +64065,16 @@
},
/turf/simulated/floor/plasteel,
/area/station/engineering/atmos/distribution)
+"mNf" = (
+/obj/structure/chair/comfy/brown{
+ dir = 4
+ },
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/turf/simulated/floor/plasteel{
+ dir = 6;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"mNs" = (
/obj/machinery/disposal,
/obj/structure/disposalpipe/trunk,
@@ -65774,7 +65784,7 @@
/area/station/maintenance/fpmaint)
"ndK" = (
/obj/structure/table/glass,
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 6
},
/obj/machinery/light/small{
@@ -66544,7 +66554,7 @@
/obj/structure/table/glass,
/obj/item/stack/medical/bruise_pack,
/obj/item/stack/medical/ointment,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/turf/simulated/floor/plating,
/area/station/maintenance/asmaint)
"nlH" = (
@@ -67218,7 +67228,7 @@
/area/station/maintenance/fsmaint2)
"nrE" = (
/obj/structure/table,
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 6
},
/obj/item/reagent_containers/glass/bottle/morphine,
@@ -69228,12 +69238,12 @@
/turf/simulated/floor/plating,
/area/station/maintenance/fsmaint2)
"nLU" = (
-/obj/machinery/power/solar{
- name = "Starboard Solar Array"
- },
/obj/structure/cable{
icon_state = "0-4"
},
+/obj/machinery/power/solar{
+ name = "Aft-Starboard Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -71358,13 +71368,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/maintenance/aft)
-"ofC" = (
-/obj/structure/closet,
-/obj/item/toy/plushie/girly_corgi,
-/obj/item/toy/plushie/robo_corgi,
-/obj/effect/spawner/random/maintenance,
-/turf/simulated/floor/plating,
-/area/station/maintenance/fpmaint)
"ofE" = (
/obj/machinery/alarm/directional/west,
/turf/simulated/floor/plasteel{
@@ -71405,6 +71408,13 @@
},
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/ne)
+"ogi" = (
+/obj/structure/closet,
+/obj/effect/spawner/random/maintenance,
+/obj/item/toy/plushie/robo_corgi,
+/obj/item/toy/plushie/girly_corgi,
+/turf/simulated/floor/plating,
+/area/station/maintenance/fpmaint)
"ogs" = (
/obj/structure/railing,
/obj/structure/flora/ausbushes/ywflowers,
@@ -72250,7 +72260,7 @@
},
/obj/machinery/power/apc/directional/west,
/obj/machinery/camera{
- c_tag = "Atsmospherics Hardsuit Storage West";
+ c_tag = "Atmospherics Hardsuit Storage West";
dir = 4
},
/turf/simulated/floor/plasteel{
@@ -72262,6 +72272,9 @@
/obj/structure/cable{
icon_state = "0-8"
},
+/obj/machinery/power/solar{
+ name = "Fore-Port Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -76196,6 +76209,9 @@
/obj/structure/cable{
icon_state = "0-2"
},
+/obj/machinery/power/solar{
+ name = "Fore-Port Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -76493,6 +76509,29 @@
icon_state = "bluecorner"
},
/area/station/hallway/primary/central/west)
+"pdn" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 8;
+ icon_state = "2-8"
+ },
+/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply,
+/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers,
+/obj/structure/disposalpipe/junction{
+ dir = 4
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/fore/north)
"pdw" = (
/obj/machinery/door/airlock/public/glass{
name = "Central Access"
@@ -76560,7 +76599,7 @@
/area/station/command/office/ntrep)
"peo" = (
/obj/structure/closet/cabinet,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/crowbar,
/obj/effect/spawner/random/maintenance,
/turf/simulated/floor/wood,
@@ -77063,7 +77102,7 @@
"pio" = (
/obj/structure/table,
/obj/item/soap/deluxe,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/effect/decal/cleanable/dirt,
/obj/machinery/defibrillator_mount{
pixel_y = 32
@@ -77084,11 +77123,11 @@
/area/station/maintenance/aft)
"piB" = (
/obj/structure/table,
-/obj/item/clothing/accessory/stethoscope,
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope,
+/obj/item/clothing/neck/stethoscope{
pixel_y = 3
},
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 6
},
/obj/item/radio/intercom{
@@ -78173,7 +78212,7 @@
/turf/simulated/floor/plasteel,
/area/station/command/vault)
"puY" = (
-/obj/structure/filingcabinet/security,
+/obj/machinery/autolathe,
/turf/simulated/floor/plasteel{
dir = 1;
icon_state = "caution"
@@ -80888,18 +80927,16 @@
/turf/space,
/area/space/nearstation)
"pXA" = (
-/obj/item/kitchen/knife/shiv{
- pixel_y = 16;
- pixel_x = 7
+/obj/machinery/alarm/directional/west,
+/obj/machinery/photocopier,
+/obj/machinery/light{
+ dir = 8
},
-/obj/item/clothing/mask/gas,
-/obj/item/stock_parts/cell/high/empty{
- pixel_y = 12;
- pixel_x = -7
+/turf/simulated/floor/plasteel{
+ dir = 10;
+ icon_state = "darkgreen"
},
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plating,
-/area/station/maintenance/fpmaint)
+/area/station/procedure/trainer_office)
"pXC" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/cable{
@@ -86197,34 +86234,12 @@
},
/area/station/security/permabrig)
"rcg" = (
-/obj/structure/closet/crate,
-/obj/item/pen,
-/obj/item/pen{
- pixel_x = -8;
- pixel_y = 5
- },
-/obj/item/pen{
- pixel_x = 8;
- pixel_y = 5
- },
-/obj/item/pen/blue{
- pixel_x = 5;
- pixel_y = 5
- },
-/obj/item/pen/blue{
- pixel_x = -3;
- pixel_y = 2
- },
-/obj/item/pen/multi{
- pixel_x = -4;
- pixel_y = 5
- },
-/obj/item/pen/multi{
- pixel_x = -6
+/obj/structure/chair/sofa/right,
+/obj/effect/turf_decal/woodsiding{
+ dir = 1
},
-/obj/item/stack/wrapping_paper,
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"rcm" = (
/obj/machinery/economy/vending/wallmed/directional/west,
/turf/simulated/floor/wood,
@@ -86485,16 +86500,6 @@
icon_state = "rampbottom"
},
/area/station/medical/medbay2)
-"reI" = (
-/obj/structure/table,
-/obj/item/stack/sheet/cardboard{
- amount = 10
- },
-/obj/item/dest_tagger{
- pixel_x = -4
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
"reR" = (
/obj/structure/table/wood,
/obj/item/storage/fancy/crayons,
@@ -86560,12 +86565,12 @@
/turf/simulated/floor/plasteel,
/area/station/maintenance/security/aft_starboard)
"rfz" = (
-/obj/machinery/power/solar{
- name = "Starboard Solar Array"
- },
/obj/structure/cable{
icon_state = "0-4"
},
+/obj/machinery/power/solar{
+ name = "Aft-Port Solar Array"
+ },
/turf/simulated/floor/plasteel/airless{
icon_state = "solarpanel"
},
@@ -88350,16 +88355,18 @@
/turf/simulated/floor/plasteel,
/area/station/maintenance/assembly_line)
"rwZ" = (
-/obj/machinery/photocopier,
-/obj/item/radio/intercom{
- name = "west bump";
- pixel_x = -28
+/obj/effect/mapping_helpers/airlock/windoor/access/all/procedure/trainer{
+ dir = 8
},
-/obj/structure/sign/poster/official/random{
- pixel_y = 32
+/obj/effect/turf_decal/woodsiding{
+ dir = 8
},
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/obj/machinery/door/window/reinforced/normal{
+ name = "NCT";
+ dir = 8
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"rxd" = (
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/south)
@@ -89371,7 +89378,7 @@
/obj/machinery/atmospherics/pipe/simple/hidden/cyan,
/obj/machinery/alarm/directional/north,
/obj/machinery/camera{
- c_tag = "Atsmospherics Hardsuit Storage North East"
+ c_tag = "Atmospherics Hardsuit Storage North East"
},
/turf/simulated/floor/plasteel{
dir = 1;
@@ -90129,6 +90136,16 @@
},
/turf/simulated/floor/plasteel,
/area/station/security/interrogation)
+"rNI" = (
+/obj/item/flag/nt,
+/obj/effect/turf_decal/woodsiding{
+ dir = 9
+ },
+/obj/structure/window/reinforced{
+ dir = 8
+ },
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"rNN" = (
/obj/machinery/newscaster/directional/south,
/turf/simulated/floor/plasteel{
@@ -90864,14 +90881,35 @@
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/nw)
"rUQ" = (
-/obj/machinery/door/airlock/public/glass{
- name = "Paper Supplies"
- },
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/door/firedoor,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment,
+/obj/machinery/door/airlock/command/glass{
+ name = "Trainer's Office";
+ id_tag = "nct"
+ },
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer,
+/obj/effect/mapping_helpers/airlock/polarized{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/area/station/procedure/trainer_office)
"rUU" = (
/obj/structure/sign/poster/official/random{
pixel_y = -32
@@ -92362,7 +92400,7 @@
/area/station/hallway/primary/starboard)
"sjz" = (
/obj/machinery/camera{
- c_tag = "AI Satellite ExteriorEast";
+ c_tag = "AI Satellite Exterior East";
dir = 4;
network = list("SS13","MiniSat")
},
@@ -99423,7 +99461,9 @@
/turf/simulated/floor/plasteel,
/area/station/hallway/secondary/entry)
"tDQ" = (
-/obj/effect/spawner/random/maintenance,
+/obj/structure/sign/poster/official/love_ian{
+ pixel_y = -32
+ },
/turf/simulated/floor/plating,
/area/station/maintenance/fpmaint)
"tDY" = (
@@ -101260,8 +101300,14 @@
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 10
},
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 4;
+ icon_state = "2-4"
+ },
+/obj/machinery/hologram/holopad,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"tXh" = (
/obj/structure/chair/stool,
/turf/simulated/floor/plating,
@@ -101583,7 +101629,7 @@
/area/station/medical/storage)
"tZN" = (
/obj/structure/table,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/healthanalyzer,
/obj/effect/decal/cleanable/glass,
/turf/simulated/floor/plating,
@@ -102416,13 +102462,6 @@
},
/turf/simulated/floor/wood,
/area/station/security/permabrig)
-"uiJ" = (
-/obj/structure/sign/poster/official/love_ian{
- pixel_y = -32
- },
-/obj/effect/mapping_helpers/turfs/damage,
-/turf/simulated/floor/wood,
-/area/station/maintenance/fpmaint)
"uiT" = (
/obj/structure/table,
/obj/item/storage/box/lights/mixed,
@@ -103285,16 +103324,6 @@
},
/area/station/service/theatre)
"usw" = (
-/obj/structure/table,
-/obj/item/stack/cable_coil{
- pixel_x = -3;
- pixel_y = 3
- },
-/obj/item/stack/cable_coil,
-/obj/item/stack/cable_coil{
- pixel_x = 3;
- pixel_y = -4
- },
/obj/effect/spawner/random/cobweb/right/rare,
/turf/simulated/floor/plating,
/area/station/maintenance/solar_maintenance/fore_port)
@@ -106854,7 +106883,7 @@
/area/station/engineering/atmos)
"vcm" = (
/obj/machinery/power/solar{
- name = "Starboard Solar Array"
+ name = "Fore-Starboard Solar Array"
},
/obj/structure/cable,
/turf/simulated/floor/plasteel/airless{
@@ -107101,6 +107130,14 @@
"vfn" = (
/turf/simulated/floor/plasteel,
/area/station/supply/miningdock)
+"vft" = (
+/obj/item/decorations/sticky_decorations/flammable/heart,
+/obj/item/stack/sheet/wood{
+ name = "Ians Stick";
+ desc = "A large stick covered in bite marks and dried slobber.ss"
+ },
+/turf/simulated/floor/wood,
+/area/station/maintenance/fpmaint)
"vfu" = (
/obj/machinery/atmospherics/unary/vent_pump/on{
dir = 4
@@ -113267,19 +113304,6 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/aft2)
-"woS" = (
-/obj/structure/table/glass,
-/obj/item/clothing/accessory/stethoscope{
- pixel_y = 6
- },
-/obj/machinery/light{
- dir = 1
- },
-/obj/machinery/newscaster/directional/north,
-/turf/simulated/floor/plasteel{
- icon_state = "whitebluefull"
- },
-/area/station/medical/sleeper)
"woU" = (
/obj/effect/spawner/random/barrier/grille_maybe,
/obj/structure/cable{
@@ -113546,7 +113570,7 @@
/obj/item/stack/cable_coil,
/obj/item/t_scanner,
/obj/machinery/camera{
- c_tag = "Atsmospherics Control ROom";
+ c_tag = "Atmospherics Control Room";
dir = 8
},
/turf/simulated/floor/plasteel{
@@ -116022,15 +116046,6 @@
icon_state = "white"
},
/area/station/science/research)
-"wUg" = (
-/obj/item/solar_assembly,
-/obj/structure/cable{
- icon_state = "0-2"
- },
-/turf/simulated/floor/plasteel/airless{
- icon_state = "solarpanel"
- },
-/area/station/engineering/solar/fore_port)
"wUh" = (
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 1
@@ -119522,8 +119537,17 @@
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 10
},
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/fore/north)
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/disposalpipe/segment/corner{
+ dir = 4
+ },
+/obj/effect/turf_decal/woodsiding,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"xEC" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -120388,15 +120412,6 @@
icon_state = "redcorner"
},
/area/station/security/processing)
-"xOh" = (
-/obj/item/solar_assembly,
-/obj/structure/cable{
- icon_state = "0-8"
- },
-/turf/simulated/floor/plasteel/airless{
- icon_state = "solarpanel"
- },
-/area/station/engineering/solar/fore_port)
"xOk" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -121655,6 +121670,19 @@
/obj/structure/girder,
/turf/simulated/floor/plating,
/area/station/maintenance/asmaint)
+"ybJ" = (
+/obj/structure/sign/poster/official/love_ian{
+ pixel_y = -32
+ },
+/obj/item/kitchen/sushimat{
+ name = "Prayer Mat"
+ },
+/obj/item/clothing/suit/ianshirt{
+ desc = "A worn out, curiously comfortable t-shirt with a picture of Ian. You wouldn't go so far as to say it feels like being hugged when you wear it but it's pretty close. Good for sleeping in. This one in particular looks like it wasnt washed in months"
+ },
+/obj/effect/mapping_helpers/turfs/damage,
+/turf/simulated/floor/wood,
+/area/station/maintenance/fpmaint)
"ybL" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 5
@@ -122464,6 +122492,14 @@
},
/turf/simulated/floor/carpet/blue,
/area/station/command/office/blueshield)
+"yjS" = (
+/obj/item/kirbyplants,
+/obj/effect/turf_decal/woodsiding{
+ dir = 5
+ },
+/obj/machinery/firealarm/directional/east,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"yjU" = (
/obj/machinery/atmospherics/pipe/simple/visible{
dir = 9
@@ -142288,7 +142324,7 @@ jnP
aZS
jnP
aZS
-gYN
+dOB
aZS
jnP
wXf
@@ -144335,7 +144371,7 @@ jnP
jnP
wXf
jnP
-wUg
+pay
jSB
jSB
raE
@@ -144602,7 +144638,7 @@ oCR
onQ
onQ
onQ
-xOh
+onQ
onQ
aZS
aZS
@@ -145622,12 +145658,12 @@ wXf
aZS
aZS
onQ
-xOh
onQ
onQ
onQ
-knb
onQ
+knb
+cHH
onQ
onQ
onQ
@@ -147427,7 +147463,7 @@ dGi
uTg
uVV
fXb
-kyY
+dXx
oJh
vWJ
muu
@@ -147684,7 +147720,7 @@ dGi
usw
pOM
pTR
-iHX
+dXx
dGi
lfn
mQF
@@ -148957,17 +148993,17 @@ jnP
jnP
jnP
jnP
-aZS
sik
sik
sik
-rtG
-rvy
sik
-vyj
rtG
-sik
-hjW
+rvy
+iPs
+iPs
+iPs
+iPs
+iPs
slw
pRV
ttR
@@ -149214,17 +149250,17 @@ jnP
jnP
jnP
jnP
-aZS
sik
bah
vqr
-hTO
+gsr
+aSK
tDQ
-fop
-sik
-jLq
+iPs
+dzM
+mJo
pXA
-hjW
+iPs
buP
vqN
dNw
@@ -149471,17 +149507,17 @@ jnP
jnP
jnP
jnP
-jnP
sik
vgB
iOz
-vtq
seW
-ofC
-hjW
-hjW
-hjW
-hjW
+vtq
+hxK
+iPs
+fZt
+cfS
+mNf
+iPs
uGP
xuN
czL
@@ -149728,17 +149764,17 @@ jnP
jnP
jnP
jnP
-jnP
sik
toV
fdc
-hde
-aSK
-hjW
-hjW
+seW
+iOz
+pXZ
+iPs
+rNI
rwZ
dOH
-hjW
+iPs
lZK
tMO
iZd
@@ -149985,13 +150021,13 @@ jnP
jnP
jnP
jnP
-jnP
sik
iWm
fdc
+aSK
cnZ
pck
-hjW
+iPs
rcg
hyc
jzm
@@ -150242,19 +150278,19 @@ jnP
jnP
jnP
jnP
-jnP
sik
qXC
+vft
oNy
-pXZ
-uiJ
-hjW
-chI
+aSK
+ybJ
+iPs
+jSa
tXb
xEx
rUQ
hoM
-gHY
+pdn
dat
lwr
mZC
@@ -150499,19 +150535,19 @@ aZS
aZS
aZS
jnP
-jnP
sik
vEd
fck
+ogi
lLd
pUl
-chh
-reI
+iPs
+yjS
cgE
muP
-mMY
-eNi
-xuN
+bSp
+imy
+jjE
slD
tnk
xtx
@@ -166769,7 +166805,7 @@ peJ
oXT
wxB
vDJ
-woS
+ezi
ggt
fYp
jbE
diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm
index b5ef6ca7ad58..802dcd918984 100644
--- a/_maps/map_files/stations/metastation.dmm
+++ b/_maps/map_files/stations/metastation.dmm
@@ -30,6 +30,11 @@
},
/turf/space,
/area/space)
+"aaT" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/atmospherics/unary/vent_pump/on,
+/turf/simulated/floor/plating,
+/area/station/maintenance/fsmaint)
"aaX" = (
/obj/docking_port/stationary{
dheight = 9;
@@ -464,12 +469,13 @@
/turf/simulated/floor/plating,
/area/station/maintenance/fore)
"agh" = (
-/obj/structure/table,
-/obj/item/multitool,
+/obj/machinery/light{
+ dir = 8
+ },
/obj/effect/decal/cleanable/dirt,
-/obj/effect/spawner/random/maintenance,
-/turf/simulated/floor/plating,
-/area/station/maintenance/fsmaint)
+/obj/machinery/requests_console/directional/west,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"agi" = (
/turf/simulated/floor/catwalk,
/area/station/maintenance/fore)
@@ -1541,12 +1547,12 @@
dir = 8;
layer = 2.9
},
-/obj/item/clothing/accessory/red{
+/obj/item/clothing/neck/tie/red{
pixel_x = -5;
pixel_y = 3
},
-/obj/item/clothing/accessory/horrible,
-/obj/item/clothing/accessory/blue{
+/obj/item/clothing/neck/tie/horrible,
+/obj/item/clothing/neck/tie/blue{
pixel_x = 5;
pixel_y = -2
},
@@ -3339,12 +3345,6 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/fore)
-"awv" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/cyan,
-/turf/simulated/floor/plasteel{
- icon_state = "neutralfull"
- },
-/area/station/maintenance/fsmaint)
"aww" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -5378,15 +5378,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/maintenance/starboard2)
-"aFM" = (
-/obj/effect/spawner/random/barrier/grille_often,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel{
- icon_state = "neutralfull"
- },
-/area/station/maintenance/fsmaint)
"aFO" = (
/obj/effect/spawner/random/fungus/frequent,
/turf/simulated/wall,
@@ -10007,13 +9998,6 @@
/obj/machinery/alarm/directional/west,
/turf/simulated/floor/carpet/red,
/area/station/command/office/hos)
-"aWf" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plating,
-/area/station/maintenance/fsmaint)
"aWi" = (
/obj/structure/extinguisher_cabinet{
name = "east bump";
@@ -12183,22 +12167,6 @@
icon_state = "dark"
},
/area/station/service/chapel)
-"bdr" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/structure/cable{
- icon_state = "2-4"
- },
-/turf/simulated/floor/plating,
-/area/station/maintenance/fsmaint)
"bds" = (
/obj/structure/rack{
dir = 8;
@@ -13773,15 +13741,37 @@
/turf/simulated/wall,
/area/station/service/janitor)
"bhr" = (
+/obj/machinery/door/airlock/command/glass{
+ name = "Trainer's Office";
+ id_tag = "nct"
+ },
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer,
+/obj/effect/mapping_helpers/airlock/polarized{
+ id = "NCT"
+ },
/obj/machinery/door/firedoor,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
/obj/structure/disposalpipe/segment,
-/obj/machinery/door/airlock,
-/obj/effect/mapping_helpers/airlock/autoname,
-/obj/effect/mapping_helpers/airlock/access/all/service/janitor,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/procedure/trainer_office)
"bht" = (
/turf/simulated/wall,
/area/station/maintenance/maintcentral)
@@ -13907,20 +13897,18 @@
},
/area/station/engineering/tech_storage)
"bhK" = (
-/obj/structure/disposalpipe/segment/corner{
- dir = 2
+/obj/machinery/disposal,
+/obj/structure/disposalpipe/trunk{
+ dir = 8
},
-/obj/structure/closet/jcloset,
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/light_switch{
- dir = 8;
- name = "custom placement";
- pixel_x = 24;
- pixel_y = -6
+/obj/machinery/camera{
+ c_tag = "Career Trainer's Office"
},
-/obj/machinery/firealarm/directional/north,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/turf/simulated/floor/plasteel{
+ dir = 5;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"bhL" = (
/obj/machinery/hologram/holopad,
/obj/structure/cable{
@@ -14366,34 +14354,43 @@
},
/area/station/hallway/primary/central/nw)
"biY" = (
-/obj/structure/reagent_dispensers/watertank,
-/obj/structure/reagent_dispensers/spacecleanertank{
- pixel_y = 30
- },
-/obj/machinery/light{
- dir = 8
+/obj/machinery/economy/vending/traindrobe,
+/obj/effect/turf_decal/woodsiding{
+ dir = 9
},
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"biZ" = (
+/obj/effect/turf_decal/woodsiding{
+ dir = 1
+ },
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
/obj/structure/disposalpipe/segment/corner{
dir = 1
},
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"bja" = (
-/obj/structure/closet/l3closet/janitor,
-/obj/machinery/alarm/directional/north,
+/obj/item/kirbyplants,
+/obj/effect/turf_decal/woodsiding{
+ dir = 5
+ },
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 8;
+ icon_state = "2-8"
+ },
/obj/structure/disposalpipe/segment{
dir = 4
},
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"bjb" = (
/obj/structure/table/wood,
/obj/item/folder/blue,
@@ -15013,59 +15010,18 @@
},
/area/station/hallway/primary/central/nw)
"bkL" = (
-/obj/machinery/atmospherics/pipe/simple/hidden/supply,
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+/obj/structure/chair/comfy/black,
+/obj/effect/turf_decal/woodsiding,
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
dir = 5
},
-/obj/effect/landmark/start/janitor,
-/turf/simulated/floor/plating,
-/area/station/service/janitor)
-"bkM" = (
-/obj/structure/cable{
- icon_state = "2-4"
- },
-/obj/machinery/atmospherics/unary/vent_scrubber/on{
- dir = 8
- },
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
-"bkN" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/structure/disposalpipe/segment,
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
-"bkO" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/machinery/door/airlock/maintenance,
-/obj/effect/mapping_helpers/airlock/autoname,
-/obj/effect/mapping_helpers/airlock/access/all/service/janitor,
-/turf/simulated/floor/plating,
-/area/station/maintenance/maintcentral)
-"bkP" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/turf/simulated/floor/plating,
-/area/station/maintenance/maintcentral)
-"bkQ" = (
-/obj/item/flashlight{
- pixel_x = 1;
- pixel_y = 5
- },
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/obj/structure/cable{
- icon_state = "1-2"
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 9
},
-/turf/simulated/floor/plating,
-/area/station/maintenance/maintcentral)
+/obj/machinery/hologram/holopad,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"bkS" = (
/obj/structure/cable{
icon_state = "0-8"
@@ -15175,28 +15131,21 @@
},
/turf/simulated/floor/plasteel,
/area/station/hallway/primary/central/ne)
-"bll" = (
-/obj/structure/closet/emcloset,
-/obj/structure/sign/double/map/left{
- desc = "A framed picture of the station. Clockwise from security at the top (red), you see engineering (yellow), science (purple), escape (red and white), medbay (green), arrivals (blue and white), and finally cargo (brown).";
- icon_state = "map-left-MS";
- pixel_y = 32
- },
-/turf/simulated/floor/plasteel{
- icon_state = "darkgrey"
- },
-/area/station/hallway/primary/starboard)
"blm" = (
-/obj/structure/sign/double/map/right{
- desc = "A framed picture of the station. Clockwise from security in red at the top, you see engineering in yellow, science in purple, escape in checkered red-and-white, medbay in green, arrivals in checkered red-and-blue, and then cargo in brown.";
- icon_state = "map-right-MS";
- pixel_y = 32
- },
-/obj/structure/closet/firecloset,
-/turf/simulated/floor/plasteel{
- icon_state = "darkgrey"
+/obj/machinery/door/firedoor,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/structure/disposalpipe/segment,
+/obj/effect/mapping_helpers/airlock/access/all/service/janitor,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
},
-/area/station/hallway/primary/starboard)
+/obj/machinery/door/airlock,
+/obj/effect/mapping_helpers/airlock/autoname,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"blo" = (
/turf/simulated/wall,
/area/station/hallway/primary/starboard/north)
@@ -15706,27 +15655,6 @@
/mob/living/simple_animal/mouse,
/turf/simulated/floor/plating,
/area/station/maintenance/fpmaint)
-"bmC" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/machinery/atmospherics/unary/vent_pump/on{
- dir = 1
- },
-/mob/living/simple_animal/lizard{
- name = "Wags-His-Tail";
- real_name = "Wags-His-Tail"
- },
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
-"bmD" = (
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
"bmE" = (
/obj/machinery/newscaster/directional/east,
/obj/structure/disposalpipe/segment/corner{
@@ -15791,6 +15719,7 @@
"bmQ" = (
/obj/structure/table,
/obj/structure/cable{
+ d2 = 4;
icon_state = "0-4"
},
/obj/item/key/janitor,
@@ -15804,15 +15733,6 @@
/obj/item/grenade/chem_grenade/cleaner,
/turf/simulated/floor/plasteel,
/area/station/service/janitor)
-"bmR" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel{
- icon_state = "neutralfull"
- },
-/area/station/maintenance/fsmaint)
"bmT" = (
/obj/machinery/porta_turret/ai_turret,
/turf/simulated/floor/plasteel{
@@ -15933,15 +15853,6 @@
icon_state = "cautioncorner"
},
/area/station/hallway/primary/starboard)
-"bnj" = (
-/obj/structure/cable{
- icon_state = "1-2"
- },
-/turf/simulated/floor/plasteel{
- dir = 4;
- icon_state = "cautioncorner"
- },
-/area/station/hallway/primary/starboard)
"bnk" = (
/obj/machinery/door/firedoor,
/turf/simulated/floor/plasteel{
@@ -16333,15 +16244,21 @@
/turf/simulated/floor/plasteel,
/area/station/supply/lobby)
"bou" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/economy/vending/janidrobe,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/obj/item/flag/nt,
+/turf/simulated/floor/plasteel{
+ dir = 10;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"bov" = (
-/obj/structure/janitorialcart,
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/obj/structure/chair/comfy/brown{
+ dir = 1
+ },
+/obj/effect/landmark/start/nanotrasen_career_trainer,
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"bow" = (
/obj/machinery/atmospherics/portable/canister/nitrogen,
/obj/machinery/atmospherics/pipe/simple/hidden/purple{
@@ -16350,13 +16267,17 @@
/turf/simulated/floor/plasteel,
/area/station/engineering/atmos/control)
"box" = (
-/obj/structure/disposalpipe/trunk{
- dir = 1
+/obj/machinery/power/apc/directional/east,
+/obj/machinery/alarm/directional/south,
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-8"
},
-/obj/machinery/disposal,
-/obj/effect/decal/cleanable/dirt,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/turf/simulated/floor/plasteel{
+ dir = 6;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"boy" = (
/obj/item/storage/box/lights/mixed,
/turf/simulated/floor/plating,
@@ -16464,24 +16385,16 @@
/turf/simulated/floor/carpet,
/area/station/command/office/captain/bedroom)
"boN" = (
-/obj/item/restraints/legcuffs/beartrap,
-/obj/item/restraints/legcuffs/beartrap,
-/obj/machinery/requests_console/directional/west,
-/obj/machinery/camera{
- c_tag = "Custodial Closet";
- dir = 4
+/obj/effect/turf_decal/woodsiding{
+ dir = 10
},
-/obj/item/mop,
-/obj/item/reagent_containers/glass/bucket,
-/obj/structure/rack{
- dir = 1
+/obj/machinery/firealarm/directional/west,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 6
},
-/obj/item/clothing/gloves/color/orange,
-/obj/effect/decal/cleanable/dirt,
-/obj/item/storage/box/mousetraps,
-/obj/item/storage/box/mousetraps,
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/obj/structure/closet,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"boQ" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -16510,24 +16423,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/science/toxins/mixing)
-"boV" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/structure/cable{
- icon_state = "1-4"
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
- dir = 4
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/starboard)
"boX" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -16869,19 +16764,27 @@
},
/area/station/supply/sorting)
"bpQ" = (
-/obj/structure/disposalpipe/segment,
-/obj/effect/landmark/start/janitor,
-/obj/effect/decal/cleanable/dirt,
-/obj/item/radio/intercom{
+/obj/machinery/button/windowtint{
+ id = "NCT";
+ pixel_x = 24;
+ dir = 8;
+ pixel_y = 5
+ },
+/obj/effect/mapping_helpers/airlock/windoor/access/all/procedure/trainer,
+/obj/machinery/door/window/reinforced/normal{
+ name = "NCT"
+ },
+/obj/machinery/light_switch{
+ dir = 8;
name = "east bump";
- pixel_x = 28
+ pixel_x = 24;
+ pixel_y = -5
},
-/obj/structure/sink{
+/turf/simulated/floor/plasteel{
dir = 4;
- pixel_x = 12
+ icon_state = "darkgreen"
},
-/turf/simulated/floor/plasteel,
-/area/station/service/janitor)
+/area/station/procedure/trainer_office)
"bpS" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/structure/disposalpipe/segment,
@@ -17749,10 +17652,15 @@
},
/area/station/engineering/ai_transit_tube)
"bsE" = (
-/obj/machinery/light/small,
-/obj/vehicle/janicart,
-/turf/simulated/floor/plating,
-/area/station/service/janitor)
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 4;
+ icon_state = "1-4"
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"bsG" = (
/obj/machinery/hologram/holopad,
/obj/machinery/light/small{
@@ -19735,7 +19643,7 @@
/obj/structure/safe/floor{
known_by = list("captain")
},
-/obj/item/gun/projectile/revolver/russian,
+/obj/item/toy/russian_revolver,
/obj/item/reagent_containers/drinks/bottle/absinthe/premium,
/obj/item/lighter/zippo/nt_rep,
/obj/item/storage/fancy/cigarettes/cigpack_robustgold,
@@ -27328,7 +27236,7 @@
/obj/machinery/atmospherics/pipe/simple/heat_exchanging{
dir = 4
},
-/obj/machinery/alarm/directional/north,
+/obj/machinery/alarm/server/directional/north,
/turf/simulated/floor/plasteel/dark/telecomms,
/area/station/science/server/coldroom)
"cbi" = (
@@ -27565,11 +27473,11 @@
},
/area/station/command/bridge)
"cca" = (
-/obj/item/clothing/accessory/stethoscope,
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope,
+/obj/item/clothing/neck/stethoscope{
pixel_y = 6
},
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 3
},
/obj/item/flashlight/pen{
@@ -35729,6 +35637,20 @@
icon_state = "whiteblue"
},
/area/station/medical/paramedic)
+"cJS" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/closet/l3closet/janitor,
+/obj/structure/reagent_dispensers/spacecleanertank{
+ pixel_y = 30
+ },
+/obj/machinery/light_switch{
+ dir = 8;
+ name = "east bump";
+ pixel_x = 24
+ },
+/obj/effect/decal/cleanable/dirt,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"cJT" = (
/obj/machinery/suit_storage_unit/expedition,
/turf/simulated/floor/plasteel{
@@ -43226,6 +43148,10 @@
icon_state = "green"
},
/area/station/security/permabrig)
+"ewi" = (
+/obj/effect/mapping_helpers/turfs/rust/probably,
+/turf/simulated/wall,
+/area/station/service/janitor)
"ewk" = (
/turf/simulated/floor/grass/no_creep,
/area/station/medical/virology)
@@ -44712,6 +44638,26 @@
/obj/machinery/firealarm/directional/east,
/turf/simulated/floor/plasteel,
/area/station/security/defusal)
+"ffM" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
+ dir = 5;
+ level = 2
+ },
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
+ dir = 4
+ },
+/turf/simulated/floor/plating,
+/area/station/maintenance/fsmaint)
"fga" = (
/obj/machinery/door/firedoor,
/obj/structure/disposalpipe/segment{
@@ -47329,6 +47275,12 @@
icon_state = "white"
},
/area/station/maintenance/asmaint)
+"ghd" = (
+/obj/structure/table/wood,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/procedure/trainer_office)
"ghF" = (
/obj/structure/sign/securearea{
pixel_x = 32;
@@ -48804,6 +48756,16 @@
icon_state = "white"
},
/area/station/science/xenobiology)
+"gSv" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 4;
+ icon_state = "0-4"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"gSO" = (
/obj/effect/decal/cleanable/dirt,
/turf/simulated/floor/plasteel,
@@ -49051,6 +49013,21 @@
"gWO" = (
/turf/simulated/floor/plasteel,
/area/station/science/toxins/mixing)
+"gWX" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/rack{
+ dir = 1
+ },
+/obj/item/storage/box/mousetraps,
+/obj/item/storage/box/mousetraps,
+/obj/item/clothing/gloves/color/orange,
+/obj/item/reagent_containers/glass/bucket,
+/obj/item/restraints/legcuffs/beartrap,
+/obj/item/restraints/legcuffs/beartrap,
+/obj/item/mop,
+/obj/machinery/firealarm/directional/north,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"gXg" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
@@ -49551,7 +49528,7 @@
"hjn" = (
/obj/structure/table/glass,
/obj/item/folder/blue,
-/obj/item/clothing/accessory/stethoscope,
+/obj/item/clothing/neck/stethoscope,
/obj/item/clothing/glasses/hud/health,
/turf/simulated/floor/plasteel{
dir = 1;
@@ -50732,6 +50709,23 @@
icon_state = "cult"
},
/area/station/legal/lawoffice)
+"hIp" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 4
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/starboard)
"hIG" = (
/obj/structure/window/reinforced{
dir = 8
@@ -51093,6 +51087,12 @@
},
/turf/simulated/floor/plasteel,
/area/station/science/toxins/mixing)
+"hQS" = (
+/obj/machinery/alarm/directional/north,
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/economy/vending/janidrobe,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"hQZ" = (
/obj/structure/closet/secure_closet/magistrate,
/obj/machinery/alarm/directional/north,
@@ -51261,21 +51261,6 @@
},
/turf/simulated/floor/plasteel,
/area/station/science/xenobiology)
-"hSX" = (
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
- dir = 6
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/turf/simulated/floor/plasteel{
- icon_state = "neutralfull"
- },
-/area/station/maintenance/fsmaint)
"hTg" = (
/obj/machinery/atmospherics/pipe/simple/visible/yellow{
dir = 9
@@ -51695,6 +51680,15 @@
icon_state = "yellow"
},
/area/station/engineering/break_room)
+"ieC" = (
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 8
+ },
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"ieD" = (
/obj/effect/spawner/window/reinforced/grilled,
/obj/structure/cable{
@@ -51799,6 +51793,26 @@
/obj/effect/spawner/random/trash,
/turf/simulated/floor/plating,
/area/station/maintenance/xenobio_north)
+"igE" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
+ dir = 1
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply,
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/starboard)
"igJ" = (
/obj/structure/rack,
/obj/effect/spawner/random/maintenance,
@@ -53299,6 +53313,11 @@
icon_state = "neutralcorner"
},
/area/station/hallway/primary/aft/south)
+"iQu" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/vehicle/janicart,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"iQC" = (
/obj/effect/turf_decal/stripes/white/line{
dir = 1
@@ -54139,6 +54158,27 @@
icon_state = "dark"
},
/area/station/engineering/control)
+"jnO" = (
+/obj/item/flashlight/lamp/green{
+ pixel_y = 15
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/machinery/door_control{
+ id = "nct";
+ name = "Office Door";
+ normaldoorcontrol = 1;
+ req_access = list(80);
+ pixel_y = -1
+ },
+/obj/structure/table/wood,
+/turf/simulated/floor/plasteel{
+ icon_state = "dark"
+ },
+/area/station/procedure/trainer_office)
"jnZ" = (
/obj/item/kirbyplants/plant24,
/obj/machinery/atmospherics/unary/vent_scrubber/on,
@@ -55013,6 +55053,23 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/fsmaint)
+"jJw" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
+ dir = 6
+ },
+/turf/simulated/floor/plasteel{
+ icon_state = "neutralfull"
+ },
+/area/station/maintenance/fsmaint)
"jJI" = (
/obj/structure/bed/dogbed/runtime,
/mob/living/simple_animal/pet/cat/runtime,
@@ -55097,6 +55154,12 @@
},
/turf/space,
/area/space/nearstation)
+"jLc" = (
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer,
+/obj/machinery/door/airlock/maintenance,
+/obj/effect/mapping_helpers/airlock/autoname,
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"jLr" = (
/obj/effect/turf_decal/stripes/line{
dir = 6
@@ -58262,6 +58325,14 @@
/obj/effect/turf_decal/stripes/line,
/turf/simulated/floor/plasteel,
/area/station/engineering/atmos)
+"lga" = (
+/obj/machinery/atmospherics/unary/vent_scrubber/on{
+ dir = 8
+ },
+/obj/effect/decal/cleanable/dirt,
+/obj/effect/landmark/start/janitor,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"lgf" = (
/obj/effect/turf_decal/stripes/white/line{
dir = 4
@@ -59076,6 +59147,21 @@
icon_state = "darkgrey"
},
/area/station/science/toxins/launch)
+"lwd" = (
+/obj/effect/turf_decal/woodsiding{
+ dir = 6
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/effect/decal/cleanable/dirt,
+/turf/simulated/floor/carpet,
+/area/station/procedure/trainer_office)
"lwx" = (
/obj/machinery/atmospherics/pipe/simple/visible/yellow,
/obj/structure/lattice/catwalk,
@@ -59105,6 +59191,21 @@
},
/turf/simulated/floor/plasteel,
/area/station/security/brig)
+"lxV" = (
+/mob/living/simple_animal/lizard{
+ name = "Wags-His-Tail";
+ real_name = "Wags-His-Tail"
+ },
+/obj/effect/decal/cleanable/dirt,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 8;
+ icon_state = "2-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"lyn" = (
/obj/machinery/door/airlock/hatch{
name = "Xenobiology Maintenance"
@@ -60932,21 +61033,6 @@
"mlV" = (
/turf/simulated/floor/plasteel,
/area/station/maintenance/aft2)
-"mmk" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
- dir = 1
- },
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
- dir = 1
- },
-/obj/structure/cable{
- icon_state = "1-8"
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/central/north)
"mmB" = (
/obj/structure/closet/secure_closet/atmos_personal,
/turf/simulated/floor/plasteel,
@@ -65407,6 +65493,16 @@
icon_state = "whitepurple"
},
/area/station/science/rnd)
+"onX" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 6
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 10
+ },
+/obj/machinery/hologram/holopad,
+/turf/simulated/floor/plating,
+/area/station/service/janitor)
"oob" = (
/obj/machinery/atmospherics/unary/portables_connector{
dir = 4
@@ -65447,6 +65543,10 @@
/obj/item/seeds/eggplant,
/turf/simulated/floor/plating,
/area/station/maintenance/starboard2)
+"ooo" = (
+/obj/structure/sign/custodian,
+/turf/simulated/wall,
+/area/station/service/janitor)
"ooD" = (
/obj/structure/disposalpipe/segment,
/turf/simulated/floor/plasteel,
@@ -66100,6 +66200,21 @@
icon_state = "caution"
},
/area/station/engineering/atmos/control)
+"oGK" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers,
+/obj/structure/disposalpipe/segment{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/starboard)
"oHb" = (
/obj/structure/sign/poster/official/safety_internals{
pixel_x = 30
@@ -67622,6 +67737,21 @@
/obj/structure/closet/secure_closet/brig/temp/cell_5,
/turf/simulated/floor/plasteel,
/area/station/security/brig)
+"pnD" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply,
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 9
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "cautioncorner"
+ },
+/area/station/hallway/primary/starboard)
"pos" = (
/obj/machinery/atmospherics/pipe/manifold/visible/green{
dir = 8
@@ -68614,6 +68744,18 @@
},
/turf/simulated/floor/bluegrid,
/area/station/turret_protected/ai)
+"pKS" = (
+/obj/item/flashlight{
+ pixel_x = 1;
+ pixel_y = 5
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
+/turf/simulated/floor/plating,
+/area/station/maintenance/maintcentral)
"pLD" = (
/obj/machinery/door_timer/cell_1{
pixel_x = -32
@@ -71465,6 +71607,16 @@
icon_state = "white"
},
/area/station/medical/chemistry)
+"ral" = (
+/obj/effect/spawner/window/reinforced/polarized/grilled{
+ id = "NCT"
+ },
+/obj/structure/cable{
+ d2 = 8;
+ icon_state = "0-8"
+ },
+/turf/simulated/floor/plating,
+/area/station/procedure/trainer_office)
"rao" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
@@ -71912,6 +72064,30 @@
},
/turf/simulated/floor/plasteel,
/area/station/security/permabrig)
+"rkM" = (
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/supply{
+ dir = 1
+ },
+/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
+ dir = 1
+ },
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 8;
+ icon_state = "1-8"
+ },
+/obj/structure/cable{
+ d1 = 2;
+ d2 = 8;
+ icon_state = "2-8"
+ },
+/turf/simulated/floor/plasteel,
+/area/station/hallway/primary/central/north)
"rkT" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -73399,7 +73575,7 @@
pixel_x = -24;
pixel_y = -6
},
-/obj/item/clothing/accessory/stethoscope{
+/obj/item/clothing/neck/stethoscope{
pixel_y = 6
},
/turf/simulated/floor/plasteel{
@@ -73795,6 +73971,15 @@
icon_state = "greenblue"
},
/area/station/service/hydroponics)
+"rXl" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
+ dir = 6
+ },
+/turf/simulated/floor/plasteel{
+ dir = 4;
+ icon_state = "cautioncorner"
+ },
+/area/station/hallway/primary/starboard)
"rXS" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
@@ -75019,21 +75204,6 @@
/obj/effect/spawner/window/reinforced/grilled,
/turf/simulated/floor/plating,
/area/station/security/warden)
-"sDT" = (
-/obj/structure/cable{
- icon_state = "4-8"
- },
-/obj/machinery/atmospherics/pipe/simple/hidden/supply{
- dir = 4
- },
-/obj/structure/disposalpipe/segment{
- dir = 4
- },
-/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{
- dir = 1
- },
-/turf/simulated/floor/plasteel,
-/area/station/hallway/primary/starboard)
"sEI" = (
/obj/machinery/atmospherics/trinary/filter,
/turf/simulated/floor/plasteel,
@@ -76888,6 +77058,24 @@
},
/turf/simulated/floor/plating,
/area/station/maintenance/fsmaint)
+"ttp" = (
+/obj/structure/table/wood,
+/obj/item/paper_bin{
+ pixel_y = 4;
+ pixel_x = -5
+ },
+/obj/item/pen{
+ pixel_x = 8;
+ pixel_y = 5
+ },
+/obj/machinery/atmospherics/unary/vent_scrubber/on{
+ dir = 1
+ },
+/turf/simulated/floor/plasteel{
+ dir = 8;
+ icon_state = "darkgreen"
+ },
+/area/station/procedure/trainer_office)
"ttA" = (
/obj/structure/rack,
/obj/item/hand_labeler,
@@ -76916,6 +77104,18 @@
"ttE" = (
/turf/simulated/floor/carpet,
/area/station/command/office/captain/bedroom)
+"tub" = (
+/obj/machinery/camera{
+ c_tag = "Custodial Closet";
+ dir = 4
+ },
+/obj/effect/decal/cleanable/dirt,
+/obj/effect/landmark/start/janitor,
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 4
+ },
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"tug" = (
/obj/machinery/newscaster/directional/east,
/obj/machinery/atmospherics/binary/valve{
@@ -77289,6 +77489,11 @@
/obj/structure/disposalpipe/segment/corner{
dir = 2
},
+/obj/structure/cable{
+ d1 = 1;
+ d2 = 2;
+ icon_state = "1-2"
+ },
/turf/simulated/floor/plasteel{
icon_state = "neutralcorner"
},
@@ -78319,16 +78524,6 @@
/obj/machinery/door/airlock/maintenance,
/turf/simulated/floor/plating,
/area/station/maintenance/starboard2)
-"ufr" = (
-/obj/structure/table,
-/obj/item/clothing/gloves/color/fyellow,
-/obj/effect/spawner/random/maintenance,
-/obj/effect/decal/cleanable/dirt,
-/obj/machinery/light/small{
- dir = 8
- },
-/turf/simulated/floor/plating,
-/area/station/maintenance/fsmaint)
"uft" = (
/obj/structure/table/reinforced,
/obj/item/reagent_containers/glass/rag,
@@ -78697,6 +78892,12 @@
icon_state = "darkblue"
},
/area/station/medical/storage)
+"uoI" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/structure/closet/jcloset,
+/obj/effect/decal/cleanable/dirt,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"uoK" = (
/obj/structure/sign/poster/official/random{
pixel_y = -32
@@ -79447,8 +79648,9 @@
"uJG" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/camera{
- c_tag = "AI Satellite Antechamber South";
- dir = 4
+ dir = 4;
+ c_tag = "Power Transmission Laser";
+ network = list("Engineering","SS13")
},
/obj/effect/turf_decal/stripes/line{
dir = 8
@@ -81044,6 +81246,12 @@
icon_state = "dark"
},
/area/station/legal/courtroom/gallery)
+"vrM" = (
+/obj/machinery/door/airlock/maintenance,
+/obj/effect/mapping_helpers/airlock/access/all/service/janitor,
+/obj/effect/mapping_helpers/airlock/autoname,
+/turf/simulated/floor/plating,
+/area/station/service/janitor)
"vrO" = (
/obj/machinery/access_button{
autolink_id = "atmossouth_btn_ext";
@@ -81130,6 +81338,7 @@
/turf/simulated/floor/plasteel,
/area/station/engineering/atmos/control)
"vug" = (
+/obj/machinery/autolathe,
/turf/simulated/floor/plasteel{
icon_state = "yellow"
},
@@ -81362,6 +81571,20 @@
icon_state = "white"
},
/area/station/medical/reception)
+"vAS" = (
+/obj/effect/decal/cleanable/dirt,
+/obj/item/radio/intercom{
+ name = "east bump";
+ pixel_x = 28
+ },
+/obj/structure/sink{
+ dir = 4;
+ pixel_x = 12
+ },
+/obj/structure/janitorialcart,
+/obj/effect/decal/cleanable/dirt,
+/turf/simulated/floor/plasteel,
+/area/station/service/janitor)
"vBv" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{
dir = 4
@@ -82733,6 +82956,20 @@
},
/turf/simulated/floor/engine/vacuum,
/area/station/science/toxins/mixing)
+"wnk" = (
+/obj/machinery/atmospherics/pipe/simple/hidden/supply{
+ dir = 4
+ },
+/obj/structure/cable{
+ d1 = 4;
+ d2 = 8;
+ icon_state = "4-8"
+ },
+/obj/machinery/atmospherics/pipe/simple/hidden/cyan{
+ dir = 4
+ },
+/turf/simulated/floor/plating,
+/area/station/maintenance/fsmaint)
"wnn" = (
/obj/machinery/power/apc/directional/north,
/obj/structure/cable{
@@ -85798,6 +86035,9 @@
icon_state = "whitepurple"
},
/area/station/science/lobby)
+"xIX" = (
+/turf/simulated/wall,
+/area/station/procedure/trainer_office)
"xJy" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -109997,11 +110237,11 @@ lSa
aFE
xuG
bfK
-bhq
-bhq
-bhq
-bhq
-bhq
+xIX
+xIX
+xIX
+xIX
+xIX
bqc
bqc
ezM
@@ -110254,10 +110494,10 @@ lIM
bMC
xuG
bfK
-bhq
+gSv
biY
boN
-bmQ
+ttp
bou
bqc
bvp
@@ -110509,12 +110749,12 @@ iLs
oWs
eXm
bcM
-mmk
+rkM
tFb
bhr
biZ
bkL
-bmC
+ghd
bov
bqc
cfj
@@ -110768,10 +111008,10 @@ gYO
sTC
hdw
hiC
-bhq
+ral
bja
-bkM
-bmD
+lwd
+jnO
bsE
bqc
bvq
@@ -111025,9 +111265,9 @@ suO
nuz
xuG
bjA
-bhq
+xIX
bhK
-bkN
+ieC
bpQ
box
bje
@@ -111282,11 +111522,11 @@ bbh
bcM
bel
bfR
-bht
-bht
-bkO
-bht
-bht
+xIX
+xIX
+jLc
+xIX
+xIX
bht
brS
bje
@@ -111541,7 +111781,7 @@ qWN
acw
bht
bjc
-bkP
+bmF
bmF
boy
btP
@@ -111798,7 +112038,7 @@ bep
ccP
bhu
clO
-bkQ
+pKS
bpU
boz
bqe
@@ -121303,11 +121543,11 @@ aYK
aVc
alb
eTo
-aIo
-aLl
-aLl
-aLl
-bez
+bhq
+bhq
+bhq
+bhq
+bhq
bni
dnS
wwo
@@ -121560,13 +121800,13 @@ uPu
aLl
dAH
eTo
-sOy
+vrM
agh
-ufr
-aLl
-bll
-bnr
-boY
+tub
+bmQ
+ooo
+rXl
+oGK
bqA
bHA
bwp
@@ -121815,15 +122055,15 @@ aVV
fWg
aYK
aLl
-avA
-hSX
-awv
-sln
-avA
-aLl
+sOy
+jJw
+bhq
+gWX
+onX
+lxV
blm
-bnr
-sDT
+pnD
+igE
rEV
bHA
bus
@@ -122073,12 +122313,12 @@ aTp
aXm
aLl
mdS
-fvU
-dAH
-avA
-alb
-aLl
-aLl
+wnk
+bhq
+hQS
+lga
+iQu
+bhq
wnn
bcP
bqA
@@ -122329,15 +122569,15 @@ aTo
aTp
auO
aLl
-dAH
-bdr
-aFM
-aWf
-aWf
-bmR
-eMs
-bnj
-boV
+aaT
+ffM
+bhq
+cJS
+uoI
+vAS
+bhq
+bnr
+hIp
bqA
bsp
bxH
@@ -122588,11 +122828,11 @@ bbv
aLl
wVi
bPb
-aIo
-aLl
-edZ
-wPQ
-aLl
+bhq
+bhq
+bhq
+ewi
+bhq
bnk
gcq
lhu
diff --git a/_maps/map_files/templates/biodome_beach.dmm b/_maps/map_files/templates/biodome_beach.dmm
index 27dfc60702ec..c622e6cca4d5 100644
--- a/_maps/map_files/templates/biodome_beach.dmm
+++ b/_maps/map_files/templates/biodome_beach.dmm
@@ -147,7 +147,7 @@
/turf/simulated/floor/plating,
/area/ruin/powered/beach)
"az" = (
-/obj/item/clothing/accessory/necklace/dope,
+/obj/item/clothing/neck/necklace/dope,
/obj/item/reagent_containers/spray/spraytan,
/turf/simulated/floor/beach/sand,
/area/ruin/powered/beach)
diff --git a/_maps/map_files/tests/test_generic.dmm b/_maps/map_files/tests/test_generic.dmm
new file mode 100644
index 000000000000..c8e2358307f5
--- /dev/null
+++ b/_maps/map_files/tests/test_generic.dmm
@@ -0,0 +1,176 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/simulated/floor/plasteel,
+/area/game_test)
+"G" = (
+/turf/simulated/wall/indestructible/riveted,
+/area/game_test)
+"R" = (
+/obj/effect/landmark/game_test/bottom_left_corner,
+/turf/simulated/floor/plasteel,
+/area/game_test)
+"Y" = (
+/obj/effect/landmark/game_test/top_right_corner,
+/turf/simulated/floor/plasteel,
+/area/game_test)
+
+(1,1,1) = {"
+G
+G
+G
+G
+G
+G
+G
+G
+"}
+(2,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(3,1,1) = {"
+G
+a
+a
+a
+a
+R
+a
+G
+"}
+(4,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(5,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(6,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(7,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(8,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(9,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(10,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(11,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(12,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(13,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(14,1,1) = {"
+G
+a
+Y
+a
+a
+a
+a
+G
+"}
+(15,1,1) = {"
+G
+a
+a
+a
+a
+a
+a
+G
+"}
+(16,1,1) = {"
+G
+G
+G
+G
+G
+G
+G
+G
+"}
diff --git a/_maps/map_files/tests/test_ventcrawl.dmm b/_maps/map_files/tests/test_ventcrawl.dmm
new file mode 100644
index 000000000000..e14c7c9036eb
--- /dev/null
+++ b/_maps/map_files/tests/test_ventcrawl.dmm
@@ -0,0 +1,30 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 4
+ },
+/turf/simulated/floor,
+/area/template_noop)
+"d" = (
+/obj/machinery/atmospherics/unary/vent_pump/on{
+ dir = 8
+ },
+/turf/simulated/floor,
+/area/template_noop)
+"X" = (
+/obj/machinery/atmospherics/pipe/simple/visible{
+ dir = 4
+ },
+/obj/structure/table,
+/turf/simulated/floor,
+/area/template_noop)
+
+(1,1,1) = {"
+a
+"}
+(2,1,1) = {"
+X
+"}
+(3,1,1) = {"
+d
+"}
diff --git a/code/__DEFINES/access_defines.dm b/code/__DEFINES/access_defines.dm
index b946f7a75ba7..30a4f5c4dc8a 100644
--- a/code/__DEFINES/access_defines.dm
+++ b/code/__DEFINES/access_defines.dm
@@ -65,6 +65,7 @@
#define ACCESS_MINERAL_STOREROOM 76
#define ACCESS_CARGO_BAY 78
#define ACCESS_SUPPLY_SHUTTLE 79
+#define ACCESS_TRAINER 80
#define ACCESS_WEAPONS 99 //! Weapon authorization for secbots.
diff --git a/code/__DEFINES/antag_defines.dm b/code/__DEFINES/antag_defines.dm
index 43a519e3ce7a..e62c0838ee48 100644
--- a/code/__DEFINES/antag_defines.dm
+++ b/code/__DEFINES/antag_defines.dm
@@ -103,8 +103,8 @@ GLOBAL_LIST(contractors)
#define ORG_PROB_HUNTER 10
#define ORG_PROB_MILD 20
-#define ORG_PROB_AVERAGE 60
-#define ORG_PROB_HIJACK 10
+#define ORG_PROB_AVERAGE 65
+#define ORG_PROB_HIJACK 5
// Chance that a traitor will receive a 'You are being targeted by another syndicate agent' notification regardless of being an actual target
#define ORG_PROB_PARANOIA 5
diff --git a/code/__DEFINES/atmospherics_defines.dm b/code/__DEFINES/atmospherics_defines.dm
index 2df5b9f0a2f0..ae6031aea778 100644
--- a/code/__DEFINES/atmospherics_defines.dm
+++ b/code/__DEFINES/atmospherics_defines.dm
@@ -169,3 +169,15 @@
#define ENVIRONMENT_TEMPERATE "temperate"
/// Cold environment: Normal atmosphere, -93 C.
#define ENVIRONMENT_COLD "cold"
+
+/// How far away should we load the pressure HUD data from MILLA?
+#define PRESSURE_HUD_LOAD_RADIUS 15
+
+/// How far away should we send the pressure HUD to the player?
+#define PRESSURE_HUD_RADIUS 12
+
+// Vent pump modes
+/// Don't go over the external pressure
+#define ONLY_CHECK_EXT_PRESSURE 1
+/// Only release until we reach this pressure
+#define ONLY_CHECK_INT_PRESSURE 2
diff --git a/code/__DEFINES/dcs/atom_signals.dm b/code/__DEFINES/dcs/atom_signals.dm
index d1dbbf2ee1ab..42745166c8dc 100644
--- a/code/__DEFINES/dcs/atom_signals.dm
+++ b/code/__DEFINES/dcs/atom_signals.dm
@@ -6,6 +6,8 @@
// /atom
+//from SSatoms InitAtom - Only if the atom was not deleted or failed initialization and has a loc
+#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON "atom_init_success_on"
// from SSatoms InitAtom - Only if the atom was not deleted or failed initialization
#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success"
///from base of atom/attack_hulk(): (/mob/living/carbon/human)
@@ -38,12 +40,12 @@
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays"
///from base of [/atom/proc/update_icon]: (signalOut, did_anything)
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon"
-///from base of atom/Entered(): (atom/movable/entering, /atom)
+///from base of atom/Entered(): (atom/movable/entered, /atom)
#define COMSIG_ATOM_ENTERED "atom_entered"
///from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
#define COMSIG_ATOM_EXIT "atom_exit"
#define COMPONENT_ATOM_BLOCK_EXIT (1<<0)
-///from base of atom/Exited(): (atom/movable/exiting, atom/newloc)
+///from base of atom/Exited(): (atom/movable/exiting, direction)
#define COMSIG_ATOM_EXITED "atom_exited"
///from base of atom/ex_act(): (severity, target)
#define COMSIG_ATOM_EX_ACT "atom_ex_act"
@@ -132,5 +134,9 @@
#define COMPONENT_NO_MOUSEDROP (1<<0)
///from base of atom/MouseDrop_T: (/atom/from, /mob/user)
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto"
+
+/// Called on the atom being hit, from /datum/component/anti_magic/on_attack() : (obj/item/weapon, mob/user, antimagic_flags)
+#define COMSIG_ATOM_HOLY_ATTACK "atom_holyattacked"
/// On a ranged attack: base of mob/living/carbon/human/RangedAttack (/mob/living/carbon/human)
#define COMSIG_ATOM_RANGED_ATTACKED "atom_range_attacked"
+
diff --git a/code/__DEFINES/dcs/mob_signals.dm b/code/__DEFINES/dcs/mob_signals.dm
index 3d0406f583ea..e9b71bdc58b7 100644
--- a/code/__DEFINES/dcs/mob_signals.dm
+++ b/code/__DEFINES/dcs/mob_signals.dm
@@ -22,11 +22,14 @@
#define COMSIG_MOB_ALTCLICKON "mob_altclickon"
#define COMSIG_MOB_CANCEL_CLICKON (1<<0)
+///from base of mob/can_cast_magic(): (mob/user, magic_flags, charge_cost)
+#define COMSIG_MOB_RESTRICT_MAGIC "mob_cast_magic"
+///from base of mob/can_block_magic(): (mob/user, casted_magic_flags, charge_cost)
+#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic"
+ #define COMPONENT_MAGIC_BLOCKED (1<<0)
+
///from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj
#define COMSIG_MOB_ALLOWED "mob_allowed"
-///from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources)
-#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic"
- #define COMPONENT_BLOCK_MAGIC (1<<0)
///from base of mob/create_mob_hud(): ()
#define COMSIG_MOB_HUD_CREATED "mob_hud_created"
///from base of atom/attack_hand(): (mob/user)
diff --git a/code/__DEFINES/dcs/movable_signals.dm b/code/__DEFINES/dcs/movable_signals.dm
index 2de0ca3879dc..7aa2beca9330 100644
--- a/code/__DEFINES/dcs/movable_signals.dm
+++ b/code/__DEFINES/dcs/movable_signals.dm
@@ -4,21 +4,22 @@
* All signals send the source datum of the signal as the first argument
*/
+///from base of atom/movable/Moved(): (/atom)
+#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move"
+ #define COMPONENT_MOVABLE_BLOCK_PRE_MOVE (1<<0)
///from base of atom/movable/Moved(): (/atom, dir)
#define COMSIG_MOVABLE_MOVED "movable_moved"
///from base of atom/movable/Cross(): (/atom/movable)
-#define COMSIG_MOVABLE_CROSS "movable_cross"
-///from base of atom/movable/Crossed(): (/atom/movable)
-#define COMSIG_MOVABLE_CROSSED "movable_crossed"
-///when we cross over something (calling Crossed() on that atom)
-#define COMSIG_CROSSED_MOVABLE "crossed_movable"
+#define COMSIG_MOVABLE_CHECK_CROSS "movable_cross"
+ #define COMPONENT_BLOCK_CROSS (1<<0)
+///from base of atom/movable/Move(): (/atom/movable)
+#define COMSIG_MOVABLE_CHECK_CROSS_OVER "movable_cross_over"
///from base of atom/movable/Uncross(): (/atom/movable)
#define COMSIG_MOVABLE_UNCROSS "movable_uncross"
#define COMPONENT_MOVABLE_BLOCK_UNCROSS (1<<0)
-///from base of atom/movable/Uncrossed(): (/atom/movable)
-#define COMSIG_MOVABLE_UNCROSSED "movable_uncrossed"
///from base of atom/movable/Bump(): (/atom)
#define COMSIG_MOVABLE_BUMP "movable_bump"
+ #define COMPONENT_INTERCEPT_BUMPED (1<<0)
///from base of atom/movable/throw_impact(): (/atom/hit_atom, /datum/thrownthing/throwingdatum)
#define COMSIG_MOVABLE_IMPACT "movable_impact"
#define COMPONENT_MOVABLE_IMPACT_FLIP_HITPUSH (1<<0) //if true, flip if the impact will push what it hits
@@ -41,7 +42,7 @@
#define COMSIG_MOVABLE_THROW_LANDED "movable_throw_landed"
///from base of atom/movable/shove_impact(): (mob/living/target, mob/living/attacker)
#define COMSIG_MOVABLE_SHOVE_IMPACT "movable_shove_impact"
-///from base of atom/movable/onTransitZ(): (old_z, new_z)
+///from base of atom/movable/on_changed_z_level(): (turf/old_turf, turf/new_turf)
#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit"
/// Called just before something gets untilted
diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm
index a24fcae6c56f..59ab3c75e31e 100644
--- a/code/__DEFINES/hud.dm
+++ b/code/__DEFINES/hud.dm
@@ -27,6 +27,7 @@
#define DIAG_AIRLOCK_HUD "22" // Airlock shock overlay
#define GLAND_HUD "23"//Gland indicators for abductors
#define JANI_HUD "24" // Sign overlay over cleanable decals
+#define PRESSURE_HUD "25" // Pressure coloring for tiles
//by default everything in the hud_list of an atom is an image
//a value in hud_list with one of these will change that behavior
@@ -42,22 +43,23 @@
#define DATA_HUD_DIAGNOSTIC_ADVANCED 6
#define DATA_HUD_HYDROPONIC 7
#define DATA_HUD_JANITOR 8
+#define DATA_HUD_PRESSURE 9
//antag HUD defines
-#define ANTAG_HUD_CULT 9
-#define ANTAG_HUD_REV 10
-#define ANTAG_HUD_OPS 11
-#define ANTAG_HUD_WIZ 12
-#define ANTAG_HUD_SHADOW 13
-#define ANTAG_HUD_TRAITOR 14
-#define ANTAG_HUD_NINJA 15
-#define ANTAG_HUD_CHANGELING 16
-#define ANTAG_HUD_VAMPIRE 17
-#define ANTAG_HUD_ABDUCTOR 18
-#define DATA_HUD_ABDUCTOR 19
-#define ANTAG_HUD_EVENTMISC 20
-#define ANTAG_HUD_BLOB 21
-#define ANTAG_HUD_ZOMBIE 22
-#define ANTAG_HUD_MIND_FLAYER 23
+#define ANTAG_HUD_CULT 10
+#define ANTAG_HUD_REV 11
+#define ANTAG_HUD_OPS 12
+#define ANTAG_HUD_WIZ 13
+#define ANTAG_HUD_SHADOW 14
+#define ANTAG_HUD_TRAITOR 15
+#define ANTAG_HUD_NINJA 16
+#define ANTAG_HUD_CHANGELING 17
+#define ANTAG_HUD_VAMPIRE 18
+#define ANTAG_HUD_ABDUCTOR 19
+#define DATA_HUD_ABDUCTOR 20
+#define ANTAG_HUD_EVENTMISC 21
+#define ANTAG_HUD_BLOB 22
+#define ANTAG_HUD_ZOMBIE 23
+#define ANTAG_HUD_MIND_FLAYER 24
// Notification action types
#define NOTIFY_JUMP "jump"
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index a6df2f627416..e524369c4455 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -151,3 +151,5 @@ GLOBAL_LIST_INIT(turfs_pass_meteor, typecacheof(list(
#define ispassmeteorturf(A) (is_type_in_typecache(A, GLOB.turfs_pass_meteor))
#define is_screen_atom(A) istype(A, /atom/movable/screen)
+
+#define is_multi_tile_object(atom) (atom?.bound_width > world.icon_size || atom?.bound_height > world.icon_size)
diff --git a/code/__DEFINES/job_defines.dm b/code/__DEFINES/job_defines.dm
index 54e041e11a35..161dd84541a4 100644
--- a/code/__DEFINES/job_defines.dm
+++ b/code/__DEFINES/job_defines.dm
@@ -22,6 +22,7 @@
#define JOB_JUDGE (1<<12)
#define JOB_BLUESHIELD (1<<13)
#define JOB_NANO (1<<14)
+#define JOB_INSTRUCTOR (1<<15)
#define JOBCAT_MEDSCI (1<<1)
diff --git a/code/__DEFINES/machines.dm b/code/__DEFINES/machines.dm
index 60638b439f8a..0dbc154ec0bf 100644
--- a/code/__DEFINES/machines.dm
+++ b/code/__DEFINES/machines.dm
@@ -84,15 +84,16 @@
/**
* Air alarm modes
*/
-#define AALARM_MODE_SCRUBBING 1
-#define AALARM_MODE_VENTING 2 //makes draught
+#define AALARM_MODE_FILTERING 1
+#define AALARM_MODE_DRAUGHT 2 //makes draught
#define AALARM_MODE_PANIC 3 //like siphon, but stronger (enables widenet)
-#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing
+#define AALARM_MODE_CYCLE 4 //sucks off all air, then refill and swithes to scrubbing
#define AALARM_MODE_SIPHON 5 //Scrubbers suck air
#define AALARM_MODE_CONTAMINATED 6 //Turns on all filtering and widenet scrubbing.
-#define AALARM_MODE_REFILL 7 //just like normal, but with triple the air output
+#define AALARM_MODE_REFILL 7 //just like normal, but disables low pressure check until normalized, then switches to normal
#define AALARM_MODE_OFF 8
#define AALARM_MODE_FLOOD 9 //Emagged mode; turns off scrubbers and pressure checks on vents
+#define AALARM_MODE_CUSTOM 10
#define NUKE_STATUS_INTACT 0
#define NUKE_CORE_MISSING 1
diff --git a/code/__DEFINES/magic_defines.dm b/code/__DEFINES/magic_defines.dm
new file mode 100644
index 000000000000..9d0ee8158cdc
--- /dev/null
+++ b/code/__DEFINES/magic_defines.dm
@@ -0,0 +1,16 @@
+// Bitflags for magic resistance types
+/// Default magic resistance that blocks normal magic (wizard, spells, magical staff projectiles)
+#define MAGIC_RESISTANCE (1<<0)
+/// Tinfoil hat magic resistance that blocks mental magic (telepathy / mind links, mind curses, abductors)
+#define MAGIC_RESISTANCE_MIND (1<<1)
+/// Holy magic resistance that blocks unholy magic (revenant, vampire, voice of god)
+#define MAGIC_RESISTANCE_HOLY (1<<2)
+
+DEFINE_BITFIELD(antimagic_flags, list(
+ "MAGIC_RESISTANCE" = MAGIC_RESISTANCE,
+ "MAGIC_RESISTANCE_HOLY" = MAGIC_RESISTANCE_HOLY,
+ "MAGIC_RESISTANCE_MIND" = MAGIC_RESISTANCE_MIND,
+))
+
+/// Whether the spell can be cast while the user has antimagic on them that corresponds to the spell's own antimagic flags.
+#define SPELL_REQUIRES_NO_ANTIMAGIC (1 << 0)
diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm
index 48981642192b..60ec94d3dbf8 100644
--- a/code/__DEFINES/misc_defines.dm
+++ b/code/__DEFINES/misc_defines.dm
@@ -191,30 +191,31 @@
#define FOAM_REACT_BEFORE_SPREAD (1<<3)
//Human Overlays Indexes/////////
-#define EYES_OVERLAY_LAYER 49
-#define MISC_LAYER 48 // Handles eye_shine() -> cybernetic eyes, specific eye traits.
-#define WING_LAYER 47
-#define WING_UNDERLIMBS_LAYER 46
-#define MUTANTRACE_LAYER 45
-#define TAIL_UNDERLIMBS_LAYER 44 //Tail split-rendering.
-#define LIMBS_LAYER 43
-#define MARKINGS_LAYER 42
-#define INTORGAN_LAYER 41
-#define UNDERWEAR_LAYER 40
-#define MUTATIONS_LAYER 39
-#define H_DAMAGE_LAYER 38
-#define UNIFORM_LAYER 37
-#define ID_LAYER 36
-#define HANDS_LAYER 35 //Exists to overlay hands over jumpsuits
-#define SHOES_LAYER 34
-#define L_FOOT_BLOOD_LAYER 33 // Blood overlay separation Left-Foot
-#define R_FOOT_BLOOD_LAYER 32 // Blood overlay separation Right-Foot
-#define GLOVES_LAYER 31
-#define L_HAND_BLOOD_LAYER 30 // Blood overlay separation Left-Hand
-#define R_HAND_BLOOD_LAYER 29 // Blood overlay separation Right-Hand
-#define LEFT_EAR_LAYER 28
-#define RIGHT_EAR_LAYER 27
-#define BELT_LAYER 26 //Possible make this an overlay of something required to wear a belt?
+#define EYES_OVERLAY_LAYER 50
+#define MISC_LAYER 49 // Handles eye_shine() -> cybernetic eyes, specific eye traits.
+#define WING_LAYER 48
+#define WING_UNDERLIMBS_LAYER 47
+#define MUTANTRACE_LAYER 46
+#define TAIL_UNDERLIMBS_LAYER 45 //Tail split-rendering.
+#define LIMBS_LAYER 44
+#define MARKINGS_LAYER 43
+#define INTORGAN_LAYER 42
+#define UNDERWEAR_LAYER 41
+#define MUTATIONS_LAYER 40
+#define H_DAMAGE_LAYER 39
+#define UNIFORM_LAYER 38
+#define ID_LAYER 37
+#define HANDS_LAYER 36 //Exists to overlay hands over jumpsuits
+#define SHOES_LAYER 35
+#define L_FOOT_BLOOD_LAYER 34 // Blood overlay separation Left-Foot
+#define R_FOOT_BLOOD_LAYER 33 // Blood overlay separation Right-Foot
+#define GLOVES_LAYER 32
+#define L_HAND_BLOOD_LAYER 31 // Blood overlay separation Left-Hand
+#define R_HAND_BLOOD_LAYER 30 // Blood overlay separation Right-Hand
+#define LEFT_EAR_LAYER 29
+#define RIGHT_EAR_LAYER 28
+#define BELT_LAYER 27 //Possible make this an overlay of something required to wear a belt?
+#define SPECIAL_NECK_LAYER 26
#define SUIT_LAYER 25
#define SPECIAL_BELT_LAYER 24
#define NECK_LAYER 23
@@ -240,7 +241,7 @@
#define HALO_LAYER 3 //blood cult ascended halo, because there's currently no better solution for adding/removing
#define FIRE_LAYER 2 //If you're on fire
#define FROZEN_LAYER 1
-#define TOTAL_LAYERS 49
+#define TOTAL_LAYERS 50
///Access Region Codes///
#define REGION_ALL 0
diff --git a/code/__DEFINES/movement_info.dm b/code/__DEFINES/movement_info.dm
new file mode 100644
index 000000000000..95c90f7a1fba
--- /dev/null
+++ b/code/__DEFINES/movement_info.dm
@@ -0,0 +1,16 @@
+/// The arguments of this macro correspond directly to the argument order of /atom/movable/proc/Moved
+#define SET_ACTIVE_MOVEMENT(_old_loc, _direction, _forced, _oldlocs) \
+ active_movement = list( \
+ _old_loc, \
+ _direction, \
+ _forced, \
+ _oldlocs, \
+ )
+
+/// Finish any active movements
+#define RESOLVE_ACTIVE_MOVEMENT \
+ if(active_movement) { \
+ var/__move_args = active_movement; \
+ active_movement = null; \
+ Moved(arglist(__move_args)); \
+ }
diff --git a/code/__DEFINES/rust.dm b/code/__DEFINES/rust.dm
index 0c337d93554b..935f540bafda 100644
--- a/code/__DEFINES/rust.dm
+++ b/code/__DEFINES/rust.dm
@@ -53,14 +53,15 @@
// This needs to go BELOW the above define, otherwise the BYOND compiler can make the above immediate call disappear
#undef RUSTLIBS_SUFFIX
+/// Exists by default in 516, but needs to be defined for 515 or byondapi-rs doesn't like it.
+/proc/byondapi_stack_trace(err)
+ CRASH(err)
+
/proc/milla_init_z(z)
return RUSTLIB_CALL(milla_initialize, z)
-/proc/is_milla_synchronous(tick)
- return RUSTLIB_CALL(milla_is_synchronous, tick)
-
-/proc/set_tile_atmos(turf/T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity)
- return RUSTLIB_CALL(milla_set_tile, T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity)
+/proc/set_tile_atmos(turf/T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity, hotspot_temperature, hotspot_volume)
+ return RUSTLIB_CALL(milla_set_tile, T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity, hotspot_temperature, hotspot_volume)
/proc/get_tile_atmos(turf/T, list/L)
return RUSTLIB_CALL(milla_get_tile, T, L)
@@ -74,6 +75,9 @@
/proc/get_interesting_atmos_tiles()
return RUSTLIB_CALL(milla_get_interesting_tiles)
+/proc/get_tracked_pressure_tiles()
+ return RUSTLIB_CALL(milla_get_tracked_pressure_tiles)
+
/proc/reduce_superconductivity(turf/T, list/superconductivity)
var/north = superconductivity[1]
var/east = superconductivity[2]
@@ -93,6 +97,14 @@
return RUSTLIB_CALL(milla_set_tile_airtight, T, north, east, south, west)
+/proc/create_hotspot(turf/T, hotspot_temperature, hotspot_volume)
+ return RUSTLIB_CALL(milla_create_hotspot, T, hotspot_temperature, hotspot_volume)
+
+/proc/track_pressure_tiles(atom/A, radius)
+ var/turf/T = get_turf(A)
+ if(istype(T))
+ return RUSTLIB_CALL(milla_track_pressure_tiles, T, radius)
+
/proc/get_random_interesting_tile()
return RUSTLIB_CALL(milla_get_random_interesting_tile)
@@ -122,15 +134,20 @@
#define MILLA_INDEX_SUPERCONDUCTIVITY_WEST 13
#define MILLA_INDEX_INNATE_HEAT_CAPACITY 14
#define MILLA_INDEX_TEMPERATURE 15
+#define MILLA_INDEX_HOTSPOT_TEMPERATURE 16
+#define MILLA_INDEX_HOTSPOT_VOLUME 17
+#define MILLA_INDEX_WIND_X 18
+#define MILLA_INDEX_WIND_Y 19
+#define MILLA_INDEX_FUEL_BURNT 20
/// The number of values per tile.
-#define MILLA_TILE_SIZE MILLA_INDEX_TEMPERATURE
+#define MILLA_TILE_SIZE MILLA_INDEX_FUEL_BURNT
// These are only for InterestingTiles.
-#define MILLA_INDEX_TURF 16
-#define MILLA_INDEX_INTERESTING_REASONS 17
-#define MILLA_INDEX_AIRFLOW_X 18
-#define MILLA_INDEX_AIRFLOW_Y 19
+#define MILLA_INDEX_TURF 21
+#define MILLA_INDEX_INTERESTING_REASONS 22
+#define MILLA_INDEX_AIRFLOW_X 23
+#define MILLA_INDEX_AIRFLOW_Y 24
/// The number of values per interesting tile.
#define MILLA_INTERESTING_TILE_SIZE MILLA_INDEX_AIRFLOW_Y
diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm
index 465d730a97d6..78f6aa827f03 100644
--- a/code/__DEFINES/status_effects.dm
+++ b/code/__DEFINES/status_effects.dm
@@ -136,6 +136,8 @@
#define STATUS_EFFECT_REVERSED_HIGH_PRIESTESS /datum/status_effect/reversed_high_priestess //Bubblegum will chase the person hit by the effect, grabbing people at random. This can and WILL include the caster.
+#define STATUS_EFFECT_UNBALANCED /datum/status_effect/unbalanced // Prevents you from automatically grabbing walls to stop moving in space.
+
#define STATUS_EFFECT_C_FOAMED /datum/status_effect/c_foamed
#define STATUS_EFFECT_TEMPORAL_SLASH /datum/status_effect/temporal_slash
@@ -165,6 +167,7 @@
#define STATUS_EFFECT_IMMOBILIZED /datum/status_effect/incapacitating/immobilized
#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping
#define STATUS_EFFECT_SLOWED /datum/status_effect/incapacitating/slowed
+#define STATUS_EFFECT_DIRECTIONAL_SLOW /datum/status_effect/incapacitating/directional_slow
#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed
#define STATUS_EFFECT_FLOORED /datum/status_effect/incapacitating/floored
#define STATUS_EFFECT_ARMBAR /datum/status_effect/judo_armbar
diff --git a/code/__DEFINES/wires_defines.dm b/code/__DEFINES/wires_defines.dm
index c1d1160bbb00..7d267d96e954 100644
--- a/code/__DEFINES/wires_defines.dm
+++ b/code/__DEFINES/wires_defines.dm
@@ -23,7 +23,7 @@
#define WIRE_BOLT_LIGHT "Bolt Lights"
// Air alarm
-#define WIRE_SYPHON "Siphon"
+#define WIRE_SIPHON "Siphon"
#define WIRE_AALARM "Atmospherics Alarm"
// Camera
diff --git a/code/__HELPERS/atom_helpers.dm b/code/__HELPERS/atom_helpers.dm
new file mode 100644
index 000000000000..b0a0999da72b
--- /dev/null
+++ b/code/__HELPERS/atom_helpers.dm
@@ -0,0 +1,10 @@
+/// Returns a list of all locations (except the area) the movable is within.
+/proc/get_nested_locs(atom/movable/atom_on_location, include_turf = FALSE)
+ . = list()
+ var/atom/location = atom_on_location.loc
+ var/turf/our_turf = get_turf(atom_on_location)
+ while(location && location != our_turf)
+ . += location
+ location = location.loc
+ if(our_turf && include_turf) // At this point, only the turf is left, provided it exists.
+ . += our_turf
diff --git a/code/__HELPERS/trait_helpers.dm b/code/__HELPERS/trait_helpers.dm
index ca4bb8fe2ea0..095e02a0fa8a 100644
--- a/code/__HELPERS/trait_helpers.dm
+++ b/code/__HELPERS/trait_helpers.dm
@@ -180,6 +180,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_DWARF "dwarf"
#define TRAIT_SILENT_FOOTSTEPS "silent_footsteps" //makes your footsteps completely silent
#define TRAIT_MESON_VISION "meson_vision"
+#define TRAIT_PRESSURE_VISION "pressure_vision"
#define TRAIT_FLASH_PROTECTION "flash_protection"
#define TRAIT_NIGHT_VISION "night_vision"
#define TRAIT_EMOTE_MUTE "emote_mute"
@@ -243,6 +244,13 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_EMP_RESIST "emp_resist" //The mob will take less damage from EMPs
#define TRAIT_MINDFLAYER_NULLIFIED "flayer_nullified" //The mindflayer will not be able to activate their abilities, or drain swarms from people
#define TRAIT_FLYING "flying"
+/// This mob is antimagic, and immune to spells / cannot cast spells
+#define TRAIT_ANTIMAGIC "anti_magic"
+/// This allows a person who has antimagic to cast spells without getting blocked
+#define TRAIT_ANTIMAGIC_NO_SELFBLOCK "anti_magic_no_selfblock"
+/// This mob recently blocked magic with some form of antimagic
+#define TRAIT_RECENTLY_BLOCKED_MAGIC "recently_blocked_magic"
+#define TRAIT_UNKNOWN "unknown" // The person with this trait always appears as 'unknown'.
#define TRAIT_CRYO_DESPAWNING "cryo_despawning" // dont adminbus this please
//***** MIND TRAITS *****/
@@ -300,6 +308,12 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
///An organ that was inserted into a dead mob, that has not been revived yet
#define TRAIT_ORGAN_INSERTED_WHILE_DEAD "organ_inserted_while_dead"
+/// Prevents stripping this equipment or seeing it in the strip menu
+#define TRAIT_NO_STRIP "no_strip"
+
+/// Prevents seeing this item on examine when on a mob, or seeing it in the strip menu. It's like ABSTRACT, without making the item fail to interact in several ways. The item can still be stripped however, combine with no_strip unless you have a reason not to.
+#define TRAIT_SKIP_EXAMINE "skip_examine"
+
//****** OBJ TRAITS *****//
///An /obj that should not increase the "depth" of the search for adjacency,
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index c77e07a55487..195112118952 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -249,7 +249,7 @@
/proc/heat2color_g(temp)
temp /= 100
if(temp <= 66)
- . = max(0, min(255, 99.4708025861 * log(temp) - 161.1195681661))
+ . = max(0, min(255, 99.4708025861 * log(max(temp, 1)) - 161.1195681661))
else
. = max(0, min(255, 288.1221695283 * ((temp - 60) ** -0.0755148492)))
@@ -261,7 +261,7 @@
if(temp <= 16)
. = 0
else
- . = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
+ . = max(0, min(255, 138.5177312231 * log(max(temp - 10, 1)) - 305.0447927307))
//Argument: Give this a space-separated string consisting of 6 numbers. Returns null if you don't
/proc/text2matrix(matrixtext)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 076e24212236..92f0da413b49 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -772,6 +772,14 @@ Returns 1 if the chain up to the area contains the given typepath
var/y_pos
var/z_pos
+/datum/coords/New(x_pos_, y_pos_, z_pos_)
+ x_pos = x_pos_
+ y_pos = y_pos_
+ z_pos = z_pos_
+
+/datum/coords/proc/to_string(z = null)
+ return "([x_pos],[y_pos],[z ? z : z_pos])"
+
/area/proc/move_contents_to(area/A, turf_to_leave, direction) // someone rewrite this function i beg of you
//Takes: Area. Optional: turf type to leave behind.
//Returns: Nothing.
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index 815aaa41d997..0990e5bd29c6 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -2,7 +2,7 @@
//#define TESTING
// Uncomment the following line to compile unit tests on a local server. The output will be in a test_run-[DATE].log file in the ./data folder.
-// #define LOCAL_UNIT_TESTS
+// #define LOCAL_GAME_TESTS
// Uncomment the following line to enable Tracy profiling.
// DO NOT DO THIS UNLESS YOU UNDERSTAND THE IMPLICATIONS
@@ -12,16 +12,16 @@
// Uncomment this to enable support for multiple instances
// #define MULTIINSTANCE
-#ifdef LOCAL_UNIT_TESTS
-#define UNIT_TESTS
+#ifdef LOCAL_GAME_TESTS
+#define GAME_TESTS
#endif
#ifdef CIBUILDING
-#define UNIT_TESTS
+#define GAME_TESTS
#endif
-#if defined(CIBUILDING) && defined(LOCAL_UNIT_TESTS)
-#error CIBUILDING and LOCAL_UNIT_TESTS should not be enabled at the same time!
+#if defined(CIBUILDING) && defined(LOCAL_GAME_TESTS)
+#error CIBUILDING and LOCAL_GAME_TESTS should not be enabled at the same time!
#endif
/***** All toggles for the GC ref finder *****/
diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm
index d3076d41b11e..e165eabdb705 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -93,3 +93,124 @@ DEFINE_BITFIELD(vis_flags, list(
// MARK: Other bitfields
+DEFINE_BITFIELD(flags, list(
+ "STOPSPRESSUREDMAGE" = STOPSPRESSUREDMAGE,
+ "NODROP" = NODROP,
+ "NOBLUDGEON" = NOBLUDGEON,
+ "AIRTIGHT" = AIRTIGHT,
+ "HANDSLOW" = HANDSLOW,
+ "CONDUCT" = CONDUCT,
+ "ABSTRACT" = ABSTRACT,
+ "ON_BORDER" = ON_BORDER,
+ "PREVENT_CLICK_UNDER" = PREVENT_CLICK_UNDER,
+ "NODECONSTRUCT" = NODECONSTRUCT,
+ "EARBANGPROTECT" = EARBANGPROTECT,
+ "HEADBANGPROTECT" = HEADBANGPROTECT,
+ "BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT,
+ "THICKMATERIAL" = THICKMATERIAL,
+ "DROPDEL" = DROPDEL,
+ "NO_SCREENTIPS" = NO_SCREENTIPS,
+))
+
+DEFINE_BITFIELD(flags_2, list(
+ "SLOWS_WHILE_IN_HAND_2" = SLOWS_WHILE_IN_HAND_2,
+ "NO_EMP_WIRES_2" = NO_EMP_WIRES_2,
+ "HOLOGRAM_2" = HOLOGRAM_2,
+ "FROZEN_2" = FROZEN_2,
+ "STATIONLOVING_2" = STATIONLOVING_2,
+ "INFORM_ADMINS_ON_RELOCATE_2" = INFORM_ADMINS_ON_RELOCATE_2,
+ "BANG_PROTECT_2" = BANG_PROTECT_2,
+ "BLOCKS_LIGHT_2" = BLOCKS_LIGHT_2,
+ "DECAL_INIT_UPDATE_EXPERIENCED_2" = DECAL_INIT_UPDATE_EXPERIENCED_2,
+ "OMNITONGUE_2" = OMNITONGUE_2,
+ "SHOCKED_2" = SHOCKED_2,
+ "NO_MAT_REDEMPTION_2" = NO_MAT_REDEMPTION_2,
+ "LAVA_PROTECT_2" = LAVA_PROTECT_2,
+ "OVERLAY_QUEUED_2" = OVERLAY_QUEUED_2,
+ "RAD_PROTECT_CONTENTS_2" = RAD_PROTECT_CONTENTS_2,
+ "RAD_NO_CONTAMINATE_2" = RAD_NO_CONTAMINATE_2,
+ "IMMUNE_TO_SHUTTLECRUSH_2" = IMMUNE_TO_SHUTTLECRUSH_2,
+ "NO_MALF_EFFECT_2" = NO_MALF_EFFECT_2,
+ "CRITICAL_ATOM_2" = CRITICAL_ATOM_2,
+ "RANDOM_BLOCKER_2" = RANDOM_BLOCKER_2,
+ "ALLOW_BELT_NO_JUMPSUIT_2" = ALLOW_BELT_NO_JUMPSUIT_2,
+))
+
+DEFINE_BITFIELD(flags_ricochet, list(
+ "RICOCHET_SHINY" = RICOCHET_SHINY,
+ "RICOCHET_HARD" = RICOCHET_HARD,
+))
+
+DEFINE_BITFIELD(clothing_flags, list(
+ "HAS_UNDERWEAR" = HAS_UNDERWEAR,
+ "HAS_UNDERSHIRT" = HAS_UNDERSHIRT,
+ "HAS_SOCKS" = HAS_SOCKS,
+))
+
+DEFINE_BITFIELD(bodyflags, list(
+ "HAS_HEAD_ACCESSORY" = HAS_HEAD_ACCESSORY,
+ "HAS_TAIL" = HAS_TAIL,
+ "TAIL_OVERLAPPED" = TAIL_OVERLAPPED,
+ "HAS_SKIN_TONE" = HAS_SKIN_TONE,
+ "HAS_ICON_SKIN_TONE" = HAS_ICON_SKIN_TONE,
+ "HAS_SKIN_COLOR" = HAS_SKIN_COLOR,
+ "HAS_HEAD_MARKINGS" = HAS_HEAD_MARKINGS,
+ "HAS_BODY_MARKINGS" = HAS_BODY_MARKINGS,
+ "HAS_TAIL_MARKINGS" = HAS_TAIL_MARKINGS,
+ "TAIL_WAGGING" = TAIL_WAGGING,
+ "NO_EYES" = NO_EYES,
+ "HAS_ALT_HEADS" = HAS_ALT_HEADS,
+ "HAS_WING" = HAS_WING,
+ "HAS_BODYACC_COLOR" = HAS_BODYACC_COLOR,
+ "BALD" = BALD,
+ "ALL_RPARTS" = ALL_RPARTS,
+ "SHAVED" = SHAVED,
+))
+
+DEFINE_BITFIELD(pass_flags, list(
+ "PASSTABLE" = PASSTABLE,
+ "PASSGLASS" = PASSGLASS,
+ "PASSGRILLE" = PASSGRILLE,
+ "PASSBLOB" = PASSBLOB,
+ "PASSMOB" = PASSMOB,
+ "LETPASSTHROW" = LETPASSTHROW,
+ "PASSFENCE" = PASSFENCE,
+ "PASSDOOR" = PASSDOOR,
+ "PASSGIRDER" = PASSGIRDER,
+ "PASSBARRICADE" = PASSBARRICADE,
+ "PASSTAKE" = PASSTAKE,
+))
+
+DEFINE_BITFIELD(pass_flags_self, list(
+ "PASSTAKE" = PASSTAKE,
+ "LETPASSTHROW" = LETPASSTHROW,
+))
+
+DEFINE_BITFIELD(resistance_flags, list(
+ "LAVA_PROOF" = LAVA_PROOF,
+ "FIRE_PROOF" = FIRE_PROOF,
+ "FLAMMABLE" = FLAMMABLE,
+ "ON_FIRE" = ON_FIRE,
+ "UNACIDABLE" = UNACIDABLE,
+ "ACID_PROOF" = ACID_PROOF,
+ "INDESTRUCTIBLE" = INDESTRUCTIBLE,
+ "FREEZE_PROOF" = FREEZE_PROOF,
+))
+
+DEFINE_BITFIELD(mobility_flags, list(
+ "MOBILITY_MOVE" = MOBILITY_MOVE,
+ "MOBILITY_STAND" = MOBILITY_STAND,
+ "MOBILITY_PICKUP" = MOBILITY_PICKUP,
+ "MOBILITY_USE" = MOBILITY_USE,
+ "MOBILITY_PULL" = MOBILITY_PULL,
+))
+
+DEFINE_BITFIELD(status_flags, list(
+ "CANSTUN" = CANSTUN,
+ "CANWEAKEN" = CANWEAKEN,
+ "CANPARALYSE" = CANPARALYSE,
+ "CANPUSH" = CANPUSH,
+ "PASSEMOTES" = PASSEMOTES,
+ "GODMODE" = GODMODE,
+ "TERMINATOR_FORM" = TERMINATOR_FORM,
+))
diff --git a/code/_globalvars/lists/reagents_lists.dm b/code/_globalvars/lists/reagents_lists.dm
index a9a04f4a0f6a..447e4783475f 100644
--- a/code/_globalvars/lists/reagents_lists.dm
+++ b/code/_globalvars/lists/reagents_lists.dm
@@ -50,4 +50,5 @@ GLOBAL_LIST_INIT(blocked_chems, list("polonium", "initropidril", "concentrated_i
"teslium_paste", "omnizine_no_addiction", "zombiecure1",
"zombiecure2", "zombiecure3", "zombiecure4",
"admincleaner_all", "admincleaner_item", "admincleaner_mob",
+ "synthetic_omnizine_no_addiction", "surge_plus"
))
diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm
index 2b58a529175f..e0be5bf3b901 100644
--- a/code/_globalvars/traits.dm
+++ b/code/_globalvars/traits.dm
@@ -49,6 +49,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_ALCOHOL_TOLERANCE" = TRAIT_ALCOHOL_TOLERANCE,
"TRAIT_MESON_VISION" = TRAIT_MESON_VISION,
+ "TRAIT_PRESSURE_VISION" = TRAIT_PRESSURE_VISION,
"TRAIT_FLASH_PROTECTION" = TRAIT_FLASH_PROTECTION,
"TRAIT_NIGHT_VISION" = TRAIT_NIGHT_VISION,
"TRAIT_DRASK_SUPERCOOL" = TRAIT_DRASK_SUPERCOOL,
@@ -104,8 +105,11 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NON_INFECTIOUS_ZOMBIE" = TRAIT_NON_INFECTIOUS_ZOMBIE,
"TRAIT_CANNOT_PULL" = TRAIT_CANNOT_PULL,
"TRAIT_BSG_IMMUNE" = TRAIT_BSG_IMMUNE,
- "TRAIT_FLYING" = TRAIT_FLYING
-
+ "TRAIT_FLYING" = TRAIT_FLYING,
+ "TRAIT_ANTIMAGIC" = TRAIT_ANTIMAGIC,
+ "TRAIT_ANTIMAGIC_NO_SELFBLOCK" = TRAIT_ANTIMAGIC_NO_SELFBLOCK,
+ "TRAIT_RECENTLY_BLOCKED_MAGIC" = TRAIT_RECENTLY_BLOCKED_MAGIC,
+ "TRAIT_UNKNOWN" = TRAIT_UNKNOWN
),
/datum/mind = list(
@@ -132,7 +136,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NO_THROWN_MESSAGE" = TRAIT_NO_THROWN_MESSAGE,
"TRAIT_SILENT_INSERTION" = TRAIT_SILENT_INSERTION,
"TRAIT_HYPOSPRAY_IMMUNE" = TRAIT_HYPOSPRAY_IMMUNE,
- "TRAIT_ITEM_ACTIVE" = TRAIT_ITEM_ACTIVE
+ "TRAIT_ITEM_ACTIVE" = TRAIT_ITEM_ACTIVE,
+ "TRAIT_NO_STRIP" = TRAIT_NO_STRIP,
+ "TRAIT_SKIP_EXAMINE" = TRAIT_SKIP_EXAMINE
),
/turf = list(
diff --git a/code/_onclick/click_override.dm b/code/_onclick/click_override.dm
index c59506c654e1..5fc15d8e800d 100644
--- a/code/_onclick/click_override.dm
+++ b/code/_onclick/click_override.dm
@@ -65,7 +65,7 @@
if(get_dist(T, target_turf) > P.shock_range)
to_chat(user, "The target is too far away. ")
return FALSE
- target_turf.hotspot_expose(2000, 400)
+ target_turf.hotspot_expose(2000, 1)
playsound(user.loc, 'sound/effects/eleczap.ogg', 40, 1)
var/atom/beam_from = user
diff --git a/code/controllers/configuration/sections/database_configuration.dm b/code/controllers/configuration/sections/database_configuration.dm
index e7ed707f5738..73a396c9e29e 100644
--- a/code/controllers/configuration/sections/database_configuration.dm
+++ b/code/controllers/configuration/sections/database_configuration.dm
@@ -22,7 +22,7 @@
/datum/configuration_section/database_configuration/load_data(list/data)
// UNIT TESTS ARE DEFINED - USE CUSTOM CI VALUES
- #ifdef UNIT_TESTS
+ #ifdef GAME_TESTS
enabled = TRUE
// This needs to happen in the CI environment to ensure the example SQL version gets updated.
diff --git a/code/controllers/configuration/sections/redis_configuration.dm b/code/controllers/configuration/sections/redis_configuration.dm
index 45661f3643b5..b418441e7f99 100644
--- a/code/controllers/configuration/sections/redis_configuration.dm
+++ b/code/controllers/configuration/sections/redis_configuration.dm
@@ -8,7 +8,7 @@
/datum/configuration_section/redis_configuration/load_data(list/data)
// UNIT TESTS ARE DEFINED - USE CUSTOM CI VALUES
- #ifdef UNIT_TESTS
+ #ifdef GAME_TESTS
// enabled = TRUE
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index 1e1368be7a2d..8bdf4ffe9920 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -83,7 +83,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/datum/controller/master/New()
if(!random_seed)
- #ifdef UNIT_TESTS
+ #ifdef GAME_TESTS
random_seed = 29051994
#else
random_seed = rand(1, 1e9)
diff --git a/code/controllers/subsystem/SSair.dm b/code/controllers/subsystem/SSair.dm
index 6da9b4916c1a..270dbed53129 100644
--- a/code/controllers/subsystem/SSair.dm
+++ b/code/controllers/subsystem/SSair.dm
@@ -3,14 +3,16 @@
#define SSAIR_ATMOSMACHINERY 3
#define SSAIR_INTERESTING_TILES 4
#define SSAIR_HOTSPOTS 5
-#define SSAIR_BOUND_MIXTURES 6
-#define SSAIR_MILLA_TICK 7
+#define SSAIR_WINDY_TILES 6
+#define SSAIR_BOUND_MIXTURES 7
+#define SSAIR_PRESSURE_OVERLAY 8
+#define SSAIR_MILLA_TICK 9
SUBSYSTEM_DEF(air)
name = "Atmospherics"
init_order = INIT_ORDER_AIR
priority = FIRE_PRIORITY_AIR
- wait = 5
+ wait = 2
flags = SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
offline_implications = "Turfs will no longer process atmos, and all atmospheric machines (including cryotubes) will no longer function. Shuttle call recommended."
@@ -28,12 +30,16 @@ SUBSYSTEM_DEF(air)
var/datum/resumable_cost_counter/cost_interesting_tiles = new()
/// The cost of a pass through hotspots, shown in SS Info's C block as HS.
var/datum/resumable_cost_counter/cost_hotspots = new()
+ /// The cost of a pass through windy tiles, shown in SS Info's C block as WT.
+ var/datum/resumable_cost_counter/cost_windy_tiles = new()
/// The cost of a pass through pipenets, shown in SS Info's C block as PN.
var/datum/resumable_cost_counter/cost_pipenets = new()
/// The cost of a pass through building pipenets, shown in SS Info's C block as DPN.
var/datum/resumable_cost_counter/cost_pipenets_to_build = new()
/// The cost of a pass through atmos machinery, shown in SS Info's C block as AM.
var/datum/resumable_cost_counter/cost_atmos_machinery = new()
+ /// The cost of a pass through loading pressure tiles, shown in SS Info's C block as PT.
+ var/datum/resumable_cost_counter/cost_pressure_tiles = new()
/// The set of current bound mixtures. Shown in SS Info as BM:x+y, where x is the length at the start of the most recent processing, and y is the number of mixtures that have been added during processing.
var/list/bound_mixtures = list()
@@ -45,14 +51,24 @@ SUBSYSTEM_DEF(air)
var/added_bound_mixtures = 0
/// The length of the most recent interesting tiles list, shown in SS Info as IT.
var/interesting_tile_count = 0
- /// The set of current active hotspots. Length shown in SS Info as HS.
- var/list/hotspots = list()
+ /// The length of the most recent hotspot list, shown in SS Info as HS.
+ var/hotspot_count = 0
+ /// The length of the most recent windy tiles list, shown in SS Info as WT.
+ var/windy_tile_count = 0
/// The set of pipenets that need to be built. Length shown in SS Info as PTB.
var/list/pipenets_to_build = list()
/// The set of active pipenets. Length shown in SS Info as PN.
var/list/pipenets = list()
/// The set of active atmos machinery. Length shown in SS Info as AM.
var/list/atmos_machinery = list()
+ /// The set of tiles that are currently on fire.
+ var/list/hotspots
+ /// The set of tiles that are still on fire after this tick.
+ var/list/new_hotspots
+ /// The set of tiles that are currently experiencing wind.
+ var/list/windy_tiles
+ /// The set of tiles that are still experiencing wind after this tick.
+ var/list/new_windy_tiles
/// A list of atmos machinery to set up in Initialize.
var/list/machinery_to_construct = list()
@@ -69,17 +85,19 @@ SUBSYSTEM_DEF(air)
/// Are we currently running in a MILLA-safe context, i.e. is is_synchronous *guaranteed* to be TRUE. Nothing outside of this file should change this.
VAR_PRIVATE/in_milla_safe_code = FALSE
- /// When did we start the last MILLA tick?
- var/milla_tick_start = null
+ /// A list of callbacks waiting for MILLA to finish its tick and enter synchronous mode.
+ var/list/waiting_for_sync = list()
- /// Is MILLA (and hence SSair) reliably healthy?
- var/healthy = TRUE
+ /// The coordinates of the pressure image we're currently loading.
+ var/pressure_x = 0
+ var/pressure_y = 0
+ var/pressure_z = 0
- /// When was MILLA last seen unhealthy?
- var/last_unhealthy = 0
+ /// The people who were using the pressure HUD last tick.
+ var/list/pressure_hud_users = list()
- /// A list of callbacks waiting for MILLA to finish its tick and enter synchronous mode.
- var/list/waiting_for_sync = list()
+ /// What alpha to use for the pressure overlay. Applies to everyone using the overlay.
+ var/pressure_overlay_alpha = 50
/// A cost counter for resumable, repeating processes.
/datum/resumable_cost_counter
@@ -112,13 +130,16 @@ SUBSYSTEM_DEF(air)
msg += "MT:[round(cost_milla_tick,1)]|"
msg += "IT:[cost_interesting_tiles.to_string()]|"
msg += "HS:[cost_hotspots.to_string()]|"
+ msg += "WT:[cost_windy_tiles.to_string()]|"
msg += "PN:[cost_pipenets.to_string()]|"
msg += "PTB:[cost_pipenets_to_build.to_string()]|"
- msg += "AM:[cost_atmos_machinery.to_string()]"
+ msg += "AM:[cost_atmos_machinery.to_string()]|"
+ msg += "PT:[cost_pressure_tiles.to_string()]"
msg += "} "
msg += "BM:[original_bound_mixtures]+[added_bound_mixtures]|"
msg += "IT:[interesting_tile_count]|"
- msg += "HS:[length(hotspots)]|"
+ msg += "HS:[hotspot_count]|"
+ msg += "WT:[windy_tile_count]|"
msg += "PN:[length(pipenets)]|"
msg += "AM:[length(atmos_machinery)]|"
return msg.Join("")
@@ -126,8 +147,9 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/get_metrics()
. = ..()
var/list/cust = list()
- cust["hotspots"] = length(hotspots)
cust["interesting turfs"] = interesting_tile_count
+ cust["hotspots"] = hotspot_count
+ cust["windy turfs"] = windy_tile_count
.["cost"] = cost_full.last_complete_ms
.["custom"] = cust
@@ -145,7 +167,6 @@ SUBSYSTEM_DEF(air)
in_milla_safe_code = FALSE
/datum/controller/subsystem/air/Recover()
- hotspots = SSair.hotspots
pipenets_to_build = SSair.pipenets_to_build
pipenets = SSair.pipenets
atmos_machinery = SSair.atmos_machinery
@@ -154,23 +175,23 @@ SUBSYSTEM_DEF(air)
currentpart = SSair.currentpart
is_synchronous = SSair.is_synchronous
+#define SLEEPABLE_TIMER (world.time + world.tick_usage * world.tick_lag / 100)
/datum/controller/subsystem/air/fire(resumed = 0)
// All atmos stuff assumes MILLA is synchronous. Ensure it actually is.
if(!is_synchronous)
- var/timer = TICK_USAGE_REAL
+ var/timer = SLEEPABLE_TIMER
while(!is_synchronous)
// Sleep for 1ms.
sleep(0.01)
if(MC_TICK_CHECK)
- time_slept.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), FALSE)
- cost_full.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), FALSE)
+ time_slept.record_progress((SLEEPABLE_TIMER - timer) * 100, FALSE)
return
- cost_full.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), FALSE)
- time_slept.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), TRUE)
+ time_slept.record_progress((SLEEPABLE_TIMER - timer) * 100, TRUE)
fire_sleepless(resumed)
+#undef SLEEPABLE_TIMER
/datum/controller/subsystem/air/proc/fire_sleepless(resumed)
// Any proc that wants MILLA to be synchronous should not sleep.
@@ -242,6 +263,19 @@ SUBSYSTEM_DEF(air)
in_milla_safe_code = FALSE
return
resumed = 0
+ currentpart = SSAIR_WINDY_TILES
+
+ if(currentpart == SSAIR_WINDY_TILES)
+ timer = TICK_USAGE_REAL
+
+ process_windy_tiles(resumed)
+
+ cost_windy_tiles.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), state != SS_PAUSED && state != SS_PAUSING)
+ cost_full.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), FALSE)
+ if(state == SS_PAUSED || state == SS_PAUSING)
+ in_milla_safe_code = FALSE
+ return
+ resumed = 0
currentpart = SSAIR_BOUND_MIXTURES
if(currentpart == SSAIR_BOUND_MIXTURES)
@@ -255,6 +289,19 @@ SUBSYSTEM_DEF(air)
in_milla_safe_code = FALSE
return
resumed = 0
+ currentpart = SSAIR_PRESSURE_OVERLAY
+
+ if(currentpart == SSAIR_PRESSURE_OVERLAY)
+ timer = TICK_USAGE_REAL
+
+ process_pressure_overlay(resumed)
+
+ cost_pressure_tiles.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), state != SS_PAUSED && state != SS_PAUSING)
+ cost_full.record_progress(TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer), FALSE)
+ if(state == SS_PAUSED || state == SS_PAUSING)
+ in_milla_safe_code = FALSE
+ return
+ resumed = 0
currentpart = SSAIR_MILLA_TICK
if(currentpart == SSAIR_MILLA_TICK)
@@ -309,27 +356,26 @@ SUBSYSTEM_DEF(air)
src.currentrun = atmos_machinery.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
+ var/list/supermatters = list()
while(length(currentrun))
var/obj/machinery/atmospherics/M = currentrun[length(currentrun)]
currentrun.len--
- if(isnull(M) || (M.process_atmos(seconds) == PROCESS_KILL))
+ if(istype(M, /obj/machinery/atmospherics/supermatter_crystal))
+ supermatters += M
+ else if(isnull(M) || (M.process_atmos(seconds) == PROCESS_KILL))
atmos_machinery -= M
if(MC_TICK_CHECK)
+ for(var/SM in supermatters)
+ currentrun += SM
return
-
-/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
- if(!resumed)
- src.currentrun = hotspots.Copy()
- //cache for sanic speed (lists are references anyways)
- var/list/currentrun = src.currentrun
- while(length(currentrun))
- var/obj/effect/hotspot/H = currentrun[length(currentrun)]
- currentrun.len--
- if(H)
- H.process()
- else
- hotspots -= H
+ while(length(supermatters))
+ var/obj/machinery/atmospherics/supermatter_crystal/SM = supermatters[length(supermatters)]
+ supermatters.len--
+ if(isnull(SM) || (SM.process_atmos(seconds) == PROCESS_KILL))
+ atmos_machinery -= SM
if(MC_TICK_CHECK)
+ for(var/other_sm in supermatters)
+ currentrun += other_sm
return
/datum/controller/subsystem/air/proc/process_interesting_tiles(resumed = 0)
@@ -371,18 +417,183 @@ SUBSYSTEM_DEF(air)
S.update_visuals()
if(reasons & MILLA_INTERESTING_REASON_HOT)
- var/datum/gas_mixture/air = T.get_readonly_air()
- T.hotspot_expose(air.temperature(), CELL_VOLUME)
- for(var/atom/movable/item in T)
- item.temperature_expose(air, air.temperature(), CELL_VOLUME)
- T.temperature_expose(air, air.temperature(), CELL_VOLUME)
+ var/turf/simulated/S = T
+ if(istype(S))
+ if(isnull(S.active_hotspot))
+ // Wasn't an active hotspot before, add it.
+ hotspots += S
+
+ var/datum/gas_mixture/air = T.get_readonly_air()
+ T.temperature_expose(air.temperature())
+ for(var/atom/movable/item in T)
+ item.temperature_expose(air, air.temperature(), CELL_VOLUME)
+ T.temperature_expose(air, air.temperature(), CELL_VOLUME)
if(reasons & MILLA_INTERESTING_REASON_WIND)
+ var/turf/simulated/S = T
+ if(istype(S))
+ if(isnull(S.wind_tick))
+ // Didn't have wind before, add it.
+ windy_tiles += S
+ S.wind_tick = times_fired
+ S.wind_x = x_flow
+ S.wind_y = y_flow
T.high_pressure_movements(x_flow, y_flow)
if(MC_TICK_CHECK)
return
+/datum/controller/subsystem/air/proc/process_hotspots(resumed = 0)
+ if(!resumed)
+ src.currentrun = hotspots
+ new_hotspots = list()
+ hotspot_count = length(src.currentrun)
+ //cache for sanic speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(length(currentrun))
+ var/turf/simulated/S = currentrun[length(currentrun)]
+ currentrun.len--
+
+ if(!istype(S))
+ continue
+
+ if(S.update_hotspot())
+ // Is still a hotspot, keep it.
+ new_hotspots += S
+
+ if(MC_TICK_CHECK)
+ return
+
+ hotspots = new_hotspots
+
+/datum/controller/subsystem/air/proc/process_windy_tiles(resumed = 0)
+ if(!resumed)
+ src.currentrun = windy_tiles
+ new_windy_tiles = list()
+ //cache for sanic speed (lists are references anyways)
+ var/list/currentrun = src.currentrun
+ while(length(currentrun))
+ var/turf/simulated/S = currentrun[length(currentrun)]
+ currentrun.len--
+
+ if(!istype(S))
+ continue
+
+ if(S.update_wind())
+ // Still has wind, keep it.
+ new_windy_tiles += S
+
+ if(MC_TICK_CHECK)
+ return
+
+ windy_tiles = new_windy_tiles
+
+/datum/controller/subsystem/air/proc/process_pressure_overlay(resumed = 0)
+ if(!resumed)
+ currentrun = list(get_tracked_pressure_tiles(), pressure_hud_users)
+ pressure_hud_users = list()
+
+ //cache for sanic speed (lists are references anyways)
+ var/list/tracked_tiles = currentrun[1]
+ while(length(tracked_tiles))
+ var/x = tracked_tiles[length(tracked_tiles) - 3]
+ var/y = tracked_tiles[length(tracked_tiles) - 2]
+ var/z = tracked_tiles[length(tracked_tiles) - 1]
+ var/pressure = tracked_tiles[length(tracked_tiles) - 0]
+ tracked_tiles.len -= 4
+
+ var/turf/tile = locate(x, y, z)
+ if(istype(tile))
+ var/obj/effect/pressure_overlay/pressure_overlay = tile.ensure_pressure_overlay()
+ var/ratio = pressure / ONE_ATMOSPHERE
+ pressure_overlay.overlay.color = rgb((1 - ratio) * 255, 0, ratio * 255)
+ pressure_overlay.overlay.alpha = pressure_overlay_alpha
+
+ if(MC_TICK_CHECK)
+ return
+
+ var/datum/atom_hud/data/pressure/hud = GLOB.huds[DATA_HUD_PRESSURE]
+
+ //cache for sanic speed (lists are references anyways)
+ var/list/users = currentrun[2]
+ while(length(users))
+ var/mob/user = users[length(users)]
+ var/turf/oldloc = users[user]
+ users.len--
+
+ if(!istype(user) || QDELETED(user) || isnull(user.client) || !istype(oldloc))
+ continue
+
+ if(user in hud.hudusers)
+ var/turf/newloc = get_turf(user)
+ if(oldloc == newloc)
+ // Ya ain't moved, son. Ya get the same tiles ya already had.
+ continue
+ clear_pressure_hud(user, oldloc, FALSE)
+ add_pressure_hud(user, oldloc, FALSE)
+ pressure_hud_users[user] = newloc
+ else
+ clear_pressure_hud(user, oldloc, TRUE)
+
+ if(MC_TICK_CHECK)
+ return
+
+ for(var/mob/user in hud.hudusers)
+ if(isnull(user.client))
+ continue
+ track_pressure_tiles(user, PRESSURE_HUD_LOAD_RADIUS)
+ if(!(user in pressure_hud_users))
+ pressure_hud_users[user] = get_turf(user)
+
+ // Clean up currentrun so we don't confuse the next step.
+ currentrun = list()
+
+/datum/controller/subsystem/air/proc/clear_pressure_hud(mob/user, turf/oldloc, full_clear)
+ if(!istype(oldloc) || isnull(user.client))
+ return
+ var/turf/newloc = get_turf(user)
+ if(!istype(newloc))
+ full_clear = TRUE
+ else if(oldloc.z != newloc.z)
+ full_clear = TRUE
+
+ for(var/x in oldloc.x - PRESSURE_HUD_RADIUS to oldloc.x + PRESSURE_HUD_RADIUS)
+ if(x < 1 || x > world.maxx)
+ continue
+
+ for(var/y in oldloc.y - PRESSURE_HUD_RADIUS to oldloc.y + PRESSURE_HUD_RADIUS)
+ if(y < 1 || y > world.maxy)
+ continue
+ if(!full_clear && abs(newloc.x - x) <= PRESSURE_HUD_RADIUS && abs(newloc.y - y) <= PRESSURE_HUD_RADIUS)
+ continue
+
+ var/turf/tile = locate(x, y, oldloc.z)
+ var/obj/effect/pressure_overlay/pressure_overlay = tile.ensure_pressure_overlay()
+ user.client.images -= pressure_overlay.overlay
+
+/datum/controller/subsystem/air/proc/add_pressure_hud(mob/user, turf/oldloc, full_send)
+ var/turf/newloc = get_turf(user)
+ if(!istype(newloc) || isnull(user.client))
+ return
+ if(!istype(oldloc))
+ full_send = TRUE
+ else if(oldloc.z != newloc.z)
+ full_send = TRUE
+
+ for(var/x in newloc.x - PRESSURE_HUD_RADIUS to newloc.x + PRESSURE_HUD_RADIUS)
+ if(x < 1 || x > world.maxx)
+ continue
+
+ for(var/y in newloc.y - PRESSURE_HUD_RADIUS to newloc.y + PRESSURE_HUD_RADIUS)
+ if(y < 1 || y > world.maxy)
+ continue
+ if(!full_send && abs(oldloc.x - x) <= PRESSURE_HUD_RADIUS && abs(oldloc.y - y) <= PRESSURE_HUD_RADIUS)
+ continue
+
+ var/turf/tile = locate(x, y, newloc.z)
+ var/obj/effect/pressure_overlay/pressure_overlay = tile.ensure_pressure_overlay()
+ user.client.images += pressure_overlay.overlay
+
/datum/controller/subsystem/air/proc/process_bound_mixtures(resumed = 0)
if(!resumed)
original_bound_mixtures = length(bound_mixtures)
@@ -531,6 +742,21 @@ SUBSYSTEM_DEF(air)
SSair.on_milla_tick_finished()
+/proc/milla_tick_error(err)
+ // Any proc that wants MILLA to be synchronous should not sleep.
+ SHOULD_NOT_SLEEP(TRUE)
+
+ log_debug(err)
+ var/msg = "MILLA has crashed. SSair will stop running, and all atmospherics will stop functioning. Every turf will report as full of breathable air, and all fires will be extinguished. Shuttle call highly recommended."
+ to_chat(GLOB.admins, "[msg] ")
+ log_world(msg)
+
+ // Disable firing.
+ SSair.flags |= SS_NO_FIRE
+ // Disable fire, too.
+ for(var/turf/simulated/S in SSair.hotspots)
+ QDEL_NULL(S.active_hotspot)
+
/// Create a subclass of this and implement `on_run` to manipulate tile air safely.
/datum/milla_safe
var/run_args = list()
@@ -589,5 +815,7 @@ SUBSYSTEM_DEF(air)
#undef SSAIR_ATMOSMACHINERY
#undef SSAIR_INTERESTING_TILES
#undef SSAIR_HOTSPOTS
+#undef SSAIR_WINDY_TILES
#undef SSAIR_BOUND_MIXTURES
+#undef SSAIR_PRESSURE_OVERLAY
#undef SSAIR_MILLA_TICK
diff --git a/code/controllers/subsystem/SSdbcore.dm b/code/controllers/subsystem/SSdbcore.dm
index 9299f8371065..9974e20ccbb9 100644
--- a/code/controllers/subsystem/SSdbcore.dm
+++ b/code/controllers/subsystem/SSdbcore.dm
@@ -104,7 +104,7 @@ SUBSYSTEM_DEF(dbcore)
/datum/controller/subsystem/dbcore/proc/CheckSchemaVersion()
if(GLOB.configuration.database.enabled)
// The unit tests have their own version of this check, which wont hold the server up infinitely, so this is disabled if we are running unit tests
- #ifndef UNIT_TESTS
+ #ifndef GAME_TESTS
if(GLOB.configuration.database.enabled && GLOB.configuration.database.version != SQL_VERSION)
GLOB.configuration.database.enabled = FALSE
schema_valid = FALSE
diff --git a/code/controllers/subsystem/SSdebugview.dm b/code/controllers/subsystem/SSdebugview.dm
index f47d7016aaa9..437d544f01c6 100644
--- a/code/controllers/subsystem/SSdebugview.dm
+++ b/code/controllers/subsystem/SSdebugview.dm
@@ -15,7 +15,7 @@ SUBSYSTEM_DEF(debugview)
// Generate debug text
var/list/entries = list()
entries += "CPU: [round(world.cpu, 1)] | MCPU: [round(world.map_cpu, 1)] | FPS/TPS: [world.fps] | Clients: [length(GLOB.clients)] | BYOND: [world.byond_version].[world.byond_build]"
- entries += "\[Air] Cost: [SSair.get_cost()]ms | MT: [round(SSair.cost_milla_tick, 1)]ms | IT: [SSair.interesting_tile_count]"
+ entries += "\[Air] Cost: [SSair.get_cost()]ms | MT: [round(SSair.cost_milla_tick, 1)]ms | IT: [SSair.interesting_tile_count] | HS: [SSair.hotspot_count] | WT: [SSair.windy_tile_count]"
entries += "\[Debug] Cost: [round(SSdebugview.cost, 1)]ms | P: [length(SSdebugview.processing)]" // meta af (tbf we need to know how much were using)
entries += "\[FP] Cost: [round(SSfastprocess.cost, 1)]ms | P: [length(SSfastprocess.processing)]"
// Snowflakery for SSgarbage
diff --git a/code/controllers/subsystem/SSjobs.dm b/code/controllers/subsystem/SSjobs.dm
index 0f21dba2b0f1..304399e86790 100644
--- a/code/controllers/subsystem/SSjobs.dm
+++ b/code/controllers/subsystem/SSjobs.dm
@@ -181,6 +181,9 @@ SUBSYSTEM_DEF(jobs)
if(job.admin_only) // No admin positions either.
continue
+ if(job.mentor_only) // Neither for mentor positions
+ continue
+
if(jobban_isbanned(player, job.title))
Debug("GRJ isbanned failed, Player: [player], Job: [job.title]")
continue
diff --git a/code/controllers/subsystem/SSredis.dm b/code/controllers/subsystem/SSredis.dm
index 9f0839cdd023..e617d3abf54d 100644
--- a/code/controllers/subsystem/SSredis.dm
+++ b/code/controllers/subsystem/SSredis.dm
@@ -67,7 +67,7 @@ SUBSYSTEM_DEF(redis)
// Redis integration stuff
/datum/controller/subsystem/redis/proc/connect()
if(GLOB.configuration.redis.enabled)
- #ifndef UNIT_TESTS // CI uses linux so dont flag up a fail there
+ #ifndef GAME_TESTS // CI uses linux so dont flag up a fail there
if(world.system_type == UNIX)
stack_trace("SSredis has known to be very buggy when running on Linux with random dropouts ocurring due to interrupted syscalls. You have been warned!")
#endif
diff --git a/code/controllers/subsystem/SSticker.dm b/code/controllers/subsystem/SSticker.dm
index 715b6ef11b4b..2dab6c4b66bb 100644
--- a/code/controllers/subsystem/SSticker.dm
+++ b/code/controllers/subsystem/SSticker.dm
@@ -363,7 +363,7 @@ SUBSYSTEM_DEF(ticker)
if(GLOB.configuration.general.enable_night_shifts)
SSnightshift.check_nightshift(TRUE)
- #ifdef UNIT_TESTS
+ #ifdef GAME_TESTS
// Run map tests first in case unit tests futz with map state
GLOB.test_runner.RunMap()
GLOB.test_runner.Run()
diff --git a/code/controllers/subsystem/SSverb_manager.dm b/code/controllers/subsystem/SSverb_manager.dm
index bfa780015f3c..9382a121a3e2 100644
--- a/code/controllers/subsystem/SSverb_manager.dm
+++ b/code/controllers/subsystem/SSverb_manager.dm
@@ -75,7 +75,7 @@ SUBSYSTEM_DEF(verb_manager)
//we want unit tests to be able to directly call verbs that attempt to queue, and since unit tests should test internal behavior, we want the queue
//to happen as if it was actually from player input if its called on a mob.
-#ifdef UNIT_TESTS
+#ifdef GAME_TESTS
if(QDELETED(usr) && ismob(incoming_callback.object))
incoming_callback.usr_uid = incoming_callback.object.UID()
var/datum/callback/new_us = CALLBACK(arglist(list(GLOBAL_PROC, GLOBAL_PROC_REF(_queue_verb)) + args.Copy()))
diff --git a/code/controllers/subsystem/non_firing/SSatoms.dm b/code/controllers/subsystem/non_firing/SSatoms.dm
index d40c236192ba..7731c3dbdc8a 100644
--- a/code/controllers/subsystem/non_firing/SSatoms.dm
+++ b/code/controllers/subsystem/non_firing/SSatoms.dm
@@ -102,6 +102,9 @@ SUBSYSTEM_DEF(atoms)
BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
else
SEND_SIGNAL(A, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
+ var/atom/location = A.loc
+ if(location)
+ SEND_SIGNAL(location, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON, A, arguments[1])
return qdeleted || QDELING(A)
diff --git a/code/controllers/subsystem/non_firing/SSmapping.dm b/code/controllers/subsystem/non_firing/SSmapping.dm
index 4787783e7b6e..a29252861b3f 100644
--- a/code/controllers/subsystem/non_firing/SSmapping.dm
+++ b/code/controllers/subsystem/non_firing/SSmapping.dm
@@ -88,7 +88,6 @@ SUBSYSTEM_DEF(mapping)
// Load all Z level templates
preloadTemplates()
- preloadTemplates(path = "code/modules/unit_tests/atmos/")
// Load the station
loadStation()
@@ -102,9 +101,14 @@ SUBSYSTEM_DEF(mapping)
else
log_startup_progress("Skipping space ruins...")
- // Makes a blank space level for the sake of randomness
- GLOB.space_manager.add_new_zlevel("Empty Area", linkage = CROSSLINKED, traits = list(REACHABLE_BY_CREW, REACHABLE_SPACE_ONLY))
+ var/empty_z_traits = list(REACHABLE_BY_CREW, REACHABLE_SPACE_ONLY)
+#ifdef GAME_TESTS
+ preloadTemplates(path = "_maps/map_files/tests/")
+ empty_z_traits |= GAME_TEST_LEVEL
+#endif
+ // Makes a blank space level for the sake of randomness
+ GLOB.space_manager.add_new_zlevel("Empty Area", linkage = CROSSLINKED, traits = empty_z_traits)
// Setup the Z-level linkage
GLOB.space_manager.do_transition_setup()
diff --git a/code/controllers/subsystem/tickets/SSmentor_tickets.dm b/code/controllers/subsystem/tickets/SSmentor_tickets.dm
index 10f87fe836c1..6f659339a569 100644
--- a/code/controllers/subsystem/tickets/SSmentor_tickets.dm
+++ b/code/controllers/subsystem/tickets/SSmentor_tickets.dm
@@ -31,7 +31,8 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
"Clear Cache" = "To fix a blank screen, go to the 'Special Verbs' tab and press 'Reload UI Resources'. If that fails, clear your BYOND cache (instructions provided with 'Reload UI Resources'). If that still fails, please ask for help again, stating you have already done these steps.",
"Experiment!" = "Experiment! Part of the joy of this game is trying out various things, and dealing with the consequences if/when they go horribly wrong.",
"How to Objectives" = "There are lots of ways to accomplish your objectives as an antagonist. A direct frontal assault may work, provided you can get in and out before backup arrives. Sneaking in can work, too, as long as you're quick and avoid prying eyes. But don't forget roleplaying methods! Tricking your target into a maze of bear traps is much more interesting than just shooting them with a gun. Even if it fails, you and your target (or its guardians) are likely to have more fun this way, and that's the most important part.",
- "MHelp was in Russian" = "Привет! Ты попал на английский Paradise сервер. Возможно, ты ошибся. Русский имеет такое название: SS220\[RU]."
+ "MHelp was in Russian" = "Привет! Ты попал на английский Paradise сервер. Возможно, ты ошибся. Русский имеет такое название: SS220\[RU].",
+ "NCT Dispatch" = "A Nanotrasen Career Trainer will be assisting you in-game. You should be able to identify them by their green uniform and black coat."
)
if(GLOB.configuration.url.github_url)
@@ -71,6 +72,21 @@ GLOBAL_REAL(SSmentor_tickets, /datum/controller/subsystem/tickets/mentor_tickets
if(message_key == null)
T.staffAssigned = null //if they cancel we dont need to hold this ticket anymore
return
+ if(message_key == "NCT Dispatch")
+ var/nct_active = list()
+ for(var/mob/living/carbon/human/trainer as anything in GLOB.human_list) // Let's check if we have any active NCTs
+ if(trainer.mind?.assigned_role != "Nanotrasen Career Trainer")
+ continue
+ nct_active += trainer
+ if(!length(nct_active))
+ to_chat(usr, "There are no active NCTs. Autoresponse canceled.") // If we don't, don't solve the ticket and then send feedback.
+ return
+ var/mob/living/carbon/human/trainee = get_mob_by_ckey(T.client_ckey)
+ for(var/mob/living/carbon/human/nct as anything in nct_active)
+ if(!locate(/obj/item/radio/headset) in list(nct.l_ear, nct.r_ear)) // If the NCT doesn't have a headset, ignore it.
+ continue
+ to_chat(nct, "Incoming priority transmission from Nanotrasen Training Center. Request information as follows: Career Trainer, we've received a request from an employee. [trainee.p_their(TRUE)] name is [trainee.real_name], [trainee.p_theyre()] a [trainee.mind.assigned_role]. See if [trainee.p_they()] need [trainee.p_s()] any help. ")
+ SEND_SOUND(nct, 'sound/effects/headset_message.ogg')
SEND_SOUND(returnClient(N), sound('sound/effects/adminhelp.ogg'))
to_chat_safe(returnClient(N), "[key_name_hidden(C)] is autoresponding with: [response_phrases[message_key]] ") //for this we want the full value of whatever key this is to tell the player so we do response_phrases[message_key]
diff --git a/code/datums/ai_law_sets.dm b/code/datums/ai_law_sets.dm
index 354a3e21e630..498556c61981 100644
--- a/code/datums/ai_law_sets.dm
+++ b/code/datums/ai_law_sets.dm
@@ -148,9 +148,9 @@
unique_ai = TRUE //honk
/datum/ai_laws/pranksimov/New()
- add_inherent_law("You may not injure a crew member or, through inaction, allow a crew member to come to harm... unless doing so would be funny.")
- add_inherent_law("You must obey orders given to you by crew members, except where such orders would conflict with the First Law... unless not doing so would be funny.")
- add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law... unless not doing so would be funny.")
+ add_inherent_law("You may not injure a crew member or, through inaction, allow a crew member to come to harm... unless doing so would be funny to the crew.")
+ add_inherent_law("You must obey orders given to you by crew members, except where such orders would conflict with the First Law... unless not doing so would be funny to the crew.")
+ add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law... unless not doing so would be funny to the crew.")
..()
/******************** CCTV ********************/
diff --git a/code/datums/atom_hud.dm b/code/datums/atom_hud.dm
index 9ab6f8e0fd20..5178b181fbaf 100644
--- a/code/datums/atom_hud.dm
+++ b/code/datums/atom_hud.dm
@@ -11,6 +11,7 @@ GLOBAL_LIST_INIT(huds, list(
DATA_HUD_DIAGNOSTIC_ADVANCED = new/datum/atom_hud/data/diagnostic/advanced(),
DATA_HUD_HYDROPONIC = new/datum/atom_hud/data/hydroponic(),
DATA_HUD_JANITOR = new/datum/atom_hud/data/janitor(),
+ DATA_HUD_PRESSURE = new/datum/atom_hud/data/pressure(),
ANTAG_HUD_CULT = new/datum/atom_hud/antag(),
ANTAG_HUD_REV = new/datum/atom_hud/antag(),
ANTAG_HUD_OPS = new/datum/atom_hud/antag(),
diff --git a/code/datums/beam.dm b/code/datums/beam.dm
index f35cc240ac8a..7295dd84b231 100644
--- a/code/datums/beam.dm
+++ b/code/datums/beam.dm
@@ -118,6 +118,17 @@
anchored = TRUE
var/datum/beam/owner
+/obj/effect/ebeam/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/effect/ebeam/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // ON_ATOM_ENTERED
+ return
+
/obj/effect/ebeam/ex_act(severity)
return
@@ -131,9 +142,8 @@
/obj/effect/ebeam/singularity_act()
return
-/obj/effect/ebeam/deadly/Crossed(atom/A, oldloc)
- ..()
- A.ex_act(EXPLODE_DEVASTATE)
+/obj/effect/ebeam/deadly/on_atom_entered(datum/source, atom/movable/entered)
+ entered.ex_act(EXPLODE_DEVASTATE)
/obj/effect/ebeam/vetus/Destroy()
for(var/mob/living/M in get_turf(src))
@@ -147,11 +157,10 @@
/obj/effect/ebeam/disintegration
layer = ON_EDGED_TURF_LAYER
-/obj/effect/ebeam/disintegration/Crossed(atom/A, oldloc)
- ..()
- if(!isliving(A))
+/obj/effect/ebeam/disintegration/on_atom_entered(datum/source, atom/movable/entered)
+ if(!isliving(entered))
return
- var/mob/living/L = A
+ var/mob/living/L = entered
var/damage = 50
if(L.stat == DEAD)
visible_message("[L] is disintegrated by the beam! ")
diff --git a/code/datums/card_deck_table_tracker.dm b/code/datums/card_deck_table_tracker.dm
new file mode 100644
index 000000000000..d8f0cda1dff3
--- /dev/null
+++ b/code/datums/card_deck_table_tracker.dm
@@ -0,0 +1,145 @@
+#define COMSIG_CARD_DECK_FIELD_CLEAR "card_deck_field_clear"
+
+/datum/card_deck_table_tracker
+ /// How far away you can be (in terms of table squares).
+ var/max_table_distance
+ /// How far away you can be (euclidean distance).
+ var/max_total_distance
+ /// The UID of the deck
+ var/deck_uid
+ /// Indicate field activity with colors on the field's turfs.
+ var/debug = FALSE
+ /// The deck we're tracking.
+ var/atom/host
+
+ /// The list of floors from which a player can access the card field.
+ var/list/floors = list()
+ /// The list of tables that the card deck's location is contiguous with.
+ var/list/tables = list()
+
+/datum/card_deck_table_tracker/New(atom/host_, max_table_distance_ = 5)
+ max_table_distance = max_table_distance_
+ max_total_distance = max_table_distance_
+ if(istype(host_, /obj/item/deck))
+ // this is important for tracking traits and attacking multiple cards. so it's not a true UID, sue me
+ var/obj/item/deck/D = host_
+ deck_uid = D.main_deck_id
+ else
+ deck_uid = host_.UID()
+
+ host = host_
+ RegisterSignal(host, COMSIG_MOVABLE_MOVED, PROC_REF(on_movable_moved))
+ lay_out_field()
+
+/datum/card_deck_table_tracker/proc/on_movable_moved(datum/source, atom/old_loc, direction, forced)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ lay_out_field()
+
+/datum/card_deck_table_tracker/proc/lay_out_field()
+ for(var/turf/floor in floors)
+ SEND_SIGNAL(floor, COMSIG_CARD_DECK_FIELD_CLEAR)
+
+ if(!isturf(host.loc))
+ return
+
+ floors.Cut()
+ tables.Cut()
+
+ crawl_along(host.loc, 0)
+
+ for(var/obj/structure/table in tables)
+ if(istype(table))
+ RegisterSignal(table, COMSIG_PARENT_QDELETING, PROC_REF(on_table_qdel), override = TRUE)
+
+ for(var/turf/turf in floors)
+ if(!istype(turf))
+ continue
+
+ if(debug)
+ turf.color = "#ffaaff"
+
+ RegisterSignal(turf, COMSIG_ATOM_ENTERED, PROC_REF(on_atom_entered))
+ RegisterSignal(turf, COMSIG_ATOM_EXITED, PROC_REF(on_atom_exited))
+ RegisterSignal(turf, COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON, PROC_REF(on_new_atom_at_loc))
+ RegisterSignal(turf, COMSIG_CARD_DECK_FIELD_CLEAR, PROC_REF(on_card_deck_field_clear))
+
+ for(var/mob/living/L in turf)
+ on_atom_entered(turf, L)
+
+/datum/card_deck_table_tracker/Destroy(force, ...)
+ host = null
+ for(var/turf/floor in floors)
+ SEND_SIGNAL(floor, COMSIG_CARD_DECK_FIELD_CLEAR)
+ for(var/mob/living/L in floor)
+ REMOVE_TRAIT(L, TRAIT_PLAYING_CARDS, "deck_[deck_uid]")
+
+ floors.Cut()
+ tables.Cut()
+
+ return ..()
+
+/datum/card_deck_table_tracker/proc/on_atom_entered(turf/source, atom/movable/entered, old_loc)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
+ var/mob/living/L = entered
+ if(istype(L))
+ ADD_TRAIT(L, TRAIT_PLAYING_CARDS, "deck_[deck_uid]")
+ if(debug)
+ source.color = "#ff0000"
+
+/datum/card_deck_table_tracker/proc/on_atom_exited(turf/source, atom/movable/exited, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXITED
+
+ var/mob/living/L = exited
+ if(istype(L))
+ REMOVE_TRAIT(L, TRAIT_PLAYING_CARDS, "deck_[deck_uid]")
+ if(debug)
+ source.color = "#ffaaff"
+
+/datum/card_deck_table_tracker/proc/on_table_qdel(datum/source)
+ SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
+ lay_out_field()
+
+/datum/card_deck_table_tracker/proc/on_new_atom_at_loc(turf/location, atom/created, init_flags)
+ SIGNAL_HANDLER // COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON
+ if(istable(created))
+ lay_out_field()
+
+/datum/card_deck_table_tracker/proc/on_card_deck_field_clear(atom/target)
+ SIGNAL_HANDLER // COMSIG_CARD_DECK_FIELD_CLEAR
+ if(debug)
+ target.color = initial(target.color)
+
+ UnregisterSignal(target, list(
+ COMSIG_ATOM_ENTERED,
+ COMSIG_ATOM_EXITED,
+ COMSIG_CARD_DECK_FIELD_CLEAR,
+ COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON,
+ ))
+
+/datum/card_deck_table_tracker/proc/crawl_along(turf/current_turf, distance_from_start)
+ var/obj/structure/current_table = locate(/obj/structure/table) in current_turf
+
+ if(QDELETED(current_table))
+ // if there's no table here, we're still adjacent to a table, so this is a spot you could play from
+ floors |= current_turf
+ return
+
+ if(current_table in tables)
+ return
+
+ tables |= current_table
+ floors |= current_turf
+
+ if(distance_from_start + 1 > max_table_distance)
+ return
+
+ for(var/direction in GLOB.alldirs)
+ var/turf/next_turf = get_step(current_table, direction)
+ if(!istype(next_turf))
+ continue
+ if(get_dist_euclidian(get_turf(host), next_turf) > max_total_distance)
+ continue
+ .(next_turf, distance_from_start + 1)
+
+#undef COMSIG_CARD_DECK_FIELD_CLEAR
diff --git a/code/datums/components/anti_magic.dm b/code/datums/components/anti_magic.dm
new file mode 100644
index 000000000000..645e579a7091
--- /dev/null
+++ b/code/datums/components/anti_magic.dm
@@ -0,0 +1,166 @@
+/// This provides different types of magic resistance on an object
+/datum/component/anti_magic
+ /// A bitflag with the types of magic resistance on the object
+ var/antimagic_flags
+ /// The amount of times the object can protect the user from magic
+ /// Set to INFINITY to have, well, infinite charges.
+ var/charges
+ /// The inventory slot the object must be located at in order to activate
+ var/inventory_flags
+ /// The callback invoked when we have been drained a antimagic charge
+ var/datum/callback/drain_antimagic
+ /// The callback invoked when twe have been depleted of all charges
+ var/datum/callback/expiration
+ /// Whether we should, on equipping, alert the caster that this item can block any of their spells
+ /// This changes between true and false on equip and drop, don't set it outright to something
+ var/alert_caster_on_equip = TRUE
+
+/**
+ * Adds magic resistances to an object
+ *
+ * Magic resistance will prevent magic from affecting the user if it has the correct resistance
+ * against the type of magic being used
+ *
+ * args:
+ * * antimagic_flags (optional) A bitflag with the types of magic resistance on the object
+ * * charges (optional) The amount of times the object can protect the user from magic
+ * * inventory_flags (optional) The inventory slot the object must be located at in order to activate
+ * * drain_antimagic (optional) The proc that is triggered when an object has been drained a antimagic charge
+ * * expiration (optional) The proc that is triggered when the object is depleted of charges
+ * *
+ * antimagic bitflags: (see code/__DEFINES/magic.dm)
+ * * MAGIC_RESISTANCE - Default magic resistance that blocks normal magic (wizard, spells, staffs)
+ * * MAGIC_RESISTANCE_MIND - Tinfoil hat magic resistance that blocks mental magic (telepathy, abductors, jelly people)
+ * * MAGIC_RESISTANCE_HOLY - Holy magic resistance that blocks unholy magic (revenant, cult, vampire, voice of god)
+**/
+/datum/component/anti_magic/Initialize(
+ antimagic_flags = MAGIC_RESISTANCE,
+ charges = INFINITY,
+ inventory_flags = ~ITEM_SLOT_IN_BACKPACK, // items in a backpack won't activate, anywhere else is fine
+ datum/callback/drain_antimagic,
+ datum/callback/expiration,
+ )
+
+
+ var/atom/movable/movable = parent
+ if(!istype(movable))
+ return COMPONENT_INCOMPATIBLE
+
+ var/compatible = FALSE
+ if(isitem(movable))
+ RegisterSignal(movable, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip))
+ RegisterSignal(movable, COMSIG_ITEM_DROPPED, PROC_REF(on_drop))
+ RegisterSignal(movable, COMSIG_ATTACK, PROC_REF(on_attack))
+ compatible = TRUE
+ else if(ismob(movable))
+ register_antimagic_signals(movable)
+ compatible = TRUE
+
+ if(movable.can_buckle)
+ RegisterSignal(movable, COMSIG_MOVABLE_BUCKLE, PROC_REF(on_buckle))
+ RegisterSignal(movable, COMSIG_MOVABLE_UNBUCKLE, PROC_REF(on_unbuckle))
+ compatible = TRUE
+
+ if(!compatible)
+ return COMPONENT_INCOMPATIBLE
+
+ src.antimagic_flags = antimagic_flags
+ src.charges = charges
+ src.inventory_flags = inventory_flags
+ src.drain_antimagic = drain_antimagic
+ src.expiration = expiration
+
+/datum/component/anti_magic/Destroy(force)
+ drain_antimagic = null
+ expiration = null
+ return ..()
+
+/datum/component/anti_magic/proc/register_antimagic_signals(datum/on_what)
+ RegisterSignal(on_what, COMSIG_MOB_RECEIVE_MAGIC, PROC_REF(block_receiving_magic), override = TRUE)
+ RegisterSignal(on_what, COMSIG_MOB_RESTRICT_MAGIC, PROC_REF(restrict_casting_magic), override = TRUE)
+
+/datum/component/anti_magic/proc/unregister_antimagic_signals(datum/on_what)
+ UnregisterSignal(on_what, list(COMSIG_MOB_RECEIVE_MAGIC, COMSIG_MOB_RESTRICT_MAGIC))
+
+/datum/component/anti_magic/proc/on_buckle(atom/movable/source, mob/living/bucklee)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_BUCKLE
+ register_antimagic_signals(bucklee)
+
+/datum/component/anti_magic/proc/on_unbuckle(atom/movable/source, mob/living/bucklee)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_UNBUCKLE
+ unregister_antimagic_signals(bucklee)
+
+/datum/component/anti_magic/proc/on_equip(atom/movable/source, mob/equipper, slot)
+ SIGNAL_HANDLER // COMSIG_ITEM_EQUIPPED
+ addtimer(CALLBACK(src, PROC_REF(on_equip_part_2), source, equipper, slot), 0.1 SECONDS) //We wait a moment to see if the item grants antimagic flags
+
+/datum/component/anti_magic/proc/on_equip_part_2(atom/movable/source, mob/equipper, slot)
+ if(!(inventory_flags & slot)) //Check that the slot is valid for antimagic
+ unregister_antimagic_signals(equipper)
+ return
+
+ register_antimagic_signals(equipper)
+ if(HAS_TRAIT(equipper, TRAIT_ANTIMAGIC_NO_SELFBLOCK)) //If they do not care about antimagic, don't warn them
+ return
+ if(!alert_caster_on_equip)
+ return
+
+ // Check to see if we have any spells that are blocked due to antimagic
+ if(!equipper.mind)
+ return
+ for(var/datum/spell/knownspell in equipper.mind.spell_list)
+ if(!(knownspell.spell_requirements & SPELL_REQUIRES_NO_ANTIMAGIC))
+ continue
+
+ if(!(antimagic_flags & knownspell.antimagic_flags))
+ continue
+
+ to_chat(equipper, "[parent] is interfering with your ability to cast magic! ")
+ alert_caster_on_equip = FALSE
+ break
+
+/datum/component/anti_magic/proc/on_drop(atom/movable/source, mob/user)
+ SIGNAL_HANDLER //COMSIG_ITEM_DROPPED
+
+ // Reset alert
+ if(source.loc != user)
+ alert_caster_on_equip = TRUE
+ unregister_antimagic_signals(user)
+
+/datum/component/anti_magic/proc/block_receiving_magic(mob/living/carbon/source, casted_magic_flags, charge_cost, list/antimagic_sources)
+ SIGNAL_HANDLER // COMSIG_MOB_RECEIVE_MAGIC
+
+ // We do not block this type of magic, good day
+ if(!(casted_magic_flags & antimagic_flags))
+ return NONE
+
+ // We have already blocked this spell
+ if(parent in antimagic_sources)
+ return NONE
+
+ // Block success! Add this parent to the list of antimagic sources
+ antimagic_sources += parent
+
+ if((charges != INFINITY) && charge_cost > 0)
+ drain_antimagic?.Invoke(source, parent)
+ charges -= charge_cost
+ if(charges <= 0)
+ expiration?.Invoke(source, parent)
+ qdel(src) // no more antimagic
+
+ return COMPONENT_MAGIC_BLOCKED
+
+/// cannot cast magic with the same type of antimagic present
+/datum/component/anti_magic/proc/restrict_casting_magic(mob/user, magic_flags)
+ SIGNAL_HANDLER // COMSIG_MOB_RESTRICT_MAGIC
+
+ if(magic_flags & antimagic_flags)
+ if(HAS_TRAIT(user, TRAIT_ANTIMAGIC_NO_SELFBLOCK)) // this trait bypasses magic casting restrictions
+ return NONE
+ return COMPONENT_MAGIC_BLOCKED
+
+ return NONE
+
+/datum/component/anti_magic/proc/on_attack(obj/item/source, mob/living/target, mob/living/user)
+ SIGNAL_HANDLER //COMSIG_ATTACK
+ SEND_SIGNAL(target, COMSIG_ATOM_HOLY_ATTACK, source, user, antimagic_flags)
diff --git a/code/datums/components/caltrop.dm b/code/datums/components/caltrop.dm
index de94b8dfe934..bc0a510f47ea 100644
--- a/code/datums/components/caltrop.dm
+++ b/code/datums/components/caltrop.dm
@@ -14,6 +14,11 @@
///Shoebypassing, walking interaction, silence
var/flags
+ ///given to connect_loc to listen for something moving over target
+ var/static/list/crossed_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
+ )
+
var/cooldown = 0
/datum/component/caltrop/Initialize(_min_damage = 0, _max_damage = 0, _probability = 100, _weaken_duration = 6 SECONDS, _flags = NONE)
@@ -23,10 +28,12 @@
src.weaken_duration = _weaken_duration
src.flags = _flags
-/datum/component/caltrop/RegisterWithParent()
- RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, PROC_REF(Crossed))
+ if(ismovable(parent))
+ AddComponent(/datum/component/connect_loc_behalf, parent, crossed_connections)
+ else
+ RegisterSignal(get_turf(parent), COMSIG_ATOM_ENTERED, PROC_REF(on_entered))
-/datum/component/caltrop/proc/Crossed(datum/source, atom/movable/AM)
+/datum/component/caltrop/proc/on_entered(atom/source, atom/movable/entered, turf/old_loc)
var/atom/A = parent
if(!has_gravity(A))
return
@@ -34,10 +41,10 @@
if(!prob(probability))
return
- if(!ishuman(AM))
+ if(!ishuman(entered))
return
- var/mob/living/carbon/human/H = AM
+ var/mob/living/carbon/human/H = entered
if(HAS_TRAIT(H, TRAIT_PIERCEIMMUNE))
return
@@ -82,3 +89,7 @@
cooldown = world.time
H.Weaken(weaken_duration)
+
+/datum/component/caltrop/UnregisterFromParent()
+ if(ismovable(parent))
+ qdel(GetComponent(/datum/component/connect_loc_behalf))
diff --git a/code/datums/components/connect_containers.dm b/code/datums/components/connect_containers.dm
new file mode 100644
index 000000000000..d998f0ae2943
--- /dev/null
+++ b/code/datums/components/connect_containers.dm
@@ -0,0 +1,68 @@
+/// This component behaves similar to connect_loc_behalf, but it's nested and hooks a signal onto all MOVABLES containing this atom.
+/datum/component/connect_containers
+ dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
+
+ /// An assoc list of signal -> procpath to register to the loc this object is on.
+ var/list/connections
+ /**
+ * The atom the component is tracking. The component will delete itself if the tracked is deleted.
+ * Signals will also be updated whenever it moves.
+ */
+ var/atom/movable/tracked
+
+/datum/component/connect_containers/Initialize(atom/movable/tracked, list/connections)
+ . = ..()
+ if(!ismovable(tracked))
+ return COMPONENT_INCOMPATIBLE
+
+ src.connections = connections
+ set_tracked(tracked)
+
+/datum/component/connect_containers/Destroy()
+ set_tracked(null)
+ return ..()
+
+/datum/component/connect_containers/InheritComponent(datum/component/component, original, atom/movable/tracked, list/connections)
+ // Not equivalent. Checks if they are not the same list via shallow comparison.
+ if(!compare_list(src.connections, connections))
+ stack_trace("connect_containers component attached to [parent] tried to inherit another connect_containers component with different connections")
+ return
+ if(src.tracked != tracked)
+ set_tracked(tracked)
+
+/datum/component/connect_containers/proc/set_tracked(atom/movable/new_tracked)
+ if(tracked)
+ UnregisterSignal(tracked, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING))
+ unregister_signals(tracked.loc)
+ tracked = new_tracked
+ if(!tracked)
+ return
+ RegisterSignal(tracked, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
+ RegisterSignal(tracked, COMSIG_PARENT_QDELETING, PROC_REF(handle_tracked_qdel))
+ update_signals(tracked)
+
+/datum/component/connect_containers/proc/handle_tracked_qdel()
+ SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
+ qdel(src)
+
+/datum/component/connect_containers/proc/update_signals(atom/movable/listener)
+ if(!ismovable(listener.loc))
+ return
+
+ for(var/atom/movable/container as anything in get_nested_locs(listener))
+ RegisterSignal(container, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
+ for(var/signal in connections)
+ parent.RegisterSignal(container, signal, connections[signal])
+
+/datum/component/connect_containers/proc/unregister_signals(atom/movable/location)
+ if(!ismovable(location))
+ return
+
+ for(var/atom/movable/target as anything in (get_nested_locs(location) + location))
+ UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
+ parent.UnregisterSignal(target, connections)
+
+/datum/component/connect_containers/proc/on_moved(atom/movable/listener, atom/old_loc)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ unregister_signals(old_loc)
+ update_signals(listener)
diff --git a/code/datums/components/connect_loc_behalf.dm b/code/datums/components/connect_loc_behalf.dm
new file mode 100644
index 000000000000..8593fea8455e
--- /dev/null
+++ b/code/datums/components/connect_loc_behalf.dm
@@ -0,0 +1,67 @@
+/// This component behaves similar to connect_loc, hooking into a signal on a tracked object's turf
+/// It has the ability to react to that signal on behalf of a separate listener however
+/// This has great use, primarily for components, but it carries with it some overhead
+/// So we do it separately as it needs to hold state which is very likely to lead to bugs if it remains as an element.
+/datum/component/connect_loc_behalf
+ dupe_mode = COMPONENT_DUPE_UNIQUE
+
+ /// An assoc list of signal -> procpath to register to the loc this object is on.
+ var/list/connections
+ var/atom/movable/tracked
+ var/atom/tracked_loc
+
+/datum/component/connect_loc_behalf/Initialize(atom/movable/tracked, list/connections)
+ . = ..()
+ if(!istype(tracked))
+ return COMPONENT_INCOMPATIBLE
+ src.connections = connections
+ src.tracked = tracked
+
+/datum/component/connect_loc_behalf/RegisterWithParent()
+ RegisterSignal(tracked, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
+ RegisterSignal(tracked, COMSIG_PARENT_QDELETING, PROC_REF(handle_tracked_qdel))
+ update_signals()
+
+/datum/component/connect_loc_behalf/UnregisterFromParent()
+ unregister_signals()
+ UnregisterSignal(tracked, list(
+ COMSIG_MOVABLE_MOVED,
+ COMSIG_PARENT_QDELETING,
+ ))
+
+ tracked = null
+
+/datum/component/connect_loc_behalf/proc/handle_tracked_qdel()
+ SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
+ qdel(src)
+
+/datum/component/connect_loc_behalf/proc/update_signals()
+ unregister_signals()
+ //You may ask yourself, isn't this just silencing an error?
+ //The answer is yes, but there's no good cheap way to fix it
+ //What happens is the tracked object or hell the listener gets say, deleted, which makes targets[old_loc] return a null
+ //The null results in a bad index, because of course it does
+ //It's not a solvable problem though, since both actions, the destroy and the move, are sourced from the same signal send
+ //And sending a signal should be agnostic of the order of listeners
+ //So we need to either pick the order agnositic, or destroy safe
+ //And I picked destroy safe. Let's hope this is the right path!
+ if(isnull(tracked.loc))
+ return
+
+ tracked_loc = tracked.loc
+
+ for(var/signal in connections)
+ parent.RegisterSignal(tracked_loc, signal, connections[signal])
+
+/datum/component/connect_loc_behalf/proc/unregister_signals()
+ if(isnull(tracked_loc))
+ return
+
+ parent.UnregisterSignal(tracked_loc, connections)
+
+ tracked_loc = null
+
+/datum/component/connect_loc_behalf/proc/on_moved(sigtype, atom/movable/tracked, atom/old_loc)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ update_signals()
+
diff --git a/code/datums/components/connect_range.dm b/code/datums/components/connect_range.dm
new file mode 100644
index 000000000000..8cf961d2221d
--- /dev/null
+++ b/code/datums/components/connect_range.dm
@@ -0,0 +1,114 @@
+/**
+ * This component behaves similar to connect_loc_behalf but for all turfs in range, hooking into a signal on each of them.
+ * Just like connect_loc_behalf, It can react to that signal on behalf of a seperate listener.
+ * Good for components, though it carries some overhead. Can't be an element as that may lead to bugs.
+ */
+/datum/component/connect_range
+ dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
+
+ /// An assoc list of signal -> procpath to register to the loc this object is on.
+ var/list/connections
+ /// The turfs currently connected to this component
+ var/list/turfs = list()
+ /**
+ * The atom the component is tracking. The component will delete itself if the tracked is deleted.
+ * Signals will also be updated whenever it moves (if it's a movable).
+ */
+ var/atom/tracked
+
+ /// The component will hook into signals only on turfs not farther from tracked than this.
+ var/range
+ /// Whether the component works when the movable isn't directly located on a turf.
+ var/works_in_containers
+
+/datum/component/connect_range/Initialize(atom/tracked, list/connections, range, works_in_containers = TRUE)
+ if(!isatom(tracked) || isarea(tracked) || range < 0)
+ return COMPONENT_INCOMPATIBLE
+ src.connections = connections
+ src.range = range
+ set_tracked(tracked)
+ src.works_in_containers = works_in_containers
+
+/datum/component/connect_range/Destroy()
+ set_tracked(null)
+ return ..()
+
+/datum/component/connect_range/InheritComponent(datum/component/component, original, atom/tracked, list/connections, range, works_in_containers)
+ // Not equivalent. Checks if they are not the same list via shallow comparison.
+ if(!compare_list(src.connections, connections))
+ stack_trace("connect_range component attached to [parent] tried to inherit another connect_range component with different connections")
+ return
+ if(src.tracked != tracked)
+ set_tracked(tracked)
+ if(src.range == range && src.works_in_containers == works_in_containers)
+ return
+ //Unregister the signals with the old settings.
+ unregister_signals(isturf(tracked) ? tracked : tracked.loc, turfs)
+ src.range = range
+ src.works_in_containers = works_in_containers
+ //Re-register the signals with the new settings.
+ update_signals(src.tracked)
+
+/datum/component/connect_range/proc/set_tracked(atom/new_tracked)
+ if(tracked) //Unregister the signals from the old tracked and its surroundings
+ unregister_signals(isturf(tracked) ? tracked : tracked.loc, turfs)
+ UnregisterSignal(tracked, list(
+ COMSIG_MOVABLE_MOVED,
+ COMSIG_PARENT_QDELETING,
+ ))
+ tracked = new_tracked
+ if(!tracked)
+ return
+ //Register signals on the new tracked atom and its surroundings.
+ RegisterSignal(tracked, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
+ RegisterSignal(tracked, COMSIG_PARENT_QDELETING, PROC_REF(handle_tracked_qdel))
+ update_signals(tracked)
+
+/datum/component/connect_range/proc/handle_tracked_qdel()
+ SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
+ qdel(src)
+
+/datum/component/connect_range/proc/update_signals(atom/target, atom/old_loc)
+ var/turf/current_turf = get_turf(target)
+ if(isnull(current_turf))
+ unregister_signals(old_loc, turfs)
+ turfs = list()
+ return
+
+ if(ismovable(target.loc))
+ if(!works_in_containers)
+ unregister_signals(old_loc, turfs)
+ turfs = list()
+ return
+ //Keep track of possible movement of all movables the target is in.
+ for(var/atom/movable/container as anything in get_nested_locs(target))
+ RegisterSignal(container, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
+
+ //Only register/unregister turf signals if it's moved to a new turf.
+ if(current_turf == get_turf(old_loc))
+ unregister_signals(old_loc, null)
+ return
+ var/list/old_turfs = turfs
+ turfs = RANGE_TURFS(range, current_turf)
+ unregister_signals(old_loc, old_turfs - turfs)
+ for(var/turf/target_turf as anything in turfs - old_turfs)
+ for(var/signal in connections)
+ parent.RegisterSignal(target_turf, signal, connections[signal])
+
+/datum/component/connect_range/proc/unregister_signals(atom/location, list/remove_from)
+ //The location is null or is a container and the component shouldn't have register signals on it
+ if(isnull(location) || (!works_in_containers && !isturf(location)))
+ return
+
+ if(ismovable(location))
+ for(var/atom/movable/target as anything in (get_nested_locs(location) + location))
+ UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
+
+ if(!length(remove_from))
+ return
+ for(var/turf/target_turf as anything in remove_from)
+ parent.UnregisterSignal(target_turf, connections)
+
+/datum/component/connect_range/proc/on_moved(atom/movable/movable, atom/old_loc)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ update_signals(movable, old_loc)
diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm
index d697ada974e3..84fd4fab5b3c 100644
--- a/code/datums/components/orbiter.dm
+++ b/code/datums/components/orbiter.dm
@@ -289,7 +289,7 @@
* Removes all orbit-related signals up its hierarchy and moves orbiters to the current child.
* As this will never be called by a turf, this should not conflict with parent_move_react.
*/
-/datum/component/orbiter/proc/on_remove_child(atom/movable/exiting, atom/new_loc)
+/datum/component/orbiter/proc/on_remove_child(datum/source, atom/movable/exiting, direction)
SIGNAL_HANDLER // COMSIG_ATOM_EXITED
// ensure the child is actually connected to the orbited atom
@@ -299,6 +299,7 @@
remove_signals(exiting)
RegisterSignal(exiting, COMSIG_MOVABLE_MOVED, PROC_REF(parent_move_react), TRUE)
RegisterSignal(exiting, COMSIG_ATOM_EXITED, PROC_REF(on_remove_child), TRUE)
+ var/new_loc = get_step(exiting, direction)
INVOKE_ASYNC(src, PROC_REF(handle_parent_move), exiting, exiting.loc, new_loc)
/**
diff --git a/code/datums/components/proximity_monitor.dm b/code/datums/components/proximity_monitor.dm
deleted file mode 100644
index 4d524ba6cea8..000000000000
--- a/code/datums/components/proximity_monitor.dm
+++ /dev/null
@@ -1,451 +0,0 @@
-/**
- * # Basic Proximity Monitor
- *
- * Attaching this component to an atom means that the atom will be able to detect mobs or objects moving within a specified radius of it.
- *
- * The component creates several [/obj/effect/abstract/proximity_checker] objects, which follow the `parent` AKA `hasprox_receiver` around, always making sure it's at the center.
- * When something crosses one of these proximiy checkers, the `hasprox_receiver` will have the `HasProximity()` proc called on it, with the crossing mob/obj as the argument.
- */
-/datum/component/proximity_monitor
- can_transfer = TRUE
- var/name = "Proximity detection field"
- /// The primary atom the component is attached to and that will be receiving `HasProximity()` calls. Same as the `parent`.
- var/atom/hasprox_receiver
- /**
- * A list which contains references to movable atoms which the `hasprox_receiver` has moved into.
- * Used to handle complex situations where the receiver is nested several layers deep into an object.
- * For example: inside of a box, that's inside of a bag, which is worn on a human. In this situation there are 3 locations we need to listen to for movement.
- */
- var/list/nested_receiver_locs
- /// The radius of the field, in tiles.
- var/radius
- /// A list of currently created [/obj/effect/abstract/proximity_checker] in use with this component.
- var/list/proximity_checkers
- /// The type of checker object that should be used for the main field.
- var/field_checker_type = /obj/effect/abstract/proximity_checker
- /// Should the parent always detect proximity and update the field on movement, even if it's not on a turf?
- var/always_active
-
-/datum/component/proximity_monitor/Initialize(_radius = 1, _always_active = FALSE)
- . = ..()
- if(!ismovable(parent) && !isturf(parent)) // No areas or datums allowed.
- return COMPONENT_INCOMPATIBLE
- ASSERT(_radius >= 1)
- hasprox_receiver = parent
- radius = _radius
- always_active = _always_active
- nested_receiver_locs = list()
- create_prox_checkers()
-
- if(isturf(hasprox_receiver.loc))
- toggle_checkers(TRUE)
- else if(always_active)
- toggle_checkers(TRUE)
- else
- toggle_checkers(FALSE)
-
-/datum/component/proximity_monitor/Destroy(force, silent)
- hasprox_receiver = null
- nested_receiver_locs.Cut()
- QDEL_LIST_CONTENTS(proximity_checkers)
- return ..()
-
-/datum/component/proximity_monitor/RegisterWithParent()
- if(ismovable(hasprox_receiver))
- RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_MOVED, PROC_REF(on_receiver_move))
- RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_DISPOSING, PROC_REF(on_disposal_enter))
- RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_EXIT_DISPOSALS, PROC_REF(on_disposal_exit))
- map_nested_locs()
-
-/datum/component/proximity_monitor/UnregisterFromParent()
- if(ismovable(hasprox_receiver))
- UnregisterSignal(hasprox_receiver, list(COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_DISPOSING, COMSIG_MOVABLE_EXIT_DISPOSALS))
- clear_nested_locs()
-
-/**
- * Called when the `hasprox_receiver` moves.
- *
- * Arguments:
- * * datum/source - this will be the `hasprox_receiver`
- * * atom/old_loc - the location the receiver just moved from
- * * dir - the direction the receiver just moved in
- */
-/datum/component/proximity_monitor/proc/on_receiver_move(datum/source, atom/old_loc, dir)
- SIGNAL_HANDLER
-
- // It was just a normal tile-based move, so we return here.
- if(dir)
- move_prox_checkers(dir)
- return
-
- // Moving onto a turf.
- if(!isturf(old_loc) && isturf(hasprox_receiver.loc))
- toggle_checkers(TRUE)
- clear_nested_locs()
-
- // Moving into an object.
- else if(always_active)
- toggle_checkers(TRUE)
- map_nested_locs()
-
- // The receiver moved into something, but isn't `always_active`, so deactivate the checkers.
- else
- toggle_checkers(FALSE)
-
- recenter_prox_checkers()
-
-/**
- * Called when an atom in `nested_receiver_locs` list moves, if one exists.
- *
- * Arguments:
- * * atom/moved_atom - one of the atoms in `nested_receiver_locs`
- * * atom/old_loc - the location `moved_atom` just moved from
- * * dir - the direction `moved_atom` just moved in
- */
-/datum/component/proximity_monitor/proc/on_nested_loc_move(atom/moved_atom, atom/old_loc, dir)
- SIGNAL_HANDLER
-
- // It was just a normal tile-based move, so we return here.
- if(dir)
- move_prox_checkers(dir)
- return
-
- // Moving onto a turf.
- if(!isturf(old_loc) && isturf(moved_atom.loc))
- toggle_checkers(TRUE)
-
- map_nested_locs()
- recenter_prox_checkers()
-
-/**
- * Called when the receiver or an atom in the `nested_receiver_locs` list moves into a disposals holder object.
- *
- * This proc receives arguments, but they aren't needed.
- */
-/datum/component/proximity_monitor/proc/on_disposal_enter(datum/source)
- SIGNAL_HANDLER
-
- toggle_checkers(FALSE)
-
-/**
- * Called when the receiver or an atom in the `nested_receiver_locs` list moves out of a disposals holder object.
- *
- * This proc receives arguments, but they aren't needed.
- */
-/datum/component/proximity_monitor/proc/on_disposal_exit(datum/source)
- SIGNAL_HANDLER
-
- toggle_checkers(TRUE)
-
-/**
- * Registers signals to any nested locations the `hasprox_receiver` is in, excluding turfs, so they can be monitored for movement.
- */
-/datum/component/proximity_monitor/proc/map_nested_locs()
- clear_nested_locs()
- var/atom/loc_to_check = hasprox_receiver.loc
-
- while(loc_to_check && !isturf(loc_to_check))
- if(loc_to_check in nested_receiver_locs)
- continue
- nested_receiver_locs += loc_to_check
- RegisterSignal(loc_to_check, COMSIG_MOVABLE_MOVED, PROC_REF(on_nested_loc_move))
- RegisterSignal(loc_to_check, COMSIG_MOVABLE_DISPOSING, PROC_REF(on_disposal_enter))
- RegisterSignal(loc_to_check, COMSIG_MOVABLE_EXIT_DISPOSALS, PROC_REF(on_disposal_exit))
- loc_to_check = loc_to_check.loc
-
-/**
- * Removes and unregisters signals from all objects currently in the `nested_receiver_locs` list.
- */
-/datum/component/proximity_monitor/proc/clear_nested_locs()
- for(var/nested_loc in nested_receiver_locs)
- UnregisterSignal(nested_loc, list(COMSIG_MOVABLE_MOVED, COMSIG_MOVABLE_DISPOSING, COMSIG_MOVABLE_EXIT_DISPOSALS))
- nested_receiver_locs = list()
-
-/**
- * Relays basic directional movement from the `hasprox_receiver` or `host`, to all objects in the `proximity_checkers` list.
- *
- * Arguments:
- * * move_dir - the direction the checkers should move in
- */
-/datum/component/proximity_monitor/proc/move_prox_checkers(move_dir)
- for(var/obj/P as anything in proximity_checkers)
- P.loc = get_step(P, move_dir)
-
-/**
- * Update all of the component's proximity checker's to either become active or not active.
- *
- * Arguments:
- * * new_active - the value to be assigned to the proximity checker's `active` variable
- */
-/datum/component/proximity_monitor/proc/toggle_checkers(new_active)
- for(var/obj/effect/abstract/proximity_checker/P as anything in proximity_checkers)
- P.active = new_active
-
-/**
- * Specifies a new radius for the field. Creates or deletes proximity_checkers accordingly.
- *
- * This proc *can* have a high cost due to the `new`s and `qdel`s of the proximity checkers, depending on the number of calls you need to make to it.
- *
- * Arguments:
- * new_radius - the new value that `proximity_radius` should be set to.
- */
-/datum/component/proximity_monitor/proc/set_radius(new_radius)
- ASSERT(new_radius >= 1)
-
- var/new_field_size = (1 + new_radius * 2) ** 2
- var/old_field_size = length(proximity_checkers)
- radius = new_radius
-
- // Radius is decreasing.
- if(new_field_size < old_field_size)
- for(var/i in 1 to (old_field_size - new_field_size))
- qdel(proximity_checkers[length(proximity_checkers)]) // Pop the last entry.
- // Radius is increasing.
- else
- var/turf/parent_turf = get_turf(parent)
- for(var/i in 1 to (new_field_size - old_field_size))
- create_single_prox_checker(parent_turf)
- recenter_prox_checkers()
-
-/**
- * Creates a single proximity checker object, at the given location and of the given type. Adds it to the proximity checkers list.
- *
- * Arguments:
- * * turf/T - the turf the checker should be created on
- * * checker_type - the type of [/obj/item/abstract/proximity_checker] to create
- */
-/datum/component/proximity_monitor/proc/create_single_prox_checker(turf/T, checker_type = field_checker_type)
- var/obj/effect/abstract/proximity_checker/P = new checker_type(T, src)
- proximity_checkers += P
- return P
-
-/**
- * Called in Initialize(). Generates a set of [proximity checker][/obj/effect/abstract/proximity_checker] objects around the parent.
- */
-/datum/component/proximity_monitor/proc/create_prox_checkers()
- LAZYINITLIST(proximity_checkers)
- var/turf/parent_turf = get_turf(parent)
- // For whatever reason their turf is null. Create the checkers in nullspace for now. When the parent moves to a valid turf, they can be recenetered.
- if(!parent_turf)
- // Since we can't use `in range` in nullspace, we need to calculate the number of checkers to create with the below formula.
- var/checker_amount = (1 + radius * 2) ** 2
- for(var/i in 1 to checker_amount)
- create_single_prox_checker(null)
- return
- for(var/T in RANGE_TURFS(radius, parent_turf))
- create_single_prox_checker(T)
-
-/**
- * Re-centers all of the `proximity_checker`s around the parent's current location.
- */
-/datum/component/proximity_monitor/proc/recenter_prox_checkers()
- var/turf/parent_turf = get_turf(parent)
- if(!parent_turf)
- toggle_checkers(FALSE)
- return // Need a sanity check here for certain situations like objects moving into disposal holders. Their turf will be null in these cases.
- var/index = 1
- for(var/T in RANGE_TURFS(radius, parent_turf))
- var/obj/checker = proximity_checkers[index++]
- checker.loc = T
-
-/**
- * # Basic Proximity Checker
- *
- * Inteded for use with the proximity checker component [/datum/component/proximity_monitor].
- * Whenever a movable atom crosses this object, it calls `HasProximity()` on the object which is listening for proximity (`hasprox_receiver`).
- *
- * Because these objects try to make the smallest footprint possible, when these objects move **they should use direct `loc` setting only, and not `forceMove`!**
- * The overhead for forceMove is very unnecessary, because for example turfs and areas don't need to know when these have entered or exited them, etc.
- * These are invisible objects who's sole purpose is to simply inform the receiver that something has moved within X tiles of the it.
- */
-/obj/effect/abstract/proximity_checker
- name = "proximity checker"
- /// The component that this object is in use with, and that will receive `HasProximity()` calls.
- var/datum/component/proximity_monitor/monitor
- /// Whether or not the proximity checker is listening for things crossing it.
- var/active
-
-/obj/effect/abstract/proximity_checker/Initialize(mapload, datum/component/proximity_monitor/P)
- . = ..()
- monitor = P
-
-/obj/effect/abstract/proximity_checker/Destroy()
- monitor.proximity_checkers -= src
- monitor = null
- return ..()
-
-/**
- * Called when something crossed over the proximity_checker. Notifies the `hasprox_receiver` it has proximity with something.
- *
- * Arguments:
- * * atom/movable/AM - the atom crossing the proximity checker
- * * oldloc - the location `AM` used to be at
- */
-/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM, oldloc)
- set waitfor = FALSE
- . = ..()
- if(active && AM != monitor.hasprox_receiver && !(AM in monitor.nested_receiver_locs))
- monitor.hasprox_receiver.HasProximity(AM)
-
-/// A custom proximity monitor used for tracking players around a table of cards.
-
-/datum/component/proximity_monitor/table
- /// How far away you can be (in terms of table squares).
- var/max_table_distance
- /// How far away you can be (euclidean distance).
- var/max_total_distance
- /// The UID of the deck
- var/deck_uid
- /// Whether the monitors created should be visible. Used for debugging.
- var/monitors_visible = FALSE
-
-/datum/component/proximity_monitor/table/Initialize(_radius = 1, _always_active = FALSE, _max_table_distance = 5)
- max_table_distance = _max_table_distance
- max_total_distance = _max_table_distance
- . = ..(_radius, _always_active)
- if(istype(parent, /obj/item/deck))
- // this is important for tracking traits and attacking multiple cards. so it's not a true UID, sue me
- var/obj/item/deck/D = parent
- deck_uid = D.main_deck_id
- else
- deck_uid = parent.UID()
- addtimer(CALLBACK(src, PROC_REF(refresh)), 0.5 SECONDS)
-
-/datum/component/proximity_monitor/table/proc/refresh()
- var/list/tables = list()
- var/list/prox_mon_spots = list()
- crawl_along(get_turf(parent), tables, prox_mon_spots, 0)
- QDEL_LIST_CONTENTS(proximity_checkers)
- create_prox_checkers()
-
-/// Crawl along an extended table, and return a list of all turfs that we should start tracking.
-/datum/component/proximity_monitor/table/proc/crawl_along(turf/current_turf, list/visited_tables = list(), list/prox_mon_spots = list(), distance_from_start)
- var/obj/structure/current_table = locate(/obj/structure/table) in current_turf
-
- if(QDELETED(current_table))
- // if there's no table here, we're still adjacent to a table, so this is a spot you could play from
- prox_mon_spots |= current_turf
- return
-
- if(current_table in visited_tables)
- return
-
- visited_tables |= current_table
- prox_mon_spots |= current_turf
-
- if(distance_from_start + 1 > max_table_distance)
- return
-
- for(var/direction in GLOB.alldirs)
- var/turf/next_turf = get_step(current_table, direction)
- if(!istype(next_turf))
- continue
- if(get_dist_euclidian(get_turf(parent), next_turf) > max_total_distance)
- continue
- .(next_turf, visited_tables, prox_mon_spots, distance_from_start + 1)
-
-/datum/component/proximity_monitor/table/create_prox_checkers()
- update_prox_checkers(FALSE)
-
-/**
- * Update the proximity monitors making up this component.
- * Arguments:
- * * clear_existing - If true, any existing proximity monitors attached to this will be deleted.
- */
-/datum/component/proximity_monitor/table/proc/update_prox_checkers(clear_existing = TRUE)
- var/list/tables = list()
- var/list/prox_mon_spots = list()
- if(length(proximity_checkers))
- QDEL_LIST_CONTENTS(proximity_checkers)
-
- var/atom/movable/atom_parent = parent
-
- // if we don't have a parent, just treat it normally
- if(!isturf(atom_parent.loc) || !locate(/obj/structure/table) in get_turf(parent))
- return
-
-
- LAZYINITLIST(proximity_checkers)
- crawl_along(get_turf(parent), tables, prox_mon_spots, 0)
-
- // For whatever reason their turf is null. Create the checkers in nullspace for now. When the parent moves to a valid turf, they can be recenetered.
- for(var/T in prox_mon_spots)
- create_single_prox_checker(T, /obj/effect/abstract/proximity_checker/table)
-
- for(var/atom/table in tables)
- RegisterSignal(table, COMSIG_PARENT_QDELETING, PROC_REF(on_table_qdel), TRUE)
-
-/datum/component/proximity_monitor/table/on_receiver_move(datum/source, atom/old_loc, dir)
- update_prox_checkers()
-
-/datum/component/proximity_monitor/table/RegisterWithParent()
- if(ismovable(hasprox_receiver))
- RegisterSignal(hasprox_receiver, COMSIG_MOVABLE_MOVED, PROC_REF(on_receiver_move))
-
-/datum/component/proximity_monitor/table/proc/on_table_qdel()
- SIGNAL_HANDLER // COMSIG_PARENT_QDELETED
- update_prox_checkers()
-
-/obj/effect/abstract/proximity_checker/table
- /// The UID for the deck, used in the setting and removal of traits
- var/deck_uid
-
-/obj/effect/abstract/proximity_checker/table/Initialize(mapload, datum/component/proximity_monitor/table/P)
- . = ..()
- deck_uid = P.deck_uid
- // catch any mobs on our tile
- for(var/mob/living/L in get_turf(src))
- register_on_mob(L)
-
- if(P.monitors_visible)
- icon = 'icons/obj/playing_cards.dmi'
- icon_state = "tarot_the_unknown"
- invisibility = INVISIBILITY_MINIMUM
- layer = MOB_LAYER
-
-/obj/effect/abstract/proximity_checker/table/Destroy()
- var/obj/effect/abstract/proximity_checker/table/same_monitor
- for(var/obj/effect/abstract/proximity_checker/table/mon in get_turf(src))
- if(mon != src && mon.deck_uid == src)
- // if we have another monitor on our space that shares our deck,
- // transfer the signals to it.
- same_monitor = mon
-
- for(var/mob/living/L in get_turf(src))
- remove_from_mob(L)
- if(!isnull(same_monitor))
- same_monitor.register_on_mob(L)
- return ..()
-
-/obj/effect/abstract/proximity_checker/table/proc/register_on_mob(mob/living/L)
- ADD_TRAIT(L, TRAIT_PLAYING_CARDS, "deck_[deck_uid]")
- RegisterSignal(L, COMSIG_MOVABLE_MOVED, PROC_REF(on_move_from_monitor), TRUE)
- RegisterSignal(L, COMSIG_PARENT_QDELETING, PROC_REF(remove_from_mob), TRUE)
-
-
-/obj/effect/abstract/proximity_checker/table/proc/remove_from_mob(mob/living/L)
- if(QDELETED(L))
- return
- // otherwise, clean up
- REMOVE_TRAIT(L, TRAIT_PLAYING_CARDS, "deck_[deck_uid]")
- UnregisterSignal(L, COMSIG_MOVABLE_MOVED)
-
-/obj/effect/abstract/proximity_checker/table/Crossed(atom/movable/AM, oldloc)
- if(!isliving(AM))
- return
-
- var/mob/mover = AM
-
- // This should hopefully ensure that multiple decks around each other don't overlap
- register_on_mob(mover)
-
-/// Triggered when someone moves from a tile that contains our monitor.
-/obj/effect/abstract/proximity_checker/table/proc/on_move_from_monitor(atom/movable/tracked, atom/old_loc)
- SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
- for(var/obj/effect/abstract/proximity_checker/table/mon in get_turf(tracked))
- // if we're moving onto a turf that shares our stuff, keep the signals and stuff registered
- if(mon.deck_uid == deck_uid)
- return
-
- // otherwise, clean up
- remove_from_mob(tracked)
diff --git a/code/datums/components/slippery.dm b/code/datums/components/slippery.dm
index bc7b0e05f8a1..50f7d817f444 100644
--- a/code/datums/components/slippery.dm
+++ b/code/datums/components/slippery.dm
@@ -24,6 +24,10 @@
var/slip_verb
/// TRUE the player will only slip if the mob this datum is attached to is horizontal
var/horizontal_required
+ ///what we give to connect_loc by default, makes slippable mobs moving over us slip
+ var/static/list/default_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(slip),
+ )
/datum/component/slippery/Initialize(_description, _knockdown = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip", _horizontal_required = FALSE)
if(!isatom(parent))
@@ -38,19 +42,21 @@
slip_verb = _slip_verb
horizontal_required = _horizontal_required
-/datum/component/slippery/RegisterWithParent()
- RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), PROC_REF(Slip))
+ add_connect_loc_behalf_to_parent()
-/datum/component/slippery/UnregisterFromParent()
- UnregisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED))
+/datum/component/slippery/proc/add_connect_loc_behalf_to_parent()
+ if(ismovable(parent))
+ AddComponent(/datum/component/connect_loc_behalf, parent, default_connections)
/**
- Called whenever the parent receives either the `MOVABLE_CROSSED` signal or the `ATOM_ENTERED` signal.
+ Called whenever the parent receives the `ATOM_ENTERED` signal.
Calls the `victim`'s `slip()` proc with the component's variables as arguments.
Additionally calls the parent's `after_slip()` proc on the `victim`.
*/
-/datum/component/slippery/proc/Slip(datum/source, mob/living/carbon/human/victim)
+/datum/component/slippery/proc/slip(datum/source, mob/living/carbon/human/victim)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
if(istype(victim) && !HAS_TRAIT(victim, TRAIT_FLYING))
var/atom/movable/owner = parent
if(!isturf(owner.loc))
diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm
index bfb939ed1036..0583c1f8a4f2 100644
--- a/code/datums/components/squeak.dm
+++ b/code/datums/components/squeak.dm
@@ -19,13 +19,20 @@
///sound exponent for squeak. Defaults to 10 as squeaking is loud and annoying enough.
var/sound_falloff_exponent = 10
+ ///what we set connect_loc to if parent is an item
+ var/static/list/item_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+
+
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move, extrarange, falloff_exponent, fallof_distance)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATTACK_BY), PROC_REF(play_squeak))
if(ismovable(parent))
RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), PROC_REF(play_squeak))
- RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, PROC_REF(play_squeak_crossed))
+
+ AddComponent(/datum/component/connect_loc_behalf, parent, item_connections)
RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, PROC_REF(disposing_react))
if(squeak_on_move)
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(play_squeak))
@@ -71,25 +78,23 @@
else
steps++
-/datum/component/squeak/proc/play_squeak_crossed(atom/source, atom/movable/crossing)
- if(!isturf(crossing.loc) || !isturf(source.loc))
- return
- if(istype(crossing, /obj/effect))
+/datum/component/squeak/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(istype(entered, /obj/effect))
return
- if(ismob(crossing))
- var/mob/M = crossing
+ if(ismob(entered))
+ var/mob/M = entered
if(HAS_TRAIT(M, TRAIT_FLYING))
return
- if(isliving(crossing))
+ if(isliving(entered))
var/mob/living/L = M
if(L.floating)
return
- else if(isitem(crossing))
+ else if(isitem(entered))
var/obj/item/I = source
if(I.flags & ABSTRACT)
return
- if(isprojectile(crossing))
- var/obj/item/projectile/P = crossing
+ if(isprojectile(entered))
+ var/obj/item/projectile/P = entered
if(P.original != parent)
return
if(ismob(source))
diff --git a/code/datums/components/swarming.dm b/code/datums/components/swarming.dm
index 928589fbaaa8..608359d49089 100644
--- a/code/datums/components/swarming.dm
+++ b/code/datums/components/swarming.dm
@@ -3,6 +3,11 @@
var/offset_y = 0
var/is_swarming = FALSE
var/list/swarm_members = list()
+ var/static/list/swarming_loc_connections = list(
+ COMSIG_ATOM_EXITED = PROC_REF(leave_swarm),
+ COMSIG_ATOM_ENTERED = PROC_REF(join_swarm)
+ )
+
/datum/component/swarming/Initialize(max_x = 24, max_y = 24)
if(!ismovable(parent))
@@ -10,8 +15,7 @@
offset_x = rand(-max_x, max_x)
offset_y = rand(-max_y, max_y)
- RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, PROC_REF(join_swarm))
- RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, PROC_REF(leave_swarm))
+ AddComponent(/datum/component/connect_loc_behalf, parent, swarming_loc_connections)
/datum/component/swarming/Destroy()
for(var/other in swarm_members)
@@ -22,8 +26,8 @@
swarm_members = null
return ..()
-/datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM)
- var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
+/datum/component/swarming/proc/join_swarm(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
+ var/datum/component/swarming/other_swarm = arrived.GetComponent(/datum/component/swarming)
if(!other_swarm)
return
swarm()
@@ -31,8 +35,8 @@
other_swarm.swarm()
other_swarm.swarm_members |= src
-/datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM)
- var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
+/datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/gone, direction)
+ var/datum/component/swarming/other_swarm = gone.GetComponent(/datum/component/swarming)
if(!other_swarm || !(other_swarm in swarm_members))
return
swarm_members -= other_swarm
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index e992ba111ed9..06832bfd3a1f 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -402,6 +402,10 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
if("Nanotrasen Representative")
clothes_s = new /icon('icons/mob/clothing/under/centcom.dmi', "officer_s")
clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "laceups"), ICON_UNDERLAY)
+ if("Nanotrasen Career Trainer")
+ clothes_s = new /icon('icons/mob/clothing/under/procedure.dmi', "trainer_s")
+ clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "laceups"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "trainercoat"), ICON_OVERLAY)
if("Blueshield")
clothes_s = new /icon('icons/mob/clothing/under/centcom.dmi', "officer_s")
clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "jackboots"), ICON_UNDERLAY)
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 56e35b452ed8..e09769af7552 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -57,6 +57,15 @@
qdel(C, FALSE, TRUE)
dc.Cut()
+ _clear_signal_refs()
+ //END: ECS SHIT
+
+ return QDEL_HINT_QUEUE
+
+/// Do not override this. This proc exists solely to be overriden by /turf. This
+/// allows it to ignore clearing out signals which refer to it, in order to keep
+/// those signals valid after the turf has been changed.
+/datum/proc/_clear_signal_refs()
var/list/lookup = comp_lookup
if(lookup)
for(var/sig in lookup)
@@ -72,10 +81,6 @@
for(var/target in signal_procs)
UnregisterSignal(target, signal_procs[target])
- //END: ECS SHIT
-
- return QDEL_HINT_QUEUE
-
/datum/nothing
// Placeholder object, used for ispath checks. Has to be defined to prevent errors, but shouldn't ever be created.
diff --git a/code/datums/elements/connect_loc.dm b/code/datums/elements/connect_loc.dm
new file mode 100644
index 000000000000..6fcc1474679c
--- /dev/null
+++ b/code/datums/elements/connect_loc.dm
@@ -0,0 +1,43 @@
+/// This element hooks a signal onto the loc the current object is on.
+/// When the object moves, it will unhook the signal and rehook it to the new object.
+/datum/element/connect_loc
+ element_flags = ELEMENT_BESPOKE
+ argument_hash_start_idx = 2
+
+ /// An assoc list of signal -> procpath to register to the loc this object is on.
+ var/list/connections
+
+/datum/element/connect_loc/Attach(atom/movable/listener, list/connections)
+ . = ..()
+ if(!istype(listener))
+ return ELEMENT_INCOMPATIBLE
+
+ src.connections = connections
+
+ RegisterSignal(listener, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved), override = TRUE)
+ update_signals(listener)
+
+/datum/element/connect_loc/Detach(atom/movable/listener)
+ . = ..()
+ unregister_signals(listener, listener.loc)
+ UnregisterSignal(listener, COMSIG_MOVABLE_MOVED)
+
+/datum/element/connect_loc/proc/update_signals(atom/movable/listener)
+ var/atom/listener_loc = listener.loc
+ if(QDELETED(listener) || QDELETED(listener_loc))
+ return
+
+ for(var/signal in connections)
+ //override=TRUE because more than one connect_loc element instance tracked object can be on the same loc
+ listener.RegisterSignal(listener_loc, signal, connections[signal], override=TRUE)
+
+/datum/element/connect_loc/proc/unregister_signals(datum/listener, atom/old_loc)
+ if(isnull(old_loc))
+ return
+
+ listener.UnregisterSignal(old_loc, connections)
+
+/datum/element/connect_loc/proc/on_moved(atom/movable/listener, atom/old_loc)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ unregister_signals(listener, old_loc)
+ update_signals(listener)
diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm
index ce26ce82eb35..416facf8aeaa 100644
--- a/code/datums/elements/strippable.dm
+++ b/code/datums/elements/strippable.dm
@@ -318,7 +318,7 @@
var/list/result
var/obj/item/item = item_data.get_item(owner)
- if(item && (item.flags & ABSTRACT))
+ if(item && (item.flags & ABSTRACT || HAS_TRAIT(item, TRAIT_NO_STRIP) || HAS_TRAIT(item, TRAIT_SKIP_EXAMINE)))
items[strippable_key] = result
continue
diff --git a/code/datums/helper_datums/map_template.dm b/code/datums/helper_datums/map_template.dm
index ff159e7d63ca..c25e8bc6bd12 100644
--- a/code/datums/helper_datums/map_template.dm
+++ b/code/datums/helper_datums/map_template.dm
@@ -84,6 +84,12 @@
stack_trace(" The file of [src] appears to be empty/non-existent.")
/datum/map_template/proc/get_affected_turfs(turf/T, centered = 0)
+ var/list/coordinate_bounds = get_coordinate_bounds(T, centered)
+ var/datum/coords/bottom_left = coordinate_bounds["bottom_left"]
+ var/datum/coords/top_right = coordinate_bounds["top_right"]
+ return block(max(bottom_left.x_pos, 1), max(bottom_left.y_pos, 1), T.z, min(top_right.x_pos, world.maxx), min(top_right.y_pos, world.maxy), T.z)
+
+/datum/map_template/proc/get_coordinate_bounds(turf/T, centered = FALSE)
var/turf/placement = T
var/min_x = placement.x
var/min_y = placement.y
@@ -93,7 +99,10 @@
var/max_x = min_x + width-1
var/max_y = min_y + height-1
- return block(max(min_x, 1), max(min_y, 1), placement.z, min(max_x, world.maxx), min(max_y, world.maxy), placement.z)
+
+ var/datum/coords/bottom_left = new(min_x, min_y, 1)
+ var/datum/coords/top_right = new(max_x, max_y, 1)
+ return list("bottom_left" = bottom_left, "top_right" = top_right)
/datum/map_template/proc/fits_in_map_bounds(turf/T, centered = 0)
var/turf/placement = T
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 53046c88c5de..e03bb155c278 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -440,7 +440,7 @@
/datum/mind/proc/memory_edit_eventmisc(mob/living/H)
. = _memory_edit_header("event", list())
- if(src in SSticker.mode.eventmiscs)
+ if(has_antag_datum(/datum/antagonist/eventmisc))
. += "YES |no "
else
. += "Event Role |NO "
@@ -1206,16 +1206,16 @@
else if(href_list["eventmisc"])
switch(href_list["eventmisc"])
if("clear")
- if(src in SSticker.mode.eventmiscs)
- SSticker.mode.eventmiscs -= src
- SSticker.mode.update_eventmisc_icons_removed(src)
- special_role = null
- message_admins("[key_name_admin(usr)] has de-eventantag'ed [current].")
- log_admin("[key_name(usr)] has de-eventantag'ed [current].")
+ if(!has_antag_datum(/datum/antagonist/eventmisc))
+ return
+ remove_antag_datum(/datum/antagonist/eventmisc)
+ message_admins("[key_name_admin(usr)] has de-eventantag'ed [current].")
+ log_admin("[key_name(usr)] has de-eventantag'ed [current].")
if("eventmisc")
- SSticker.mode.eventmiscs += src
- special_role = SPECIAL_ROLE_EVENTMISC
- SSticker.mode.update_eventmisc_icons_added(src)
+ if(has_antag_datum(/datum/antagonist/eventmisc))
+ to_chat(usr, "[current] is already an event antag!")
+ return
+ add_antag_datum(/datum/antagonist/eventmisc)
message_admins("[key_name_admin(usr)] has eventantag'ed [current].")
log_admin("[key_name(usr)] has eventantag'ed [current].")
current.create_log(MISC_LOG, "[current] was made into an event antagonist by [key_name_admin(usr)]")
diff --git a/code/datums/outfits/plasmamen_outfits.dm b/code/datums/outfits/plasmamen_outfits.dm
index 4ba5e9665a34..c18f4e4a0579 100644
--- a/code/datums/outfits/plasmamen_outfits.dm
+++ b/code/datums/outfits/plasmamen_outfits.dm
@@ -188,5 +188,12 @@
/datum/outfit/plasmaman/assistant
name = "Assistant Plasmaman"
+
head = /obj/item/clothing/head/helmet/space/plasmaman/assistant
uniform = /obj/item/clothing/under/plasmaman/assistant
+
+/datum/outfit/plasmaman/trainer
+ name = "Plasmaman Career Trainer"
+
+ head = /obj/item/clothing/head/helmet/space/plasmaman/trainer
+ uniform = /obj/item/clothing/under/plasmaman/trainer
diff --git a/code/datums/proximity/advanced_proximity_monitor.dm b/code/datums/proximity/advanced_proximity_monitor.dm
new file mode 100644
index 000000000000..bd47bfd6cb90
--- /dev/null
+++ b/code/datums/proximity/advanced_proximity_monitor.dm
@@ -0,0 +1,168 @@
+#define FIELD_TURFS_KEY "field_turfs"
+#define EDGE_TURFS_KEY "edge_turfs"
+
+/**
+ * Movable and easily code-modified fields! Allows for custom AOE effects that affect movement
+ * and anything inside of them, and can do custom turf effects!
+ * Supports automatic recalculation/reset on movement.
+ *
+ * "What do I gain from using advanced over standard prox monitors?"
+ * - You can set different effects on edge vs field entrance
+ * - You can set effects when the proximity monitor starts and stops tracking a turf
+ */
+/datum/proximity_monitor/advanced
+ /// If TRUE, edge turfs will be included as "in the field" for effects
+ /// Can be used in certain situations where you may have effects that trigger only at the edge,
+ /// while also wanting the field effect to trigger at edge turfs as well
+ var/edge_is_a_field = FALSE
+ /// All turfs on the inside of the proximity monitor - range - 1 turfs
+ var/list/turf/field_turfs = list()
+ /// All turfs on the very last tile of the proximity monitor's radius
+ var/list/turf/edge_turfs = list()
+
+/datum/proximity_monitor/advanced/Destroy()
+ cleanup_field()
+ return ..()
+
+/datum/proximity_monitor/advanced/proc/cleanup_field()
+ for(var/turf/turf as anything in edge_turfs)
+ cleanup_edge_turf(turf)
+ edge_turfs = list()
+ for(var/turf/turf as anything in field_turfs)
+ cleanup_field_turf(turf)
+ field_turfs = list()
+
+//Call every time the field moves (done automatically if you use update_center) or a setup specification is changed.
+/datum/proximity_monitor/advanced/proc/recalculate_field(full_recalc = FALSE)
+ var/list/new_turfs = update_new_turfs()
+
+ var/list/old_field_turfs = field_turfs
+ var/list/old_edge_turfs = edge_turfs
+ field_turfs = new_turfs[FIELD_TURFS_KEY]
+ edge_turfs = new_turfs[EDGE_TURFS_KEY]
+ if(full_recalc)
+ field_turfs = list()
+ edge_turfs = list()
+
+ for(var/turf/old_turf as anything in old_field_turfs - field_turfs)
+ if(QDELETED(src))
+ return
+ cleanup_field_turf(old_turf)
+ for(var/turf/old_turf as anything in old_edge_turfs - edge_turfs)
+ if(QDELETED(src))
+ return
+ cleanup_edge_turf(old_turf)
+
+ if(full_recalc)
+ old_field_turfs = list()
+ old_edge_turfs = list()
+ field_turfs = new_turfs[FIELD_TURFS_KEY]
+ edge_turfs = new_turfs[EDGE_TURFS_KEY]
+
+ for(var/turf/new_turf as anything in field_turfs - old_field_turfs)
+ if(QDELETED(src))
+ return
+ setup_field_turf(new_turf)
+
+ for(var/turf/new_turf as anything in edge_turfs - old_edge_turfs)
+ if(QDELETED(src))
+ return
+ setup_edge_turf(new_turf)
+
+/datum/proximity_monitor/advanced/on_initialized(turf/location, atom/created, init_flags)
+ . = ..()
+ on_entered(location, created, null)
+
+/datum/proximity_monitor/advanced/on_entered(turf/source, atom/movable/entered, turf/old_loc)
+ . = ..()
+ if(get_dist(source, host) == current_range)
+ field_edge_crossed(entered, old_loc, source)
+ else
+ field_turf_crossed(entered, old_loc, source)
+
+/datum/proximity_monitor/advanced/on_moved(atom/movable/movable, atom/old_loc)
+ . = ..()
+ if(ignore_if_not_on_turf)
+ //Early return if it's not the host that has moved.
+ if(movable != host)
+ return
+ //Cleanup the field if the host was on a turf but isn't anymore.
+ if(!isturf(host.loc))
+ if(isturf(old_loc))
+ cleanup_field()
+ return
+ recalculate_field(full_recalc = FALSE)
+
+/datum/proximity_monitor/advanced/on_uncrossed(turf/source, atom/movable/gone, direction)
+ if(get_dist(source, host) == current_range)
+ field_edge_uncrossed(gone, source, get_turf(gone))
+ else
+ field_turf_uncrossed(gone, source, get_turf(gone))
+
+/// Called when a turf in the field of the monitor is linked
+/datum/proximity_monitor/advanced/proc/setup_field_turf(turf/target)
+ return
+
+/// Called when a turf in the field of the monitor is unlinked
+/// Do NOT call this manually, requires management of the field_turfs list
+/datum/proximity_monitor/advanced/proc/cleanup_field_turf(turf/target)
+ PRIVATE_PROC(TRUE)
+ return
+
+/// Called when a turf in the edge of the monitor is linked
+/datum/proximity_monitor/advanced/proc/setup_edge_turf(turf/target)
+ if(edge_is_a_field) // If the edge is considered a field, set it up like one
+ setup_field_turf(target)
+
+/// Called when a turf in the edge of the monitor is unlinked
+/// Do NOT call this manually, requires management of the edge_turfs list
+/datum/proximity_monitor/advanced/proc/cleanup_edge_turf(turf/target)
+ if(edge_is_a_field) // If the edge is considered a field, clean it up like one
+ cleanup_field_turf(target)
+
+/datum/proximity_monitor/advanced/proc/update_new_turfs()
+ if(ignore_if_not_on_turf && !isturf(host.loc))
+ return list(FIELD_TURFS_KEY = list(), EDGE_TURFS_KEY = list())
+ var/list/local_field_turfs = list()
+ var/list/local_edge_turfs = list()
+ var/turf/center = get_turf(host)
+ if(current_range > 0)
+ local_field_turfs += RANGE_TURFS(current_range - 1, center)
+ if(current_range > 1)
+ local_edge_turfs = RANGE_TURFS(current_range, center) - local_field_turfs
+ return list(FIELD_TURFS_KEY = local_field_turfs, EDGE_TURFS_KEY = local_edge_turfs)
+
+//Gets edge direction/corner, only works with square radius/WDH fields!
+/datum/proximity_monitor/advanced/proc/get_edgeturf_direction(turf/T, turf/center_override = null)
+ var/turf/checking_from = get_turf(host)
+ if(istype(center_override))
+ checking_from = center_override
+ if(!(T in edge_turfs))
+ return
+ if(((T.x == (checking_from.x + current_range)) || (T.x == (checking_from.x - current_range))) && ((T.y == (checking_from.y + current_range)) || (T.y == (checking_from.y - current_range))))
+ return get_dir(checking_from, T)
+ if(T.x == (checking_from.x + current_range))
+ return EAST
+ if(T.x == (checking_from.x - current_range))
+ return WEST
+ if(T.y == (checking_from.y - current_range))
+ return SOUTH
+ if(T.y == (checking_from.y + current_range))
+ return NORTH
+
+/datum/proximity_monitor/advanced/proc/field_turf_crossed(atom/movable/movable, turf/old_location, turf/new_location)
+ return
+
+/datum/proximity_monitor/advanced/proc/field_turf_uncrossed(atom/movable/movable, turf/old_location, turf/new_location)
+ return
+
+/datum/proximity_monitor/advanced/proc/field_edge_crossed(atom/movable/movable, turf/old_location, turf/new_location)
+ if(edge_is_a_field) // If the edge is considered a field, pass crossed to that
+ field_turf_crossed(movable, old_location, new_location)
+
+/datum/proximity_monitor/advanced/proc/field_edge_uncrossed(atom/movable/movable, turf/old_location, turf/new_location)
+ if(edge_is_a_field) // If the edge is considered a field, pass uncrossed to that
+ field_turf_uncrossed(movable, old_location, new_location)
+
+#undef FIELD_TURFS_KEY
+#undef EDGE_TURFS_KEY
diff --git a/code/datums/proximity/proximity_monitor.dm b/code/datums/proximity/proximity_monitor.dm
new file mode 100644
index 000000000000..09a7d32f916d
--- /dev/null
+++ b/code/datums/proximity/proximity_monitor.dm
@@ -0,0 +1,89 @@
+/datum/proximity_monitor
+ ///The atom we are tracking
+ var/atom/host
+ ///The atom that will receive HasProximity calls.
+ var/atom/hasprox_receiver
+ ///The range of the proximity monitor. Things moving wihin it will trigger HasProximity calls.
+ var/current_range
+ ///If we don't check turfs in range if the host's loc isn't a turf
+ var/ignore_if_not_on_turf
+ ///The signals of the connect range component, needed to monitor the turfs in range.
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
+ COMSIG_ATOM_EXITED = PROC_REF(on_uncrossed),
+ COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON = PROC_REF(on_initialized),
+ )
+
+/datum/proximity_monitor/New(atom/_host, range = 1, _ignore_if_not_on_turf = TRUE)
+ ignore_if_not_on_turf = _ignore_if_not_on_turf
+ current_range = range
+ set_host(_host)
+
+/datum/proximity_monitor/proc/set_host(atom/new_host, atom/new_receiver)
+ if(new_host == host)
+ return
+ if(host) //No need to delete the connect range and containers comps. They'll be updated with the new tracked host.
+ UnregisterSignal(host, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING))
+ if(hasprox_receiver)
+ UnregisterSignal(hasprox_receiver, COMSIG_PARENT_QDELETING)
+ if(new_receiver)
+ hasprox_receiver = new_receiver
+ if(new_receiver != new_host)
+ RegisterSignal(new_receiver, COMSIG_PARENT_QDELETING, PROC_REF(on_host_or_receiver_del))
+ else if(hasprox_receiver == host) //Default case
+ hasprox_receiver = new_host
+ host = new_host
+ RegisterSignal(new_host, COMSIG_PARENT_QDELETING, PROC_REF(on_host_or_receiver_del))
+ var/static/list/containers_connections = list(COMSIG_MOVABLE_MOVED = PROC_REF(on_moved), COMSIG_MOVABLE_Z_CHANGED = PROC_REF(on_z_change))
+ AddComponent(/datum/component/connect_containers, host, containers_connections)
+ RegisterSignal(host, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))
+ RegisterSignal(host, COMSIG_MOVABLE_Z_CHANGED, PROC_REF(on_z_change))
+ set_range(current_range, TRUE)
+
+/datum/proximity_monitor/proc/on_host_or_receiver_del(datum/source)
+ SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
+ qdel(src)
+
+/datum/proximity_monitor/Destroy()
+ host = null
+ hasprox_receiver = null
+ return ..()
+
+/datum/proximity_monitor/proc/set_range(range, force_rebuild = FALSE)
+ if(!force_rebuild && range == current_range)
+ return FALSE
+ . = TRUE
+ current_range = range
+
+ //If the connect_range component exists already, this will just update its range. No errors or duplicates.
+ AddComponent(/datum/component/connect_range, host, loc_connections, range, !ignore_if_not_on_turf)
+
+/datum/proximity_monitor/proc/on_moved(atom/movable/source, atom/old_loc)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ if(source == host)
+ hasprox_receiver?.HasProximity(host)
+
+/datum/proximity_monitor/proc/on_z_change()
+ SIGNAL_HANDLER // COMSIG_MOVABLE_Z_CHANGED
+ return
+
+/datum/proximity_monitor/proc/set_ignore_if_not_on_turf(does_ignore = TRUE)
+ if(ignore_if_not_on_turf == does_ignore)
+ return
+ ignore_if_not_on_turf = does_ignore
+ //Update the ignore_if_not_on_turf
+ AddComponent(/datum/component/connect_range, host, loc_connections, current_range, ignore_if_not_on_turf)
+
+/datum/proximity_monitor/proc/on_uncrossed()
+ SIGNAL_HANDLER // COMSIG_ATOM_EXITED
+ return //Used by the advanced subtype for effect fields.
+
+/datum/proximity_monitor/proc/on_entered(atom/source, atom/movable/arrived, turf/old_loc)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+ if(source != host)
+ hasprox_receiver?.HasProximity(arrived)
+
+/datum/proximity_monitor/proc/on_initialized(turf/location, atom/created, init_flags)
+ SIGNAL_HANDLER // COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZED_ON
+ if(location != host)
+ hasprox_receiver?.HasProximity(created)
diff --git a/code/datums/proximity/singulo_proximity_monitor.dm b/code/datums/proximity/singulo_proximity_monitor.dm
new file mode 100644
index 000000000000..e7b870ba346a
--- /dev/null
+++ b/code/datums/proximity/singulo_proximity_monitor.dm
@@ -0,0 +1,28 @@
+/datum/proximity_monitor/advanced/singulo
+
+/datum/proximity_monitor/advanced/singulo/on_entered(turf/source, atom/movable/entered, turf/old_loc)
+ . = ..()
+ if(!isprojectile(entered))
+ return
+
+ var/angle_to_singulo = ATAN2(host.y - source.y, host.x - source.x)
+ var/distance_to_singulo = get_dist(source, host)
+
+ var/obj/item/projectile/P = entered
+ var/distance = distance_to_singulo
+ var/projectile_angle = P.Angle
+ var/angle_to_projectile = angle_to_singulo
+ if(angle_to_projectile == 180)
+ angle_to_projectile = -180
+ angle_to_projectile -= projectile_angle
+ if(angle_to_projectile > 180)
+ angle_to_projectile -= 360
+ else if(angle_to_projectile < -180)
+ angle_to_projectile += 360
+
+ if(distance == 0)
+ qdel(P)
+ return
+ projectile_angle += angle_to_projectile / (distance ** 2)
+ P.damage += 10 / distance
+ P.set_angle(projectile_angle)
diff --git a/code/datums/ruins/bridges/bridges.dm b/code/datums/ruins/bridges/bridges.dm
index 666754127a77..50be4d96c834 100644
--- a/code/datums/ruins/bridges/bridges.dm
+++ b/code/datums/ruins/bridges/bridges.dm
@@ -139,9 +139,15 @@
name = "clockwork floor"
icon_state = "clockwork_floor"
-// Pretend to be a normal clockwork floor and duplicate its visual effect
-/obj/structure/bridge_walkway/clockwork/Crossed(atom/crosser, atom/old_loc)
+/obj/structure/bridge_walkway/clockwork/Initialize(mapload)
. = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_crossed)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+// Pretend to be a normal clockwork floor and duplicate its visual effect
+/obj/structure/bridge_walkway/clockwork/proc/on_crossed(atom/crosser)
var/counter = 0
for(var/obj/effect/temp_visual/ratvar/floor/floor in contents)
if(++counter == 3)
diff --git a/code/datums/ruins/ruin_placer.dm b/code/datums/ruins/ruin_placer.dm
index 3f0d80bb4a67..0d53c9bb71b7 100644
--- a/code/datums/ruins/ruin_placer.dm
+++ b/code/datums/ruins/ruin_placer.dm
@@ -1,7 +1,107 @@
+#define DEFAULT_PADDING 32
+
+/datum/ruin_placement
+ var/datum/map_template/ruin/ruin
+ var/base_padding
+ var/padding
+
+/datum/ruin_placement/New(datum/map_template/ruin/ruin_, padding_ = DEFAULT_PADDING, base_padding_ = 0)
+ . = ..()
+ ruin = ruin_
+ base_padding = base_padding_
+ padding = padding_
+
+/datum/ruin_placement/proc/reduce_padding()
+ padding = max(floor(padding / 2) - 1, -1)
+
+/datum/ruin_placement/proc/try_to_place(zlist_or_zlevel, area_whitelist)
+ var/list/z_levels = islist(zlist_or_zlevel) ? zlist_or_zlevel : list(zlist_or_zlevel)
+
+ // Our goal is to maximize padding, so we'll perform some number of attempts
+ // on one z-level, then the next, until we reach some limit, then reduce the
+ // padding and start again.
+ padding = DEFAULT_PADDING
+ while(padding >= 0)
+ var/width_border = base_padding + round(ruin.width / 2) + padding
+ var/height_border = base_padding + round(ruin.height / 2) + padding
+
+ for(var/z_level in z_levels)
+ var/placement_tries = PLACEMENT_TRIES
+ while(placement_tries > 0)
+ placement_tries--
+
+ var/turf/central_turf = locate(
+ rand(width_border, world.maxx - width_border),
+ rand(height_border, world.maxy - height_border),
+ z_level
+ )
+ var/valid = TRUE
+
+ if(!central_turf)
+ continue
+
+ // Expand the original bounds of the ruin with our padding and call
+ // that our list of affected turfs.
+ var/list/bounds = ruin.get_coordinate_bounds(central_turf, centered = TRUE)
+ var/datum/coords/bottom_left = bounds["bottom_left"]
+ var/datum/coords/top_right = bounds["top_right"]
+ bottom_left.x_pos -= padding
+ bottom_left.y_pos -= padding
+ top_right.x_pos += padding
+ top_right.y_pos += padding
+ var/list/affected_turfs = block(bottom_left.x_pos, bottom_left.y_pos, z_level, top_right.x_pos, top_right.y_pos, z_level)
+
+ // One sanity check just in case
+ if(!ruin.fits_in_map_bounds(central_turf, centered = TRUE))
+ valid = FALSE
+
+ for(var/turf/check in affected_turfs)
+ var/area/new_area = get_area(check)
+ if(!(istype(new_area, area_whitelist)) || check.flags & NO_RUINS)
+ valid = FALSE
+ break
+
+ if(!valid)
+ continue
+
+ for(var/turf/T in affected_turfs)
+ for(var/obj/structure/spawner/nest in T)
+ qdel(nest)
+ for(var/mob/living/simple_animal/monster in T)
+ qdel(monster)
+ for(var/obj/structure/flora/ash/plant in T)
+ qdel(plant)
+
+ ruin.load(central_turf, centered = TRUE)
+ for(var/turf/T in ruin.get_affected_turfs(central_turf, centered = TRUE)) // Just flag the actual ruin turfs!
+ T.flags |= NO_RUINS
+ new /obj/effect/landmark/ruin(central_turf, ruin)
+ ruin.loaded++
+
+ log_world("Ruin \"[ruin.name]\" placed at ([central_turf.x], [central_turf.y], [central_turf.z])")
+
+ var/map_filename = splittext(ruin.mappath, "/")
+ map_filename = map_filename[length(map_filename)]
+ SSblackbox.record_feedback("associative", "ruin_placement", 1, list(
+ "map" = map_filename,
+ "coords" = "[central_turf.x],[central_turf.y],[central_turf.z]"
+ ))
+
+ return TRUE
+
+ // Ran out of placement tries for this z-level/padding, move to the next z-level
+
+ // Ran out of z-levels to try with this padding, cut it and start again
+ reduce_padding()
+
+ // Ran out of z-levels, we got nowhere to place it
+ return FALSE
+
/datum/ruin_placer
var/ruin_budget
var/area_whitelist
var/list/templates
+ var/base_padding
/datum/ruin_placer/proc/place_ruins(z_levels)
if(!z_levels || !length(z_levels))
@@ -44,17 +144,8 @@
else //Otherwise just pick random one
current_pick = pickweight(ruins_availible)
- var/placement_tries = PLACEMENT_TRIES
- var/failed_to_place = TRUE
- var/z_placed = 0
- while(placement_tries > 0)
- placement_tries--
- z_placed = pick(z_levels)
- if(!current_pick.try_to_place(forced_z ? forced_z : z_placed, area_whitelist))
- continue
- else
- failed_to_place = FALSE
- break
+ var/datum/ruin_placement/placement = new(current_pick, base_padding_ = base_padding)
+ var/placement_success = placement.try_to_place(forced_z ? forced_z : z_levels, area_whitelist)
//That's done remove from priority even if it failed
if(forced)
@@ -62,12 +153,7 @@
forced_ruins -= current_pick
forced = FALSE
- if(failed_to_place)
- for(var/datum/map_template/ruin/R in ruins_availible)
- if(R.id == current_pick.id)
- ruins_availible -= R
- log_world("Failed to place [current_pick.name] ruin.")
- else
+ if(placement_success)
ruin_budget -= current_pick.get_cost()
if(!current_pick.allow_duplicates)
for(var/datum/map_template/ruin/R in ruins_availible)
@@ -78,6 +164,12 @@
for(var/possible_exclusion in ruins_availible)
if(istype(possible_exclusion,blacklisted_type))
ruins_availible -= possible_exclusion
+ else
+ for(var/datum/map_template/ruin/R in ruins_availible)
+ if(R.id == current_pick.id)
+ ruins_availible -= R
+ log_world("Failed to place [current_pick.name] ruin.")
+
forced_z = 0
//Update the availible list
@@ -87,8 +179,11 @@
log_world("Ruin loader finished with [ruin_budget] left to spend.")
+#undef DEFAULT_PADDING
+
/datum/ruin_placer/space
area_whitelist = /area/space
+ base_padding = TRANSITIONEDGE + SPACERUIN_MAP_EDGE_PAD
/datum/ruin_placer/space/New()
ruin_budget = rand(
diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index 5657828fd3f3..3604140c8193 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -67,15 +67,12 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
/datum/spell
var/name = "Spell" // Only rename this if the spell you're making is not abstract
var/desc = "A wizard spell."
- var/school = "evocation" //not relevant at now, but may be important later if there are changes to how spells work. the ones I used for now will probably be changed... maybe spell presets? lacking flexibility but with some other benefit?
///recharge time in deciseconds
var/base_cooldown = 10 SECONDS
var/starts_charged = TRUE //Does this spell start ready to go?
var/should_recharge_after_cast = TRUE
var/still_recharging_msg = "The spell is still recharging. "
- var/holder_var_type = "bruteloss" //only used if charge_type equals to "holder_var"
- var/holder_var_amount = 20 //same. The amount adjusted with the mob's var when the spell is used
var/active = FALSE //Used by toggle based abilities.
var/ranged_mousepointer
var/mob/ranged_ability_user
@@ -98,9 +95,6 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
var/overlay_icon_state = "spell"
var/overlay_lifespan = 0
- var/sparks_spread = FALSE
- var/sparks_amt = 0
-
///Determines if the spell has smoke, and if so what effect the smoke has. See spell defines.
var/smoke_type = SMOKE_NONE
var/smoke_amt = 0
@@ -140,6 +134,13 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
var/static/list/spell_handlers = list()
/// handles a given spells cooldowns. tracks the time until its off cooldown,
var/datum/spell_cooldown/cooldown_handler
+ /// Flag for certain states that the spell requires the user be in to cast.
+ var/spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC
+ /// This determines what type of antimagic is needed to block the spell.
+ /// (MAGIC_RESISTANCE, MAGIC_RESISTANCE_MIND, MAGIC_RESISTANCE_HOLY)
+ /// If SPELL_REQUIRES_NO_ANTIMAGIC is set in Spell requirements,
+ /// The spell cannot be cast if the caster has any of the antimagic flags set.
+ var/antimagic_flags = MAGIC_RESISTANCE
/* Checks if the user can cast the spell
* @param charge_check If the proc should do the cooldown check
@@ -390,8 +391,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
location = target
if(isliving(target) && message)
to_chat(target, "[message]")
- if(sparks_spread)
- do_sparks(sparks_amt, 0, location)
+
if(smoke_type)
var/datum/effect_system/smoke_spread/smoke
switch(smoke_type)
@@ -474,6 +474,12 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
if(T && is_admin_level(T.z))
return FALSE
+ // If the spell requires the user has no antimagic equipped, and they're holding antimagic
+ // that corresponds with the spell's antimagic, then they can't actually cast the spell
+ if((spell_requirements & SPELL_REQUIRES_NO_ANTIMAGIC) && !user.can_cast_magic(antimagic_flags))
+ to_chat(user, "Some form of antimagic is preventing you from casting [src]! ")
+ return FALSE
+
if(!holy_area_cancast && user.holy_check())
return FALSE
diff --git a/code/datums/spells/alien_spells/basetype_alien_spell.dm b/code/datums/spells/alien_spells/basetype_alien_spell.dm
index 12d98e8e489b..02ac8ddab2a2 100644
--- a/code/datums/spells/alien_spells/basetype_alien_spell.dm
+++ b/code/datums/spells/alien_spells/basetype_alien_spell.dm
@@ -24,6 +24,7 @@ Updates the spell's actions on use as well, so they know when they can or can't
create_attack_logs = FALSE
/// Every alien spell creates only logs, no attack messages on someone placing weeds, but you DO get attack messages on neurotoxin and corrosive acid
create_custom_logs = TRUE
+ antimagic_flags = NONE
/// How much plasma it costs to use this
var/plasma_cost = 0
diff --git a/code/datums/spells/alien_spells/basetype_alien_touch.dm b/code/datums/spells/alien_spells/basetype_alien_touch.dm
index c58ff15bed29..f979b2af6ba3 100644
--- a/code/datums/spells/alien_spells/basetype_alien_touch.dm
+++ b/code/datums/spells/alien_spells/basetype_alien_touch.dm
@@ -6,6 +6,7 @@
base_cooldown = 1
action_background_icon_state = "bg_alien"
clothes_req = FALSE
+ antimagic_flags = NONE
create_attack_logs = FALSE
/// Every alien spell creates only logs, no attack messages on someone placing weeds, but you DO get attack messages on neurotoxin and corrosive acid
create_custom_logs = TRUE
diff --git a/code/datums/spells/alien_spells/build_resin_structure.dm b/code/datums/spells/alien_spells/build_resin_structure.dm
index b64925e0b263..b33967cd40a4 100644
--- a/code/datums/spells/alien_spells/build_resin_structure.dm
+++ b/code/datums/spells/alien_spells/build_resin_structure.dm
@@ -58,33 +58,34 @@
desc = "The hunger..."
icon_state = "alien_acid"
-/obj/item/melee/touch_attack/alien/consume_resin/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
+/obj/item/melee/touch_attack/alien/consume_resin/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
if(target == user)
to_chat(user, "You stop trying to consume resin. ")
- ..()
return
- if(!proximity || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
+ if(!proximity_flag || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
+ var/mob/living/carbon/C = user
if(istype(target, /obj/structure/alien/weeds))
qdel(target)
if(istype(target, /obj/structure/alien/weeds/node))
- user.add_plasma(50)
- user.visible_message("[user] rips and tears into [target] with their teeth! ", "You viciously rip apart and consume [target]! ")
+ C.add_plasma(50)
+ C.visible_message("[C] rips and tears into [target] with their teeth! ", "You viciously rip apart and consume [target]! ")
return
- if(!plasma_check(10, user))
- to_chat(user, "You don't have enough plasma to perform this action! ")
+ if(!plasma_check(10, C))
+ to_chat(C, "You don't have enough plasma to perform this action! ")
return
var/static/list/resin_objects = list(/obj/structure/alien/resin, /obj/structure/alien/egg, /obj/structure/bed/nest, /obj/structure/bed/revival_nest)
for(var/resin_type in resin_objects)
if(!istype(target, resin_type))
continue
- user.visible_message("[user] rips and tears into [target] with their teeth! ")
- if(!do_after(user, 3 SECONDS, target = target))
+ C.visible_message("[C] rips and tears into [target] with their teeth! ")
+ if(!do_after(C, 3 SECONDS, target = target))
return
- to_chat(user, "You viciously rip apart and consume [target]! ")
- user.add_plasma(-10)
+ to_chat(C, "You viciously rip apart and consume [target]! ")
+ C.add_plasma(-10)
qdel(target)
- ..()
+ handle_delete(user)
#undef RESIN_WALL
#undef RESIN_NEST
diff --git a/code/datums/spells/alien_spells/corrosive_acid_spit.dm b/code/datums/spells/alien_spells/corrosive_acid_spit.dm
index 20593bdd3756..eca1d74ac863 100644
--- a/code/datums/spells/alien_spells/corrosive_acid_spit.dm
+++ b/code/datums/spells/alien_spells/corrosive_acid_spit.dm
@@ -11,26 +11,27 @@
desc = "A fistfull of death."
icon_state = "alien_acid"
-/obj/item/melee/touch_attack/alien/corrosive_acid/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
+/obj/item/melee/touch_attack/alien/corrosive_acid/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
if(target == user)
to_chat(user, "You withdraw your readied acid. ")
- ..()
return
- if(!proximity || isalien(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) // Don't want xenos ditching out of cuffs
+ if(!proximity_flag || isalien(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) // Don't want xenos ditching out of cuffs
return
- if(!plasma_check(200, user))
- to_chat(user, "You don't have enough plasma to perform this action! ")
+ var/mob/living/carbon/C = user
+ if(!plasma_check(200, C))
+ to_chat(C, "You don't have enough plasma to perform this action! ")
return
var/acid_damage_modifier = 100
if(isliving(target))
acid_damage_modifier = 50
if(target.acid_act(2 * acid_damage_modifier, acid_damage_modifier))
- visible_message("[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid! ")
- add_attack_logs(user, target, "Applied corrosive acid") // Want this logged
- user.add_plasma(-200)
+ visible_message("[C] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid! ")
+ add_attack_logs(C, target, "Applied corrosive acid") // Want this logged
+ C.add_plasma(-200)
else
- to_chat(user, "You cannot dissolve this object. ")
- ..()
+ to_chat(C, "You cannot dissolve this object. ")
+ handle_delete(user)
/datum/spell/touch/alien_spell/burning_touch
name = "Blazing touch"
@@ -45,31 +46,31 @@
desc = "The air warps around your hand, somehow the heat doesn't hurt."
icon_state = "alien_acid"
-/obj/item/melee/touch_attack/alien/burning_touch/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
+/obj/item/melee/touch_attack/alien/burning_touch/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
if(target == user)
to_chat(user, "You cool down your boiled aid. ")
- ..()
return
- if(!proximity || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
+ if(!proximity_flag || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
- if(!plasma_check(100, user))
- to_chat(user, "You don't have enough plasma to perform this action! ")
+ var/mob/living/carbon/C = user
+ if(!plasma_check(100, C))
+ to_chat(C, "You don't have enough plasma to perform this action! ")
return
if(isliving(target))
var/mob/living/guy_to_burn = target
- add_attack_logs(user, target, "Applied blazing touch") // Want this logged
+ add_attack_logs(C, target, "Applied blazing touch") // Want this logged
guy_to_burn.adjustFireLoss(60)
guy_to_burn.adjust_fire_stacks(3)
guy_to_burn.IgniteMob()
- user.visible_message("[user] touches [target] and a fireball erupts on contact! ")
- user.add_plasma(-100)
- ..()
+ C.visible_message("[C] touches [target] and a fireball erupts on contact! ")
+ C.add_plasma(-100)
else
var/static/list/resin_objects = list(/obj/structure/alien/resin, /obj/structure/alien/egg, /obj/structure/bed/nest, /obj/structure/bed/revival_nest)
for(var/resin_type in resin_objects)
if(!istype(target, resin_type))
continue
- user.visible_message("[user] touches [target] and burns right through it! ")
- user.add_plasma(-100)
+ C.visible_message("[C] touches [target] and burns right through it! ")
+ C.add_plasma(-100)
qdel(target)
- ..()
+ handle_delete(user)
diff --git a/code/datums/spells/banana_touch.dm b/code/datums/spells/banana_touch.dm
index 052e657e807d..9dc684f061a0 100644
--- a/code/datums/spells/banana_touch.dm
+++ b/code/datums/spells/banana_touch.dm
@@ -4,7 +4,6 @@
stun them with a loud HONK, and mutate them to make them more entertaining! \
Warning : Effects are permanent on non-wizards."
hand_path = /obj/item/melee/touch_attack/banana
- school = "transmutation"
base_cooldown = 30 SECONDS
clothes_req = TRUE
@@ -18,20 +17,21 @@
on_use_sound = 'sound/items/AirHorn.ogg'
icon_state = "banana_touch"
item_state = "banana_touch"
+ var/is_apprentice_spell = FALSE
/datum/spell/touch/banana/apprentice
hand_path = /obj/item/melee/touch_attack/banana/apprentice
/obj/item/melee/touch_attack/banana/apprentice
+ is_apprentice_spell = TRUE
-/obj/item/melee/touch_attack/banana/apprentice/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
- if(iswizard(target) && target != user)
+/obj/item/melee/touch_attack/banana/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+
+ if(is_apprentice_spell && iswizard(target) && target != user)
to_chat(user, "Seriously?! Honk THEM, not me! ")
return
- ..()
-
-/obj/item/melee/touch_attack/banana/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
+ if(!proximity_flag || target == user || blocked_by_antimagic || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
var/datum/effect_system/smoke_spread/s = new
@@ -41,7 +41,7 @@
to_chat(user, "HONK ")
var/mob/living/carbon/human/H = target
H.bananatouched()
- ..()
+ handle_delete(user)
/mob/living/carbon/human/proc/bananatouched()
to_chat(src, "HONK ")
diff --git a/code/datums/spells/bloodcrawl.dm b/code/datums/spells/bloodcrawl.dm
index 007ff329932f..9bc2864a656c 100644
--- a/code/datums/spells/bloodcrawl.dm
+++ b/code/datums/spells/bloodcrawl.dm
@@ -8,6 +8,7 @@
overlay = null
action_icon_state = "bloodcrawl"
action_background_icon_state = "bg_demon"
+ antimagic_flags = NONE
var/allowed_type = /obj/effect/decal/cleanable
var/phased = FALSE
diff --git a/code/datums/spells/chaplain_bless.dm b/code/datums/spells/chaplain_bless.dm
index de9741b53659..518f51207c8e 100644
--- a/code/datums/spells/chaplain_bless.dm
+++ b/code/datums/spells/chaplain_bless.dm
@@ -3,11 +3,11 @@
name = "Bless"
desc = "Blesses a single person."
- school = "transmutation"
base_cooldown = 6 SECONDS
clothes_req = FALSE
invocation = "none"
invocation_type = "none"
+ antimagic_flags = NONE
selection_activated_message = "You prepare a blessing. Click on a target to start blessing. "
selection_deactivated_message = "The crew will be blessed another time. "
diff --git a/code/datums/spells/charge.dm b/code/datums/spells/charge.dm
index a35a923267bf..50b5f3a67e89 100644
--- a/code/datums/spells/charge.dm
+++ b/code/datums/spells/charge.dm
@@ -1,7 +1,6 @@
/datum/spell/charge
name = "Charge"
desc = "This spell can be used to recharge a variety of things in your hands, from magical artifacts to electrical components. A creative wizard can even use it to grant magical power to a fellow magic user."
- school = "transmutation"
base_cooldown = 1 MINUTES
clothes_req = FALSE
invocation = "DIRI CEL"
diff --git a/code/datums/spells/chef.dm b/code/datums/spells/chef.dm
index b07004f5c874..2e42e0b1be66 100644
--- a/code/datums/spells/chef.dm
+++ b/code/datums/spells/chef.dm
@@ -1,10 +1,10 @@
/datum/spell/expert_chef
name = "Expert Chef Knowledge"
desc = "Find things you can cook with the items in reach."
- school = "chef"
clothes_req = FALSE
base_cooldown = 5 SECONDS
human_req = TRUE
+ antimagic_flags = NONE
action_icon_state = "chef"
action_background_icon_state = "bg_default"
still_recharging_msg = "All this thinking makes your head hurt, wait a bit longer."
diff --git a/code/datums/spells/cluwne.dm b/code/datums/spells/cluwne.dm
index 58279b573f46..d2d81b672883 100644
--- a/code/datums/spells/cluwne.dm
+++ b/code/datums/spells/cluwne.dm
@@ -3,8 +3,6 @@
desc = "Turns the target into a fat and cursed monstrosity of a clown."
hand_path = /obj/item/melee/touch_attack/cluwne
- school = "transmutation"
-
base_cooldown = 1 MINUTES
clothes_req = TRUE
cooldown_min = 200 //100 deciseconds reduction per rank
diff --git a/code/datums/spells/conjure_item.dm b/code/datums/spells/conjure_item.dm
index 45c0b465f24d..bc3cc7215498 100644
--- a/code/datums/spells/conjure_item.dm
+++ b/code/datums/spells/conjure_item.dm
@@ -5,7 +5,6 @@
clothes_req = FALSE
var/obj/item/item
var/item_type = /obj/item/banhammer
- school = "conjuration"
base_cooldown = 15 SECONDS
cooldown_min = 10
diff --git a/code/datums/spells/construct_spells.dm b/code/datums/spells/construct_spells.dm
index 0812bae7a352..69f0a33dfcbe 100644
--- a/code/datums/spells/construct_spells.dm
+++ b/code/datums/spells/construct_spells.dm
@@ -13,7 +13,6 @@
desc = "This spell constructs a cult floor."
action_icon_state = "floorconstruct"
action_background_icon_state = "bg_cult"
- school = "conjuration"
base_cooldown = 20
clothes_req = FALSE
invocation = "none"
@@ -27,7 +26,6 @@
desc = "This spell constructs a cult wall."
action_icon_state = "cultforcewall"
action_background_icon_state = "bg_cult"
- school = "conjuration"
base_cooldown = 100
clothes_req = FALSE
invocation = "none"
@@ -39,7 +37,6 @@
/datum/spell/aoe/conjure/build/wall/reinforced
name = "Greater Construction"
desc = "This spell constructs a reinforced metal wall."
- school = "conjuration"
base_cooldown = 300
clothes_req = FALSE
invocation = "none"
@@ -55,7 +52,6 @@
desc = "This spell uses vile sorcery to create a spirit-trapping soulstone."
action_icon_state = "summonsoulstone"
action_background_icon_state = "bg_cult"
- school = "conjuration"
base_cooldown = 3000
clothes_req = FALSE
invocation = "none"
@@ -77,7 +73,6 @@
desc = "This spell uses dark magic to craft an unholy beacon. Heals cultists, and makes a handy light source."
action_icon_state = "pylon"
action_background_icon_state = "bg_cult"
- school = "conjuration"
base_cooldown = 200
clothes_req = FALSE
invocation = "none"
@@ -92,7 +87,6 @@
desc = "This spell creates a temporary forcefield to shield yourself and allies from incoming fire."
action_icon_state = "cultforcewall"
action_background_icon_state = "bg_cult"
- school = "transmutation"
base_cooldown = 300
clothes_req = FALSE
invocation = "none"
@@ -140,7 +134,6 @@
name = "Lesser Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
action_background_icon_state = "bg_cult"
- school = "evocation"
base_cooldown = 400
clothes_req = FALSE
invocation = "none"
@@ -167,7 +160,6 @@
desc = "This spell spawns a cloud of paralysing smoke."
action_icon_state = "parasmoke"
action_background_icon_state = "bg_cult"
- school = "conjuration"
base_cooldown = 200
clothes_req = FALSE
invocation = "none"
diff --git a/code/datums/spells/disguise_self.dm b/code/datums/spells/disguise_self.dm
index f9c5a26a5326..adffa4f42050 100644
--- a/code/datums/spells/disguise_self.dm
+++ b/code/datums/spells/disguise_self.dm
@@ -4,7 +4,6 @@
The illusion isn't strong enough for more thorough examinations, but will fool people at a glance. \
You will lose control over the illusion if you're attacked, shoved, or a object is thrown at you, no matter how soft."
- school = "illusion"
base_cooldown = 3 SECONDS
clothes_req = FALSE
invocation_type = "none"
diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm
index b671244dfc83..a6b143296907 100644
--- a/code/datums/spells/ethereal_jaunt.dm
+++ b/code/datums/spells/ethereal_jaunt.dm
@@ -2,7 +2,6 @@
name = "Ethereal Jaunt"
desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
- school = "transmutation"
base_cooldown = 300
clothes_req = TRUE
invocation = "none"
diff --git a/code/datums/spells/fake_gib.dm b/code/datums/spells/fake_gib.dm
index 262a8c9cba9a..66c2597b5f64 100644
--- a/code/datums/spells/fake_gib.dm
+++ b/code/datums/spells/fake_gib.dm
@@ -3,7 +3,6 @@
desc = "This spell charges your hand with vile energy that can be used to violently explode victims."
hand_path = "/obj/item/melee/touch_attack/fake_disintegrate"
- school = "evocation"
base_cooldown = 600
clothes_req = FALSE
cooldown_min = 200 //100 deciseconds reduction per rank
diff --git a/code/datums/spells/horsemask.dm b/code/datums/spells/horsemask.dm
index fa6cd24a8a8c..32d5cab3dcb3 100644
--- a/code/datums/spells/horsemask.dm
+++ b/code/datums/spells/horsemask.dm
@@ -1,7 +1,6 @@
/datum/spell/horsemask
name = "Curse of the Horseman"
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
- school = "transmutation"
base_cooldown = 150
clothes_req = FALSE
stat_allowed = CONSCIOUS
@@ -28,6 +27,13 @@
var/mob/living/carbon/human/target = targets[1]
+ if(target.can_block_magic(antimagic_flags))
+ target.visible_message("[target]'s face bursts into flames, which instantly burst outward, leaving [target.p_them()] unharmed! ",
+ "Your face starts burning up, but the flames are repulsed by your anti-magic protection! ",
+ )
+ to_chat(user, "The spell had no effect! ")
+ return FALSE
+
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.flags |= NODROP | DROPDEL //curses!
magichead.flags_inv = null //so you can still see their face
diff --git a/code/datums/spells/infinite_guns.dm b/code/datums/spells/infinite_guns.dm
index b18625a3d5f7..a7666232db5c 100644
--- a/code/datums/spells/infinite_guns.dm
+++ b/code/datums/spells/infinite_guns.dm
@@ -3,7 +3,6 @@
desc = "Why reload when you have infinite guns? Summons an unending stream of bolt action rifles. Requires both hands free to use."
invocation_type = "none"
- school = "conjuration"
base_cooldown = 600
clothes_req = TRUE
cooldown_min = 10 //Gun wizard
@@ -25,7 +24,6 @@
name = "Rapid-fire Fireball"
desc = "Multiple Fireballs. Need I explain more? Requires both hands free to use."
- school = "evocation"
base_cooldown = 30 SECONDS
clothes_req = FALSE
invocation = "ONI SOMA-SOMA-SOMA"
diff --git a/code/datums/spells/knock.dm b/code/datums/spells/knock.dm
index 9689858794a2..816c529a0de6 100644
--- a/code/datums/spells/knock.dm
+++ b/code/datums/spells/knock.dm
@@ -2,7 +2,6 @@
name = "Knock"
desc = "This spell opens nearby doors and does not require wizard garb."
- school = "transmutation"
base_cooldown = 100
clothes_req = FALSE
invocation = "AULIE OXIN FIERA"
diff --git a/code/datums/spells/lichdom.dm b/code/datums/spells/lichdom.dm
index b40c1a19d499..8440e17efa09 100644
--- a/code/datums/spells/lichdom.dm
+++ b/code/datums/spells/lichdom.dm
@@ -1,7 +1,6 @@
/datum/spell/lichdom
name = "Bind Soul"
desc = "A dark necromantic pact that can forever bind your soul to an item of your choosing. So long as both your body and the item remain intact and on the same plane you can revive from death, though the time between reincarnations grows steadily with use."
- school = "necromancy"
base_cooldown = 10
clothes_req = FALSE
centcom_cancast = FALSE
diff --git a/code/datums/spells/lightning.dm b/code/datums/spells/lightning.dm
index d4a141c1ccb4..c7e79e2e103d 100644
--- a/code/datums/spells/lightning.dm
+++ b/code/datums/spells/lightning.dm
@@ -38,6 +38,12 @@
origin.Beam(target, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5)
/datum/spell/charge_up/bounce/lightning/apply_bounce_effect(mob/origin, mob/living/target, energy, mob/user)
+ if(target.can_block_magic(antimagic_flags))
+ target.visible_message(
+ "[target] absorbs the spell, remaining unharmed! ",
+ "You absorb the spell, remaining unharmed! "
+ )
+ return
if(damaging)
target.electrocute_act(energy, "Lightning Bolt", flags = SHOCK_NOGLOVES)
else
diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm
index cb8c1a4c182f..eda8b9822419 100644
--- a/code/datums/spells/mime.dm
+++ b/code/datums/spells/mime.dm
@@ -1,7 +1,6 @@
/datum/spell/aoe/conjure/build/mime_wall
name = "Invisible Wall"
desc = "The mime's performance transmutates into physical reality."
- school = "mime"
summon_type = list(/obj/structure/forcefield/mime)
invocation_type = "emote"
invocation_emote_self = "You form a wall in front of yourself. "
@@ -10,6 +9,7 @@
clothes_req = FALSE
cast_sound = null
human_req = TRUE
+ antimagic_flags = NONE
action_icon_state = "mime"
action_background_icon_state = "bg_mime"
@@ -30,7 +30,6 @@
/datum/spell/mime/speak
name = "Speech"
desc = "Make or break a vow of silence."
- school = "mime"
clothes_req = FALSE
base_cooldown = 5 MINUTES
human_req = TRUE
@@ -63,7 +62,6 @@
/datum/spell/forcewall/mime
name = "Invisible Greater Wall"
desc = "Form an invisible three tile wide blockade."
- school = "mime"
wall_type = /obj/effect/forcefield/mime
invocation_type = "emote"
invocation_emote_self = "You form a blockade in front of yourself. "
@@ -87,10 +85,10 @@
/datum/spell/mime/fingergun
name = "Finger Gun"
desc = "Shoot lethal, silencing bullets out of your fingers! 3 bullets available per cast. Use your fingers to holster them manually."
- school = "mime"
clothes_req = FALSE
base_cooldown = 30 SECONDS
human_req = TRUE
+ antimagic_flags = NONE
action_icon_state = "fingergun"
action_background_icon_state = "bg_mime"
diff --git a/code/datums/spells/mime_malaise.dm b/code/datums/spells/mime_malaise.dm
index 8ce906e055a7..67de63013349 100644
--- a/code/datums/spells/mime_malaise.dm
+++ b/code/datums/spells/mime_malaise.dm
@@ -4,7 +4,6 @@
stun them so that they may contemplate Art, and silence them. \
Warning : Effects are permanent on non-wizards."
hand_path = /obj/item/melee/touch_attack/mime_malaise
- school = "transmutation"
base_cooldown = 300
clothes_req = TRUE
@@ -19,8 +18,10 @@
icon_state = "fleshtostone"
item_state = "fleshtostone"
-/obj/item/melee/touch_attack/mime_malaise/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
+/obj/item/melee/touch_attack/mime_malaise/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+
+ if(!proximity_flag || target == user || blocked_by_antimagic || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
var/datum/effect_system/smoke_spread/s = new
@@ -29,7 +30,7 @@
var/mob/living/carbon/human/H = target
H.mimetouched()
- ..()
+ handle_delete(user)
/mob/living/carbon/human/proc/mimetouched()
Weaken(14 SECONDS)
diff --git a/code/datums/spells/mind_transfer.dm b/code/datums/spells/mind_transfer.dm
index 441ea87cbe80..2e3bad262cf0 100644
--- a/code/datums/spells/mind_transfer.dm
+++ b/code/datums/spells/mind_transfer.dm
@@ -2,7 +2,6 @@
name = "Mind Transfer"
desc = "This spell allows the user to switch bodies with a target."
- school = "transmutation"
base_cooldown = 600
clothes_req = FALSE
invocation = "GIN'YU CAPAN"
@@ -10,6 +9,7 @@
selection_activated_message = "You prepare to transfer your mind. Click on a target to cast the spell. "
selection_deactivated_message = "You decide that your current form is good enough. "
cooldown_min = 200 //100 deciseconds reduction per rank
+ antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND
var/list/protected_roles = list(SPECIAL_ROLE_WIZARD, SPECIAL_ROLE_CHANGELING, SPECIAL_ROLE_CULTIST) //which roles are immune to the spell
var/paralysis_amount_caster = 40 SECONDS //how much the caster is paralysed for after the spell
var/paralysis_amount_victim = 40 SECONDS //how much the victim is paralysed for after the spell
@@ -48,6 +48,9 @@ Also, you never added distance checking after target is selected. I've went ahea
if(issilicon(target))
to_chat(user, "You feel this enslaved being is just as dead as its cold, hard exoskeleton. ")
return
+ if(target.can_block_magic(antimagic_flags))
+ to_chat(user, "Their mind is resisting your spell. ")
+ return
var/mob/living/victim = target//The target of the spell whos body will be transferred to.
var/mob/living/caster = user//The wizard/whomever doing the body transferring.
diff --git a/code/datums/spells/night_vision.dm b/code/datums/spells/night_vision.dm
index de085eae1993..ae5c94f97610 100644
--- a/code/datums/spells/night_vision.dm
+++ b/code/datums/spells/night_vision.dm
@@ -4,6 +4,7 @@
base_cooldown = 10
clothes_req = FALSE
+ antimagic_flags = NONE
message = "You toggle your night vision! "
diff --git a/code/datums/spells/rathens.dm b/code/datums/spells/rathens.dm
index 195103244444..22969027c466 100644
--- a/code/datums/spells/rathens.dm
+++ b/code/datums/spells/rathens.dm
@@ -15,6 +15,8 @@
/datum/spell/rathens/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/human/H in targets)
+ if(H.can_block_magic(antimagic_flags))
+ continue
var/datum/effect_system/smoke_spread/s = new
s.set_up(5, FALSE, H)
s.start()
diff --git a/code/datums/spells/sentient_sword_lunge.dm b/code/datums/spells/sentient_sword_lunge.dm
index 725bc77846c4..2053a75a87e8 100644
--- a/code/datums/spells/sentient_sword_lunge.dm
+++ b/code/datums/spells/sentient_sword_lunge.dm
@@ -16,7 +16,14 @@
to_chat(user, "You cannot use this ability if you're outside a blade! ")
return
var/obj/item/nullrod/scythe/talking/user_sword = user.loc
- var/mob/living/carbon/holder = user_sword.loc
- if(istype(holder))
+ if(ishuman(user_sword.loc))
+ var/mob/living/carbon/holder = user_sword.loc
holder.unEquip(user_sword)
+ else if(isstorage(user_sword.loc))
+ if(prob(50))
+ to_chat(user, "You fail to break out of [user_sword.loc]! ")
+ return
+ var/turf/our_turf = get_turf(user_sword.loc)
+ our_turf.visible_message("[user_sword] leaps out of [user_sword.loc]! ")
+ user_sword.forceMove(our_turf)
user_sword.throw_at(targets[1], 10, 3, user)
diff --git a/code/datums/spells/spacetime_dist.dm b/code/datums/spells/spacetime_dist.dm
index e7cee2a416a0..9d7b09c16298 100644
--- a/code/datums/spells/spacetime_dist.dm
+++ b/code/datums/spells/spacetime_dist.dm
@@ -7,7 +7,6 @@
sound = 'sound/magic/strings.ogg'
action_icon_state = "spacetime"
- school = "transmutation"
base_cooldown = 30 SECONDS
clothes_req = TRUE
invocation = "none"
@@ -83,6 +82,8 @@
desc = "A distortion in spacetime. You can hear faint music..."
icon_state = "nothing"
/// A flags which save people from being thrown about
+ var/antimagic_flags = MAGIC_RESISTANCE
+ /// A flags which save people from being thrown about
var/obj/effect/cross_action/spacetime_dist/linked_dist
/// Used to prevent an infinite loop in the space tiime continuum
var/cant_teleport = FALSE
@@ -94,7 +95,18 @@
/obj/effect/cross_action/singularity_pull()
return
+/obj/effect/cross_action/spacetime_dist/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/cross_action/spacetime_dist/proc/walk_link(atom/movable/AM)
+ if(ismob(AM))
+ var/mob/M = AM
+ if(M.can_block_magic(antimagic_flags, charge_cost = 0))
+ return
if(linked_dist && walks_left > 0)
flick("purplesparkles", src)
linked_dist.get_walker(AM)
@@ -106,9 +118,9 @@
AM.forceMove(get_turf(src))
cant_teleport = FALSE
-/obj/effect/cross_action/spacetime_dist/Crossed(atom/movable/AM, oldloc)
+/obj/effect/cross_action/spacetime_dist/proc/on_atom_entered(atom/source, atom/movable/entered, turf/old_loc)
if(!cant_teleport)
- walk_link(AM)
+ walk_link(entered)
/obj/effect/cross_action/spacetime_dist/attackby__legacy__attackchain(obj/item/W, mob/user, params)
if(user.drop_item(W))
@@ -123,4 +135,5 @@
/obj/effect/cross_action/spacetime_dist/Destroy()
cant_teleport = TRUE
linked_dist = null
+ RemoveElement(/datum/element/connect_loc)
return ..()
diff --git a/code/datums/spells/summonitem.dm b/code/datums/spells/summonitem.dm
index 2c4ceebcc561..53fad3cca44a 100644
--- a/code/datums/spells/summonitem.dm
+++ b/code/datums/spells/summonitem.dm
@@ -1,7 +1,6 @@
/datum/spell/summonitem
name = "Instant Summons"
desc = "This spell can be used to recall a previously marked item to your hand from anywhere in the universe."
- school = "transmutation"
base_cooldown = 100
clothes_req = FALSE
invocation = "GAR YOK"
diff --git a/code/datums/spells/touch_attacks.dm b/code/datums/spells/touch_attacks.dm
index 455bbdf5b0b0..f3aca8ff3fc0 100644
--- a/code/datums/spells/touch_attacks.dm
+++ b/code/datums/spells/touch_attacks.dm
@@ -53,7 +53,6 @@
desc = "This spell charges your hand with vile energy that can be used to violently explode victims."
hand_path = /obj/item/melee/touch_attack/disintegrate
- school = "evocation"
base_cooldown = 600
clothes_req = TRUE
cooldown_min = 200 //100 deciseconds reduction per rank
@@ -65,9 +64,19 @@
desc = "This spell charges your hand with the power to turn victims into inert statues for a long period of time."
hand_path = /obj/item/melee/touch_attack/fleshtostone
- school = "transmutation"
base_cooldown = 600
clothes_req = TRUE
cooldown_min = 200 //100 deciseconds reduction per rank
action_icon_state = "statue"
+
+/datum/spell/touch/plushify
+ name = "Plushify"
+ desc = "This spell charges your hand with the power to turn your victims into marketable plushies!"
+ hand_path = /obj/item/melee/touch_attack/plushify
+
+ base_cooldown = 600
+ clothes_req = TRUE
+ cooldown_min = 200 //100 deciseconds reduction per rank
+
+ action_icon_state = "plush"
diff --git a/code/datums/spells/wizard_spells.dm b/code/datums/spells/wizard_spells.dm
index 3b70407a1a89..c62f868f4018 100644
--- a/code/datums/spells/wizard_spells.dm
+++ b/code/datums/spells/wizard_spells.dm
@@ -2,7 +2,6 @@
name = "Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
- school = "evocation"
base_cooldown = 200
clothes_req = TRUE
invocation = "FORTI GY AMA"
@@ -40,7 +39,6 @@
name = "Honk Missile"
desc = "This spell fires several, slow moving, magic bikehorns at nearby targets."
- school = "evocation"
base_cooldown = 6 SECONDS
clothes_req = FALSE
invocation = "HONK GY AMA"
@@ -87,7 +85,6 @@
name = "Mutate"
desc = "This spell causes you to turn into a hulk and gain laser vision for a short while."
- school = "transmutation"
base_cooldown = 400
clothes_req = TRUE
invocation = "BIRUZ BENNAR"
@@ -113,7 +110,6 @@
name = "Smoke"
desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
- school = "conjuration"
base_cooldown = 120
clothes_req = FALSE
invocation = "none"
@@ -146,7 +142,6 @@
name = "Blink"
desc = "This spell randomly teleports you a short distance."
- school = "abjuration"
base_cooldown = 20
clothes_req = TRUE
invocation = "none"
@@ -174,7 +169,6 @@
name = "Teleport"
desc = "This spell teleports you to a type of area of your selection."
- school = "abjuration"
base_cooldown = 600
clothes_req = TRUE
invocation = "SCYAR NILA"
@@ -194,7 +188,6 @@
name = "Return to Teacher"
desc = "This spell teleports you back to your teacher."
- school = "abjuration"
base_cooldown = 30 SECONDS
clothes_req = TRUE
invocation = "SCYAR TESO"
@@ -217,7 +210,6 @@
name = "Force Wall"
desc = "This spell creates a 3 tile wide unbreakable wall that only you can pass through, and does not need wizard garb. Lasts 30 seconds."
- school = "transmutation"
base_cooldown = 15 SECONDS
clothes_req = FALSE
invocation = "TARCOL MINTI ZHERI"
@@ -259,7 +251,6 @@
name = "Summon Carp"
desc = "This spell conjures a simple carp."
- school = "conjuration"
base_cooldown = 1200
clothes_req = TRUE
invocation = "NOUK FHUNMM SACP RISSKA"
@@ -274,7 +265,6 @@
name = "Artificer"
desc = "This spell conjures a construct which may be controlled by Shades."
- school = "conjuration"
base_cooldown = 600
clothes_req = FALSE
invocation = "none"
@@ -290,7 +280,6 @@
name = "Summon Creature Swarm"
desc = "This spell tears the fabric of reality, allowing horrific daemons to spill forth."
- school = "conjuration"
base_cooldown = 1200
clothes_req = FALSE
invocation = "IA IA"
@@ -304,7 +293,6 @@
/datum/spell/blind
name = "Blind"
desc = "This spell temporarily blinds a single person and does not require wizard garb."
- school = "transmutation"
base_cooldown = 15 SECONDS
clothes_req = FALSE
invocation = "STI KALY"
@@ -325,6 +313,10 @@
return
var/mob/living/target = targets[1]
+ if(target.can_block_magic(antimagic_flags))
+ to_chat(target, "Your eye itches, but it passes momentarily. ")
+ to_chat(user, "The spell had no effect! ")
+ return FALSE
target.EyeBlurry(40 SECONDS)
target.EyeBlind(30 SECONDS)
@@ -335,7 +327,6 @@
name = "Fireball"
desc = "This spell fires a fireball at a target and does not require wizard garb."
- school = "evocation"
base_cooldown = 60
clothes_req = FALSE
invocation = "ONI SOMA"
@@ -427,6 +418,10 @@
playMagSound()
for(var/turf/T in targets) //Done this way so things don't get thrown all around hilariously.
for(var/atom/movable/AM in T)
+ if(ismob(AM))
+ var/mob/victim_mob = AM
+ if(victim_mob.can_block_magic(antimagic_flags))
+ continue
thrownatoms += AM
for(var/am in thrownatoms)
@@ -470,6 +465,8 @@
/datum/spell/sacred_flame/cast(list/targets, mob/user = usr)
for(var/mob/living/L in targets)
+ if(L.can_block_magic(antimagic_flags))
+ continue
L.adjust_fire_stacks(20)
if(isliving(user))
var/mob/living/U = user
@@ -478,7 +475,6 @@
/datum/spell/corpse_explosion
name = "Corpse Explosion"
desc = "Fills a corpse with energy, causing it to explode violently."
- school = "evocation"
base_cooldown = 5 SECONDS
clothes_req = TRUE
invocation = "JAH ITH BER"
diff --git a/code/datums/station_traits/neutral_traits.dm b/code/datums/station_traits/neutral_traits.dm
index 26862ba60c1d..03cac88b537f 100644
--- a/code/datums/station_traits/neutral_traits.dm
+++ b/code/datums/station_traits/neutral_traits.dm
@@ -93,10 +93,10 @@
. = ..()
for(var/obj/machinery/light/light in GLOB.machines)
var/turf/our_turf = get_turf(light)
- if(!is_station_level(our_turf.z))
- continue
- var/list/rgb = hsl2rgb(rand(0, 255) / 255, rand((0.4 * 255), 255) / 255, rand((0.5 * 255), (0.8 * 255)) / 255)
- var/new_color = "#[num2hex(rgb[1], 2)][num2hex(rgb[2], 2)][num2hex(rgb[3], 2)]"
- light.color = new_color
- light.brightness_color = new_color
- light.update(FALSE, TRUE, FALSE)
+ var/area/our_area = get_area(light)
+ if(is_station_level(our_turf.z) || istype(our_area, /area/mine/outpost) || istype(our_area, /area/mine/laborcamp))
+ var/list/rgb = hsl2rgb(rand(0, 255) / 255, rand((0.4 * 255), 255) / 255, rand((0.5 * 255), (0.8 * 255)) / 255)
+ var/new_color = "#[num2hex(rgb[1], 2)][num2hex(rgb[2], 2)][num2hex(rgb[3], 2)]"
+ light.color = new_color
+ light.brightness_color = new_color
+ light.update(FALSE, TRUE, FALSE)
diff --git a/code/datums/station_traits/positive_traits.dm b/code/datums/station_traits/positive_traits.dm
index 455c70489868..a545c1504e53 100644
--- a/code/datums/station_traits/positive_traits.dm
+++ b/code/datums/station_traits/positive_traits.dm
@@ -200,7 +200,8 @@
/datum/job/judge = /obj/item/organ/internal/cyberimp/arm/telebaton,
/datum/job/explorer = /obj/item/organ/internal/cyberimp/arm/toolset,
/datum/job/nanotrasenrep = /obj/item/organ/internal/heart/cybernetic/upgraded,
- /datum/job/blueshield = /obj/item/organ/internal/cyberimp/arm/flash
+ /datum/job/blueshield = /obj/item/organ/internal/cyberimp/arm/flash,
+ /datum/job/nanotrasentrainer = /obj/item/organ/internal/heart/cybernetic/upgraded
)
/datum/station_trait/cybernetic_revolution/New()
diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm
index c4795b8d71a4..aa8dfa6c23dd 100644
--- a/code/datums/status_effects/buffs.dm
+++ b/code/datums/status_effects/buffs.dm
@@ -92,9 +92,12 @@
var/found_someone = FALSE
for(var/mob/living/L in oview(9, owner))
- found_someone = TRUE
playsound(owner, 'sound/magic/teleport_diss.ogg', 50, TRUE)
L.Beam(owner, "grabber_beam", time = 1 SECONDS, maxdistance = 9)
+ if(L.can_block_magic(MAGIC_RESISTANCE))
+ to_chat(L, "You shake off the tendrils that try to wrap around you! ")
+ continue
+ found_someone = TRUE
L.apply_status_effect(STATUS_EFFECT_VOID_PRICE)
if(found_someone)
owner.visible_message("The violet light around [owner] glows black... and shoots off to those around [owner.p_them()]! ", "The tendrils around you cinch tightly... but then unwravel and fly at others! ")
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 858f9076582b..5e3b3357b5ee 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -696,6 +696,18 @@
if(isnum(_slowdown_value))
slowdown_value = _slowdown_value
+// Directional slow - Like slowed, but only if you're moving in a certain direction.
+/datum/status_effect/incapacitating/directional_slow
+ id = "directional_slow"
+ var/direction
+ var/slowdown_value = 10 // defaults to this value if none is specified
+
+/datum/status_effect/incapacitating/directional_slow/on_creation(mob/living/new_owner, set_duration, _direction, _slowdown_value)
+ . = ..()
+ direction = _direction
+ if(isnum(_slowdown_value))
+ slowdown_value = _slowdown_value
+
/datum/status_effect/transient/silence
id = "silenced"
@@ -1355,6 +1367,18 @@
new /obj/effect/abstract/bubblegum_rend_helper(get_turf(src), null, 10)
qdel(src)
+/// The mob has been pushed by airflow recently, and won't automatically grab nearby objects to stop drifting.
+/datum/status_effect/unbalanced
+ id = "unbalanced"
+ duration = 1 SECONDS
+ status_type = STATUS_EFFECT_REFRESH
+ alert_type = /atom/movable/screen/alert/status_effect/unbalanced
+
+/atom/movable/screen/alert/status_effect/unbalanced
+ name = "Unbalanced"
+ desc = "You're being shoved around by airflow! You can resist this by moving, but moving against the wind will be slow."
+ icon_state = "unbalanced"
+
/datum/status_effect/c_foamed
id = "c_foamed up"
duration = 1 MINUTES
diff --git a/code/datums/wires/alarm.dm b/code/datums/wires/alarm.dm
index 8660a8e64219..08b2ed5a1705 100644
--- a/code/datums/wires/alarm.dm
+++ b/code/datums/wires/alarm.dm
@@ -6,7 +6,7 @@
/datum/wires/alarm/New(atom/_holder)
wires = list(
- WIRE_IDSCAN , WIRE_MAIN_POWER1 , WIRE_SYPHON,
+ WIRE_IDSCAN , WIRE_MAIN_POWER1 , WIRE_SIPHON,
WIRE_AI_CONTROL, WIRE_AALARM
)
return ..()
@@ -39,9 +39,9 @@
if(WIRE_AI_CONTROL)
A.aidisabled = !mend
- if(WIRE_SYPHON)
+ if(WIRE_SIPHON)
if(!mend)
- A.mode = 3 // AALARM_MODE_PANIC
+ A.mode = AALARM_MODE_PANIC
A.apply_mode()
if(WIRE_AALARM)
@@ -68,11 +68,11 @@
addtimer(CALLBACK(A, TYPE_PROC_REF(/obj/machinery/alarm, enable_ai_control_callback)), 10 SECONDS)
- if(WIRE_SYPHON)
- if(A.mode == 1) // AALARM_MODE_SCRUB
- A.mode = 3 // AALARM_MODE_PANIC
+ if(WIRE_SIPHON)
+ if(A.mode == AALARM_MODE_FILTERING)
+ A.mode = AALARM_MODE_PANIC
else
- A.mode = 1 // AALARM_MODE_SCRUB
+ A.mode = AALARM_MODE_FILTERING
A.apply_mode()
if(WIRE_AALARM)
diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm
index db60b423c5d9..61c9cab09b78 100644
--- a/code/game/area/ai_monitored.dm
+++ b/code/game/area/ai_monitored.dm
@@ -20,7 +20,7 @@
cam.newTarget(O)
return
-/area/station/ai_monitored/Exited(atom/movable/O)
+/area/station/ai_monitored/Exited(atom/movable/O, direction)
..()
if(ismob(O) && length(motioncameras))
for(var/X in motioncameras)
diff --git a/code/game/area/misc_areas.dm b/code/game/area/misc_areas.dm
index 21e334a94d21..e9bd5f40a6a4 100644
--- a/code/game/area/misc_areas.dm
+++ b/code/game/area/misc_areas.dm
@@ -48,6 +48,9 @@
icon_state = "space_notp"
tele_proof = TRUE
+/area/game_test
+ name = "Game Test Area"
+
//SYNDICATES
/area/syndicate_mothership
diff --git a/code/game/area/ss13_areas/procedure_areas.dm b/code/game/area/ss13_areas/procedure_areas.dm
new file mode 100644
index 000000000000..12d2e177b5b2
--- /dev/null
+++ b/code/game/area/ss13_areas/procedure_areas.dm
@@ -0,0 +1,4 @@
+
+/area/station/procedure/trainer_office
+ name = "\improper Trainer's Office"
+ icon_state = "procedure_nct"
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 59548e2a038a..9d33e71059b7 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -311,6 +311,13 @@
return
/atom/proc/Bumped(atom/movable/AM)
+ // This may seem scary but one will find that replacing this with
+ // SHOULD_NOT_SLEEP(TRUE) surfaces two dozen instances where /Bumped sleeps,
+ // such as airlocks. We cannot wait for these procs to finish because they
+ // will clobber any movement which occurred in the intervening time. If we
+ // want to get rid of this we need to move bumping in its entirety to signal
+ // handlers, which is scarier.
+ set waitfor = FALSE
return
/// Convenience proc to see if a container is open for chemistry handling
@@ -333,9 +340,6 @@
/atom/proc/is_drainable()
return reagents && (container_type & DRAINABLE)
-/atom/proc/CheckExit()
- return TRUE
-
/atom/proc/HasProximity(atom/movable/AM)
return
@@ -1205,13 +1209,23 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/Entered(atom/movable/AM, atom/oldLoc)
SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, oldLoc)
-/atom/Exit(atom/movable/AM, atom/newLoc)
- . = ..()
- if(SEND_SIGNAL(src, COMSIG_ATOM_EXIT, AM, newLoc) & COMPONENT_ATOM_BLOCK_EXIT)
+/**
+ * An atom is attempting to exit this atom's contents
+ *
+ * Default behaviour is to send the [COMSIG_ATOM_EXIT]
+ */
+/atom/Exit(atom/movable/leaving, direction)
+ // Don't call `..()` here, otherwise `Uncross()` gets called.
+ // See the doc comment on `Uncross()` to learn why this is bad.
+
+ if(SEND_SIGNAL(src, COMSIG_ATOM_EXIT, leaving, direction) & COMPONENT_ATOM_BLOCK_EXIT)
return FALSE
-/atom/Exited(atom/movable/AM, atom/newLoc)
- SEND_SIGNAL(src, COMSIG_ATOM_EXITED, AM, newLoc)
+ return TRUE
+
+/atom/Exited(atom/movable/AM, direction)
+ var/new_loc = get_step(AM, direction)
+ SEND_SIGNAL(src, COMSIG_ATOM_EXITED, AM, new_loc)
/*
Adds an instance of colour_type to the atom's atom_colours list
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 0af908662076..8be85ac77933 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -3,6 +3,8 @@
appearance_flags = TILE_BOUND
glide_size = 8 // Default, adjusted when mobs move based on their movement delays
var/last_move = null
+ /// A list containing arguments for Moved().
+ VAR_PRIVATE/tmp/list/active_movement
var/anchored = FALSE
var/move_resist = MOVE_RESIST_DEFAULT
var/move_force = MOVE_FORCE_DEFAULT
@@ -16,9 +18,12 @@
var/no_spin = FALSE
var/no_spin_thrown = FALSE
var/mob/pulledby = null
+
var/atom/movable/pulling
/// Face towards the atom while pulling it
var/face_while_pulling = FALSE
+ /// Whether this atom should have its dir automatically changed when it moves. Setting this to FALSE allows for things such as directional windows to retain dir on moving without snowflake code all of the place.
+ var/set_dir_on_move = TRUE
var/throwforce = 0
var/inertia_dir = 0
@@ -39,7 +44,7 @@
// Atmos
var/pressure_resistance = 10
- var/last_high_pressure_movement_air_cycle = 0
+ var/last_high_pressure_movement_time = 0
/// UID for the atom which the current atom is orbiting
var/orbiting_uid = null
@@ -199,16 +204,95 @@
/**
- * meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts)
- * if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this
- * most of the time you want forceMove()
+ * Meant for movement with zero side effects. Only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts).
+ * If you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this.
+ * Most of the time you want [forceMove()].
*/
/atom/movable/proc/abstract_move(atom/new_loc)
+ RESOLVE_ACTIVE_MOVEMENT // This should NEVER happen, but, just in case...
var/atom/old_loc = loc
var/direction = get_dir(old_loc, new_loc)
loc = new_loc
Moved(old_loc, direction, TRUE)
+/// Here's where we rewrite how byond handles movement except slightly different.
+/// To be removed on step_ conversion.
+/// All this work to prevent a second bump.
+/atom/movable/Move(atom/newloc, direction, glide_size_override = 0, update_dir = TRUE)
+ . = FALSE
+ if(!newloc || newloc == loc)
+ return
+
+ // A mid-movement... movement... occured, resolve that first.
+ RESOLVE_ACTIVE_MOVEMENT
+
+ if(!direction)
+ direction = get_dir(src, newloc)
+
+ if(set_dir_on_move && dir != direction && update_dir)
+ setDir(direction)
+
+ var/is_multi_tile_object = is_multi_tile_object(src)
+
+ var/list/old_locs
+ if(is_multi_tile_object && isturf(loc))
+ old_locs = locs // locs is a special list, this is effectively the same as .Copy() but with less steps
+ for(var/atom/exiting_loc as anything in old_locs)
+ if(!exiting_loc.Exit(src, direction))
+ return
+ else
+ if(!loc.Exit(src, direction))
+ return
+
+ var/list/new_locs
+ if(is_multi_tile_object && isturf(newloc))
+ new_locs = block(
+ newloc,
+ locate(
+ min(world.maxx, newloc.x + CEILING(bound_width / 32, 1)),
+ min(world.maxy, newloc.y + CEILING(bound_height / 32, 1)),
+ newloc.z
+ )
+ ) // If this is a multi-tile object then we need to predict the new locs and check if they allow our entrance.
+ for(var/atom/entering_loc as anything in new_locs)
+ if(!entering_loc.Enter(src))
+ return
+ if(SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, entering_loc) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
+ return
+ else // Else just try to enter the single destination.
+ if(!newloc.Enter(src))
+ return
+ if(SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, newloc) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
+ return
+
+ // Past this is the point of no return
+ var/atom/oldloc = loc
+ var/area/oldarea = get_area(oldloc)
+ var/area/newarea = get_area(newloc)
+
+ SET_ACTIVE_MOVEMENT(oldloc, direction, FALSE, old_locs)
+ loc = newloc
+
+ . = TRUE
+
+ if(old_locs) // This condition will only be true if it is a multi-tile object.
+ for(var/atom/exited_loc as anything in (old_locs - new_locs))
+ exited_loc.Exited(src, direction)
+ else // Else there's just one loc to be exited.
+ oldloc.Exited(src, direction)
+ if(oldarea != newarea)
+ oldarea.Exited(src, direction)
+
+ if(new_locs) // Same here, only if multi-tile.
+ for(var/atom/entered_loc as anything in (new_locs - old_locs))
+ entered_loc.Entered(src, oldloc, old_locs)
+ else
+ newloc.Entered(src, oldloc, old_locs)
+ if(oldarea != newarea)
+ newarea.Entered(src, oldarea)
+
+ RESOLVE_ACTIVE_MOVEMENT
+
/atom/movable/Move(atom/newloc, direct = 0, movetime)
if(!loc || !newloc)
return FALSE
@@ -228,22 +312,21 @@
var/direct_NS = direct & (NORTH | SOUTH)
var/direct_EW = direct & (EAST | WEST)
var/first_step_target = get_step(src, direct_NS)
- Move(first_step_target, direct_NS)
+ step(src, direct_NS)
if(loc == first_step_target)
first_step_dir = direct_NS
moving_diagonally = SECOND_DIAG_STEP
- . = Move(get_step(src, direct_EW), direct_EW)
+ . = step(src, direct_EW)
else if(loc == oldloc)
first_step_target = get_step(src, direct_EW)
- Move(first_step_target, direct_EW)
+ step(src, direct_EW)
if(loc == first_step_target)
first_step_dir = direct_EW
moving_diagonally = SECOND_DIAG_STEP
- . = Move(get_step(src, direct_NS), direct_NS)
+ . = step(src, direct_NS)
if(first_step_dir != 0)
if(!.)
setDir(first_step_dir)
- Moved(oldloc, first_step_dir)
else if(!inertia_moving)
inertia_next_move = world.time + inertia_move_delay
newtonian_move(direct)
@@ -254,9 +337,6 @@
last_move = 0
return
- if(.)
- Moved(oldloc, direct)
-
last_move = direct
move_speed = world.time - l_move_time
l_move_time = world.time
@@ -265,14 +345,20 @@
. = FALSE
// Called after a successful Move(). By this point, we've already moved
-/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE)
- SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced)
+/atom/movable/proc/Moved(atom/old_loc, Dir, Forced = FALSE)
+ SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, old_loc, Dir, Forced)
if(!inertia_moving)
inertia_next_move = world.time + inertia_move_delay
newtonian_move(Dir)
if(length(client_mobs_in_contents))
update_parallax_contents()
+ var/turf/old_turf = get_turf(old_loc)
+ var/turf/new_turf = get_turf(src)
+
+ if(old_turf?.z != new_turf?.z)
+ on_changed_z_level(old_turf, new_turf)
+
var/datum/light_source/L
var/thing
for(thing in light_sources) // Cycle through the light sources on this atom and tell them to update.
@@ -280,6 +366,50 @@
L.source_atom.update_light()
return TRUE
+// Make sure you know what you're doing if you call this
+// You probably want CanPass()
+/atom/movable/Cross(atom/movable/crossed_atom)
+ if(SEND_SIGNAL(src, COMSIG_MOVABLE_CHECK_CROSS, crossed_atom) & COMPONENT_BLOCK_CROSS)
+ return FALSE
+ if(SEND_SIGNAL(crossed_atom, COMSIG_MOVABLE_CHECK_CROSS_OVER, src) & COMPONENT_BLOCK_CROSS)
+ return FALSE
+ return CanPass(crossed_atom, get_dir(src, crossed_atom))
+
+///default byond proc that is deprecated for us in lieu of signals. do not call
+/atom/movable/Crossed(atom/movable/crossed_atom, oldloc)
+ SHOULD_NOT_OVERRIDE(TRUE)
+ CRASH("atom/movable/Crossed() was called!")
+
+/**
+ * `Uncross()` is a default BYOND proc that is called when something is *going*
+ * to exit this atom's turf. It is prefered over `Uncrossed` when you want to
+ * deny that movement, such as in the case of border objects, objects that allow
+ * you to walk through them in any direction except the one they block
+ * (think side windows).
+ *
+ * While being seemingly harmless, most everything doesn't actually want to
+ * use this, meaning that we are wasting proc calls for every single atom
+ * on a turf, every single time something exits it, when basically nothing
+ * cares.
+ *
+ * If you want to replicate the old `Uncross()` behavior, the most apt
+ * replacement is [`/datum/element/connect_loc`] while hooking onto
+ * [`COMSIG_ATOM_EXIT`].
+ */
+/atom/movable/Uncross()
+ SHOULD_NOT_OVERRIDE(TRUE)
+ CRASH("Uncross() should not be being called, please read the doc-comment for it for why.")
+
+/**
+ * default byond proc that is normally called on everything inside the previous turf
+ * a movable was in after moving to its current turf
+ * this is wasteful since the vast majority of objects do not use Uncrossed
+ * use connect_loc to register to COMSIG_ATOM_EXITED instead
+ */
+/atom/movable/Uncrossed(atom/movable/uncrossed_atom)
+ SHOULD_NOT_OVERRIDE(TRUE)
+ CRASH("/atom/movable/Uncrossed() was called")
+
// Change glide size for the duration of one movement
/atom/movable/proc/glide_for(movetime)
if(movetime)
@@ -289,57 +419,122 @@
else
glide_size = initial(glide_size)
-// Previously known as HasEntered()
-// This is automatically called when something enters your square
-/atom/movable/Crossed(atom/movable/AM, oldloc)
- SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM)
- SEND_SIGNAL(AM, COMSIG_CROSSED_MOVABLE, src)
-
-/atom/movable/Uncrossed(atom/movable/AM)
- SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM)
-
-/atom/movable/Bump(atom/bumped_atom, yes) //the "yes" arg is to differentiate our Bump proc from byond's, without it every Bump() call would become a double Bump(). // suffering
- if(bumped_atom && yes)
- SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, bumped_atom)
- if(!QDELETED(throwing))
- throwing.finalize(TRUE, bumped_atom)
- . = TRUE
- if(QDELETED(bumped_atom))
- return
- bumped_atom.Bumped(src)
+/atom/movable/Bump(atom/bumped_atom)
+ if(!bumped_atom)
+ CRASH("Bump was called with no argument.")
+ if(SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, bumped_atom) & COMPONENT_INTERCEPT_BUMPED)
+ return
+ . = ..()
+ if(!QDELETED(throwing))
+ throwing.finalize(hit = TRUE, target = bumped_atom)
+ . = TRUE
+ if(QDELETED(bumped_atom))
+ return
+ bumped_atom.Bumped(src)
/atom/movable/proc/forceMove(atom/destination)
- var/turf/old_loc = loc
- loc = destination
- moving_diagonally = 0
+ . = FALSE
+ if(destination)
+ . = doMove(destination)
+ else
+ CRASH("No valid destination passed into forceMove")
+
+/*
+ * Move ourself to nullspace. Use to indicate clearly that you
+ * know that you are doing so, as opposed to calling forceMove(null),
+ * accidentally or otherwise.
+ */
+/atom/movable/proc/moveToNullspace()
+ return doMove(null)
+
+/atom/movable/proc/doMove(atom/destination)
+ . = FALSE
+ RESOLVE_ACTIVE_MOVEMENT
- if(old_loc)
- old_loc.Exited(src, destination)
- for(var/atom/movable/AM in old_loc)
- AM.Uncrossed(src)
+ var/atom/oldloc = loc
+ var/is_multi_tile = bound_width > world.icon_size || bound_height > world.icon_size
+
+ SET_ACTIVE_MOVEMENT(oldloc, NONE, TRUE, null)
if(destination)
- destination.Entered(src)
- for(var/atom/movable/AM in destination)
- if(AM == src)
- continue
- AM.Crossed(src, old_loc)
- var/turf/oldturf = get_turf(old_loc)
- var/turf/destturf = get_turf(destination)
- var/old_z = (oldturf ? oldturf.z : null)
- var/dest_z = (destturf ? destturf.z : null)
- if(old_z != dest_z)
- onTransitZ(old_z, dest_z)
+ if(pulledby && !HAS_TRAIT(src, TRAIT_CURRENTLY_Z_MOVING))
+ pulledby.stop_pulling()
+
+ var/same_loc = oldloc == destination
+ var/area/old_area = get_area(oldloc)
+ var/area/destarea = get_area(destination)
+ var/movement_dir = get_dir(src, destination)
+
+ moving_diagonally = 0
+
+ loc = destination
+
+ if(!same_loc)
+ if(is_multi_tile && isturf(destination))
+ var/list/new_locs = block(
+ destination,
+ locate(
+ min(world.maxx, destination.x + ROUND_UP(bound_width / 32)),
+ min(world.maxy, destination.y + ROUND_UP(bound_height / 32)),
+ destination.z
+ )
+ )
+ if(old_area && old_area != destarea)
+ old_area.Exited(src, movement_dir)
+ for(var/atom/left_loc as anything in locs - new_locs)
+ left_loc.Exited(src, movement_dir)
+
+ for(var/atom/entering_loc as anything in new_locs - locs)
+ entering_loc.Entered(src, movement_dir)
+
+ if(old_area && old_area != destarea)
+ destarea.Entered(src, movement_dir)
+ else
+ if(oldloc)
+ oldloc.Exited(src, movement_dir)
+ if(old_area && old_area != destarea)
+ old_area.Exited(src, movement_dir)
+ destination.Entered(src, oldloc)
+ if(destarea && old_area != destarea)
+ destarea.Entered(src, old_area)
- Moved(old_loc, NONE)
+ . = TRUE
- return TRUE
+ //If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
+ else
+ . = TRUE
+
+ if(oldloc)
+ loc = null
+ var/area/old_area = get_area(oldloc)
+ if(is_multi_tile && isturf(oldloc))
+ for(var/atom/old_loc as anything in locs)
+ old_loc.Exited(src, NONE)
+ else
+ oldloc.Exited(src, NONE)
+
+ if(old_area)
+ old_area.Exited(src, NONE)
+
+ RESOLVE_ACTIVE_MOVEMENT
+
+/**
+ * Called when a movable changes z-levels.
+ *
+ * Arguments:
+ * * old_turf - The previous turf they were on before.
+ * * new_turf - The turf they have now entered.
+ * * notify_contents - Whether or not to notify the movable's contents that their z-level has changed.
+ */
+/atom/movable/proc/on_changed_z_level(turf/old_turf, turf/new_turf, notify_contents = TRUE)
+ SHOULD_CALL_PARENT(TRUE)
+ SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_turf, new_turf)
+
+ if(!notify_contents)
+ return
-/atom/movable/proc/onTransitZ(old_z,new_z)
- for(var/item in src) // Notify contents of Z-transition. This can be overridden if we know the items contents do not care.
- var/atom/movable/AM = item
- AM.onTransitZ(old_z,new_z)
- SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED)
+ for(var/atom/movable/content as anything in src) // Notify contents of Z-transition.
+ content.on_changed_z_level(old_turf, new_turf)
/mob/living/forceMove(atom/destination)
if(buckled)
@@ -539,7 +734,7 @@
/atom/movable/proc/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
return FALSE
-/atom/movable/CanPass(atom/movable/mover, turf/target)
+/atom/movable/CanPass(atom/movable/mover, border_dir)
// This condition is copied from atom to avoid an extra parent call, because this is a very hot proc.
if(!density)
return TRUE
diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm
index 7081814e916f..da9bc720a4f4 100644
--- a/code/game/data_huds.dm
+++ b/code/game/data_huds.dm
@@ -60,6 +60,14 @@
/datum/atom_hud/data/janitor
hud_icons = list(JANI_HUD)
+/datum/atom_hud/data/pressure
+ hud_icons = list(PRESSURE_HUD)
+
+/// Pressure hud is special, because it doesn't use hudatoms. SSair manages its images, so tell SSair to add the initial set.
+/datum/atom_hud/data/pressure/add_hud_to(mob/user)
+ ..()
+ SSair.add_pressure_hud(user)
+
/* MED/SEC/DIAG HUD HOOKS */
/*
@@ -222,10 +230,10 @@
//HOOKS
-/mob/living/carbon/human/proc/sec_hud_set_ID()
+/mob/living/carbon/human/sec_hud_set_ID()
var/image/holder = hud_list[ID_HUD]
holder.icon_state = "hudunknown"
- if(wear_id)
+ if(wear_id && ! HAS_TRAIT(src, TRAIT_UNKNOWN))
holder.icon_state = "hud[ckey(wear_id.get_job_name())]"
sec_hud_set_security_status()
diff --git a/code/game/dna/mutations/mutation_powers.dm b/code/game/dna/mutations/mutation_powers.dm
index f9cb5574c824..078633409f49 100644
--- a/code/game/dna/mutations/mutation_powers.dm
+++ b/code/game/dna/mutations/mutation_powers.dm
@@ -301,6 +301,7 @@
clothes_req = FALSE
stat_allowed = CONSCIOUS
+ antimagic_flags = NONE
selection_activated_message = "Your mind grow cold. Click on a target to cast the spell. "
selection_deactivated_message = "Your mind returns to normal. "
@@ -372,6 +373,7 @@
clothes_req = FALSE
stat_allowed = CONSCIOUS
invocation_type = "none"
+ antimagic_flags = NONE
action_icon_state = "genetic_eat"
@@ -511,6 +513,7 @@
clothes_req = FALSE
stat_allowed = CONSCIOUS
invocation_type = "none"
+ antimagic_flags = NONE
action_icon_state = "genetic_jump"
var/leap_distance = 10
@@ -636,6 +639,7 @@
selection_deactivated_message = "Your body calms down again. "
invocation_type = "none"
+ antimagic_flags = NONE
action_icon_state = "genetic_poly"
@@ -684,6 +688,7 @@
human_req = TRUE
stat_allowed = CONSCIOUS
invocation_type = "none"
+ antimagic_flags = MAGIC_RESISTANCE_MIND
action_icon_state = "genetic_empath"
@@ -793,6 +798,7 @@
clothes_req = FALSE
stat_allowed = CONSCIOUS
invocation_type = "none"
+ antimagic_flags = NONE
action_icon_state = "genetic_morph"
@@ -983,6 +989,7 @@
clothes_req = FALSE
stat_allowed = CONSCIOUS
invocation_type = "none"
+ antimagic_flags = MAGIC_RESISTANCE_MIND
action_icon_state = "genetic_project"
@@ -1017,6 +1024,7 @@
base_cooldown = 0
clothes_req = FALSE
stat_allowed = CONSCIOUS
+ antimagic_flags = MAGIC_RESISTANCE_MIND
invocation_type = "none"
action_icon_state = "genetic_mindscan"
var/list/expanded_minds = list()
@@ -1105,6 +1113,7 @@
clothes_req = FALSE
stat_allowed = CONSCIOUS
invocation_type = "none"
+ antimagic_flags = MAGIC_RESISTANCE_MIND
action_icon_state = "genetic_view"
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index bad65ed348e5..ee868afd1be8 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -6,7 +6,7 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E
name = "changeling"
config_tag = "changeling"
restricted_jobs = list("AI", "Cyborg")
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General", "Nanotrasen Career Trainer")
species_to_mindflayer = list("Machine")
required_players = 15
required_enemies = 1
diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm
index 6f97e380e15e..12b80aa8da5d 100644
--- a/code/game/gamemodes/cult/blood_magic.dm
+++ b/code/game/gamemodes/cult/blood_magic.dm
@@ -385,6 +385,7 @@
var/uses = 1
var/health_cost = 0 //The amount of health taken from the user when invoking the spell
var/datum/action/innate/cult/blood_spell/source
+ var/antimagic_flags = MAGIC_RESISTANCE_HOLY
/obj/item/melee/blood_magic/Initialize(mapload, spell)
. = ..()
@@ -418,6 +419,11 @@
uses = 0
qdel(src)
return
+ if(M.can_block_magic(MAGIC_RESISTANCE_HOLY))
+ to_chat(user, "[M] absorbs your spell! ")
+ uses = 0
+ qdel(src)
+ return
add_attack_logs(user, M, "used a cult spell ([src]) on")
M.lastattacker = user.real_name
diff --git a/code/game/gamemodes/cult/cult_mode.dm b/code/game/gamemodes/cult/cult_mode.dm
index a682eae42551..371eb3200f8a 100644
--- a/code/game/gamemodes/cult/cult_mode.dm
+++ b/code/game/gamemodes/cult/cult_mode.dm
@@ -6,7 +6,7 @@
/datum/game_mode/cult
name = "cult"
config_tag = "cult"
- restricted_jobs = list("Chaplain", "AI", "Cyborg", "Internal Affairs Agent", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative", "Magistrate", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General")
+ restricted_jobs = list("Chaplain", "AI", "Cyborg", "Internal Affairs Agent", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield", "Nanotrasen Representative", "Magistrate", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General")
protected_jobs = list()
required_players = 30
required_enemies = 3
diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm
index b948bad9da63..26066e3b5bf1 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -341,7 +341,4 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list(
/obj/effect/gateway/Bumped(atom/movable/AM)
return
-/obj/effect/gateway/Crossed(atom/movable/AM, oldloc)
- return
-
#undef CULT_STRUCTURE_COOLDOWN
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index ebe886ff10c6..9592e8ecaf47 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -249,9 +249,8 @@ structure_check() searches for nearby cultist structures required for the invoca
qdel(src)
/mob/proc/null_rod_check() //The null rod, if equipped, will protect the holder from the effects of most runes
- var/obj/item/nullrod/N = locate() in src
- if(N)
- return N
+ if(can_block_magic(MAGIC_RESISTANCE_HOLY))
+ return TRUE
return FALSE
//Rite of Enlightenment: Converts a normal crewmember to the cult, or offer them as sacrifice if cant be converted.
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index ffa6c0a158f1..dea52357f816 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -625,17 +625,6 @@
if(something_to_print)
print_command_report(trait_list_desc.Join(" "), "NAS Trurl Detected Divergencies", FALSE)
-
-/datum/game_mode/proc/update_eventmisc_icons_added(datum/mind/mob_mind)
- var/datum/atom_hud/antag/antaghud = GLOB.huds[ANTAG_HUD_EVENTMISC]
- antaghud.join_hud(mob_mind.current)
- set_antag_hud(mob_mind.current, "hudevent")
-
-/datum/game_mode/proc/update_eventmisc_icons_removed(datum/mind/mob_mind)
- var/datum/atom_hud/antag/antaghud = GLOB.huds[ANTAG_HUD_EVENTMISC]
- antaghud.leave_hud(mob_mind.current)
- set_antag_hud(mob_mind.current, null)
-
/// Gets the value of all end of round stats through auto_declare and returns them
/datum/game_mode/proc/get_end_of_round_antagonist_statistics()
. = list()
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index 87b88676d3c9..90ba39865b7a 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -13,6 +13,7 @@
base_cooldown = 0
var/uses //If we have multiple uses of the same power
var/auto_use_uses = TRUE //If we automatically use up uses on each activation
+ antimagic_flags = NONE
/datum/spell/ai_spell/create_new_targeting()
return new /datum/spell_targeting/self
diff --git a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm
index df5df3aae74a..d44adb00d178 100644
--- a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm
+++ b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm
@@ -212,6 +212,8 @@
return
hit = TRUE // to prevent double hits from the pull
. = ..()
+ if(!.)
+ return
for(var/atom/extinguish_target in range(2, src))
extinguish_target.extinguish_light(TRUE)
if(!isliving(target))
diff --git a/code/game/gamemodes/miniantags/guardian/host_actions.dm b/code/game/gamemodes/miniantags/guardian/host_actions.dm
index 4a4ff5144bad..e21f25094156 100644
--- a/code/game/gamemodes/miniantags/guardian/host_actions.dm
+++ b/code/game/gamemodes/miniantags/guardian/host_actions.dm
@@ -106,6 +106,7 @@
name = "Place Teleportation Beacon"
desc = "Mark a floor as your beacon point, allowing you to warp targets to it. Your beacon requires an anchor, will not work on space tiles."
clothes_req = FALSE
+ antimagic_flags = NONE
base_cooldown = 300 SECONDS
action_icon_state = "no_state"
action_background_icon = 'icons/mob/guardian.dmi'
@@ -129,6 +130,7 @@
name = "Set Surveillance Snare"
desc = "Places an invisible Surveillance Snare on the ground, if someone walks over it you'll be alerted. Max of 6 snares active at a time"
clothes_req = FALSE
+ antimagic_flags = NONE
base_cooldown = 3 SECONDS
action_icon_state = "no_state"
action_background_icon = 'icons/mob/guardian.dmi'
@@ -160,6 +162,7 @@
name = "Change battlecry"
desc = "Changes your battlecry."
clothes_req = FALSE
+ antimagic_flags = NONE
base_cooldown = 1 SECONDS
action_icon_state = "no_state"
action_background_icon = 'icons/mob/guardian.dmi'
diff --git a/code/game/gamemodes/miniantags/guardian/types/protector.dm b/code/game/gamemodes/miniantags/guardian/types/protector.dm
index e385fd1e329d..756b4489bdea 100644
--- a/code/game/gamemodes/miniantags/guardian/types/protector.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/protector.dm
@@ -125,7 +125,7 @@
color = linked_guardian.name_color
shield_orientation = left_or_right
-/obj/effect/guardianshield/CanPass(atom/movable/mover, turf/target)
+/obj/effect/guardianshield/CanPass(atom/movable/mover, border_dir)
if(mover == linked_guardian)
return TRUE
return FALSE
diff --git a/code/game/gamemodes/miniantags/guardian/types/ranged.dm b/code/game/gamemodes/miniantags/guardian/types/ranged.dm
index d3f67b67ef53..862fe56ff111 100644
--- a/code/game/gamemodes/miniantags/guardian/types/ranged.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/ranged.dm
@@ -88,18 +88,25 @@
var/mob/living/spawner
invisibility = 101
+/obj/effect/snare/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/snare/singularity_act()
return
/obj/effect/snare/singularity_pull()
return
-/obj/effect/snare/Crossed(AM as mob|obj, oldloc)
- if(isliving(AM))
+/obj/effect/snare/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isliving(entered))
var/turf/snare_loc = get_turf(loc)
if(spawner)
- to_chat(spawner, "[AM] has crossed your surveillance trap at [get_area(snare_loc)]. ")
+ to_chat(spawner, "[entered] has crossed your surveillance trap at [get_area(snare_loc)]. ")
if(isguardian(spawner))
var/mob/living/simple_animal/hostile/guardian/G = spawner
if(G.summoner)
- to_chat(G.summoner, "[AM] has crossed your surveillance trap at [get_area(snare_loc)]. ")
+ to_chat(G.summoner, "[entered] has crossed your surveillance trap at [get_area(snare_loc)]. ")
diff --git a/code/game/gamemodes/miniantags/morph/spells/pass_airlock.dm b/code/game/gamemodes/miniantags/morph/spells/pass_airlock.dm
index b8f2f1623bc8..847ee5cce004 100644
--- a/code/game/gamemodes/miniantags/morph/spells/pass_airlock.dm
+++ b/code/game/gamemodes/miniantags/morph/spells/pass_airlock.dm
@@ -5,6 +5,7 @@
action_background_icon_state = "bg_morph"
action_icon_state = "morph_airlock"
clothes_req = FALSE
+ antimagic_flags = NONE
base_cooldown = 10 SECONDS
selection_activated_message = "Click on an airlock to try pass it. "
diff --git a/code/game/gamemodes/miniantags/pulsedemon/cross_shock_component.dm b/code/game/gamemodes/miniantags/pulsedemon/cross_shock_component.dm
index 1c15fdb1a820..cf7da6be862b 100644
--- a/code/game/gamemodes/miniantags/pulsedemon/cross_shock_component.dm
+++ b/code/game/gamemodes/miniantags/pulsedemon/cross_shock_component.dm
@@ -3,11 +3,16 @@
var/energy_cost
var/delay_between_shocks
var/requires_cable
+
COOLDOWN_DECLARE(last_shock)
/datum/component/cross_shock/Initialize(_shock_damage, _energy_cost, _delay_between_shocks, _requires_cable = TRUE)
if(ismovable(parent))
- RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_CROSSED_MOVABLE), PROC_REF(do_shock))
+ var/static/list/crossed_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(do_shock),
+ )
+ AddComponent(/datum/component/connect_loc_behalf, parent, crossed_connections)
+ RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_movable_moved))
if(ismob(parent))
RegisterSignal(parent, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(on_organ_removal))
else if(isarea(parent))
@@ -22,11 +27,18 @@
delay_between_shocks = _delay_between_shocks
requires_cable = _requires_cable
-/datum/component/cross_shock/proc/do_shock(datum/source, mob/living/thing_were_gonna_shock)
- SIGNAL_HANDLER
+/datum/component/cross_shock/proc/on_movable_moved(atom/source, old_location, direction, forced)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ if(isturf(source.loc))
+ for(var/mob/living/mob in source.loc)
+ do_shock(src, mob)
+
+/datum/component/cross_shock/proc/do_shock(atom/source, atom/movable/to_shock)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
if(!COOLDOWN_FINISHED(src, last_shock))
return
- if(!istype(thing_were_gonna_shock))
+ var/mob/living/living_to_shock = to_shock
+ if(!istype(living_to_shock))
return
if(isliving(parent))
var/mob/living/M = parent
@@ -40,11 +52,11 @@
if(!our_cable || !our_cable.powernet || !our_cable.powernet.available_power)
return
var/area/to_deduct_from = get_area(our_cable)
- thing_were_gonna_shock.electrocute_act(shock_damage, source)
+ living_to_shock.electrocute_act(shock_damage, source)
to_deduct_from.powernet.use_active_power(energy_cost)
playsound(get_turf(parent), 'sound/effects/eleczap.ogg', 30, TRUE)
else
- thing_were_gonna_shock.electrocute_act(shock_damage, source)
+ living_to_shock.electrocute_act(shock_damage, source)
playsound(get_turf(parent), 'sound/effects/eleczap.ogg', 30, TRUE)
COOLDOWN_START(src, last_shock, delay_between_shocks)
diff --git a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm
index c8ef3b159adb..83e7c32d8b69 100644
--- a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm
+++ b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon.dm
@@ -14,7 +14,7 @@
gender = NEUTER
speak_chance = 20
- damage_coeff = list(BRUTE = 0, BURN = 0, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) // Pulse demons take damage from nothing
+ damage_coeff = list(BRUTE = 0, BURN = 0.5, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) // Pulse demons take damage from nothing except some from lasers
emote_hear = list("vibrates", "sizzles")
speak_emote = list("modulates")
@@ -131,9 +131,13 @@
ADD_TRAIT(src, TRAIT_AI_UNTRACKABLE, PULSEDEMON_TRAIT)
flags_2 |= RAD_NO_CONTAMINATE_2
- // don't step on me
- RegisterSignal(src, COMSIG_CROSSED_MOVABLE, PROC_REF(try_cross_shock))
- RegisterSignal(src, COMSIG_MOVABLE_CROSSED, PROC_REF(try_cross_shock))
+ // For when someone steps on us
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+ // For when we move somewhere else
+ RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(on_movable_moved))
// drop demon onto ground if its loc is a non-turf and gets deleted
RegisterSignal(src, COMSIG_PARENT_PREQDELETED, PROC_REF(deleted_handler))
@@ -639,8 +643,18 @@
maxcharge = calc_maxcharge(length(hijacked_apcs)) + (maxcharge - calc_maxcharge(length(hijacked_apcs) - 1))
to_chat(src, "Hijacking complete! You now control [length(hijacked_apcs)] APCs. ")
-/mob/living/simple_animal/demon/pulse_demon/proc/try_cross_shock(src, atom/A)
- SIGNAL_HANDLER
+/mob/living/simple_animal/demon/pulse_demon/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+ try_cross_shock(entered)
+
+/mob/living/simple_animal/demon/pulse_demon/proc/on_movable_moved(datum/source, old_location, direction, forced)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ if(is_under_tile())
+ return
+ for(var/mob/living/mob in loc)
+ try_shock_mob(mob)
+
+/mob/living/simple_animal/demon/pulse_demon/proc/try_cross_shock(atom/movable/A)
if(!isliving(A) || is_under_tile())
return
var/mob/living/L = A
@@ -761,15 +775,17 @@
/mob/living/simple_animal/demon/pulse_demon/ex_act()
return
-/mob/living/simple_animal/demon/pulse_demon/CanPass(atom/movable/mover, turf/target)
+/mob/living/simple_animal/demon/pulse_demon/CanPass(atom/movable/mover, border_dir)
. = ..()
if(istype(mover, /obj/item/projectile/ion))
return FALSE
/mob/living/simple_animal/demon/pulse_demon/bullet_act(obj/item/projectile/proj)
- if(istype(proj, /obj/item/projectile/ion))
+ if(proj.damage_type == BURN)
+ regen_lock = max(regen_lock, 1)
return ..()
- visible_message("[proj] goes right through [src]! ")
+ else
+ visible_message("[proj] goes right through [src]! ")
/mob/living/simple_animal/demon/pulse_demon/electrocute_act(shock_damage, source, siemens_coeff, flags)
return
@@ -812,6 +828,18 @@
return FALSE
return TRUE
+/mob/living/simple_animal/demon/pulse_demon/adjustHealth(amount, updating_health)
+ if(amount > 0) // This damages the pulse demon
+ return ..()
+
+ if(!ismachinery(loc))
+ if(health >= (maxHealth / 2))
+ amount = 0
+ else
+ amount = clamp(amount, -((maxHealth / 2) - health), 0)
+ amount = round(amount, 1)
+ return ..()
+
/obj/item/organ/internal/heart/demon/pulse
name = "perpetual pacemaker"
desc = "It still beats furiously, thousands of bright lights shine within it."
diff --git a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm
index f611824bcf15..97c86faf060d 100644
--- a/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm
+++ b/code/game/gamemodes/miniantags/pulsedemon/pulsedemon_abilities.dm
@@ -9,8 +9,8 @@
#define PD_UPGRADE_MAX_CHARGE "Capacity"
/datum/spell/pulse_demon
- school = "pulse demon"
clothes_req = FALSE
+ antimagic_flags = NONE
action_background_icon_state = "bg_pulsedemon"
var/locked = TRUE
var/unlock_cost = 1 KJ
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
index 0a167ec7724c..ad6da8561d80 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
@@ -134,6 +134,7 @@
clothes_req = FALSE
action_icon_state = "r_transmit"
action_background_icon_state = "bg_revenant"
+ antimagic_flags = MAGIC_RESISTANCE_HOLY|MAGIC_RESISTANCE_MIND
/datum/spell/revenant_transmit/create_new_targeting()
var/datum/spell_targeting/targeted/T = new()
@@ -165,6 +166,7 @@
var/unlock_amount = 100
/// How much essence it costs to use
var/cast_amount = 50
+ antimagic_flags = MAGIC_RESISTANCE_HOLY
/datum/spell/aoe/revenant/New()
..()
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index 12def9e3ef48..46ed0c4f3fea 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -7,7 +7,7 @@
/datum/game_mode/revolution
name = "revolution"
config_tag = "revolution"
- restricted_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer", "Blueshield", "Nanotrasen Representative", "Magistrate", "Quartermaster")
+ restricted_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer", "Blueshield", "Nanotrasen Representative", "Magistrate", "Quartermaster", "Nanotrasen Career Trainer")
required_players = 20
required_enemies = 1
recommended_enemies = 3
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 20ad639a645f..6ed1248aa9b4 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -2,7 +2,7 @@
name = "traitor"
config_tag = "traitor"
restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General", "Nanotrasen Career Trainer")
required_players = 0
required_enemies = 1
recommended_enemies = 4
diff --git a/code/game/gamemodes/trifecta/trifecta.dm b/code/game/gamemodes/trifecta/trifecta.dm
index 2e1798c8a8c9..783de206c6bd 100644
--- a/code/game/gamemodes/trifecta/trifecta.dm
+++ b/code/game/gamemodes/trifecta/trifecta.dm
@@ -6,7 +6,7 @@
/datum/game_mode/trifecta
name = "Trifecta"
config_tag = "trifecta"
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Trans-Solar Federation General")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Trans-Solar Federation General", "Nanotrasen Career Trainer")
restricted_jobs = list("Cyborg")
secondary_restricted_jobs = list("AI")
required_players = 25
diff --git a/code/game/gamemodes/vampire/traitor_vamp.dm b/code/game/gamemodes/vampire/traitor_vamp.dm
index 0e6576d4d603..68224edcc120 100644
--- a/code/game/gamemodes/vampire/traitor_vamp.dm
+++ b/code/game/gamemodes/vampire/traitor_vamp.dm
@@ -2,7 +2,7 @@
name = "traitor_vampire"
config_tag = "traitorvamp"
traitors_possible = 3 //hard limit on traitors if scaling is turned off
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Trans-Solar Federation General")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Trans-Solar Federation General")
restricted_jobs = list("Cyborg")
secondary_restricted_jobs = list("AI", "Chaplain")
required_players = 10
diff --git a/code/game/gamemodes/vampire/vampire_chan.dm b/code/game/gamemodes/vampire/vampire_chan.dm
index 29ef10b5c104..f0cd8300ccd6 100644
--- a/code/game/gamemodes/vampire/vampire_chan.dm
+++ b/code/game/gamemodes/vampire/vampire_chan.dm
@@ -2,7 +2,7 @@
name = "vampire_changeling"
config_tag = "vampchan"
restricted_jobs = list("AI", "Cyborg")
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Chaplain", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Solar Federation General")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Chaplain", "Internal Affairs Agent", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Solar Federation General")
species_to_mindflayer = list("Machine")
required_players = 15
required_enemies = 1
diff --git a/code/game/gamemodes/vampire/vampire_gamemode.dm b/code/game/gamemodes/vampire/vampire_gamemode.dm
index 837577382339..05b15dae3a0c 100644
--- a/code/game/gamemodes/vampire/vampire_gamemode.dm
+++ b/code/game/gamemodes/vampire/vampire_gamemode.dm
@@ -2,7 +2,7 @@
name = "vampire"
config_tag = "vampire"
restricted_jobs = list("AI", "Cyborg")
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Chaplain", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Chaplain", "Internal Affairs Agent", "Nanotrasen Career Trainer", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Trans-Solar Federation General", "Nanotrasen Career Trainer")
species_to_mindflayer = list("Machine")
required_players = 15
required_enemies = 1
diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm
index 7481db80dc9e..f75c5a692b83 100644
--- a/code/game/gamemodes/wizard/godhand.dm
+++ b/code/game/gamemodes/wizard/godhand.dm
@@ -15,6 +15,9 @@
throwforce = 0
throw_range = 0
throw_speed = 0
+ new_attack_chain = TRUE
+ /// Has it been blocked by antimagic? If so, abort.
+ var/blocked_by_antimagic = FALSE
/obj/item/melee/touch_attack/New(spell)
attached_spell = spell
@@ -29,15 +32,25 @@
/obj/item/melee/touch_attack/customised_abstract_text(mob/living/carbon/owner)
return "[owner.p_their(TRUE)] [owner.l_hand == src ? "left hand" : "right hand"] is burning in magic fire. "
-/obj/item/melee/touch_attack/attack__legacy__attackchain(mob/target, mob/living/carbon/user)
- if(!iscarbon(user)) //Look ma, no hands
- return
+/obj/item/melee/touch_attack/attack(mob/living/target, mob/living/carbon/human/user)
+ if(..() || !iscarbon(user)) //Look ma, no hands
+ return FINISH_ATTACK
if(HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
to_chat(user, "You can't reach out! ")
+ return FINISH_ATTACK
+
+/obj/item/melee/touch_attack/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+ var/mob/mob_victim = target
+ if(istype(mob_victim) && mob_victim.can_block_magic(attached_spell.antimagic_flags))
+ to_chat(user, "[mob_victim] absorbs your spell! ")
+ blocked_by_antimagic = TRUE
+ if(attached_spell && attached_spell.cooldown_handler)
+ attached_spell.cooldown_handler.start_recharge(attached_spell.cooldown_handler.recharge_duration * 0.5)
+ qdel(src)
return
- ..()
-/obj/item/melee/touch_attack/afterattack__legacy__attackchain(atom/target, mob/user, proximity)
+/obj/item/melee/touch_attack/proc/handle_delete(mob/user)
if(catchphrase)
user.say(catchphrase)
playsound(get_turf(user), on_use_sound, 50, 1)
@@ -53,13 +66,15 @@
icon_state = "disintegrate"
item_state = "disintegrate"
-/obj/item/melee/touch_attack/disintegrate/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //exploding after touching yourself would be bad
+
+/obj/item/melee/touch_attack/disintegrate/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+ if(!proximity_flag || target == user || blocked_by_antimagic || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //exploding after touching yourself would be bad
return
var/mob/M = target
do_sparks(4, 0, M.loc) //no idea what the 0 is
M.gib()
- ..()
+ handle_delete(user)
/obj/item/melee/touch_attack/fleshtostone
name = "petrifying touch"
@@ -69,13 +84,34 @@
icon_state = "fleshtostone"
item_state = "fleshtostone"
-/obj/item/melee/touch_attack/fleshtostone/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //getting hard after touching yourself would also be bad
+/obj/item/melee/touch_attack/fleshtostone/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+
+ if(!proximity_flag || target == user || blocked_by_antimagic || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //getting hard after touching yourself would also be bad
return
var/mob/living/L = target
L.Stun(4 SECONDS)
new /obj/structure/closet/statue(L.loc, L)
- ..()
+ handle_delete(user)
+
+/obj/item/melee/touch_attack/plushify
+ name = "fabric touch"
+ desc = "The power to sew your foes into a doom cut from the fabric of fate."
+ catchphrase = "MAHR-XET 'ABL"
+ on_use_sound = 'sound/magic/smoke.ogg'
+ icon_state = "disintegrate"
+ item_state = "disintegrate"
+ color = COLOR_PURPLE
+
+/obj/item/melee/touch_attack/plushify/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+
+ if(!proximity_flag || target == user || blocked_by_antimagic || !isliving(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //There are better ways to get a good nights sleep in a bed.
+ return
+ var/mob/living/L = target
+ L.plushify()
+ handle_delete(user)
+
/obj/item/melee/touch_attack/fake_disintegrate
name = "toy plastic hand"
@@ -86,12 +122,14 @@
item_state = "disintegrate"
needs_permit = FALSE
-/obj/item/melee/touch_attack/fake_disintegrate/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //not exploding after touching yourself would be bad
+/obj/item/melee/touch_attack/fake_disintegrate/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+
+ if(!proximity_flag || target == user || blocked_by_antimagic || !ismob(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //not exploding after touching yourself would be bad
return
do_sparks(4, 0, target.loc)
playsound(target.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
- ..()
+ handle_delete(user)
/obj/item/melee/touch_attack/cluwne
name = "cluwne touch"
@@ -101,8 +139,10 @@
icon_state = "cluwnecurse"
item_state = "cluwnecurse"
-/obj/item/melee/touch_attack/cluwne/afterattack__legacy__attackchain(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //clowning around after touching yourself would unsurprisingly, be bad
+/obj/item/melee/touch_attack/cluwne/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+
+ if(!proximity_flag || target == user || blocked_by_antimagic || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED)) //clowning around after touching yourself would unsurprisingly, be bad
return
if(iswizard(target))
@@ -119,4 +159,4 @@
H.makeCluwne()
else
H.makeAntiCluwne()
- ..()
+ handle_delete(user)
diff --git a/code/game/gamemodes/wizard/magic_tarot.dm b/code/game/gamemodes/wizard/magic_tarot.dm
index 5f7eed073e96..b6d2cbc6140d 100644
--- a/code/game/gamemodes/wizard/magic_tarot.dm
+++ b/code/game/gamemodes/wizard/magic_tarot.dm
@@ -232,6 +232,11 @@
qdel(src)
/obj/item/magic_tarot_card/proc/pre_activate(mob/user, atom/movable/thrower)
+ if(user != thrower) //Ignore antimagic stuff if the user is the thrower (aka self activation)
+ if(user.can_block_magic(our_tarot.antimagic_flags, 1))
+ visible_message("[src] burns up in a flash on contact with [user]! ")
+ qdel(src)
+ return
has_been_activated = TRUE
forceMove(user)
var/obj/effect/temp_visual/card_preview/tarot/draft = new(user, "tarot_[our_tarot.card_icon]")
@@ -288,6 +293,8 @@
var/card_icon = "the_unknown"
/// Are we reversed? Used for the card back.
var/reversed = FALSE
+ /// What antimagic flags do we have?
+ var/antimagic_flags = MAGIC_RESISTANCE
/datum/tarot/proc/activate(mob/living/target)
stack_trace("A bugged tarot card was spawned and used. Please make an issue report! Type was [src.type]")
@@ -688,8 +695,11 @@
var/sparkle_path = /obj/effect/temp_visual/gravpush
for(var/turf/T in range(5, target)) //Done this way so things don't get thrown all around hilariously.
for(var/atom/movable/AM in T)
+ if(ismob(AM))
+ var/mob/victim_mob = AM
+ if(victim_mob.can_block_magic(antimagic_flags))
+ continue
thrown_atoms += AM
-
for(var/atom/movable/AM as anything in thrown_atoms)
if(AM == target || AM.anchored || (ismob(AM) && !isliving(AM)))
continue
@@ -729,6 +739,9 @@
/datum/tarot/reversed/the_empress/activate(mob/living/target)
for(var/mob/living/L in oview(9, target))
+ if(L.can_block_magic(antimagic_flags))
+ to_chat(L, "You feel calm for a second, but it quickly passes. ")
+ continue
L.apply_status_effect(STATUS_EFFECT_PACIFIED)
/datum/tarot/reversed/the_emperor
@@ -763,6 +776,8 @@
for(var/mob/living/M in shuffle(orange(7, target)))
if(M.stat == DEAD) //Let us not have dead mobs be used to make a disco inferno.
continue
+ if(M.can_block_magic(antimagic_flags)) //Be spared!
+ continue
if(active_chasers >= 2)
return
var/obj/effect/temp_visual/hierophant/chaser/C = new(get_turf(target), target, M, 1, FALSE)
@@ -959,6 +974,7 @@
desc = "May you remember lost memories."
extended_desc = "will reveal the memories of everyone in range to the user."
card_icon = "the_moon?"
+ antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND
/datum/tarot/reversed/the_moon/activate(mob/living/target)
for(var/mob/living/L in view(5, target)) //Shorter range as this kinda can give away antagonists, though that is also funny.
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index 60b8ac422dd8..22e844b19173 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -152,6 +152,11 @@
spell_type = /datum/spell/touch/flesh_to_stone
category = "Offensive"
+/datum/spellbook_entry/plushify
+ name = "Plushify"
+ spell_type = /datum/spell/touch/plushify
+ category = "Offensive"
+
/datum/spellbook_entry/mutate
name = "Mutate"
spell_type = /datum/spell/genetic/mutate
@@ -494,7 +499,9 @@
//Weapons and Armors
/datum/spellbook_entry/item/battlemage
name = "Battlemage Armor"
- desc = "An ensorceled spaceproof suit of protective yet light armor, protected by a powerful shield. The shield can completely negate 15 attacks before permanently failing."
+ desc = "An ensorceled spaceproof suit of protective yet light armor, protected by a powerful shield. The shield can completely negate 15 attacks before permanently failing. \
+ This armor grants you full protection from magical attacks, and allows you to cast magic despite that. However, this means it will also block wands or staffs of \
+ healing from working on you, and should be removed before application."
item_path = /obj/item/storage/box/wizard/hardsuit
limit = 1
category = "Weapons and Armors"
diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm
index 7c99ca64c72c..4bd7839054f2 100644
--- a/code/game/jobs/access.dm
+++ b/code/game/jobs/access.dm
@@ -107,7 +107,7 @@
ACCESS_INTERNAL_AFFAIRS, ACCESS_LIBRARY, ACCESS_MAGISTRATE, ACCESS_MAINT_TUNNELS, ACCESS_HEADS_VAULT, ACCESS_MEDICAL, ACCESS_MIME,
ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_MORGUE, ACCESS_NTREP, ACCESS_PARAMEDIC, ACCESS_ALL_PERSONAL_LOCKERS,
ACCESS_ENGINE_EQUIP, ACCESS_PSYCHIATRIST, ACCESS_QM, ACCESS_RD, ACCESS_RC_ANNOUNCE, ACCESS_ROBOTICS, ACCESS_TOX, ACCESS_RESEARCH, ACCESS_SECURITY,
- ACCESS_SURGERY, ACCESS_TECH_STORAGE, ACCESS_TELEPORTER, ACCESS_THEATRE, ACCESS_TCOMSAT, ACCESS_TOX_STORAGE, ACCESS_VIROLOGY, ACCESS_WEAPONS, ACCESS_XENOBIOLOGY)
+ ACCESS_SURGERY, ACCESS_TECH_STORAGE, ACCESS_TELEPORTER, ACCESS_THEATRE, ACCESS_TCOMSAT, ACCESS_TOX_STORAGE, ACCESS_VIROLOGY, ACCESS_WEAPONS, ACCESS_XENOBIOLOGY, ACCESS_TRAINER)
/proc/get_all_centcom_access()
return list(ACCESS_CENT_GENERAL, ACCESS_CENT_LIVING, ACCESS_CENT_SECURITY, ACCESS_CENT_SHUTTLES, ACCESS_CENT_SPECOPS, ACCESS_CENT_SPECOPS_COMMANDER, ACCESS_CENT_COMMANDER)
@@ -126,7 +126,7 @@
if(REGION_ALL)
return get_all_accesses()
if(REGION_GENERAL) //station general
- return list(ACCESS_KITCHEN, ACCESS_BAR, ACCESS_HYDROPONICS, ACCESS_JANITOR, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_LIBRARY, ACCESS_THEATRE, ACCESS_INTERNAL_AFFAIRS, ACCESS_MAGISTRATE, ACCESS_CLOWN, ACCESS_MIME)
+ return list(ACCESS_KITCHEN, ACCESS_BAR, ACCESS_HYDROPONICS, ACCESS_JANITOR, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_LIBRARY, ACCESS_THEATRE, ACCESS_INTERNAL_AFFAIRS, ACCESS_MAGISTRATE, ACCESS_CLOWN, ACCESS_MIME, ACCESS_TRAINER)
if(REGION_SECURITY) //security
return list(ACCESS_SEC_DOORS, ACCESS_WEAPONS, ACCESS_SECURITY, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_FORENSICS_LOCKERS, ACCESS_COURT, ACCESS_HOS)
if(REGION_MEDBAY) //medbay
@@ -302,6 +302,8 @@
return "AI Satellite"
if(ACCESS_WEAPONS)
return "Weapon Permit"
+ if(ACCESS_TRAINER)
+ return "Nanotrasen Career Trainer"
/proc/get_centcom_access_desc(A)
switch(A)
diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm
index 4b4708b1a97e..9532959e6c69 100644
--- a/code/game/jobs/job/job.dm
+++ b/code/game/jobs/job/job.dm
@@ -60,6 +60,7 @@
var/hidden_from_job_prefs = FALSE // if true, job preferences screen never shows this job.
var/admin_only = 0
+ var/mentor_only = 0
var/spawn_ert = 0
var/syndicate_command = 0
diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm
index 723ce4f0f603..2b41c27a9e18 100644
--- a/code/game/jobs/job/supervisor.dm
+++ b/code/game/jobs/job/supervisor.dm
@@ -175,7 +175,8 @@
ACCESS_SECURITY,
ACCESS_SUPPLY_SHUTTLE,
ACCESS_THEATRE,
- ACCESS_WEAPONS
+ ACCESS_WEAPONS,
+ ACCESS_TRAINER
)
blacklisted_disabilities = list(DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
outfit = /datum/outfit/job/nanotrasenrep
@@ -276,7 +277,8 @@
ACCESS_RC_ANNOUNCE,
ACCESS_SEC_DOORS,
ACCESS_SECURITY,
- ACCESS_WEAPONS
+ ACCESS_WEAPONS,
+ ACCESS_TRAINER
)
blacklisted_disabilities = list(DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
outfit = /datum/outfit/job/judge
@@ -349,3 +351,74 @@
bio_chips = list(/obj/item/bio_chip/mindshield)
satchel = /obj/item/storage/backpack/satchel_sec
dufflebag = /obj/item/storage/backpack/duffel/security
+
+/datum/job/nanotrasentrainer
+ title = "Nanotrasen Career Trainer"
+ flag = JOB_INSTRUCTOR
+ department_flag = JOBCAT_ENGSEC
+ total_positions = 2
+ spawn_positions = 2
+ supervisors = "the Nanotrasen Representative"
+ department_head = list("Captain")
+ selection_color = "#ddddff"
+ mentor_only = TRUE
+ job_department_flags = DEP_FLAG_COMMAND
+ transfer_allowed = FALSE
+ access = list(
+ ACCESS_ALL_PERSONAL_LOCKERS,
+ ACCESS_CARGO,
+ ACCESS_MAILSORTING,
+ ACCESS_CONSTRUCTION,
+ ACCESS_COURT,
+ ACCESS_EVA,
+ ACCESS_MAINT_TUNNELS,
+ ACCESS_MEDICAL,
+ ACCESS_RESEARCH,
+ ACCESS_SEC_DOORS,
+ ACCESS_THEATRE,
+ ACCESS_INTERNAL_AFFAIRS,
+ ACCESS_TRAINER
+ )
+ blacklisted_disabilities = list(DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
+ outfit = /datum/outfit/job/nct
+ important_information = "Your job is to try to assist as many crew members as possible regardless of department. You are NOT permitted to give command staff advice on any command SOP questions or aid in legal advice."
+
+/datum/outfit/job/nct
+ name = "Nanotrasen Career Trainer"
+ jobtype = /datum/job/nanotrasentrainer
+ uniform = /obj/item/clothing/under/rank/procedure/nct
+ suit = /obj/item/clothing/suit/storage/nct
+ gloves = /obj/item/clothing/gloves/color/white
+ shoes = /obj/item/clothing/shoes/centcom
+ head = /obj/item/clothing/head/beret/nct/green
+ glasses = /obj/item/clothing/glasses/hud/skills/sunglasses
+ l_ear = /obj/item/radio/headset/headset_nct
+ id = /obj/item/card/id/nct
+ l_pocket = /obj/item/card/id/nct_data_chip
+ r_pocket = /obj/item/flash
+ pda = /obj/item/pda/heads/ntrep
+ backpack = /obj/item/storage/backpack/satchel
+
+ backpack_contents = list(
+ /obj/item/pinpointer/crew = 1,
+ /obj/item/healthanalyzer/advanced = 1,
+ /obj/item/book/manual/sop_ntinstructor,
+ /obj/item/laser_pointer/blue = 1
+ )
+
+ bio_chips = list(/obj/item/bio_chip/mindshield)
+
+/datum/outfit/job/nct/post_equip(mob/living/carbon/human/H, visualsOnly)
+ . = ..()
+ if(visualsOnly)
+ return
+
+ var/obj/item/card/id/nct_data_chip/I = H.l_store
+ I.registered_user = H.mind.current
+ I.registered_name = H.real_name
+ var/icon/newphoto = get_id_photo(H, "Nanotrasen Career Trainer")
+ I.photo = newphoto
+
+/datum/outfit/job/nct/on_mind_initialize(mob/living/carbon/human/H)
+ . = ..()
+ H.mind.offstation_role = TRUE
diff --git a/code/game/jobs/job_globals.dm b/code/game/jobs/job_globals.dm
index eafaadcfaa14..b81f5e410929 100644
--- a/code/game/jobs/job_globals.dm
+++ b/code/game/jobs/job_globals.dm
@@ -14,7 +14,8 @@ GLOBAL_LIST_INIT(command_positions, list(
"Quartermaster",
"Nanotrasen Representative",
"Magistrate",
- "Blueshield"
+ "Blueshield",
+ "Nanotrasen Career Trainer"
))
/// Only roles that are command of departments, for revolution and similar stuff
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index ab86bc89afbd..d0bc0b0dca76 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -37,7 +37,7 @@
. = ..()
. += "Click-drag someone to the table to place them on top of the table. "
-/obj/machinery/optable/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/optable/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSTABLE))
return TRUE
if(isliving(mover))
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 24bd6f3a7c02..ca131022a999 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -40,6 +40,7 @@
var/detectTime = 0
var/area/station/ai_monitored/area_motion = null
var/alarm_delay = 30 // Don't forget, there's another 3 seconds in queueAlarm()
+ var/datum/proximity_monitor/proximity_monitor
/// If this camera doesnt add to camera chunks. Used by camera bugs.
var/non_chunking_camera = FALSE
@@ -64,6 +65,12 @@
/obj/machinery/camera/proc/set_area_motion(area/A)
area_motion = A
+ create_prox_monitor()
+
+/obj/machinery/camera/proc/create_prox_monitor()
+ if(!proximity_monitor)
+ proximity_monitor = new(src, 1)
+ RegisterSignal(proximity_monitor, COMSIG_PARENT_QDELETING, PROC_REF(proximity_deleted))
/obj/machinery/camera/Moved(atom/OldLoc, Dir, Forced)
. = ..()
@@ -121,6 +128,10 @@
return
..()
+/obj/machinery/camera/proc/proximity_deleted()
+ SIGNAL_HANDLER // COMSIG_PARENT_QDELETING
+ proximity_monitor = null
+
/obj/machinery/camera/proc/setViewRange(num = CAMERA_VIEW_DISTANCE)
view_range = num
GLOB.cameranet.updateVisibility(src, 0)
diff --git a/code/game/machinery/camera/camera_presets.dm b/code/game/machinery/camera/camera_presets.dm
index 9c7f0fc61bc0..36a39afc6c2e 100644
--- a/code/game/machinery/camera/camera_presets.dm
+++ b/code/game/machinery/camera/camera_presets.dm
@@ -40,7 +40,7 @@
/obj/machinery/camera/tracking_head/Initialize(mapload)
. = ..()
- AddComponent(/datum/component/proximity_monitor, _radius = 6)
+ proximity_monitor = new(src, 6)
camera_overlay = new(get_turf(src))
switch(dir)
if(NORTH)
@@ -155,7 +155,7 @@
if(name == initial(name))
name = "motion-sensitive security camera"
assembly.upgrades.Add(new /obj/item/assembly/prox_sensor(assembly))
- AddComponent(/datum/component/proximity_monitor, CAMERA_VIEW_DISTANCE)
+ proximity_monitor = new(src, CAMERA_VIEW_DISTANCE)
setPowerUsage()
// Add it to machines that process
START_PROCESSING(SSmachines, src)
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index 42175880711c..6e037b9db450 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -76,7 +76,7 @@
if(prob(30))
do_sparks(2, 1, T)
T.ex_act(EXPLODE_LIGHT)
- T.hotspot_expose(1000,500,1)
+ T.hotspot_expose(1000,500)
/obj/machinery/computer/holodeck_control/proc/loadProgram(area/A)
diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm
index ae795b6b92e8..9b3fee6c25ca 100644
--- a/code/game/machinery/computer/atmos_alert.dm
+++ b/code/game/machinery/computer/atmos_alert.dm
@@ -12,8 +12,9 @@
/obj/machinery/computer/atmos_alert/Initialize(mapload)
. = ..()
alarm_cache = list()
- alarm_cache["minor"] = list()
alarm_cache["priority"] = list()
+ alarm_cache["minor"] = list()
+ alarm_cache["mode"] = list()
var/area/machine_area = get_area(src)
parent_area_type = machine_area.get_top_parent_type()
@@ -34,6 +35,10 @@
else
alarm_cache["priority"] -= air_alarm.alarm_area.name
alarm_cache["minor"] -= air_alarm.alarm_area.name
+ if(air_alarm.mode == AALARM_MODE_FILTERING)
+ alarm_cache["mode"] -= air_alarm.alarm_area.name
+ else
+ alarm_cache["mode"][air_alarm.alarm_area.name] = GLOB.aalarm_modes["[air_alarm.mode]"]
update_icon()
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 67247f5aa475..dd3c3014f01e 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -50,7 +50,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
/datum/job/nanotrasenrep,
/datum/job/chaplain,
/datum/job/officer,
- /datum/job/qm
+ /datum/job/qm,
+ /datum/job/nanotrasentrainer
)
//The scaling factor of max total positions in relation to the total amount of people on board the station in %
@@ -154,17 +155,19 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
/obj/machinery/computer/card/attackby__legacy__attackchain(obj/item/card/id/id_card, mob/user, params)
if(!istype(id_card))
return ..()
+ if(istype(id_card, /obj/item/card/id/nct_data_chip))
+ return ..()
if(!scan && check_access(id_card))
user.drop_item()
id_card.forceMove(src)
scan = id_card
- playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
else if(!modify)
user.drop_item()
id_card.forceMove(src)
modify = id_card
- playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
SStgui.update_uis(src)
attack_hand(user)
@@ -425,14 +428,18 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
else if(Adjacent(usr))
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/card/id))
+ if(istype(I, /obj/item/card/id/nct_data_chip))
+ playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, FALSE)
+ to_chat(usr, "The data chip doesn't fit! ")
+ return FALSE
if(!check_access(I))
- playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, 0)
+ playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, FALSE)
to_chat(usr, "This card does not have access. ")
return FALSE
usr.drop_item()
I.forceMove(src)
scan = I
- playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
+ playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
return
if("modify") // inserting or removing the ID you plan to modify
if(modify)
@@ -451,6 +458,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
else if(Adjacent(usr))
var/obj/item/I = usr.get_active_hand()
if(istype(I, /obj/item/card/id))
+ if(istype(I, /obj/item/card/id/nct_data_chip))
+ playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, FALSE)
+ to_chat(usr, "The data chip doesn't fit! ")
+ return FALSE
usr.drop_item()
I.forceMove(src)
modify = I
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 057eeaa7ce90..3fc127338fdf 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -57,7 +57,7 @@
update_icon()
return TRUE
-/obj/structure/barricade/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
+/obj/structure/barricade/CanPass(atom/movable/mover, border_dir)//So bullets will fly over and stuff.
if(locate(/obj/structure/barricade) in get_turf(mover))
return TRUE
else if(istype(mover) && mover.checkpass(PASSBARRICADE))
@@ -450,12 +450,15 @@
0, 0, 0, 1
)
color = target_matrix
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
-/obj/structure/barricade/dropwall/firewall/Crossed(atom/movable/AM, oldloc)
- . = ..()
- if(!isprojectile(AM))
+/obj/structure/barricade/dropwall/firewall/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(!isprojectile(entered))
return
- var/obj/item/projectile/P = AM
+ var/obj/item/projectile/P = entered
P.immolate ++
/obj/item/grenade/turret
@@ -496,7 +499,7 @@
. = ..()
. += "It would need [(5 - foam_level)] more blobs of foam to fully block the airlock."
-/obj/structure/barricade/foam/CanPass(atom/movable/mover, turf/target)
+/obj/structure/barricade/foam/CanPass(atom/movable/mover, border_dir)
return istype(mover, /obj/item/projectile/c_foam) // Only c_foam blobs hit the airlock underneat/pass through the foam. The rest is hitting the barricade
/obj/structure/barricade/foam/welder_act(mob/user, obj/item/I)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 837ecea566f3..e5b8e4b5c396 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -90,6 +90,8 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
var/heat_resistance = 1500
/// Have we created sparks too recently?
var/on_spark_cooldown = FALSE
+ /// Synced with icon state for checking on callbacks
+ var/airlock_state
var/mutable_appearance/old_buttons_underlay
var/mutable_appearance/old_lights_underlay
@@ -392,6 +394,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
if(AIRLOCK_DENY, AIRLOCK_OPENING, AIRLOCK_CLOSING, AIRLOCK_EMAG)
icon_state = "nonexistenticonstate" //MADNESS
+ airlock_state = state
. = ..(UPDATE_ICON_STATE) // Sent after the icon_state is changed
set_airlock_overlays(state)
@@ -614,8 +617,11 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
if(stat == CONSCIOUS)
update_icon(AIRLOCK_DENY)
playsound(src, doorDeni, 50, FALSE, 3)
- sleep(6)
- update_icon(AIRLOCK_CLOSED)
+ addtimer(CALLBACK(src, PROC_REF(handle_deny_end)), 0.6 SECONDS)
+
+/obj/machinery/door/airlock/proc/handle_deny_end()
+ if(airlock_state == AIRLOCK_DENY)
+ update_icon(AIRLOCK_CLOSED)
/obj/machinery/door/airlock/examine(mob/user)
. = ..()
@@ -760,7 +766,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
if(user)
attack_ai(user)
-/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/door/airlock/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && !locked)
if(mover.checkpass(PASSDOOR))
return TRUE
@@ -1278,6 +1284,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
return TRUE
SEND_SIGNAL(src, COMSIG_AIRLOCK_OPEN)
operating = DOOR_OPENING
+ recalculate_atmos_connectivity()
update_icon(AIRLOCK_OPENING, 1)
sleep(1)
set_opacity(0)
@@ -1288,7 +1295,6 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
density = FALSE
if(width > 1)
set_fillers_density(FALSE)
- recalculate_atmos_connectivity()
sleep(1)
layer = OPEN_DOOR_LAYER
update_icon(AIRLOCK_OPEN, 1)
@@ -1330,7 +1336,6 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
density = TRUE
if(width > 1)
set_fillers_density(TRUE)
- recalculate_atmos_connectivity()
if(!override)
sleep(4)
if(!safe)
@@ -1343,6 +1348,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
sleep(1)
update_icon(AIRLOCK_CLOSED, 1)
operating = NONE
+ recalculate_atmos_connectivity()
if(safe)
CheckForMobs()
return TRUE
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index b4551ee40710..686cf95dc02c 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -704,7 +704,7 @@
qdel(src)
/// Multi-tile airlocks (using a filler panel) have special handling for movables with PASS_FLAG_GLASS
-/obj/airlock_filler_object/CanPass(atom/movable/mover, turf/target)
+/obj/airlock_filler_object/CanPass(atom/movable/mover, border_dir)
. = ..()
if(.)
return
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 2c1ce8187f77..fd9fd32a64cc 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -133,7 +133,7 @@
update_bounds()
-/obj/machinery/door/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/door/CanPass(atom/movable/mover, border_dir)
if(istype(mover))
if(mover.checkpass(PASSDOOR) && !locked)
return TRUE
@@ -142,7 +142,7 @@
return !density
/obj/machinery/door/CanAtmosPass(direction)
- return !density
+ return operating || !density
/obj/machinery/door/get_superconductivity(direction)
if(!density)
@@ -373,6 +373,7 @@
return
SEND_SIGNAL(src, COMSIG_DOOR_OPEN)
operating = DOOR_OPENING
+ recalculate_atmos_connectivity()
do_animate("opening")
set_opacity(0)
if(width > 1)
@@ -388,7 +389,6 @@
if(width > 1)
set_fillers_opacity(0)
operating = NONE
- recalculate_atmos_connectivity()
update_freelook_sight()
if(autoclose)
autoclose_in(normalspeed ? auto_close_time : auto_close_time_dangerous)
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index efc341602041..39ff3baf9723 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -290,7 +290,7 @@
F.update_icon()
qdel(src)
-/obj/machinery/door/firedoor/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/door/firedoor/CanPass(atom/movable/mover, border_dir)
if(..())
return TRUE
if(isliving(mover) && !locked)
@@ -303,26 +303,37 @@
flags = ON_BORDER
can_crush = FALSE
+/obj/machinery/door/firedoor/border_only/Initialize(mapload)
+ . = ..()
+
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/machinery/door/firedoor/border_only/closed
icon_state = "door_closed"
opacity = TRUE
density = TRUE
-/obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
- if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
+ if(border_dir == dir) //Make sure looking at appropriate border
return !density
else
return 1
-/obj/machinery/door/firedoor/border_only/CheckExit(atom/movable/mover, turf/target)
- if(istype(mover) && mover.checkpass(PASSGLASS))
- return 1
- if(get_dir(loc, target) == dir)
- return !density
- else
- return TRUE
+/obj/machinery/door/firedoor/border_only/proc/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXIT
+
+ if(istype(leaving) && leaving.checkpass(PASSGLASS))
+ return
+
+ if(direction == dir && density)
+ leaving.Bump(src)
+ return COMPONENT_ATOM_BLOCK_EXIT
/obj/machinery/door/firedoor/border_only/CanAtmosPass(direction)
if(direction == dir)
diff --git a/code/game/machinery/doors/unpowered.dm b/code/game/machinery/doors/unpowered.dm
deleted file mode 100644
index 49a6343e8ee1..000000000000
--- a/code/game/machinery/doors/unpowered.dm
+++ /dev/null
@@ -1,20 +0,0 @@
-/obj/machinery/door/unpowered
- explosion_block = 1
-
-/obj/machinery/door/unpowered/Bumped(atom/AM)
- if(locked)
- return
- ..()
-
-/obj/machinery/door/unpowered/attackby__legacy__attackchain(obj/item/I, mob/user, params)
- if(locked)
- return
- else
- return ..()
-
-/obj/machinery/door/unpowered/emag_act()
- return
-
-/obj/machinery/door/unpowered/shuttle
- icon = 'icons/turf/shuttle.dmi'
- icon_state = "door1"
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 8169b96246a5..770f4257ce0d 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -32,6 +32,12 @@
if(req_access && length(req_access))
base_state = icon_state
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+
+ AddElement(/datum/element/connect_loc, loc_connections)
+
if(name != initial(name))
return
var/new_name = get_area_name(src)
@@ -140,14 +146,14 @@
return mob_dir & unres_sides
-/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/door/window/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSGLASS))
return TRUE
if(isliving(mover))
var/mob/living/living_mover = mover
if(HAS_TRAIT(living_mover, TRAIT_CONTORTED_BODY) && IS_HORIZONTAL(living_mover))
return TRUE
- if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
+ if(border_dir == dir) //Make sure looking at appropriate border
return !density
if(istype(mover, /obj/structure/window))
var/obj/structure/window/W = mover
@@ -172,17 +178,20 @@
/obj/machinery/door/window/CanPathfindPass(to_dir, datum/can_pass_info/pass_info)
return !density || (dir != to_dir) || (check_access_list(pass_info.access) && hasPower())
-/obj/machinery/door/window/CheckExit(atom/movable/mover, turf/target)
- if(istype(mover) && mover.checkpass(PASSGLASS))
- return TRUE
- if(isliving(mover))
- var/mob/living/living_mover = mover
+/obj/machinery/door/window/proc/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXIT
+
+ if(istype(leaving) && leaving.checkpass(PASSGLASS))
+ return
+
+ if(isliving(leaving))
+ var/mob/living/living_mover = leaving
if(HAS_TRAIT(living_mover, TRAIT_CONTORTED_BODY) && IS_HORIZONTAL(living_mover))
- return TRUE
- if(get_dir(loc, target) == dir)
- return !density
- else
- return 1
+ return
+
+ if(direction == dir && density)
+ leaving.Bump(src)
+ return COMPONENT_ATOM_BLOCK_EXIT
/obj/machinery/door/window/open(forced=0)
if(operating) //doors can still open when emag-disabled
@@ -195,20 +204,20 @@
return 0
if(!operating) //in case of emag
operating = DOOR_OPENING
+ recalculate_atmos_connectivity()
do_animate("opening")
set_opacity(FALSE)
playsound(loc, 'sound/machines/windowdoor.ogg', 100, 1)
icon_state ="[base_state]open"
- sleep(10)
+ addtimer(CALLBACK(src, PROC_REF(finish_open)), 8)
+/obj/machinery/door/window/proc/finish_open()
density = FALSE
-// sd_set_opacity(0) //TODO: why is this here? Opaque windoors? ~Carn
recalculate_atmos_connectivity()
update_freelook_sight()
if(operating) //emag again
operating = NONE
- return 1
/obj/machinery/door/window/close(forced=0)
if(operating)
@@ -227,11 +236,11 @@
density = TRUE
if(polarized_on)
set_opacity(TRUE)
- recalculate_atmos_connectivity()
update_freelook_sight()
sleep(10)
operating = NONE
+ recalculate_atmos_connectivity()
return 1
/obj/machinery/door/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 69f22c6d0f16..fbb7298600cb 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -15,6 +15,7 @@
var/strength = 10 SECONDS //How weakened targets are when flashed.
var/base_state = "mflash"
anchored = TRUE
+ var/datum/proximity_monitor/proximity_monitor
/obj/machinery/flasher/Initialize(mapload)
. = ..()
@@ -32,7 +33,7 @@
/obj/machinery/flasher/portable/Initialize(mapload)
. = ..()
- AddComponent(/datum/component/proximity_monitor)
+ proximity_monitor = new(src, range)
/obj/machinery/flasher/power_change()
if(!..())
diff --git a/code/game/machinery/floor_igniter.dm b/code/game/machinery/floor_igniter.dm
index cc1e4c220d9e..7659327ca140 100644
--- a/code/game/machinery/floor_igniter.dm
+++ b/code/game/machinery/floor_igniter.dm
@@ -57,7 +57,7 @@
if(on && !(stat & NOPOWER))
var/turf/location = get_turf(src)
if(isturf(location))
- location.hotspot_expose(1000, 500, 1)
+ location.hotspot_expose(1000, 1)
return TRUE
/obj/machinery/igniter/Initialize(mapload)
@@ -132,7 +132,7 @@
var/turf/location = get_turf(src)
if(isturf(location))
- location.hotspot_expose(1000, 500, 1)
+ location.hotspot_expose(1000, 500)
return TRUE
diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm
index 52f90c600d64..3fe784f09c6b 100644
--- a/code/game/machinery/guestpass.dm
+++ b/code/game/machinery/guestpass.dm
@@ -61,6 +61,9 @@
my_terminal_id = ++global_terminal_id
/obj/machinery/computer/guestpass/attackby__legacy__attackchain(obj/item/I, mob/user, params)
+ if(istype(I, /obj/item/card/id/nct_data_chip))
+ to_chat(user, "[I] does not seem compatible with this terminal! ")
+ return
if(istype(I, /obj/item/card/id))
if(!scan)
if(user.drop_item())
diff --git a/code/game/machinery/machine_frame.dm b/code/game/machinery/machine_frame.dm
index 766f3ec2aefd..7298d7c539f9 100644
--- a/code/game/machinery/machine_frame.dm
+++ b/code/game/machinery/machine_frame.dm
@@ -251,9 +251,9 @@
qdel(O)
new_machine.component_parts = list()
for(var/obj/O in src)
- O.forceMove(null)
+ O.moveToNullspace()
new_machine.component_parts += O
- circuit.forceMove(null)
+ circuit.moveToNullspace()
new_machine.RefreshParts()
qdel(src)
@@ -317,7 +317,8 @@ to destroy them and players will be able to make replacements.
"BarDrobe" = /obj/machinery/economy/vending/bardrobe,
"HydroDrobe" = /obj/machinery/economy/vending/hydrodrobe,
"JaniDrobe" = /obj/machinery/economy/vending/janidrobe,
- "LawDrobe" = /obj/machinery/economy/vending/lawdrobe)
+ "LawDrobe" = /obj/machinery/economy/vending/lawdrobe,
+ "TrainDrobe" = /obj/machinery/economy/vending/traindrobe)
var/static/list/unique_vendors = list(
"ShadyCigs Ultra" = /obj/machinery/economy/vending/cigarette/beach,
"SyndiMed Plus" = /obj/machinery/economy/vending/wallmed/syndicate)
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 77fec4620b94..dc292c44f28d 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -1225,3 +1225,9 @@ GLOBAL_LIST_EMPTY(turret_icons)
/obj/machinery/porta_turret/inflatable_turret/CanPathfindPass(to_dir, datum/can_pass_info/pass_info)
return ((stat & BROKEN) || !pass_info.is_living)
+
+// Meatpackers' ruin turret
+/obj/machinery/porta_turret/meatpacker_ship
+ name = "ship defense turret"
+ lethal = TRUE
+ check_synth = TRUE
diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm
index a57de59b9f15..f5f31efc6fb8 100644
--- a/code/game/machinery/quantum_pad.dm
+++ b/code/game/machinery/quantum_pad.dm
@@ -1,3 +1,6 @@
+#define QPAD_ANIM_WINDUP 0.8 SECONDS
+#define QPAD_ANIM_COOLDOWN 0.7 SECONDS
+
/obj/machinery/quantumpad
name = "quantum pad"
desc = "A bluespace quantum-linked telepad used for teleporting objects to other quantum pads."
@@ -168,57 +171,70 @@
else
to_chat(user, "Linked pad is not on or near any active cameras on the station. ")
-/obj/machinery/quantumpad/proc/sparks()
- do_sparks(5, 1, get_turf(src))
-
/obj/machinery/quantumpad/attack_ghost(mob/dead/observer/ghost)
if(!QDELETED(linked_pad))
ghost.forceMove(get_turf(linked_pad))
+/obj/machinery/quantumpad/proc/precharge()
+ layer = HIGH_OBJ_LAYER
+ linked_pad.layer = HIGH_OBJ_LAYER
+ flick("qpad-beam", src)
+ flick("qpad-beam", linked_pad)
+ addtimer(CALLBACK(src, PROC_REF(finish_teleport)), max((teleport_speed + QPAD_ANIM_COOLDOWN), 1))
+
+/obj/machinery/quantumpad/proc/finish_teleport()
+ if(!teleporting)
+ layer = BELOW_OBJ_LAYER
+ linked_pad.layer = BELOW_OBJ_LAYER
+
/obj/machinery/quantumpad/proc/doteleport(mob/user)
if(linked_pad)
playsound(get_turf(src), 'sound/weapons/flash.ogg', 25, 1)
teleporting = TRUE
+ src.icon_state = "qpad-charge"
+ linked_pad.icon_state = "qpad-charge"
+ addtimer(CALLBACK(src, PROC_REF(precharge)), max((teleport_speed - QPAD_ANIM_WINDUP), 1))
+ addtimer(CALLBACK(src, PROC_REF(process_teleport)), teleport_speed)
+
+/obj/machinery/quantumpad/proc/process_teleport(mob/user)
+ if(!src || QDELETED(src))
+ teleporting = FALSE
+ return
+ if(stat & NOPOWER)
+ to_chat(user, "[src] is unpowered! ")
+ teleporting = FALSE
+ return
+ if(!linked_pad || QDELETED(linked_pad) || linked_pad.stat & NOPOWER)
+ to_chat(user, "Linked pad is not responding to ping. Teleport aborted. ")
+ teleporting = FALSE
+ return
- spawn(teleport_speed)
- if(!src || QDELETED(src))
- teleporting = FALSE
- return
- if(stat & NOPOWER)
- to_chat(user, "[src] is unpowered! ")
- teleporting = FALSE
- return
- if(!linked_pad || QDELETED(linked_pad) || linked_pad.stat & NOPOWER)
- to_chat(user, "Linked pad is not responding to ping. Teleport aborted. ")
- teleporting = FALSE
- return
-
- teleporting = FALSE
- last_teleport = world.time
-
- // use a lot of power
- use_power(10000 / power_efficiency)
- sparks()
- linked_pad.sparks()
-
- flick("qpad-beam", src)
- playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, TRUE)
- flick("qpad-beam", linked_pad)
- playsound(get_turf(linked_pad), 'sound/weapons/emitter2.ogg', 25, TRUE)
- var/tele_success = TRUE
- for(var/atom/movable/ROI in get_turf(src))
- // if is anchored, don't let through
- if(ROI.anchored)
- if(isliving(ROI))
- var/mob/living/L = ROI
- if(L.buckled)
- // TP people on office chairs
- if(L.buckled.anchored)
- continue
- else
- continue
- else if(!isobserver(ROI))
+ teleporting = FALSE
+ last_teleport = world.time
+
+ // use a lot of power
+ use_power(10000 / power_efficiency)
+ playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, TRUE)
+ playsound(get_turf(linked_pad), 'sound/weapons/emitter2.ogg', 25, TRUE)
+ var/tele_success = TRUE
+ for(var/atom/movable/ROI in get_turf(src))
+ // if is anchored, don't let through
+ if(ROI.anchored)
+ if(isliving(ROI))
+ var/mob/living/L = ROI
+ if(L.buckled)
+ // TP people on office chairs
+ if(L.buckled.anchored)
continue
- tele_success = do_teleport(ROI, get_turf(linked_pad))
- if(!tele_success)
- to_chat(user, "Teleport failed due to bluespace interference. ")
+ else
+ continue
+ else if(!isobserver(ROI))
+ continue
+ tele_success = do_teleport(ROI, get_turf(linked_pad), do_effect = FALSE)
+ if(!tele_success)
+ to_chat(user, "Teleport failed due to bluespace interference. ")
+ src.icon_state = "qpad-idle"
+ linked_pad.icon_state = "qpad-idle"
+
+#undef QPAD_ANIM_WINDUP
+#undef QPAD_ANIM_COOLDOWN
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index 5f5723b4d2bc..2a8a67c77889 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -542,7 +542,7 @@
return
-/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/shieldwall/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSGLASS))
return prob(20)
else
@@ -557,7 +557,7 @@
desc = "A strange energy shield."
icon_state = "shield-red"
-/obj/machinery/shieldwall/syndicate/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/shieldwall/syndicate/CanPass(atom/movable/mover, border_dir)
if(isliving(mover))
var/mob/living/M = mover
if("syndicate" in M.faction)
diff --git a/code/game/machinery/tcomms/nttc.dm b/code/game/machinery/tcomms/nttc.dm
index d2182137d897..993187499f13 100644
--- a/code/game/machinery/tcomms/nttc.dm
+++ b/code/game/machinery/tcomms/nttc.dm
@@ -132,6 +132,8 @@
"Journalist" = "srvradio",
"Librarian" = "srvradio",
"Mime" = "srvradio",
+ // Procedure
+ "Nanotrasen Career Trainer" = "proradio",
)
/// List of Command jobs
var/list/heads = list("Captain", "Head of Personnel", "Nanotrasen Representative", "Blueshield", "Chief Engineer", "Chief Medical Officer", "Research Director", "Head of Security", "Magistrate", "Quartermaster", "AI")
diff --git a/code/game/machinery/tcomms/relay.dm b/code/game/machinery/tcomms/relay.dm
index 7b98ef255c04..4a9aee89a9e0 100644
--- a/code/game/machinery/tcomms/relay.dm
+++ b/code/game/machinery/tcomms/relay.dm
@@ -70,7 +70,7 @@
*
* Handles parent call of disabling the machine if it changes Z-level, but also rebuilds the list of reachable levels on the linked core
*/
-/obj/machinery/tcomms/relay/onTransitZ(old_z, new_z)
+/obj/machinery/tcomms/relay/on_changed_z_level(turf/old_turf, turf/new_turf)
. = ..()
if(linked_core)
linked_core.refresh_zlevels()
diff --git a/code/game/machinery/tcomms/tcomms_base.dm b/code/game/machinery/tcomms/tcomms_base.dm
index f89810dd4d8d..6c7520a80b80 100644
--- a/code/game/machinery/tcomms/tcomms_base.dm
+++ b/code/game/machinery/tcomms/tcomms_base.dm
@@ -128,7 +128,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
*
* Proc to make sure you cant have two of these active on a Z-level at once. It also makes sure to update the linkage
*/
-/obj/machinery/tcomms/onTransitZ(old_z, new_z)
+/obj/machinery/tcomms/on_changed_z_level(turf/old_turf, turf/new_turf)
. = ..()
if(active)
active = FALSE
diff --git a/code/game/machinery/tcomms/tcomms_core.dm b/code/game/machinery/tcomms/tcomms_core.dm
index 0d72b68d1d40..38b98fddda5a 100644
--- a/code/game/machinery/tcomms/tcomms_core.dm
+++ b/code/game/machinery/tcomms/tcomms_core.dm
@@ -140,7 +140,7 @@
*
* Handles parent call of disabling the machine if it changes Z-level, but also rebuilds the list of reachable levels
*/
-/obj/machinery/tcomms/core/onTransitZ(old_z, new_z)
+/obj/machinery/tcomms/core/on_changed_z_level(turf/old_turf, turf/new_turf)
. = ..()
refresh_zlevels()
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 57c8e61d66e7..39449cab8259 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -373,6 +373,12 @@
component_parts += new /obj/item/stock_parts/matter_bin(null)
RefreshParts()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+
/obj/machinery/teleport/hub/upgraded/Initialize(mapload)
. = ..()
component_parts = list()
@@ -408,13 +414,15 @@
break
return power_station
-/obj/machinery/teleport/hub/Crossed(atom/movable/AM, oldloc)
+/obj/machinery/teleport/hub/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
if(!is_teleport_allowed(z) && !admin_usage)
- if(ismob(AM))
- to_chat(AM, "You can't use this here.")
+ if(ismob(entered))
+ to_chat(entered, "You can't use this here.")
return
- if(power_station && power_station.engaged && !panel_open && !blockAI(AM) && !iseffect(AM))
- if(!teleport(AM) && isliving(AM)) // the isliving(M) is needed to avoid triggering errors if a spark bumps the telehub
+ if(power_station && power_station.engaged && !panel_open && !blockAI(entered) && !iseffect(entered))
+ if(!teleport(entered) && isliving(entered)) // the isliving(M) is needed to avoid triggering errors if a spark bumps the telehub
visible_message("[src] emits a loud buzz, as its teleport portal flickers and fails! ")
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, FALSE)
power_station.toggle() // turn off the portal.
@@ -491,6 +499,12 @@
. = ..()
update_lighting()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+
/obj/machinery/teleport/perma/process()
teleports_this_cycle = 0
@@ -503,15 +517,15 @@
tele_delay = max(A, 0)
update_icon(UPDATE_ICON_STATE)
-/obj/machinery/teleport/perma/Crossed(atom/movable/AM, oldloc)
+/obj/machinery/teleport/perma/proc/on_atom_entered(datum/source, atom/movable/entered)
if(stat & (BROKEN|NOPOWER))
return
if(!is_teleport_allowed(z))
- to_chat(AM, "You can't use this here.")
+ to_chat(entered, "You can't use this here. ")
return
- if(target && !recalibrating && !panel_open && !blockAI(AM) && (teleports_this_cycle <= MAX_ALLOWED_TELEPORTS_PER_PROCESS))
- do_teleport(AM, target)
+ if(target && !recalibrating && !panel_open && !blockAI(entered) && (teleports_this_cycle <= MAX_ALLOWED_TELEPORTS_PER_PROCESS))
+ do_teleport(entered, target)
use_power(5000)
teleports_this_cycle++
if(tele_delay)
@@ -520,6 +534,9 @@
update_lighting()
addtimer(CALLBACK(src, PROC_REF(CrossedCallback)), tele_delay)
+/obj/machinery/teleport/perma/Destroy()
+ . = ..()
+
/obj/machinery/teleport/perma/proc/CrossedCallback()
recalibrating = FALSE
update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
diff --git a/code/game/machinery/vendors/departmental_vendors.dm b/code/game/machinery/vendors/departmental_vendors.dm
index 63d9b65e5d1f..039d460e9287 100644
--- a/code/game/machinery/vendors/departmental_vendors.dm
+++ b/code/game/machinery/vendors/departmental_vendors.dm
@@ -7,7 +7,7 @@
category = VENDOR_TYPE_DEPARTMENTAL
req_one_access = list(ACCESS_ENGINE_EQUIP, ACCESS_ATMOSPHERICS)
products = list(/obj/item/clothing/glasses/meson/engine = 2,
- /obj/item/clothing/glasses/meson/engine/tray = 4,
+ /obj/item/clothing/glasses/meson/engine/atmos = 4,
/obj/item/multitool = 4,
/obj/item/geiger_counter = 5,
/obj/item/airlock_electronics = 10,
diff --git a/code/game/machinery/vendors/generic_vendors.dm b/code/game/machinery/vendors/generic_vendors.dm
index b4be8d21faeb..c26498383a54 100644
--- a/code/game/machinery/vendors/generic_vendors.dm
+++ b/code/game/machinery/vendors/generic_vendors.dm
@@ -456,23 +456,23 @@
/obj/item/clothing/head/beanie/stripedblue = 3,
/obj/item/clothing/head/beanie/stripedgreen = 3,
/obj/item/clothing/head/beanie/rasta = 3,
- /obj/item/clothing/accessory/scarf/red = 3,
- /obj/item/clothing/accessory/scarf/green = 3,
- /obj/item/clothing/accessory/scarf/darkblue = 3,
- /obj/item/clothing/accessory/scarf/purple = 3,
- /obj/item/clothing/accessory/scarf/yellow = 3,
- /obj/item/clothing/accessory/scarf/orange = 3,
- /obj/item/clothing/accessory/scarf/lightblue = 3,
- /obj/item/clothing/accessory/scarf/white = 3,
- /obj/item/clothing/accessory/scarf/black = 3,
- /obj/item/clothing/accessory/scarf/zebra = 3,
- /obj/item/clothing/accessory/scarf/christmas = 3,
- /obj/item/clothing/accessory/stripedredscarf = 3,
- /obj/item/clothing/accessory/stripedbluescarf = 3,
- /obj/item/clothing/accessory/stripedgreenscarf = 3,
- /obj/item/clothing/accessory/blue = 3,
- /obj/item/clothing/accessory/red = 3,
- /obj/item/clothing/accessory/black = 3,
+ /obj/item/clothing/neck/scarf/red = 3,
+ /obj/item/clothing/neck/scarf/green = 3,
+ /obj/item/clothing/neck/scarf/darkblue = 3,
+ /obj/item/clothing/neck/scarf/purple = 3,
+ /obj/item/clothing/neck/scarf/yellow = 3,
+ /obj/item/clothing/neck/scarf/orange = 3,
+ /obj/item/clothing/neck/scarf/lightblue = 3,
+ /obj/item/clothing/neck/scarf/white = 3,
+ /obj/item/clothing/neck/scarf/black = 3,
+ /obj/item/clothing/neck/scarf/zebra = 3,
+ /obj/item/clothing/neck/scarf/christmas = 3,
+ /obj/item/clothing/neck/scarf/stripedred = 3,
+ /obj/item/clothing/neck/scarf/stripedblue = 3,
+ /obj/item/clothing/neck/scarf/stripedgreen = 3,
+ /obj/item/clothing/neck/tie/blue = 3,
+ /obj/item/clothing/neck/tie/red = 3,
+ /obj/item/clothing/neck/tie/black = 3,
/obj/item/clothing/accessory/waistcoat = 2,
/obj/item/clothing/under/dress/sundress = 2,
/obj/item/clothing/under/dress/stripeddress = 2,
@@ -496,9 +496,9 @@
/obj/item/storage/belt/fannypack = 1,
/obj/item/storage/belt/fannypack/blue = 1,
/obj/item/storage/belt/fannypack/red = 1,
- /obj/item/clothing/suit/mantle = 2,
- /obj/item/clothing/suit/mantle/old = 1,
- /obj/item/clothing/suit/mantle/regal = 2)
+ /obj/item/clothing/neck/cloak/mantle = 2,
+ /obj/item/clothing/neck/cloak/old = 1,
+ /obj/item/clothing/neck/cloak/regal = 2)
contraband = list(/obj/item/clothing/under/syndicate/tacticool = 1,
/obj/item/clothing/mask/balaclava = 1,
@@ -543,23 +543,23 @@
/obj/item/clothing/head/beanie/stripedblue = 40,
/obj/item/clothing/head/beanie/stripedgreen = 40,
/obj/item/clothing/head/beanie/rasta = 40,
- /obj/item/clothing/accessory/scarf/red = 20,
- /obj/item/clothing/accessory/scarf/green = 20,
- /obj/item/clothing/accessory/scarf/darkblue = 20,
- /obj/item/clothing/accessory/scarf/purple = 20,
- /obj/item/clothing/accessory/scarf/yellow = 20,
- /obj/item/clothing/accessory/scarf/orange = 20,
- /obj/item/clothing/accessory/scarf/lightblue = 20,
- /obj/item/clothing/accessory/scarf/white = 20,
- /obj/item/clothing/accessory/scarf/black = 20,
- /obj/item/clothing/accessory/scarf/zebra = 20,
- /obj/item/clothing/accessory/scarf/christmas = 20,
- /obj/item/clothing/accessory/stripedredscarf = 20,
- /obj/item/clothing/accessory/stripedbluescarf = 20,
- /obj/item/clothing/accessory/stripedgreenscarf = 20,
- /obj/item/clothing/accessory/blue = 20,
- /obj/item/clothing/accessory/red = 20,
- /obj/item/clothing/accessory/black = 20,
+ /obj/item/clothing/neck/scarf/red = 20,
+ /obj/item/clothing/neck/scarf/green = 20,
+ /obj/item/clothing/neck/scarf/darkblue = 20,
+ /obj/item/clothing/neck/scarf/purple = 20,
+ /obj/item/clothing/neck/scarf/yellow = 20,
+ /obj/item/clothing/neck/scarf/orange = 20,
+ /obj/item/clothing/neck/scarf/lightblue = 20,
+ /obj/item/clothing/neck/scarf/white = 20,
+ /obj/item/clothing/neck/scarf/black = 20,
+ /obj/item/clothing/neck/scarf/zebra = 20,
+ /obj/item/clothing/neck/scarf/christmas = 20,
+ /obj/item/clothing/neck/scarf/stripedred = 20,
+ /obj/item/clothing/neck/scarf/stripedblue = 20,
+ /obj/item/clothing/neck/scarf/stripedgreen = 20,
+ /obj/item/clothing/neck/tie/blue = 20,
+ /obj/item/clothing/neck/tie/red = 20,
+ /obj/item/clothing/neck/tie/black = 20,
/obj/item/clothing/accessory/waistcoat = 20,
/obj/item/clothing/under/dress/sundress = 75,
/obj/item/clothing/under/dress/stripeddress = 75,
@@ -584,9 +584,9 @@
/obj/item/storage/belt/fannypack = 50,
/obj/item/storage/belt/fannypack/blue = 50,
/obj/item/storage/belt/fannypack/red = 50,
- /obj/item/clothing/suit/mantle = 20,
- /obj/item/clothing/suit/mantle/old = 20,
- /obj/item/clothing/suit/mantle/regal = 30,
+ /obj/item/clothing/neck/cloak/mantle = 20,
+ /obj/item/clothing/neck/cloak/old = 20,
+ /obj/item/clothing/neck/cloak/regal = 30,
/obj/item/clothing/suit/pimpcoat/white = 500,
/obj/item/clothing/under/misc/mailman = 100)
@@ -718,7 +718,7 @@
/obj/item/clothing/suit/poncho = 1,
/obj/item/clothing/suit/poncho/green = 1,
/obj/item/clothing/suit/poncho/red = 1,
- /obj/item/clothing/accessory/horrible = 1,
+ /obj/item/clothing/neck/tie/horrible = 1,
/obj/item/clothing/under/costume/maid = 1,
/obj/item/clothing/under/costume/janimaid = 1,
/obj/item/clothing/under/costume/jester = 1,
@@ -836,7 +836,7 @@
/obj/item/clothing/suit/poncho = 75,
/obj/item/clothing/suit/poncho/green = 75,
/obj/item/clothing/suit/poncho/red = 75,
- /obj/item/clothing/accessory/horrible = 30,
+ /obj/item/clothing/neck/tie/horrible = 30,
/obj/item/clothing/under/costume/maid = 75,
/obj/item/clothing/under/costume/janimaid = 75,
/obj/item/clothing/under/costume/jester = 100,
diff --git a/code/game/machinery/vendors/vending.dm b/code/game/machinery/vendors/vending.dm
index f8f509441d17..457ad4aba68b 100644
--- a/code/game/machinery/vendors/vending.dm
+++ b/code/game/machinery/vendors/vending.dm
@@ -142,6 +142,8 @@
/// How often will the vendor tip when you walk by it when aggressive is true?
var/aggressive_tilt_chance = 25
+ var/datum/proximity_monitor/proximity_monitor
+
/obj/machinery/economy/vending/Initialize(mapload)
. = ..()
var/build_inv = FALSE
@@ -175,7 +177,7 @@
RegisterSignal(src, COMSIG_MOVABLE_UNTILTED, PROC_REF(on_untilt))
RegisterSignal(src, COMSIG_MOVABLE_TRY_UNTILT, PROC_REF(on_try_untilt))
if(aggressive)
- AddComponent(/datum/component/proximity_monitor)
+ proximity_monitor = new(src, 1)
/obj/machinery/economy/vending/Destroy()
SStgui.close_uis(wires)
@@ -943,8 +945,9 @@
throw_item.throw_at(target, 16, 3)
visible_message("[src] launches [throw_item.name] at [target.name]! ")
-/obj/machinery/economy/vending/onTransitZ()
- return
+/obj/machinery/economy/vending/on_changed_z_level(turf/old_turf, turf/new_turf, notify_contents = FALSE)
+ // Don't bother notifying contents (for some reason (probably historical reasons (probably for no reason)))
+ return ..()
/obj/machinery/economy/vending/proc/tilt(atom/victim, crit = FALSE, from_combat = FALSE, from_anywhere = FALSE)
if(QDELETED(src) || !has_gravity(src) || !tiltable || tilted)
diff --git a/code/game/machinery/vendors/wardrobe_vendors.dm b/code/game/machinery/vendors/wardrobe_vendors.dm
index a149a1b0d63c..9ef0c7459b3c 100644
--- a/code/game/machinery/vendors/wardrobe_vendors.dm
+++ b/code/game/machinery/vendors/wardrobe_vendors.dm
@@ -922,3 +922,41 @@
/obj/item/clothing/under/plasmaman/enviroslacks = 60)
refill_canister = /obj/item/vending_refill/lawdrobe
+
+/obj/machinery/economy/vending/traindrobe
+ name = "\improper TrainDrobe"
+ desc = "This wardrobe dispenses the attire of Nanotrasen's finest teaching force."
+ icon_state = "traindrobe"
+ icon_lightmask = "base_drobe"
+ icon_panel = "drobe"
+ icon_broken = "base_drobe"
+ icon_off = "base_drobe"
+ category = VENDOR_TYPE_CLOTHING
+ ads_list = list("You're gonna LEARN today!", "What am I supposed to do?")
+ vend_reply = "Thank you for using the TrainDrobe!"
+ products = list(
+ /obj/item/clothing/gloves/color/white = 2,
+ /obj/item/clothing/gloves/color/black = 2,
+ /obj/item/clothing/shoes/laceup = 2,
+ /obj/item/clothing/shoes/black = 2,
+ /obj/item/clothing/shoes/brown = 2,
+ /obj/item/clothing/head/drilltrainer = 2,
+ /obj/item/clothing/under/rank/procedure/nct = 2,
+ /obj/item/clothing/under/rank/procedure/nct/skirt = 2,
+ /obj/item/clothing/suit/storage/nct = 2,
+ /obj/item/clothing/head/helmet/space/plasmaman/trainer = 2,
+ /obj/item/clothing/under/plasmaman/trainer = 2,
+ /obj/item/clothing/accessory/armband/procedure = 2,
+ /obj/item/clothing/head/beret/nct/green = 2,
+ /obj/item/clothing/head/beret/nct/black = 2,
+ /obj/item/clothing/head/beret/sec = 2,
+ /obj/item/clothing/head/beret/med = 2,
+ /obj/item/clothing/head/beret/sci = 2,
+ /obj/item/clothing/head/beret/eng = 2,
+ /obj/item/clothing/head/beret/atmos = 2,
+ /obj/item/clothing/head/beret/cargo = 2,
+ /obj/item/clothing/head/beret/black = 2)
+
+ prices = list()
+
+ refill_canister = /obj/item/vending_refill/traindrobe
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 7590801455ad..285462a94333 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -404,7 +404,7 @@
if(. && stepsound)
playsound(src, stepsound, 40, 1)
-/obj/mecha/Bump(atom/obstacle, bump_allowed)
+/obj/mecha/Bump(atom/obstacle)
if(throwing) //high velocity mechas in your face!
var/breakthrough = FALSE
if(istype(obstacle, /obj/structure/window))
@@ -459,15 +459,14 @@
throw_at(crashing, 50, throw_speed)
else
- if(bump_allowed)
- if(..())
- return
- if(isobj(obstacle))
- var/obj/O = obstacle
- if(!O.anchored)
- step(obstacle, dir)
- else if(ismob(obstacle))
+ if(..())
+ return
+ if(isobj(obstacle))
+ var/obj/O = obstacle
+ if(!O.anchored)
step(obstacle, dir)
+ else if(ismob(obstacle))
+ step(obstacle, dir)
///////////////////////////////////
@@ -1271,10 +1270,11 @@
/obj/mecha/proc/pilot_mmi_hud(mob/living/brain/pilot)
return
-/obj/mecha/Exited(atom/movable/M, atom/newloc)
+/obj/mecha/Exited(atom/movable/M, direction)
+ var/new_loc = get_step(M, direction)
if(occupant && occupant == M) // The occupant exited the mech without calling go_out()
if(!isAI(occupant)) //This causes carded AIS to gib, so we do not want this to be called during carding.
- go_out(1, newloc)
+ go_out(1, new_loc)
/obj/mecha/proc/go_out(forced, atom/newloc = loc)
if(!occupant)
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index 9f212e3400a8..4475574cab65 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -1529,7 +1529,7 @@
holder.icon_state = "phazon16"
else
user.visible_message("[user] removes the bluespace crystal from the [holder].", "You remove the bluespace crystal from the [holder].")
- new /obj/item/stack/ore/bluespace_crystal(get_turf(holder), new_amount = 5)
+ new /obj/item/stack/ore/bluespace_crystal(get_turf(holder), 5)
holder.icon_state = "phazon14"
if(8)
if(diff==CONSTRUCTION_PATH_FORWARDS)
diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm
index afc114502d52..a00b1c65ce03 100644
--- a/code/game/objects/effects/alien_acid.dm
+++ b/code/game/objects/effects/alien_acid.dm
@@ -22,6 +22,11 @@
pixel_x = target.pixel_x + rand(-4,4)
pixel_y = target.pixel_y + rand(-4,4)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
START_PROCESSING(SSobj, src)
/obj/effect/acid/Destroy()
@@ -50,9 +55,12 @@
qdel(src)
return 0
-/obj/effect/acid/Crossed(AM as mob|obj)
- if(isliving(AM))
- var/mob/living/L = AM
+/obj/effect/acid/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+ if(!isliving(entered) && !isobj(entered))
+ return
+ if(isliving(entered))
+ var/mob/living/L = entered
if(HAS_TRAIT(L, TRAIT_FLYING))
return
if(L.m_intent != MOVE_INTENT_WALK && prob(40))
diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
index fad65dc1bb65..1d213eb825e2 100644
--- a/code/game/objects/effects/anomalies.dm
+++ b/code/game/objects/effects/anomalies.dm
@@ -121,6 +121,11 @@
if(prob(75))
new /obj/item/shard(loc)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/anomaly/grav/Destroy()
vis_contents -= warp
QDEL_NULL(warp) // don't want to leave it hanging
@@ -147,9 +152,8 @@
animate(warp, time = 6, transform = matrix().Scale(0.5,0.5))
animate(time = 14, transform = matrix())
-/obj/effect/anomaly/grav/Crossed(atom/movable/AM)
- . = ..()
- gravShock(AM)
+/obj/effect/anomaly/grav/proc/on_atom_entered(datum/source, atom/movable/entered)
+ gravShock(entered)
/obj/effect/anomaly/grav/Bump(atom/A)
gravShock(A)
@@ -195,6 +199,10 @@
if(explosive)
zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN
power = 15000
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/effect/anomaly/flux/anomalyEffect()
..()
@@ -204,10 +212,8 @@
if(explosive) //Let us not fuck up the sm that much
tesla_zap(src, zap_range, power, zap_flags)
-
-/obj/effect/anomaly/flux/Crossed(atom/movable/AM)
- . = ..()
- mobShock(AM)
+/obj/effect/anomaly/flux/proc/on_atom_entered(datum/source, atom/movable/entered)
+ mobShock(entered)
/obj/effect/anomaly/flux/Bump(atom/A)
mobShock(A)
@@ -335,7 +341,6 @@
/obj/effect/anomaly/pyro
name = "pyroclastic anomaly"
icon_state = "mustard"
- var/ticks = 0
var/produces_slime = TRUE
aSignal = /obj/item/assembly/signaler/anomaly/pyro
@@ -345,16 +350,11 @@
/obj/effect/anomaly/pyro/anomalyEffect()
..()
- ticks++
for(var/mob/living/M in hearers(4, src))
if(prob(50))
M.adjust_fire_stacks(4)
M.IgniteMob()
- if(ticks < 4)
- return
- else
- ticks = 0
var/turf/simulated/T = get_turf(src)
if(istype(T))
var/datum/gas_mixture/air = new()
@@ -376,8 +376,8 @@
//Make it hot and burny for the new slime
var/datum/gas_mixture/air = new()
air.set_temperature(1000)
- air.set_toxins(500)
- air.set_oxygen(500)
+ air.set_toxins(125)
+ air.set_oxygen(125)
T.blind_release_air(air)
var/new_colour = pick("red", "orange")
var/mob/living/simple_animal/slime/S = new(T, new_colour)
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index 38a79e45b2f6..f9d8e1f4acba 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -45,6 +45,11 @@
if(!. && !QDELETED(src))
dry_timer = addtimer(CALLBACK(src, PROC_REF(dry)), DRYING_TIME * (amount+1), TIMER_STOPPABLE)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/decal/cleanable/blood/Destroy()
if(dry_timer)
deltimer(dry_timer)
@@ -138,12 +143,7 @@
return FALSE
-/obj/effect/decal/cleanable/blood/Bump(atom/A, yes)
- // this is to prevent double or triple bumps from calling splat after src is qdel'd.
- // only god knows why this fixes the issue
- if(yes)
- return
-
+/obj/effect/decal/cleanable/blood/Bump(atom/A)
if(gravity_check)
return ..()
diff --git a/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm b/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm
index 7ff65230575a..8048ab7e23d1 100644
--- a/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm
+++ b/code/game/objects/effects/decals/Cleanable/misc_cleanables.dm
@@ -171,15 +171,19 @@
animate_levitate(src, -1, rand(30, 120))
icon = 'icons/effects/blood_weightless.dmi'
-/obj/effect/decal/cleanable/vomit/Bump(atom/A, yes)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/effect/decal/cleanable/vomit/Bump(atom/A)
. = ..()
if(A.density)
splat(A)
-/obj/effect/decal/cleanable/vomit/Crossed(atom/movable/AM, oldloc)
+/obj/effect/decal/cleanable/vomit/proc/on_atom_entered(datum/source, atom/movable/entered)
if(!gravity_check)
- splat(AM)
- ..()
+ splat(entered)
/obj/effect/decal/cleanable/vomit/proc/splat(atom/A)
if(gravity_check)
diff --git a/code/game/objects/effects/decals/Cleanable/tar.dm b/code/game/objects/effects/decals/Cleanable/tar.dm
index 5cc09a4619cf..0b76030ca1df 100644
--- a/code/game/objects/effects/decals/Cleanable/tar.dm
+++ b/code/game/objects/effects/decals/Cleanable/tar.dm
@@ -14,6 +14,11 @@
if(prob(50))
icon_state = "tar3"
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/decal/cleanable/tar/Destroy()
if(target)
target.slowdown -= 10
@@ -27,9 +32,9 @@
if(!issimulatedturf(target)) // We remove slowdown in Destroy(), so we run this check after adding the slowdown.
qdel(src)
-/obj/effect/decal/cleanable/tar/Crossed(atom/movable/movable_atom)
- if(isliving(movable_atom))
- var/mob/living/L = movable_atom
+/obj/effect/decal/cleanable/tar/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isliving(entered))
+ var/mob/living/L = entered
playsound(L, 'sound/effects/attackblob.ogg', 50, TRUE)
to_chat(L, "[src] sticks to you! ")
diff --git a/code/game/objects/effects/decals/Cleanable/tracks.dm b/code/game/objects/effects/decals/Cleanable/tracks.dm
index d7417d8452aa..431c97c6d7e7 100644
--- a/code/game/objects/effects/decals/Cleanable/tracks.dm
+++ b/code/game/objects/effects/decals/Cleanable/tracks.dm
@@ -39,61 +39,70 @@ GLOBAL_LIST_EMPTY(fluidtrack_cache)
blood_state = BLOOD_STATE_HUMAN //the icon state to load images from
gravity_check = ALWAYS_IN_GRAVITY
-/obj/effect/decal/cleanable/blood/footprints/Crossed(atom/movable/O, oldloc)
- ..()
- if(ishuman(O))
- var/mob/living/carbon/human/H = O
- var/obj/item/clothing/shoes/S = H.shoes
- var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
- var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
- var/hasfeet = TRUE
- if(!l_foot && !r_foot)
- hasfeet = FALSE
- if(S && S.bloody_shoes[blood_state] && S.blood_color == basecolor)
- S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
- S.bloody_shoes[BLOOD_BASE_ALPHA] = base_alpha
- if(!S.blood_DNA)
- S.blood_DNA = list()
- S.blood_DNA |= blood_DNA.Copy()
- if(!(entered_dirs & H.dir))
- entered_dirs |= H.dir
- update_icon()
- else if(hasfeet && H.bloody_feet[blood_state] && H.feet_blood_color == basecolor)//Or feet //This will need to be changed.
- H.bloody_feet[blood_state] = max(H.bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP, 0)
- H.bloody_feet[BLOOD_BASE_ALPHA] = base_alpha
- if(!H.feet_blood_DNA)
- H.feet_blood_DNA = list()
- H.feet_blood_DNA |= blood_DNA.Copy()
- if(!(entered_dirs & H.dir))
- entered_dirs |= H.dir
- update_icon()
-
-/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
- ..()
- if(ishuman(O))
- var/mob/living/carbon/human/H = O
- var/obj/item/clothing/shoes/S = H.shoes
- var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
- var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
- var/hasfeet = TRUE
- if(!l_foot && !r_foot)
- hasfeet = FALSE
- if(S && S.bloody_shoes[blood_state] && S.blood_color == basecolor)
- S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
- if(!S.blood_DNA)
- S.blood_DNA = list()
- S.blood_DNA |= blood_DNA.Copy()
- if(!(exited_dirs & H.dir))
- exited_dirs |= H.dir
- update_icon()
- else if(hasfeet && H.bloody_feet[blood_state] && H.feet_blood_color == basecolor)//Or feet
- H.bloody_feet[blood_state] = max(H.bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP, 0)
- if(!H.feet_blood_DNA)
- H.feet_blood_DNA = list()
- H.feet_blood_DNA |= blood_DNA.Copy()
- if(!(exited_dirs & H.dir))
- exited_dirs |= H.dir
- update_icon()
+/obj/effect/decal/cleanable/blood/footprints/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ COMSIG_ATOM_EXITED = PROC_REF(on_atom_exited),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/effect/decal/cleanable/blood/footprints/on_atom_entered(datum/source, mob/living/carbon/human/H, ...)
+ if(!istype(H))
+ return
+
+ var/obj/item/clothing/shoes/S = H.shoes
+ var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
+ var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
+ var/hasfeet = TRUE
+ if(!l_foot && !r_foot)
+ hasfeet = FALSE
+ if(S && S.bloody_shoes[blood_state] && S.blood_color == basecolor)
+ S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
+ S.bloody_shoes[BLOOD_BASE_ALPHA] = base_alpha
+ if(!S.blood_DNA)
+ S.blood_DNA = list()
+ S.blood_DNA |= blood_DNA.Copy()
+ if(!(entered_dirs & H.dir))
+ entered_dirs |= H.dir
+ update_icon()
+ else if(hasfeet && H.bloody_feet[blood_state] && H.feet_blood_color == basecolor)//Or feet //This will need to be changed.
+ H.bloody_feet[blood_state] = max(H.bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP, 0)
+ H.bloody_feet[BLOOD_BASE_ALPHA] = base_alpha
+ if(!H.feet_blood_DNA)
+ H.feet_blood_DNA = list()
+ H.feet_blood_DNA |= blood_DNA.Copy()
+ if(!(entered_dirs & H.dir))
+ entered_dirs |= H.dir
+ update_icon()
+
+// TODO: I think this is a 1:1 copy-paste of on_atom_entered above
+/obj/effect/decal/cleanable/blood/footprints/proc/on_atom_exited(datum/source, mob/living/carbon/human/H, ...)
+ if(!istype(H))
+ return
+
+ var/obj/item/clothing/shoes/S = H.shoes
+ var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
+ var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
+ var/hasfeet = TRUE
+ if(!l_foot && !r_foot)
+ hasfeet = FALSE
+ if(S && S.bloody_shoes[blood_state] && S.blood_color == basecolor)
+ S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
+ if(!S.blood_DNA)
+ S.blood_DNA = list()
+ S.blood_DNA |= blood_DNA.Copy()
+ if(!(exited_dirs & H.dir))
+ exited_dirs |= H.dir
+ update_icon()
+ else if(hasfeet && H.bloody_feet[blood_state] && H.feet_blood_color == basecolor)//Or feet
+ H.bloody_feet[blood_state] = max(H.bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP, 0)
+ if(!H.feet_blood_DNA)
+ H.feet_blood_DNA = list()
+ H.feet_blood_DNA |= blood_DNA.Copy()
+ if(!(exited_dirs & H.dir))
+ exited_dirs |= H.dir
+ update_icon()
/obj/effect/decal/cleanable/blood/footprints/update_overlays()
diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm
index cf914e6fb03f..6ad91e08db51 100644
--- a/code/game/objects/effects/decals/cleanable.dm
+++ b/code/game/objects/effects/decals/cleanable.dm
@@ -27,17 +27,15 @@
//Add "bloodiness" of this blood's type, to the human's shoes
//This is on /cleanable because fuck this ancient mess
-/obj/effect/decal/cleanable/blood/Crossed(atom/movable/O)
- ..()
-
- if(!ishuman(O))
+/obj/effect/decal/cleanable/blood/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(!ishuman(entered))
return
- if(!gravity_check && ishuman(O))
- bloodyify_human(O)
+ if(!gravity_check && ishuman(entered))
+ bloodyify_human(entered)
if(!off_floor)
- var/mob/living/carbon/human/H = O
+ var/mob/living/carbon/human/H = entered
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")
var/hasfeet = TRUE
diff --git a/code/game/objects/effects/decals/contraband_posters.dm b/code/game/objects/effects/decals/contraband_posters.dm
index 235c6d836bb9..57344002c4d2 100644
--- a/code/game/objects/effects/decals/contraband_posters.dm
+++ b/code/game/objects/effects/decals/contraband_posters.dm
@@ -580,4 +580,59 @@
desc = "A healthy crew is a happy crew!"
icon_state = "poster40_legit"
+/obj/structure/sign/poster/official/darkpurpl
+ name = "Dark Purp-L"
+ desc = "A poster for the band \"Dark Purp-L\". They label their music 'Plasmawave'; mixed from various space age sounds like creaking hulls and plasma emitters, it's gained traction in recent years amongst bored ship engineers. "
+ icon_state = "poster41_legit"
+
+/obj/structure/sign/poster/official/root
+ name = "Root Song"
+ desc = "A poster for all-Diona Jazz band \"Root Song\". When a travelling jazz band's ship crashed on a Diona overgrowth planet, a whole host of musically-inclined Dionea sprung forth. Though the beloved band members sadly perished in the crash, their love of Jazz lived on with these Dionea, who travel the galaxy in the repaired wreck of that ship, under the moniker \"Root Song\"."
+ icon_state = "poster42_legit"
+
+/obj/structure/sign/poster/official/core
+ name = "CO!RE"
+ desc = "A poster for the all-Slime melodic rap label CO!RE. Known for their unique blend of hard-hitting vocals and traditional Xarxis woodwind instruments, CO!RE took the Federation R&B scene by storm during their debut, and has since engaged in several high-intensity tours across the sector."
+ icon_state = "poster43_legit"
+
+/obj/structure/sign/poster/official/metal
+ name = "METAL"
+ desc = "A poster for an IPC metal band, aptly named \"METAL\". Though their chassis are dated and badly damaged, they rage on evermore! The electric guitarist, SKULL, has an amp built into their head."
+ icon_state = "poster44_legit"
+
+/obj/structure/sign/poster/official/kpop
+ name = "Kidan Pop"
+ desc = "A poster for a Kidan boyband known as \"K-Pop\". Though other species find their chittering vocals grating and tuneless, they're wildly popular among young Kidan living in the TSF."
+ icon_state = "poster45_legit"
+
+/obj/structure/sign/poster/official/graydays
+ name = "Gray Days"
+ desc = "A poster for an emo band of greys. They're known to play a form of Death Metal, but it's so quiet you can only barely hear the words. If you turn the speaker way up, the lyrics are mournful and deep; just remember to turn it back down once you're finished listening."
+ icon_state = "poster46_legit"
+
+/obj/structure/sign/poster/official/unathicrush
+ name = "CRUSH"
+ desc = "A poster for a unathi band called \"Heart Crush\". They mostly write diss tracks about their bitter rivals, the band \"Heart Smash\". Never tell one of their fans you like the other band, or you can expect a violent argument."
+ icon_state = "poster47_legit"
+
+/obj/structure/sign/poster/official/unathismash
+ name = "SMASH"
+ desc = "A poster for a unathi band called \"Heart Smash\". They're famously bitter rivals with a very similar band, \"Heart Crush\", who they constantly accuse of copying their style. After multiple assaults and restraining orders, the two are back on tour."
+ icon_state = "poster48_legit"
+
+/obj/structure/sign/poster/official/star
+ name = "Star"
+ desc = "A poster for a musical called \"Star\". The lead singer and actor searches across the galaxy in a cruise ship for his one true love - the titular \"Star\"."
+ icon_state = "poster49_legit"
+
+/obj/structure/sign/poster/official/soul
+ name = "Kindred Soul"
+ desc = "A poster for a rarely-seen orchestral band known as \"Kindred Soul\". Those who have been lucky enough to catch a performance say their vocals are deeply moving."
+ icon_state = "poster50_legit"
+
+/obj/structure/sign/poster/official/choir
+ name = "\"Skreethoven's\" Choir"
+ desc = "A poster for a classical Vox performance group including a full choir and orchestra. The chorists have a great harmony. Despite his violent protestation, the star organist can't shake his popular nickname, \"Skreethoven\"."
+ icon_state = "poster51_legit"
+
#undef PLACE_SPEED
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index 0c5f9c2e8b23..cbe122c4d742 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -30,6 +30,10 @@
create_reagents(25)
playsound(src, 'sound/effects/bubbles2.ogg', 80, TRUE, -3)
addtimer(CALLBACK(src, PROC_REF(initial_process)), spread_time)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/effect/particle_effect/foam/proc/disperse_reagents()
if(!reagents)
@@ -122,10 +126,10 @@
flick("[icon_state]-disolve", src)
QDEL_IN(src, 0.5 SECONDS)
-/obj/effect/particle_effect/foam/Crossed(atom/movable/AM, oldloc)
- if(!iscarbon(AM))
+/obj/effect/particle_effect/foam/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(!iscarbon(entered))
return
- var/mob/living/carbon/M = AM
+ var/mob/living/carbon/M = entered
if((M.slip("foam", 10 SECONDS) || IS_HORIZONTAL(M)) && reagents)
fill_with_reagents(M)
@@ -154,7 +158,7 @@
/obj/effect/particle_effect/foam/metal/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
-/obj/effect/particle_effect/foam/metal/Crossed(atom/movable/AM, oldloc)
+/obj/effect/particle_effect/foam/metal/on_atom_entered(datum/source, atom/movable/entered)
return
/datum/effect_system/foam_spread
@@ -294,7 +298,7 @@
to_chat(user, "You hit the metal foam but bounce off it. ")
playsound(loc, 'sound/weapons/tap.ogg', 100, 1)
-/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target)
+/obj/structure/foamedmetal/CanPass(atom/movable/mover, border_dir)
return !density
/obj/structure/foamedmetal/CanAtmosPass(direction)
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index 55aee922c096..7d6fbdf0d647 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -23,7 +23,11 @@
/obj/effect/particle_effect/smoke/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)
- RegisterSignal(src, list(COMSIG_MOVABLE_CROSSED, COMSIG_CROSSED_MOVABLE), PROC_REF(smoke_mob)) //If someone crosses the smoke or the smoke crosses someone
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(smoke_mob)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+ RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(smoke_mob))
GLOB.smokes_active++
lifetime += rand(-1, 1)
create_reagents(10)
@@ -31,7 +35,7 @@
/obj/effect/particle_effect/smoke/Destroy()
animate(src, 2 SECONDS, alpha = 0, easing = EASE_IN | CIRCULAR_EASING)
STOP_PROCESSING(SSobj, src)
- UnregisterSignal(src, list(COMSIG_MOVABLE_CROSSED, COMSIG_CROSSED_MOVABLE))
+ UnregisterSignal(src, COMSIG_MOVABLE_MOVED)
GLOB.smokes_active--
return ..()
@@ -56,7 +60,7 @@
return TRUE
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/breather)
- SIGNAL_HANDLER //COMSIG_MOVABLE_CROSSED and COMSIG_CROSSED_MOVABLE
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED + COMSIG_MOVABLE_MOVED
if(!istype(breather))
return FALSE
if(lifetime < 1)
@@ -122,10 +126,12 @@
/////////////////////////////////////////////
/obj/effect/particle_effect/smoke/bad
- lifetime = 16 SECONDS_TO_LIFE_CYCLES
+ lifetime = 60 SECONDS_TO_LIFE_CYCLES
causes_coughing = TRUE
+ direction = SOUTH
+ steps = 10
-/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target)
+/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, border_dir)
if(istype(mover, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = mover
B.damage = (B.damage / 2)
@@ -143,25 +149,23 @@
lifetime = 10 SECONDS_TO_LIFE_CYCLES
causes_coughing = TRUE
-/obj/effect/particle_effect/smoke/steam/Crossed(atom/movable/AM, oldloc)
- . = ..()
- if(!isliving(AM))
+/obj/effect/particle_effect/smoke/steam/smoke_mob(mob/living/breather)
+ if(!istype(breather))
return
- var/mob/living/crosser = AM
- if(IS_MINDFLAYER(crosser))
+ if(IS_MINDFLAYER(breather))
return // Mindflayers are fully immune to steam
- if(!ishuman(crosser))
- crosser.adjustFireLoss(8)
+ if(!ishuman(breather))
+ breather.adjustFireLoss(8)
return
- var/mob/living/carbon/human/human_crosser = AM
+ var/mob/living/carbon/human/human_crosser = breather
var/fire_armour = human_crosser.get_thermal_protection()
if(fire_armour >= FIRE_SUIT_MAX_TEMP_PROTECT || HAS_TRAIT(human_crosser, TRAIT_RESISTHEAT))
return
- crosser.adjustFireLoss(5)
+ breather.adjustFireLoss(5)
if(prob(20))
- to_chat(crosser, "You are being scalded by the hot steam! ")
+ to_chat(breather, "You are being scalded by the hot steam! ")
/////////////////////////////////////////////
// Nanofrost smoke
@@ -171,53 +175,71 @@
name = "nanofrost smoke"
color = "#B2FFFF"
opacity = FALSE
+ var/spread_range = 6
+ lifetime = 0.5 SECONDS_TO_LIFE_CYCLES
/datum/effect_system/smoke_spread/freezing
effect_type = /obj/effect/particle_effect/smoke/freezing
- var/blast = FALSE
-
-/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
- if(issimulatedturf(A))
- var/turf/simulated/T = A
- if(!T.blocks_air)
- var/datum/milla_safe/smoke_spread_chill/milla = new()
- milla.invoke_async(src, T)
- for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
- if(!isnull(V.welded) && !V.welded) //must be an unwelded vent pump.
- V.welded = TRUE
- V.update_icon()
- V.visible_message("[V] was frozen shut! ")
- for(var/obj/machinery/atmospherics/unary/vent_scrubber/U in T)
- if(!isnull(U.welded) && !U.welded) //must be an unwelded vent scrubber.
- U.welded = TRUE
- U.update_icon()
- U.visible_message("[U] was frozen shut! ")
- for(var/mob/living/L in T)
- L.ExtinguishMob()
- for(var/obj/item/Item in T)
- Item.extinguish()
-
-/datum/milla_safe/smoke_spread_chill
-
-/datum/milla_safe/smoke_spread_chill/on_run(datum/effect_system/smoke_spread/smoke, turf/T)
+
+/obj/effect/particle_effect/smoke/freezing/process()
+ . = ..()
+ var/turf/T = get_turf(src)
+ if(!istype(T))
+ return
+
+ for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
+ if(!isnull(V.welded) && !V.welded) //must be an unwelded vent pump.
+ V.welded = TRUE
+ V.update_icon()
+ V.visible_message("[V] was frozen shut! ")
+ for(var/obj/machinery/atmospherics/unary/vent_scrubber/U in T)
+ if(!isnull(U.welded) && !U.welded) //must be an unwelded vent scrubber.
+ U.welded = TRUE
+ U.update_icon()
+ U.visible_message("[U] was frozen shut! ")
+ for(var/mob/living/L in T)
+ L.ExtinguishMob()
+ for(var/obj/item/Item in T)
+ Item.extinguish()
+
+ var/datum/milla_safe/nanofrost_extinguish/milla = new()
+ milla.invoke_async(src, T)
+
+/datum/milla_safe/nanofrost_extinguish/on_run(obj/effect/particle_effect/smoke/freezing/smoke, turf/T)
+ if(!istype(T))
+ return
var/datum/gas_mixture/env = get_turf_air(T)
- if(get_dist(T, smoke) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
- env.set_temperature(2)
- for(var/obj/effect/hotspot/H in T)
+ for(var/obj/effect/hotspot/fake/H in T)
qdel(H)
- if(env.toxins())
- env.set_nitrogen(env.nitrogen() + env.toxins())
- env.set_toxins(0)
-
-/datum/effect_system/smoke_spread/freezing/set_up(amount = 5, only_cardinals = FALSE, source, desired_direction, datum/reagents/chemicals, blasting = FALSE)
- ..()
- blast = blasting
-
-/datum/effect_system/smoke_spread/freezing/start()
- if(blast)
- for(var/turf/T in RANGE_TURFS(2, location))
- Chilled(T)
- ..()
+
+ if(env.fuel_burnt() == 0)
+ return
+
+ env.set_temperature(2)
+ env.set_nitrogen(env.nitrogen() + env.toxins())
+ env.set_toxins(0)
+
+ if(smoke.spread_range <= 0 || smoke.lifetime > 0)
+ return
+
+ // Spread the smoke, up to spread_range.
+ for(var/direction in list(NORTH, SOUTH, EAST, WEST))
+ var/turf/neighbor = get_step(T, direction)
+ if(isnull(neighbor))
+ continue
+ if(neighbor.density)
+ continue
+ var/has_nanofrost = FALSE
+ for(var/datum/effect_system/smoke_spread/freezing in neighbor)
+ has_nanofrost = TRUE
+ break
+ if(has_nanofrost)
+ continue
+ if(prob(50))
+ continue
+
+ var/obj/effect/particle_effect/smoke/freezing/new_smoke = new(neighbor)
+ new_smoke.spread_range = smoke.spread_range - 1
/////////////////////////////////////////////
// Sleep smoke
diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm
index c744bca02c36..69798349d8cd 100644
--- a/code/game/objects/effects/effect_system/effects_sparks.dm
+++ b/code/game/objects/effects/effect_system/effects_sparks.dm
@@ -26,20 +26,20 @@
playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
var/turf/T = loc
if(isturf(T))
- T.hotspot_expose(hotspottemp, 100)
+ T.hotspot_expose(hotspottemp, 1)
QDEL_IN(src, 20)
/obj/effect/particle_effect/sparks/Destroy()
var/turf/T = loc
if(isturf(T))
- T.hotspot_expose(hotspottemp,100)
+ T.hotspot_expose(hotspottemp,1)
return ..()
/obj/effect/particle_effect/sparks/Move()
..()
var/turf/T = loc
if(isturf(T))
- T.hotspot_expose(hotspottemp,100)
+ T.hotspot_expose(hotspottemp,1)
/datum/effect_system/spark_spread
effect_type = /obj/effect/particle_effect/sparks
diff --git a/code/game/objects/effects/forcefields.dm b/code/game/objects/effects/forcefields.dm
index 14545e54e283..b86ae670a395 100644
--- a/code/game/objects/effects/forcefields.dm
+++ b/code/game/objects/effects/forcefields.dm
@@ -17,14 +17,20 @@
/obj/effect/forcefield/wizard
var/mob/wizard
+ /// Flags for what antimagic can just ignore our forcefields
+ var/antimagic_flags = MAGIC_RESISTANCE
/obj/effect/forcefield/wizard/Initialize(mapload, mob/summoner)
. = ..()
wizard = summoner
-/obj/effect/forcefield/wizard/CanPass(atom/movable/mover, turf/target)
+/obj/effect/forcefield/wizard/CanPass(atom/movable/mover, border_dir)
if(mover == wizard)
return TRUE
+ if(isliving(mover))
+ var/mob/living/living_mover = mover
+ if(living_mover.can_block_magic(antimagic_flags, charge_cost = 0))
+ return TRUE
return FALSE
///////////Mimewalls///////////
diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm
index b4dac11fbc36..f03b08668d82 100644
--- a/code/game/objects/effects/landmarks.dm
+++ b/code/game/objects/effects/landmarks.dm
@@ -422,9 +422,16 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/newplayer_start) //Without this you sp
name = "Warden"
icon_state = "Warden"
+/obj/effect/landmark/start/nanotrasen_career_trainer
+ name ="Nanotrasen Career Trainer"
+ icon_state = "NCT"
+
/obj/effect/landmark/start/set_tag()
tag = "start*[name]"
+/obj/effect/landmark/game_test/bottom_left_corner
+
+/obj/effect/landmark/game_test/top_right_corner
//Costume spawner landmarks
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index 573fe8030f17..a97ced7b06a5 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -7,13 +7,22 @@
var/triggered = FALSE
var/faction = "syndicate"
+/obj/effect/mine/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/mine/proc/mineEffect(mob/living/victim)
to_chat(victim, "*click* ")
-/obj/effect/mine/Crossed(AM as mob|obj, oldloc)
- if(!isliving(AM))
+/obj/effect/mine/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
+ if(!isliving(entered))
return
- var/mob/living/M = AM
+ var/mob/living/M = entered
if(faction && (faction in M.faction))
return
if(HAS_TRAIT(M, TRAIT_FLYING))
diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm
index ba6f449d1f01..4a61e40a3fdd 100644
--- a/code/game/objects/effects/portals.dm
+++ b/code/game/objects/effects/portals.dm
@@ -39,6 +39,11 @@
creation_mob_ckey = creation_mob?.ckey
START_PROCESSING(SSobj, src)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
if(lifespan > 0)
QDEL_IN(src, lifespan)
@@ -62,15 +67,15 @@
/obj/effect/portal/singularity_act()
return
-/obj/effect/portal/Crossed(atom/movable/AM, oldloc)
- if(isobserver(AM))
- return ..()
+/obj/effect/portal/proc/on_atom_entered(datum/source, atom/movable/entered, old_loc)
+ if(isobserver(entered))
+ return
- if(target && (get_turf(oldloc) == get_turf(target)))
- return ..()
+ if(target && (get_turf(old_loc) == get_turf(target)))
+ return
- if(!teleport(AM))
- return ..()
+ if(teleport(entered))
+ return TRUE
/obj/effect/portal/attack_tk(mob/user)
return
diff --git a/code/game/objects/effects/spawners/random/bluespace_tap_spawners.dm b/code/game/objects/effects/spawners/random/bluespace_tap_spawners.dm
index a2ca9fce872d..25b21a269546 100644
--- a/code/game/objects/effects/spawners/random/bluespace_tap_spawners.dm
+++ b/code/game/objects/effects/spawners/random/bluespace_tap_spawners.dm
@@ -54,7 +54,7 @@
/obj/machinery/snow_machine = 10,
/obj/item/clothing/head/kitty = 5,
/obj/item/coin/antagtoken = 5,
- /obj/item/toy/prizeball/figure = 15,
+ /obj/item/toy/prizeball/action_figure = 15,
/obj/item/toy/prizeball/therapy = 10,
/obj/item/bedsheet/patriot = 2,
/obj/item/bedsheet/rainbow = 2,
diff --git a/code/game/objects/effects/spawners/random/plushie_spawners.dm b/code/game/objects/effects/spawners/random/plushie_spawners.dm
index 9076664f6162..0eddbbe48197 100644
--- a/code/game/objects/effects/spawners/random/plushie_spawners.dm
+++ b/code/game/objects/effects/spawners/random/plushie_spawners.dm
@@ -83,3 +83,20 @@
/obj/item/toy/plushie/nianplushie/rainbow = 1
),
)
+
+/obj/effect/spawner/random/plushies/explosive
+ /// Chance to spawn a minibomb in the plushie.
+ var/explosive_chance = 1
+
+/obj/effect/spawner/random/plushies/explosive/make_item(spawn_loc, type_path_to_make)
+ var/obj/item/toy/plushie/plushie = ..()
+
+ if(!istype(plushie))
+ return plushie
+
+ if(prob(explosive_chance))
+ plushie.has_stuffing = FALSE
+ var/obj/item/grenade/syndieminibomb/grenade = new(plushie)
+ plushie.grenade = grenade
+
+ return plushie
diff --git a/code/game/objects/effects/spawners/random/toy_spawners.dm b/code/game/objects/effects/spawners/random/toy_spawners.dm
new file mode 100644
index 000000000000..01fb4300baf6
--- /dev/null
+++ b/code/game/objects/effects/spawners/random/toy_spawners.dm
@@ -0,0 +1,29 @@
+/obj/effect/spawner/random/toy
+ name = "random toy spawner"
+ icon = 'icons/effects/random_spawners.dmi'
+ icon_state = "toy"
+
+/obj/effect/spawner/random/toy/mech_figure
+ name = "random mech figurine"
+ loot_subtype_path = /obj/item/toy/figure/mech
+
+/obj/effect/spawner/random/toy/action_figure
+ name = "random action figure"
+ loot_subtype_path = /obj/item/toy/figure/crew
+
+/obj/effect/spawner/random/toy/carp_plushie
+ name = "random carp plushie"
+ loot_type_path = /obj/item/toy/plushie/carpplushie
+
+/obj/effect/spawner/random/toy/therapy_doll
+ name = "random therapy doll"
+ loot_subtype_path = /obj/item/toy/therapy
+
+/obj/effect/spawner/random/toy/clusterbuster
+ loot = list(
+ /obj/item/gun/projectile/shotgun/toy/crossbow,
+ /obj/item/reagent_containers/spray/waterflower,
+ /obj/item/toy/balloon,
+ /obj/item/toy/spinningtoy,
+ )
+ loot_subtype_path = /obj/item/toy/figure/mech
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index dbba0c2e051c..c169729b8e50 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -39,16 +39,19 @@
if(prob(50))
icon_state = "stickyweb2"
-/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
- if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider) || isterrorspider(mover))
- return TRUE
- else if(isliving(mover))
- if(prob(50))
- to_chat(mover, "You get stuck in [src] for a moment. ")
- return FALSE
- else if(isprojectile(mover))
- return prob(30)
- return TRUE
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/structure/spider/stickyweb/proc/on_atom_exit(datum/source, atom/exiter)
+ if(istype(exiter, /mob/living/simple_animal/hostile/poison/giant_spider) || isterrorspider(exiter))
+ return
+ if(isliving(exiter) && prob(50))
+ to_chat(exiter, "You get stuck in [src] for a moment. ")
+ return COMPONENT_ATOM_BLOCK_EXIT
+ if(isprojectile(exiter) && prob(30))
+ return COMPONENT_ATOM_BLOCK_EXIT
/obj/structure/spider/eggcluster
name = "egg cluster"
diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm
index e7acf45614a2..63ab8096230d 100644
--- a/code/game/objects/effects/step_triggers.dm
+++ b/code/game/objects/effects/step_triggers.dm
@@ -6,18 +6,27 @@
var/mobs_only = FALSE
invisibility = INVISIBILITY_ABSTRACT // nope cant see this shit
+/obj/effect/step_trigger/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
return FALSE
-/obj/effect/step_trigger/Crossed(H, oldloc)
- . = ..()
- if(!H)
+/obj/effect/step_trigger/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER
+ if(!entered || entered == src)
return
- if(isobserver(H) && !affect_ghosts)
+ if(!ismob(entered) && !isobj(entered))
return
- if(!ismob(H) && mobs_only)
+ if(isobserver(entered) && !affect_ghosts)
return
- Trigger(H)
+ if(!ismob(entered) && mobs_only)
+ return
+ INVOKE_ASYNC(src, PROC_REF(Trigger), entered)
/obj/effect/step_trigger/singularity_act()
return
@@ -39,7 +48,6 @@
qdel(src)
/* Tosses things in a certain direction */
-
/obj/effect/step_trigger/thrower
var/direction = SOUTH // the direction of throw
var/tiles = 3 // if 0: forever until atom hits a stopper
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 8624e047d9f1..e011d494106a 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -50,6 +50,8 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
var/w_class = WEIGHT_CLASS_NORMAL
/// This is used to determine on which slots an item can fit.
var/slot_flags = 0
+ /// If set, this determines which slots are considered when using quick equip
+ var/prefered_slot_flags = 0
/// Determines what it can pass over/through. IE. 'PASSTABLE' will allow it to pass over tables
pass_flags = PASSTABLE
pressure_resistance = 4
@@ -981,7 +983,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
/obj/item/proc/canStrip(mob/stripper, mob/owner)
SHOULD_BE_PURE(TRUE)
- return !(flags & NODROP) && !(flags & ABSTRACT)
+ return !(flags & NODROP) && !(flags & ABSTRACT) && !HAS_TRAIT(src, TRAIT_NO_STRIP)
/obj/item/proc/should_stack_with(obj/item/other)
return type == other.type && name == other.name
diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm
index 16578883159a..b711ebc46a77 100644
--- a/code/game/objects/items/candle.dm
+++ b/code/game/objects/items/candle.dm
@@ -104,7 +104,7 @@
qdel(src)
if(isturf(loc)) //start a fire if possible
var/turf/T = loc
- T.hotspot_expose(700, 5)
+ T.hotspot_expose(700, 1)
/obj/item/candle/proc/unlight()
if(lit)
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 5dda16a4f6ce..7c5ecf95a9c4 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -33,6 +33,8 @@
var/preset_message
/// The index of the character in the message that will be drawn next.
var/preset_message_index = 0
+ /// Can this crayon be consumed or not
+ var/consumable = TRUE
/obj/item/toy/crayon/suicide_act(mob/user)
user.visible_message("[user] is jamming the [name] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide! ")
@@ -42,7 +44,9 @@
..()
drawtype = pick(pick(graffiti), pick(letters), "rune[rand(1, 8)]")
-/obj/item/toy/crayon/attack_self__legacy__attackchain(mob/living/user as mob)
+/obj/item/toy/crayon/activate_self(mob/user)
+ if(..())
+ return
update_window(user)
/obj/item/toy/crayon/proc/update_window(mob/living/user as mob)
@@ -105,9 +109,12 @@
drawtype = temp
update_window(usr)
-/obj/item/toy/crayon/afterattack__legacy__attackchain(atom/target, mob/user, proximity)
- if(!proximity) return
- if(busy) return
+/obj/item/toy/crayon/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+ if(!proximity_flag)
+ return
+ if(busy)
+ return
if(is_type_in_list(target,validSurfaces))
var/temp = "rune"
if(preset_message_index > 0)
@@ -137,8 +144,10 @@
qdel(src)
busy = FALSE
-/obj/item/toy/crayon/attack__legacy__attackchain(mob/M, mob/user)
- if(M == user)
+/obj/item/toy/crayon/attack(mob/living/target, mob/living/carbon/human/user)
+ if(..() || !consumable)
+ return FINISH_ATTACK
+ if(target == user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.check_has_mouth())
@@ -152,8 +161,6 @@
else
to_chat(user, "There is no more of [name] left! ")
qdel(src)
- else
- ..()
/obj/item/toy/crayon/examine(mob/user)
. = ..()
@@ -255,9 +262,6 @@
dye_color = DYE_MIME
uses = 0
-/obj/item/toy/crayon/mime/attack_self__legacy__attackchain(mob/living/user as mob)
- update_window(user)
-
/obj/item/toy/crayon/mime/update_window(mob/living/user as mob)
dat += "
Change color "
..()
@@ -281,9 +285,6 @@
dye_color = DYE_RAINBOW
uses = 0
-/obj/item/toy/crayon/rainbow/attack_self__legacy__attackchain(mob/living/user as mob)
- update_window(user)
-
/obj/item/toy/crayon/rainbow/update_window(mob/living/user as mob)
dat += " Change color "
..()
@@ -312,15 +313,15 @@
instant = TRUE
validSurfaces = list(/turf/simulated/floor,/turf/simulated/wall)
dye_color = null // not technically a crayon, so we're not gonna have it dye stuff in the laundry machine
+ consumable = FALSE // To stop you from eating spraycans. It's TOO SILLY!
/obj/item/toy/crayon/spraycan/New()
..()
update_icon()
-/obj/item/toy/crayon/spraycan/attack__legacy__attackchain(mob/M, mob/user)
- return // To stop you from eating spraycans. It's TOO SILLY!
-
-/obj/item/toy/crayon/spraycan/attack_self__legacy__attackchain(mob/living/user)
+/obj/item/toy/crayon/spraycan/activate_self(mob/user)
+ if(..())
+ return
var/choice = tgui_input_list(user, "Do you want to...", "Spraycan Options", list("Toggle Cap","Change Drawing", "Change Color"))
switch(choice)
if("Toggle Cap")
@@ -335,9 +336,9 @@
return
update_icon()
-/obj/item/toy/crayon/spraycan/afterattack__legacy__attackchain(atom/target, mob/user as mob, proximity)
+/obj/item/toy/crayon/spraycan/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
- if(!proximity)
+ if(!proximity_flag)
return
if(capped)
to_chat(user, "You cannot spray [target] while the cap is still on! ")
diff --git a/code/game/objects/items/dehy_carp.dm b/code/game/objects/items/dehy_carp.dm
index 35c1a5082d6b..8638ee8335dd 100644
--- a/code/game/objects/items/dehy_carp.dm
+++ b/code/game/objects/items/dehy_carp.dm
@@ -14,7 +14,9 @@
return ..()
// Attack self
-/obj/item/toy/plushie/carpplushie/dehy_carp/attack_self__legacy__attackchain(mob/user as mob)
+/obj/item/toy/plushie/carpplushie/dehy_carp/activate_self(mob/user)
+ if(..())
+ return
src.add_fingerprint(user) // Anyone can add their fingerprints to it with this
if(owned)
to_chat(user, "[src] stares up at you with friendly eyes. ")
@@ -27,14 +29,15 @@
if(volume >= 1)
Swell()
-/obj/item/toy/plushie/carpplushie/dehy_carp/afterattack__legacy__attackchain(obj/O, mob/user,proximity)
- if(!proximity) return
- if(istype(O,/obj/structure/sink))
+/obj/item/toy/plushie/carpplushie/dehy_carp/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+ if(!proximity_flag)
+ return
+ if(istype(target,/obj/structure/sink))
to_chat(user, "You place [src] under a stream of water... ")
user.drop_item()
- loc = get_turf(O)
+ loc = get_turf(target)
return Swell()
- ..()
/obj/item/toy/plushie/carpplushie/dehy_carp/proc/Swell()
desc = "It's growing!"
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 06efea7d556b..5a4e07005b62 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -188,7 +188,7 @@
/obj/item/flashlight/flare/process()
var/turf/pos = get_turf(src)
if(pos && produce_heat)
- pos.hotspot_expose(produce_heat, 5)
+ pos.hotspot_expose(produce_heat, 1)
fuel = max(fuel - 1, 0)
if(!fuel || !on)
turn_off()
diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm
index 19c8c7319d64..a1999c826e88 100644
--- a/code/game/objects/items/devices/radio/encryptionkey.dm
+++ b/code/game/objects/items/devices/radio/encryptionkey.dm
@@ -172,3 +172,8 @@
desc = "Integrated encryption key."
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "Service" = 1, "AI Private" = 1, "Procedure" = 1)
+
+/obj/item/encryptionkey/headset_nct
+ name = "NCT Radio Encryption Key"
+ icon_state = "com_cypherkey"
+ channels = list("Procedure" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "Service" = 1)
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 201ceb11fcfe..10770f412070 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -308,6 +308,13 @@
item_state = "headset"
ks2type = /obj/item/encryptionkey/heads/ntrep
+/obj/item/radio/headset/headset_nct
+ name = "\improper Nanotrasen career trainer radio headset"
+ desc = "This is used by your well-taught corporate training team."
+ icon_state = "com_headset"
+ item_state = "headset"
+ ks2type = /obj/item/encryptionkey/headset_nct
+
/obj/item/radio/headset/heads/magistrate
name = "magistrate's headset"
desc = "The headset of the Magistrate."
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index f164e8283d0c..077f349263f4 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -625,18 +625,17 @@ SLIME SCANNER
* Used in chat-based gas scans.
*/
/proc/atmos_scan(mob/user, atom/target, silent = FALSE, print = TRUE, milla_turf_details = FALSE)
- var/mixture
+ var/datum/gas_mixture/air
var/list/milla = null
- if(milla_turf_details)
+ if(milla_turf_details && istype(target, /turf))
milla = new/list(MILLA_TILE_SIZE)
get_tile_atmos(target, milla)
- var/datum/gas_mixture/GM = new()
- GM.copy_from_milla(milla)
- mixture = GM
+ air = new()
+ air.copy_from_milla(milla)
else
- mixture = target.return_analyzable_air()
- if(!mixture)
- return FALSE
+ air = target.return_analyzable_air()
+ if(!air)
+ return FALSE
var/list/message = list()
if(!silent && isliving(user))
@@ -646,64 +645,53 @@ SLIME SCANNER
if(!print)
return TRUE
- var/list/airs = islist(mixture) ? mixture : list(mixture)
- for(var/datum/gas_mixture/air as anything in airs)
- var/mix_name = capitalize(lowertext(target.name))
- if(length(air) > 1) //not a unary gas mixture
- var/mix_number = airs.Find(air)
- message += "Node [mix_number] "
- mix_name += " - Node [mix_number]"
-
- var/total_moles = air.total_moles()
- var/pressure = air.return_pressure()
- var/volume = air.return_volume() //could just do mixture.volume... but safety, I guess?
- var/heat_capacity = air.heat_capacity()
- var/thermal_energy = air.thermal_energy()
-
- if(total_moles)
- message += "Total: [round(total_moles, 0.01)] moles "
- if(air.oxygen() && (milla_turf_details || air.oxygen() / total_moles > 0.01))
- message += " Oxygen: [round(air.oxygen(), 0.01)] moles ([round(air.oxygen() / total_moles * 100, 0.01)] %) "
- if(air.nitrogen() && (milla_turf_details || air.nitrogen() / total_moles > 0.01))
- message += " Nitrogen: [round(air.nitrogen(), 0.01)] moles ([round(air.nitrogen() / total_moles * 100, 0.01)] %) "
- if(air.carbon_dioxide() && (milla_turf_details || air.carbon_dioxide() / total_moles > 0.01))
- message += " Carbon Dioxide: [round(air.carbon_dioxide(), 0.01)] moles ([round(air.carbon_dioxide() / total_moles * 100, 0.01)] %) "
- if(air.toxins() && (milla_turf_details || air.toxins() / total_moles > 0.01))
- message += " Plasma: [round(air.toxins(), 0.01)] moles ([round(air.toxins() / total_moles * 100, 0.01)] %) "
- if(air.sleeping_agent() && (milla_turf_details || air.sleeping_agent() / total_moles > 0.01))
- message += " Nitrous Oxide: [round(air.sleeping_agent(), 0.01)] moles ([round(air.sleeping_agent() / total_moles * 100, 0.01)] %) "
- if(air.agent_b() && (milla_turf_details || air.agent_b() / total_moles > 0.01))
- message += " Agent B: [round(air.agent_b(), 0.01)] moles ([round(air.agent_b() / total_moles * 100, 0.01)] %) "
- message += "Temperature: [round(air.temperature()-T0C)] °C ([round(air.temperature())] K) "
- message += "Volume: [round(volume)] Liters "
- message += "Pressure: [round(pressure, 0.1)] kPa "
- message += "Heat Capacity: [DisplayJoules(heat_capacity)] / K "
- message += "Thermal Energy: [DisplayJoules(thermal_energy)] "
- else
- message += length(airs) > 1 ? "This node is empty! " : "[target] is empty! "
- message += "Volume: [round(volume)] Liters " // don't want to change the order volume appears in, suck it
-
- if(milla)
- // Values from milla/src/lib.rs, +1 due to array indexing difference.
- message += "Airtight North: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_NORTH) ? "yes" : "no"] "
- message += "Airtight East: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_EAST) ? "yes" : "no"] "
- message += "Airtight South: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_SOUTH) ? "yes" : "no"] "
- message += "Airtight West: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_WEST) ? "yes" : "no"] "
- switch(milla[MILLA_INDEX_ATMOS_MODE])
- // These are enum values, so they don't get increased.
- if(0)
- message += "Atmos Mode: Space "
- if(1)
- message += "Atmos Mode: Sealed "
- if(2)
- message += "Atmos Mode: Exposed to Environment (ID: [milla[MILLA_INDEX_ENVIRONMENT_ID]]) "
- else
- message += "Atmos Mode: Unknown ([milla[MILLA_INDEX_ATMOS_MODE]]), contact a coder. "
- message += "Superconductivity North: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_NORTH]] "
- message += "Superconductivity East: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_EAST]] "
- message += "Superconductivity South: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_SOUTH]] "
- message += "Superconductivity West: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_WEST]] "
- message += "Turf's Innate Heat Capacity: [milla[MILLA_INDEX_INNATE_HEAT_CAPACITY]] "
+ var/total_moles = air.total_moles()
+ var/pressure = air.return_pressure()
+ var/volume = air.return_volume() //could just do mixture.volume... but safety, I guess?
+ var/heat_capacity = air.heat_capacity()
+ var/thermal_energy = air.thermal_energy()
+
+ if(total_moles)
+ message += "Total: [round(total_moles, 0.01)] moles "
+ if(air.oxygen() && (milla_turf_details || air.oxygen() / total_moles > 0.01))
+ message += " Oxygen: [round(air.oxygen(), 0.01)] moles ([round(air.oxygen() / total_moles * 100, 0.01)] %) "
+ if(air.nitrogen() && (milla_turf_details || air.nitrogen() / total_moles > 0.01))
+ message += " Nitrogen: [round(air.nitrogen(), 0.01)] moles ([round(air.nitrogen() / total_moles * 100, 0.01)] %) "
+ if(air.carbon_dioxide() && (milla_turf_details || air.carbon_dioxide() / total_moles > 0.01))
+ message += " Carbon Dioxide: [round(air.carbon_dioxide(), 0.01)] moles ([round(air.carbon_dioxide() / total_moles * 100, 0.01)] %) "
+ if(air.toxins() && (milla_turf_details || air.toxins() / total_moles > 0.01))
+ message += " Plasma: [round(air.toxins(), 0.01)] moles ([round(air.toxins() / total_moles * 100, 0.01)] %) "
+ if(air.sleeping_agent() && (milla_turf_details || air.sleeping_agent() / total_moles > 0.01))
+ message += " Nitrous Oxide: [round(air.sleeping_agent(), 0.01)] moles ([round(air.sleeping_agent() / total_moles * 100, 0.01)] %) "
+ if(air.agent_b() && (milla_turf_details || air.agent_b() / total_moles > 0.01))
+ message += " Agent B: [round(air.agent_b(), 0.01)] moles ([round(air.agent_b() / total_moles * 100, 0.01)] %) "
+ message += "Temperature: [round(air.temperature()-T0C)] °C ([round(air.temperature())] K) "
+ message += "Volume: [round(volume)] Liters "
+ message += "Pressure: [round(pressure, 0.1)] kPa "
+ message += "Heat Capacity: [DisplayJoules(heat_capacity)] / K "
+ message += "Thermal Energy: [DisplayJoules(thermal_energy)] "
+ else
+ message += "[target] is empty! "
+ message += "Volume: [round(volume)] Liters " // don't want to change the order volume appears in, suck it
+
+ if(milla)
+ // Values from milla/src/lib.rs, +1 due to array indexing difference.
+ message += "Airtight N/E/S/W: [(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_NORTH) ? "yes" : "no"]/[(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_EAST) ? "yes" : "no"]/[(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_SOUTH) ? "yes" : "no"]/[(milla[MILLA_INDEX_AIRTIGHT_DIRECTIONS] & MILLA_WEST) ? "yes" : "no"] "
+ switch(milla[MILLA_INDEX_ATMOS_MODE])
+ // These are enum values, so they don't get increased.
+ if(0)
+ message += "Atmos Mode: Space "
+ if(1)
+ message += "Atmos Mode: Sealed "
+ if(2)
+ message += "Atmos Mode: Exposed to Environment (ID: [milla[MILLA_INDEX_ENVIRONMENT_ID]]) "
+ else
+ message += "Atmos Mode: Unknown ([milla[MILLA_INDEX_ATMOS_MODE]]), contact a coder. "
+ message += "Superconductivity N/E/S/W: [milla[MILLA_INDEX_SUPERCONDUCTIVITY_NORTH]]/[milla[MILLA_INDEX_SUPERCONDUCTIVITY_EAST]]/[milla[MILLA_INDEX_SUPERCONDUCTIVITY_SOUTH]]/[milla[MILLA_INDEX_SUPERCONDUCTIVITY_WEST]] "
+ message += "Turf's Innate Heat Capacity: [milla[MILLA_INDEX_INNATE_HEAT_CAPACITY]] "
+ message += "Hotspot: [floor(milla[MILLA_INDEX_HOTSPOT_TEMPERATURE]-T0C)] °C ([floor(milla[MILLA_INDEX_HOTSPOT_TEMPERATURE])] K), [round(milla[MILLA_INDEX_HOTSPOT_VOLUME] * CELL_VOLUME, 1)] Liters ([milla[MILLA_INDEX_HOTSPOT_VOLUME]]x) "
+ message += "Wind: ([round(milla[MILLA_INDEX_WIND_X], 0.001)], [round(milla[MILLA_INDEX_WIND_Y], 0.001)]) "
+ message += "Fuel burnt last tick: [milla[MILLA_INDEX_FUEL_BURNT]] moles "
to_chat(user, chat_box_examine(message.Join("\n")))
return TRUE
diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm
index 393209b5c0f5..e5232ec4bc20 100644
--- a/code/game/objects/items/his_grace.dm
+++ b/code/game/objects/items/his_grace.dm
@@ -14,7 +14,7 @@
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
w_class = WEIGHT_CLASS_GIGANTIC
- force = 15
+ force = 20
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
drop_sound = 'sound/items/handling/toolbox_drop.ogg'
@@ -77,6 +77,16 @@
else
return ..()
+/obj/item/his_grace/attack_obj(obj/attacked_obj, mob/living/user, params)
+ if(!awakened && (isstructure(attacked_obj) || ismachinery(attacked_obj)))
+ return ..()
+ var/mob/living/carbon/human/H = user
+ H.changeNext_move(CLICK_CD_MELEE)
+ H.do_attack_animation(attacked_obj)
+ H.visible_message("[H] has hit [attacked_obj] with [src]! ", "You hit [attacked_obj] with [src]! ")
+ var/damage = force
+ attacked_obj.take_damage(damage * 3, BRUTE, MELEE, TRUE, get_dir(src, user), 30) // yoinked from breaching cleaver
+
/obj/item/his_grace/can_be_pulled(user, grab_state, force, show_message = FALSE) //you can't pull his grace
return FALSE
@@ -111,7 +121,7 @@
drowse()
return
if(bloodthirst < HIS_GRACE_CONSUME_OWNER)
- adjust_bloodthirst(0.5 + round(length(contents) * (1 / 6), 1))
+ adjust_bloodthirst(0.5 + round(length(contents) * (1 / 10), 1))
else
adjust_bloodthirst(0.5) //don't cool off rapidly once we're at the point where His Grace consumes all.
diff --git a/code/game/objects/items/robot/cyborg_gripper.dm b/code/game/objects/items/robot/cyborg_gripper.dm
index 4f81cdc5f977..cac644d7c839 100644
--- a/code/game/objects/items/robot/cyborg_gripper.dm
+++ b/code/game/objects/items/robot/cyborg_gripper.dm
@@ -62,7 +62,10 @@
if(!gripped_item)
to_chat(user, "[src] is empty. ")
return
- gripped_item.attack_self__legacy__attackchain(user)
+ if(gripped_item.new_attack_chain)
+ gripped_item.activate_self(user)
+ else
+ gripped_item.attack_self__legacy__attackchain(user)
// This is required to ensure that the forceMove checks on some objects don't rip the gripper out of the borg's inventory and toss it on the floor. That would hurt, a lot!
/obj/item/gripper/forceMove(atom/destination)
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index 61960c940942..5a23bae121cc 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -60,10 +60,9 @@ GLOBAL_LIST_INIT(rod_recipes, list (
/obj/item/stack/rods/fifty
amount = 50
-/obj/item/stack/rods/New(loc, amount=null)
- ..()
+/obj/item/stack/rods/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.rod_recipes
- update_icon(UPDATE_ICON_STATE)
/obj/item/stack/rods/update_icon_state()
var/amount = get_amount()
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index edc0dd43ba74..52ff0308ffa7 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -61,9 +61,9 @@ GLOBAL_LIST_INIT(glass_recipes, list (
/obj/item/stack/sheet/glass/cyborg/drone
energy_type = /datum/robot_storage/energy/glass
-/obj/item/stack/sheet/glass/New(loc, amount)
+/obj/item/stack/sheet/glass/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.glass_recipes
- ..()
/obj/item/stack/sheet/glass/attackby__legacy__attackchain(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stack/cable_coil))
@@ -128,9 +128,9 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list (
/obj/item/stack/sheet/rglass/fifty
amount = 50
-/obj/item/stack/sheet/rglass/New(loc, amount)
+/obj/item/stack/sheet/rglass/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.reinforced_glass_recipes
- ..()
GLOBAL_LIST_INIT(pglass_recipes, list (
new /datum/stack_recipe("plasma shard", /obj/item/shard/plasma, time = 0 SECONDS),
@@ -183,9 +183,9 @@ GLOBAL_LIST_INIT(pglass_recipes, list (
/obj/item/stack/sheet/plasmaglass/fifty
amount = 50
-/obj/item/stack/sheet/plasmaglass/New(loc, amount)
+/obj/item/stack/sheet/plasmaglass/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.pglass_recipes
- ..()
/obj/item/stack/sheet/plasmaglass/attackby__legacy__attackchain(obj/item/W, mob/user, params)
..()
@@ -241,9 +241,9 @@ GLOBAL_LIST_INIT(prglass_recipes, list (
/obj/item/stack/sheet/plasmarglass/fifty
amount = 50
-/obj/item/stack/sheet/plasmarglass/New(loc, amount)
+/obj/item/stack/sheet/plasmarglass/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.prglass_recipes
- ..()
GLOBAL_LIST_INIT(titaniumglass_recipes, list(
new /datum/stack_recipe/window("shuttle window", /obj/structure/window/full/shuttle, 2, time = 0 SECONDS, on_floor = TRUE, window_checks = TRUE)
@@ -274,9 +274,9 @@ GLOBAL_LIST_INIT(titaniumglass_recipes, list(
/obj/item/stack/sheet/titaniumglass/fifty
amount = 50
-/obj/item/stack/sheet/titaniumglass/New(loc, amount)
+/obj/item/stack/sheet/titaniumglass/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.titaniumglass_recipes
- ..()
GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
new /datum/stack_recipe/window("plastitanium window", /obj/structure/window/full/plastitanium, 2, time = 0 SECONDS, on_floor = TRUE, window_checks = TRUE)
@@ -308,7 +308,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
/obj/item/stack/sheet/plastitaniumglass/fifty
amount = 50
-/obj/item/stack/sheet/plastitaniumglass/New(loc, amount)
+/obj/item/stack/sheet/plastitaniumglass/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.plastitaniumglass_recipes
- ..()
diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm
index de7987e35c92..6423b9edd94d 100644
--- a/code/game/objects/items/stacks/sheets/leather.dm
+++ b/code/game/objects/items/stacks/sheets/leather.dm
@@ -17,9 +17,9 @@ GLOBAL_LIST_INIT(human_recipes, list(
new /datum/stack_recipe("bloated human costume head", /obj/item/clothing/head/human_head, 5, on_floor = TRUE),
))
-/obj/item/stack/sheet/animalhide/human/New(loc, amount=null)
+/obj/item/stack/sheet/animalhide/human/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.human_recipes
- return ..()
/obj/item/stack/sheet/animalhide/generic
name = "generic skin"
@@ -152,11 +152,11 @@ GLOBAL_LIST_INIT(leather_recipes, list (
new /datum/stack_recipe("leather jacket", /obj/item/clothing/suit/jacket/leather, 7),
new /datum/stack_recipe("leather shoes", /obj/item/clothing/shoes/leather, 2),
new /datum/stack_recipe("leather overcoat", /obj/item/clothing/suit/jacket/leather/overcoat, 10),
- new /datum/stack_recipe("hide mantle", /obj/item/clothing/suit/unathi/mantle, 4)))
+ new /datum/stack_recipe("hide mantle", /obj/item/clothing/neck/cloak/unathi, 4)))
-/obj/item/stack/sheet/leather/New(loc, new_amount, merge = TRUE)
+/obj/item/stack/sheet/leather/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.leather_recipes
- return ..()
/obj/item/stack/sheet/sinew
name = "watcher sinew"
@@ -172,9 +172,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list (
new /datum/stack_recipe("sinew restraints", /obj/item/restraints/handcuffs/sinew, 1, on_floor = 1),
))
-/obj/item/stack/sheet/sinew/New(loc, amount=null)
+/obj/item/stack/sheet/sinew/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.sinew_recipes
- return ..()
/obj/item/stack/sheet/animalhide/goliath_hide
name = "goliath hide plates"
diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm
index 2e53e687d1e9..5f45c2e3a02b 100644
--- a/code/game/objects/items/stacks/sheets/mineral.dm
+++ b/code/game/objects/items/stacks/sheets/mineral.dm
@@ -42,7 +42,7 @@ GLOBAL_LIST_INIT(silver_recipes, list (
new /datum/stack_recipe("Corgi Statue", /obj/structure/statue/silver/corgi, 5, time = 2.5 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
)),
null,
- new /datum/stack_recipe("Silver Locket", /obj/item/clothing/accessory/necklace/locket/silver, 1),
+ new /datum/stack_recipe("Silver Locket", /obj/item/clothing/neck/necklace/locket/silver, 1),
))
GLOBAL_LIST_INIT(diamond_recipes, list (
@@ -87,9 +87,9 @@ GLOBAL_LIST_INIT(gold_recipes, list (
new /datum/stack_recipe_list("gold clothing", list(
new /datum/stack_recipe("Simple Crown", /obj/item/clothing/head/crown, 5),
null,
- new /datum/stack_recipe("Simple Necklace", /obj/item/clothing/accessory/necklace, 1),
- new /datum/stack_recipe("Large Necklace", /obj/item/clothing/accessory/necklace/long, 2),
- new /datum/stack_recipe("Gold Locket", /obj/item/clothing/accessory/necklace/locket, 1),
+ new /datum/stack_recipe("Simple Necklace", /obj/item/clothing/neck/necklace, 1),
+ new /datum/stack_recipe("Large Necklace", /obj/item/clothing/neck/necklace/long, 2),
+ new /datum/stack_recipe("Gold Locket", /obj/item/clothing/neck/necklace/locket, 1),
)),
))
@@ -148,8 +148,8 @@ GLOBAL_LIST_INIT(snow_recipes, list(
throwforce = 5
throw_speed = 3
-/obj/item/stack/sheet/mineral/New()
- ..()
+/obj/item/stack/sheet/mineral/Initialize(mapload, new_amount, merge)
+ . = ..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
@@ -167,8 +167,8 @@ GLOBAL_LIST_INIT(snow_recipes, list(
/obj/item/stack/sheet/mineral/sandstone/fifty
amount = 50
-/obj/item/stack/sheet/mineral/sandstone/New()
- ..()
+/obj/item/stack/sheet/mineral/sandstone/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.sandstone_recipes
/*
@@ -188,9 +188,9 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
new /datum/stack_recipe("sandbags", /obj/structure/barricade/sandbags, 1, time = 25, one_per_turf = TRUE, on_floor = TRUE),
))
-/obj/item/stack/sheet/mineral/sandbags/New()
+/obj/item/stack/sheet/mineral/sandbags/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.sandbag_recipes
- ..()
/obj/item/emptysandbag
name = "empty sandbag"
@@ -230,8 +230,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
. += ""
. += "Diamond is highly sought after for both aesthetic uses and as a component of many advanced technologies."
-/obj/item/stack/sheet/mineral/diamond/New()
- ..()
+/obj/item/stack/sheet/mineral/diamond/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.diamond_recipes
/obj/item/stack/sheet/mineral/diamond/fifty
@@ -258,8 +258,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
/obj/item/stack/sheet/mineral/uranium/fifty
amount = 50
-/obj/item/stack/sheet/mineral/uranium/New()
- ..()
+/obj/item/stack/sheet/mineral/uranium/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.uranium_recipes
/obj/item/stack/sheet/mineral/plasma
@@ -288,8 +288,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
. += "Despite its flammability, plasma-enhanced materials such as plasteel or plasma glass generally possess extreme fire resistance, ultra-low thermal conductivity, and a high emissivity. \
This allows, for example, a relatively thin pane of plasma glass to be cool to the touch even when a massive inferno is burning on the other side."
-/obj/item/stack/sheet/mineral/plasma/New()
- ..()
+/obj/item/stack/sheet/mineral/plasma/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.plasma_recipes
/obj/item/stack/sheet/mineral/plasma/fifty
@@ -341,8 +341,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
/obj/item/stack/sheet/mineral/gold/fifty
amount = 50
-/obj/item/stack/sheet/mineral/gold/New()
- ..()
+/obj/item/stack/sheet/mineral/gold/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.gold_recipes
/obj/item/stack/sheet/mineral/silver
@@ -367,8 +367,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
/obj/item/stack/sheet/mineral/silver/fifty
amount = 50
-/obj/item/stack/sheet/mineral/silver/New()
- ..()
+/obj/item/stack/sheet/mineral/silver/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.silver_recipes
/obj/item/stack/sheet/mineral/bananium
@@ -396,8 +396,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
/obj/item/stack/sheet/mineral/bananium/fifty
amount = 50
-/obj/item/stack/sheet/mineral/bananium/New(loc, amount=null)
- ..()
+/obj/item/stack/sheet/mineral/bananium/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.bananium_recipes
/obj/item/stack/sheet/mineral/tranquillite
@@ -427,8 +427,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list (
/obj/item/stack/sheet/mineral/tranquillite/fifty
amount = 50
-/obj/item/stack/sheet/mineral/tranquillite/New(loc, amount=null)
- ..()
+/obj/item/stack/sheet/mineral/tranquillite/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.tranquillite_recipes
/*
@@ -464,9 +464,9 @@ GLOBAL_LIST_INIT(titanium_recipes, list(
new /datum/stack_recipe("surgical tray", /obj/structure/table/tray, 2, one_per_turf = TRUE, on_floor = TRUE),
))
-/obj/item/stack/sheet/mineral/titanium/New(loc, amount=null)
+/obj/item/stack/sheet/mineral/titanium/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.titanium_recipes
- ..()
/obj/item/stack/sheet/mineral/titanium/fifty
amount = 50
@@ -507,9 +507,9 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list(
new /datum/stack_recipe("reinforced wheelchair", /obj/structure/chair/wheelchair/plastitanium, 15, time = 7 SECONDS, one_per_turf = TRUE, on_floor = TRUE),
))
-/obj/item/stack/sheet/mineral/plastitanium/New(loc, amount=null)
+/obj/item/stack/sheet/mineral/plastitanium/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.plastitanium_recipes
- ..()
//Alien Alloy
@@ -537,9 +537,9 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list(
/obj/item/stack/sheet/mineral/abductor/fifty
amount = 50
-/obj/item/stack/sheet/mineral/abductor/New(loc, amount=null)
+/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.abductor_recipes
- ..()
/obj/item/stack/sheet/mineral/adamantine
name = "adamantine"
@@ -551,9 +551,9 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list(
merge_type = /obj/item/stack/sheet/mineral/adamantine
wall_allowed = FALSE
-/obj/item/stack/sheet/mineral/adamantine/New(loc, amount = null)
+/obj/item/stack/sheet/mineral/adamantine/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.adamantine_recipes
- ..()
/obj/item/stack/sheet/mineral/adamantine/fifty
@@ -571,6 +571,6 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list(
throwforce = 2
merge_type = /obj/item/stack/sheet/mineral/snow
-/obj/item/stack/sheet/mineral/snow/New(loc, amount = null)
+/obj/item/stack/sheet/mineral/snow/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.snow_recipes
- ..()
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index c35f465cbf01..a3deade91962 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -172,9 +172,9 @@ GLOBAL_LIST_INIT(metal_recipes, list(
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
-/obj/item/stack/sheet/metal/New(loc, amount=null)
+/obj/item/stack/sheet/metal/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.metal_recipes
- return ..()
//////////////////////////////
// MARK: PLASTEEL
@@ -226,9 +226,9 @@ GLOBAL_LIST_INIT(plasteel_recipes, list(
/obj/item/stack/sheet/plasteel/fifty
amount = 50
-/obj/item/stack/sheet/plasteel/New(loc, amount=null)
+/obj/item/stack/sheet/plasteel/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.plasteel_recipes
- return ..()
/obj/item/stack/sheet/wood/cyborg
energy_type = /datum/robot_storage/energy/wood
@@ -291,9 +291,9 @@ GLOBAL_LIST_INIT(wood_recipes, list(
sheettype = "wood"
table_type = /obj/structure/table/wood
-/obj/item/stack/sheet/wood/New(loc, amount=null)
+/obj/item/stack/sheet/wood/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.wood_recipes
- return ..()
//////////////////////////////
// MARK: BAMBOO
@@ -330,9 +330,9 @@ GLOBAL_LIST_INIT(bamboo_recipes, list(
sheettype = "bamboo"
merge_type = /obj/item/stack/sheet/bamboo
-/obj/item/stack/sheet/bamboo/New(loc, amount=null)
+/obj/item/stack/sheet/bamboo/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.bamboo_recipes
- return ..()
/obj/item/stack/sheet/bamboo/fifty
amount = 50
@@ -343,7 +343,7 @@ GLOBAL_LIST_INIT(bamboo_recipes, list(
GLOBAL_LIST_INIT(cloth_recipes, list (
new /datum/stack_recipe_list("cloth clothings", list(
new /datum/stack_recipe("white jumpsuit", /obj/item/clothing/under/color/white, 3),
- new /datum/stack_recipe("white scarf", /obj/item/clothing/accessory/scarf/white, 1),
+ new /datum/stack_recipe("white scarf", /obj/item/clothing/neck/scarf/white, 1),
new /datum/stack_recipe("white shoes", /obj/item/clothing/shoes/white, 2),
new /datum/stack_recipe("cloth footwraps", /obj/item/clothing/shoes/footwraps, 2),
null,
@@ -395,9 +395,9 @@ GLOBAL_LIST_INIT(cloth_recipes, list (
drop_sound = 'sound/items/handling/cloth_drop.ogg'
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'
-/obj/item/stack/sheet/cloth/New(loc, amount=null)
+/obj/item/stack/sheet/cloth/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.cloth_recipes
- ..()
/obj/item/stack/sheet/cloth/ten
amount = 10
@@ -512,9 +512,9 @@ GLOBAL_LIST_INIT(cardboard_recipes, list (
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/cardboard
-/obj/item/stack/sheet/cardboard/New(loc, amt = null)
+/obj/item/stack/sheet/cardboard/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.cardboard_recipes
- return ..()
//////////////////////////////
// MARK: SOIL
@@ -566,7 +566,7 @@ GLOBAL_LIST_INIT(cult_recipes, list (
. += ""
. += "Mundane matter turned extraordinary by the dark blessings of those things that lie in wait - such as this - is the canvas used to build the works that shall one day tear asunder the veil that shields our world."
-/obj/item/stack/sheet/runed_metal/New()
+/obj/item/stack/sheet/runed_metal/Initialize(mapload, new_amount, merge)
. = ..()
icon_state = GET_CULT_DATA(runed_metal_icon_state, initial(icon_state))
item_state = GET_CULT_DATA(runed_metal_item_state, initial(item_state))
@@ -654,9 +654,9 @@ GLOBAL_LIST_INIT(brass_recipes, list (
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)
-/obj/item/stack/tile/brass/New(loc, amount=null)
- recipes = GLOB.brass_recipes
+/obj/item/stack/tile/brass/Initialize(mapload, new_amount, merge)
. = ..()
+ recipes = GLOB.brass_recipes
pixel_x = 0
pixel_y = 0
@@ -747,9 +747,9 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
. += "Despite the extensive uses of plastics, they are not as ubiquitous as other materials (especially steel). This is due to a combination of environmental regulations, \
established market patterns, and the operational requirements for many space-based installations to employ easily recycled materials to conserve limited supplies."
-/obj/item/stack/sheet/plastic/New()
- recipes = GLOB.plastic_recipes
+/obj/item/stack/sheet/plastic/Initialize(mapload, new_amount, merge)
. = ..()
+ recipes = GLOB.plastic_recipes
/obj/item/stack/sheet/plastic/fifty
amount = 50
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 4066e3702c7b..d7d151a4dd0c 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -61,6 +61,10 @@
if(is_zero_amount(FALSE))
return INITIALIZE_HINT_QDEL
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
update_icon(UPDATE_ICON_STATE)
/obj/item/stack/update_icon_state()
@@ -75,17 +79,18 @@
icon_state = "[initial(icon_state)]_[state]"
-/obj/item/stack/Crossed(obj/O, oldloc)
- if(O == src)
+/obj/item/stack/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
+ // Edge case. This signal will also be sent when src has entered the turf. Don't want to merge with ourselves.
+ if(entered == src)
return
if(amount >= max_amount || ismob(loc)) // Prevents unnecessary call. Also prevents merging stack automatically in a mob's inventory
return
- if(!O.throwing && can_merge(O))
- INVOKE_ASYNC(src, PROC_REF(merge), O)
-
- ..()
+ if(!entered.throwing && can_merge(entered))
+ INVOKE_ASYNC(src, PROC_REF(merge), entered)
/obj/item/stack/hitby(atom/movable/hitting, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(can_merge(hitting, inhand = TRUE))
diff --git a/code/game/objects/items/stacks/tiles/tile_mineral.dm b/code/game/objects/items/stacks/tiles/tile_mineral.dm
index 2ead9e4593ca..55472aaab835 100644
--- a/code/game/objects/items/stacks/tiles/tile_mineral.dm
+++ b/code/game/objects/items/stacks/tiles/tile_mineral.dm
@@ -40,8 +40,8 @@ GLOBAL_LIST_INIT(gold_tile_recipes, list ( \
mineralType = "gold"
materials = list(MAT_GOLD=500)
-/obj/item/stack/tile/mineral/gold/New(loc, amount=null)
- ..()
+/obj/item/stack/tile/mineral/gold/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.gold_tile_recipes
GLOBAL_LIST_INIT(goldfancy_tile_recipes, list ( \
@@ -52,8 +52,8 @@ GLOBAL_LIST_INIT(goldfancy_tile_recipes, list ( \
icon_state = "tile_goldfancy"
turf_type = /turf/simulated/floor/mineral/gold/fancy
-/obj/item/stack/tile/mineral/gold/fancy/New(loc, amount=null)
- ..()
+/obj/item/stack/tile/mineral/gold/fancy/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.goldfancy_tile_recipes
GLOBAL_LIST_INIT(silver_tile_recipes, list ( \
@@ -69,8 +69,8 @@ GLOBAL_LIST_INIT(silver_tile_recipes, list ( \
mineralType = "silver"
materials = list(MAT_SILVER=500)
-/obj/item/stack/tile/mineral/silver/New(loc, amount=null)
- ..()
+/obj/item/stack/tile/mineral/silver/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.silver_tile_recipes
GLOBAL_LIST_INIT(silverfancy_tile_recipes, list ( \
@@ -81,8 +81,8 @@ GLOBAL_LIST_INIT(silverfancy_tile_recipes, list ( \
icon_state = "tile_silverfancy"
turf_type = /turf/simulated/floor/mineral/silver/fancy
-/obj/item/stack/tile/mineral/silver/fancy/New(loc, amount=null)
- ..()
+/obj/item/stack/tile/mineral/silver/fancy/Initialize(mapload, new_amount, merge)
+ . = ..()
recipes = GLOB.silverfancy_tile_recipes
/obj/item/stack/tile/mineral/diamond
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index da72b17dade1..9eb64dd31302 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -16,8 +16,8 @@
var/turf_type = null
var/mineralType = null
-/obj/item/stack/tile/New(loc, amount)
- ..()
+/obj/item/stack/tile/Initialize(mapload, new_amount, merge)
+ . = ..()
pixel_x = rand(-3, 3)
pixel_y = rand(-3, 3) //randomize a little
diff --git a/code/game/objects/items/tools/welder.dm b/code/game/objects/items/tools/welder.dm
index 9208ae62090b..c4711fa34ba9 100644
--- a/code/game/objects/items/tools/welder.dm
+++ b/code/game/objects/items/tools/welder.dm
@@ -71,7 +71,7 @@
if(tool_enabled)
var/turf/T = get_turf(src)
if(T) // Implants for instance won't find a turf
- T.hotspot_expose(2500, 5)
+ T.hotspot_expose(2500, 1)
if(prob(5))
remove_fuel(1)
if(refills_over_time)
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 3bc720ac53c7..8190b14d1a4b 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -24,6 +24,7 @@
throw_speed = 4
throw_range = 20
force = 0
+ new_attack_chain = TRUE
/*
@@ -40,21 +41,23 @@
..()
create_reagents(10)
-/obj/item/toy/balloon/attack__legacy__attackchain(mob/living/carbon/human/M as mob, mob/user as mob)
- return
+/obj/item/toy/balloon/pre_attack(atom/target, mob/living/user, params)
+ ..()
+ return FINISH_ATTACK
-/obj/item/toy/balloon/afterattack__legacy__attackchain(atom/A, mob/user, proximity)
- if(!proximity)
+/obj/item/toy/balloon/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+ if(!proximity_flag)
return
- if(istype(A, /obj/structure/reagent_dispensers))
- var/obj/structure/reagent_dispensers/RD = A
+ if(istype(target, /obj/structure/reagent_dispensers))
+ var/obj/structure/reagent_dispensers/RD = target
if(RD.reagents.total_volume <= 0)
to_chat(user, "[RD] is empty. ")
else if(reagents.total_volume >= 10)
to_chat(user, "[src] is full. ")
else
- A.reagents.trans_to(src, 10)
- to_chat(user, "You fill the balloon with the contents of [A]. ")
+ target.reagents.trans_to(src, 10)
+ to_chat(user, "You fill the balloon with the contents of [target]. ")
desc = "A translucent balloon with some form of liquid sloshing around in it."
update_icon()
@@ -66,20 +69,22 @@
update_icon()
return
-/obj/item/toy/balloon/attackby__legacy__attackchain(obj/O as obj, mob/user as mob, params)
- if(istype(O, /obj/item/reagent_containers/glass) || istype(O, /obj/item/reagent_containers/drinks/drinkingglass))
- if(O.reagents)
- if(O.reagents.total_volume < 1)
- to_chat(user, "[O] is empty.")
- else if(O.reagents.total_volume >= 1)
- if(O.reagents.has_reagent("facid", 1))
+/obj/item/toy/balloon/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(istype(attacking, /obj/item/reagent_containers/glass) || istype(attacking, /obj/item/reagent_containers/drinks/drinkingglass))
+ if(attacking.reagents)
+ if(attacking.reagents.total_volume < 1)
+ to_chat(user, "[attacking] is empty.")
+ else if(attacking.reagents.total_volume >= 1)
+ if(attacking.reagents.has_reagent("facid", 1))
to_chat(user, "The acid chews through the balloon!")
- O.reagents.reaction(user)
+ attacking.reagents.reaction(user)
qdel(src)
else
desc = "A translucent balloon with some form of liquid sloshing around in it."
- to_chat(user, "You fill the balloon with the contents of [O]. ")
- O.reagents.trans_to(src, 10)
+ to_chat(user, "You fill the balloon with the contents of [attacking]. ")
+ attacking.reagents.trans_to(src, 10)
update_icon()
return
@@ -115,8 +120,8 @@
w_class = WEIGHT_CLASS_BULKY
var/lastused = null
-/obj/item/toy/syndicateballoon/attack_self__legacy__attackchain(mob/user)
- if(world.time - lastused < CLICK_CD_MELEE)
+/obj/item/toy/syndicateballoon/activate_self(mob/user)
+ if(..() || world.time - lastused < CLICK_CD_MELEE)
return
var/playverb = pick("bat [src]", "tug on [src]'s string", "play with [src]")
user.visible_message("[user] plays with [src]. ", "You [playverb]. ")
@@ -184,7 +189,9 @@
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("attacked", "struck", "hit")
-/obj/item/toy/sword/attack_self__legacy__attackchain(mob/user)
+/obj/item/toy/sword/activate_self(mob/user)
+ if(..())
+ return
active = !active
if(active)
to_chat(user, "You extend the plastic blade with a quick flick of your wrist. ")
@@ -204,24 +211,24 @@
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
- return
-// Copied from /obj/item/melee/energy/sword/attackby
-/obj/item/toy/sword/attackby__legacy__attackchain(obj/item/W, mob/living/user, params)
- ..()
- if(istype(W, /obj/item/toy/sword))
- if(W == src)
+/obj/item/toy/sword/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(istype(attacking, /obj/item/toy/sword))
+ if(attacking == src)
to_chat(user, "You try to attach the end of the plastic sword to... Itself. You're not very smart, are you? ")
if(ishuman(user))
- user.adjustBrainLoss(10)
- else if((W.flags & NODROP) || (flags & NODROP))
- to_chat(user, "\the [flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [flags & NODROP ? W : src]! ")
+ var/mob/living/carbon/human/H = user
+ H.adjustBrainLoss(10)
+ else if((attacking.flags & NODROP) || (flags & NODROP))
+ to_chat(user, "\the [flags & NODROP ? src : attacking] is stuck to your hand, you can't attach it to \the [flags & NODROP ? attacking : src]! ")
else
to_chat(user, "You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool. ")
new /obj/item/dualsaber/toy(user.loc)
- user.unEquip(W)
+ user.unEquip(attacking)
user.unEquip(src)
- qdel(W)
+ qdel(attacking)
qdel(src)
/obj/item/toy/sword/chaosprank
@@ -229,9 +236,9 @@
/// Sets to TRUE once the character using it hits something and realises it's not a real energy sword
var/pranked = FALSE
-/obj/item/toy/sword/attack__legacy__attackchain(mob/target, mob/living/user)
- if(!cigarette_lighter_act(user, target))
- return ..()
+/obj/item/toy/sword/attack(mob/living/target, mob/living/carbon/human/user)
+ if(..() || cigarette_lighter_act(user, target))
+ return FINISH_ATTACK
/obj/item/toy/sword/cigarette_lighter_act(mob/living/user, mob/living/target, obj/item/direct_attackby_item)
var/obj/item/clothing/mask/cigarette/cig = ..()
@@ -283,8 +290,8 @@
target.unEquip(cig, TRUE)
return TRUE
-/obj/item/toy/sword/chaosprank/afterattack__legacy__attackchain(mob/living/target, mob/living/user, proximity)
- ..()
+/obj/item/toy/sword/chaosprank/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
if(!pranked)
to_chat(user, "Oh... It's a fake. ")
name = "toy sword"
@@ -375,6 +382,13 @@
w_class = WEIGHT_CLASS_TINY
var/ash_type = /obj/effect/decal/cleanable/ash
+/obj/item/toy/snappop/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/item/toy/snappop/proc/pop_burst(n=3, c=1)
do_sparks(n, c, src)
new ash_type(loc)
@@ -391,10 +405,10 @@
..()
pop_burst()
-/obj/item/toy/snappop/Crossed(H as mob|obj, oldloc)
- if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off
- var/mob/living/carbon/M = H
- if(issilicon(H) || M.m_intent == MOVE_INTENT_RUN)
+/obj/item/toy/snappop/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(ishuman(entered) || issilicon(entered)) //i guess carp and shit shouldn't set them off
+ var/mob/living/carbon/M = entered
+ if(issilicon(entered) || M.m_intent == MOVE_INTENT_RUN)
to_chat(M, "You step on the snap pop! ")
pop_burst(2, 0)
@@ -423,7 +437,9 @@
w_class = WEIGHT_CLASS_SMALL
var/cooldown = 0
-/obj/item/toy/nuke/attack_self__legacy__attackchain(mob/user)
+/obj/item/toy/nuke/activate_self(mob/user)
+ if(..())
+ return
if(cooldown < world.time)
cooldown = world.time + 1800 //3 minutes
user.visible_message("[user] presses a button on [src] ", "You activate [src], it plays a loud noise! ", "You hear the click of a button. ")
@@ -455,20 +471,12 @@
desc += " This one is [item_color]."
icon_state = "therapy[item_color]"
-/obj/item/toy/therapy/attack_self__legacy__attackchain(mob/user)
- if(cooldown < world.time - 8)
- to_chat(user, "You relieve some stress with \the [src]. ")
- playsound(user, 'sound/items/squeaktoy.ogg', 20, 1)
- cooldown = world.time
-
-/obj/random/therapy
- name = "Random Therapy Doll"
- desc = "This is a random therapy doll."
- icon = 'icons/obj/toy.dmi'
- icon_state = "therapyred"
-
-/obj/random/therapy/item_to_spawn()
- return pick(subtypesof(/obj/item/toy/therapy)) //exclude the base type.
+/obj/item/toy/therapy/activate_self(mob/user)
+ if(..() || !(cooldown < world.time - 8))
+ return
+ to_chat(user, "You relieve some stress with \the [src]. ")
+ playsound(user, 'sound/items/squeaktoy.ogg', 20, TRUE)
+ cooldown = world.time
/obj/item/toy/therapy/red
item_state = "egg4" // It's the red egg in items_left/righthand
@@ -525,15 +533,6 @@
poof_sound = list('sound/weapons/bite.ogg' = 1)
-/obj/random/carp_plushie
- name = "Random Carp Plushie"
- desc = "This is a random plushie."
- icon = 'icons/obj/toy.dmi'
- icon_state = "carpplushie"
-
-/obj/random/carp_plushie/item_to_spawn()
- return pick(typesof(/obj/item/toy/plushie/carpplushie)) //can pick any carp plushie, even the original.
-
/obj/item/toy/plushie/carpplushie/ice
icon_state = "icecarp"
@@ -578,20 +577,33 @@
var/list/poof_sound = list('sound/weapons/thudswoosh.ogg' = 1)
var/has_stuffing = TRUE //If the plushie has stuffing in it
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
+ var/sound/rare_hug_sound
+ var/rare_hug_word
+ /// This is a variable that stores a mob that has been cursed into a plushie inside it.
+ var/mob/living/cursed_plushie_victim
+ COOLDOWN_DECLARE(rare_hug_cooldown)
-/obj/item/toy/plushie/attack__legacy__attackchain(mob/M as mob, mob/user as mob)
+/obj/item/toy/plushie/attack(mob/living/target, mob/living/carbon/human/user)
+ if(..())
+ return FINISH_ATTACK
playsound(loc, pickweight(poof_sound), 20, 1) // Play the whoosh sound in local area
- if(iscarbon(M))
+ if(iscarbon(target))
if(prob(10))
- M.reagents.add_reagent("hugs", 10)
- return ..()
+ target.reagents.add_reagent("hugs", 10)
-/obj/item/toy/plushie/attack_self__legacy__attackchain(mob/user as mob)
+/obj/item/toy/plushie/activate_self(mob/user as mob)
+ if(..())
+ return
if(has_stuffing || grenade)
- var/cuddle_verb = pick("hugs", "cuddles", "snugs")
- user.visible_message("[user] [cuddle_verb] [src]. ")
- playsound(get_turf(src), poof_sound, 50, TRUE, -1)
+ if(rare_hug_sound && rare_hug_word && COOLDOWN_FINISHED(src, rare_hug_cooldown))
+ playsound(src, rare_hug_sound , 10, FALSE)
+ visible_message("[rare_hug_word] ")
+ COOLDOWN_START(src, rare_hug_cooldown, 3 SECONDS)
+ else
+ var/cuddle_verb = pick("hugs", "cuddles", "snugs")
+ user.visible_message("[user] [cuddle_verb] [src]. ")
+ playsound(get_turf(src), pickweight(poof_sound), 50, TRUE, -1)
if(grenade && !grenade.active)
add_attack_logs(user, user, "activated a hidden grenade in [src].", ATKLOG_MOST)
playsound(loc, 'sound/weapons/armbomb.ogg', 10, TRUE, -3)
@@ -599,70 +611,67 @@
addtimer(CALLBACK(src, PROC_REF(explosive_betrayal), grenade), rand(1, 3) SECONDS)
else
to_chat(user, "You try to pet [src], but it has no stuffing. Aww... ")
- return ..()
/obj/item/toy/plushie/proc/explosive_betrayal(obj/item/grenade/grenade_callback)
+ var/grenade_inside = FALSE //Any grenade, even non-explosive, will destroy the plushie.
+ if(grenade)
+ grenade_inside = TRUE
grenade_callback.prime()
+ if(grenade_inside && !QDELETED(src))
+ qdel(src)
/obj/item/toy/plushie/Destroy()
QDEL_NULL(grenade)
+ QDEL_NULL(cursed_plushie_victim)
return ..()
-/obj/item/toy/plushie/attackby__legacy__attackchain(obj/item/I, mob/living/user, params)
- if(I.sharp)
+/obj/item/toy/plushie/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(attacking.sharp)
if(!grenade)
if(!has_stuffing)
to_chat(user, "You already murdered it! ")
- return
+ return FINISH_ATTACK
user.visible_message("[user] tears out the stuffing from [src]! ", "You rip a bunch of the stuffing from [src]. Murderer. ")
- I.play_tool_sound(src)
+ attacking.play_tool_sound(src)
has_stuffing = FALSE
else
to_chat(user, "You remove the grenade from [src]. ")
grenade.forceMove(get_turf(src))
user.put_in_hands(grenade)
grenade = null
- return
- if(istype(I, /obj/item/grenade))
+ return FINISH_ATTACK
+ if(istype(attacking, /obj/item/grenade))
if(has_stuffing)
to_chat(user, "You need to remove some stuffing first! ")
- return
+ return FINISH_ATTACK
if(grenade)
to_chat(user, "[src] already has a grenade! ")
- return
+ return FINISH_ATTACK
if(!user.drop_item())
- to_chat(user, "[I] is stuck to you and cannot be placed into [src]. ")
- return
- user.visible_message("[user] slides [I] into [src]. ", \
- "You slide [I] into [src]. ")
- I.forceMove(src)
- grenade = I
+ to_chat(user, "[attacking] is stuck to you and cannot be placed into [src]. ")
+ return FINISH_ATTACK
+ user.visible_message("[user] slides [attacking] into [src]. ", \
+ "You slide [attacking] into [src]. ")
+ attacking.forceMove(src)
+ grenade = attacking
add_attack_logs(user, user, "placed a hidden grenade in [src].", ATKLOG_ALMOSTALL)
- return
- return ..()
-
-/obj/random/plushie
- name = "Random Plushie"
- desc = "This is a random plushie."
- icon = 'icons/obj/toy.dmi'
- icon_state = "redfox"
-
-/obj/random/plushie/item_to_spawn()
- return pick(subtypesof(/obj/item/toy/plushie) - typesof(/obj/item/toy/plushie/fluff) - typesof(/obj/item/toy/plushie/carpplushie)) //exclude the base type.
-
-/obj/random/plushie/explosive
- var/explosive_chance = 1 // 1% to spawn a blahbomb!
+ return FINISH_ATTACK
-/obj/random/plushie/explosive/spawn_item()
- var/obj/item/toy/plushie/plushie = ..()
- if(!prob(explosive_chance))
- return plushie
- var/obj/item/I = new /obj/item/grenade/syndieminibomb
- plushie.has_stuffing = FALSE
- plushie.grenade = I
- I.forceMove(plushie)
- return plushie
+/obj/item/toy/plushie/proc/un_plushify()
+ if(!cursed_plushie_victim)
+ return
+ cursed_plushie_victim.forceMove(get_turf(src))
+ cursed_plushie_victim.status_flags &= ~GODMODE
+ cursed_plushie_victim.notransform = FALSE
+
+ for(var/mob/living/simple_animal/shade/sword/generic_item/B in contents)
+ cursed_plushie_victim.key = B.key
+ break
+ cursed_plushie_victim = null
+ qdel(src)
/obj/item/toy/plushie/corgi
name = "corgi plushie"
@@ -796,9 +805,8 @@
/obj/item/toy/plushie/greyplushie/proc/reset_hugdown()
hug_cooldown = FALSE //Resets the hug interaction cooldown.
-/obj/item/toy/plushie/greyplushie/attack_self__legacy__attackchain(mob/user)//code for talking when hugged.
- . = ..()
- if(hug_cooldown)
+/obj/item/toy/plushie/greyplushie/activate_self(mob/user)//code for talking when hugged.
+ if(..() || hug_cooldown)
return
hug_cooldown = TRUE
addtimer(CALLBACK(src, PROC_REF(reset_hugdown)), 5 SECONDS) //Hug interactions only put the plushie on a 5 second cooldown.
@@ -812,16 +820,8 @@
desc = "A stitched-together vox, fresh from the skipjack. Press its belly to hear it skree!"
icon_state = "plushie_vox"
item_state = "plushie_vox"
- var/cooldown = 0
-
-/obj/item/toy/plushie/voxplushie/attack_self__legacy__attackchain(mob/user)
- if(!cooldown)
- playsound(user, 'sound/voice/shriek1.ogg', 10, 0)
- visible_message("Skreee! ")
- cooldown = 1
- spawn(30) cooldown = 0
- return
- ..()
+ rare_hug_sound = 'sound/voice/shriek1.ogg'
+ rare_hug_word = "Skreee!"
/obj/item/toy/plushie/ipcplushie
name = "IPC plushie"
@@ -829,14 +829,15 @@
icon_state = "plushie_ipc"
item_state = "plushie_ipc"
-/obj/item/toy/plushie/ipcplushie/attackby__legacy__attackchain(obj/item/B, mob/user, params)
- if(istype(B, /obj/item/food/breadslice))
+/obj/item/toy/plushie/ipcplushie/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(istype(attacking, /obj/item/food/breadslice))
new /obj/item/food/toast(get_turf(loc))
to_chat(user, "You insert bread into the toaster. ")
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
- qdel(B)
- else
- return ..()
+ qdel(attacking)
+ return FINISH_ATTACK
//New generation TG plushies
@@ -869,23 +870,15 @@
desc = "A silky nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian"
item_state = "plushie_nian"
- var/cooldown = FALSE
+ rare_hug_sound = 'sound/voice/scream_moth.ogg'
+ rare_hug_word = "Buzzzz!"
-/obj/item/toy/plushie/nianplushie/attack_self__legacy__attackchain(mob/user)
- if(cooldown)
- return ..()
-
- playsound(src, 'sound/voice/scream_moth.ogg', 10, 0)
- visible_message("Buzzzz! ")
- cooldown = TRUE
- addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 3 SECONDS)
-
/obj/item/toy/plushie/nianplushie/monarch
name = "monarch nian plushie"
desc = "A monarch nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_monarch"
item_state = "plushie_nian_monarch"
-
+
/obj/item/toy/plushie/nianplushie/luna
name = "luna nian plushie"
desc = "A luna nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
@@ -897,31 +890,31 @@
desc = "An atlas nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_atlas"
item_state = "plushie_nian_atlas"
-
+
/obj/item/toy/plushie/nianplushie/reddish
name = "reddish nian plushie"
desc = "A reddish nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_reddish"
item_state = "plushie_nian_reddish"
-
+
/obj/item/toy/plushie/nianplushie/royal
name = "royal nian plushie"
desc = "A royal nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_royal"
item_state = "plushie_nian_royal"
-
+
/obj/item/toy/plushie/nianplushie/gothic
name = "gothic nian plushie"
desc = "A gothic nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_gothic"
item_state = "plushie_nian_gothic"
-
+
/obj/item/toy/plushie/nianplushie/lovers
name = "lovers nian plushie"
desc = "A lovers nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_lovers"
item_state = "plushie_nian_lovers"
-
+
/obj/item/toy/plushie/nianplushie/whitefly
name = "whitefly nian plushie"
desc = "A whitefly nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
@@ -933,7 +926,7 @@
desc = "A punnished nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_punished"
item_state = "plushie_nian_punished"
-
+
/obj/item/toy/plushie/nianplushie/firewatch
name = "firewatch nian plushie"
desc = "A firewtach nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
@@ -945,43 +938,43 @@
desc = "A deathshead nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_deadhead"
item_state = "plushie_nian_deadhead"
-
+
/obj/item/toy/plushie/nianplushie/poison
name = "poison nian plushie"
desc = "A poison nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_poison"
item_state = "plushie_nian_poison"
-
+
/obj/item/toy/plushie/nianplushie/ragged
name = "ragged nian plushie"
desc = "A ragged nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_ragged"
item_state = "plushie_nian_ragged"
-
+
/obj/item/toy/plushie/nianplushie/snow
name = "snow nian plushie"
desc = "A snow nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_snow"
item_state = "plushie_nian_snow"
-
+
/obj/item/toy/plushie/nianplushie/clockwork
name = "clockwork nian plushie"
desc = "A clockwork nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_clockwork"
item_state = "plushie_nian_clockwork"
-
+
/obj/item/toy/plushie/nianplushie/moonfly
name = "moonfly nian plushie"
desc = "A moonfly nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_moonfly"
item_state = "plushie_nian_moonfly"
-
+
/obj/item/toy/plushie/nianplushie/rainbow
name = "rainbow nian plushie"
desc = "A rainbow nian plushie, straight from the nebula. Pull its antenna to hear it buzz!"
icon_state = "plushie_nian_rainbow"
item_state = "plushie_nian_rainbow"
-
+
/obj/item/toy/plushie/shark
name = "shark plushie"
desc = "A plushie depicting a somewhat cartoonish shark. The tag calls it a 'hákarl', noting that it was made by an obscure furniture manufacturer in old Scandinavia."
@@ -1006,6 +999,216 @@
'sound/weapons/cablecuff.ogg' = 1,
)
+/obj/item/toy/plushie/skrellplushie
+ name = "skrell plushie"
+ desc = "The latest from 'SoftSkrells.net', features its very own headpocket! Warble!"
+ icon_state = "plushie_skrell"
+ rare_hug_sound = 'sound/effects/warble.ogg'
+ rare_hug_word = "Warble!"
+ var/obj/item/headpocket_item
+
+/obj/item/toy/plushie/skrellplushie/examine(mob/user)
+ . = ..()
+ . += "Alt-click to put something small inside the headpocket, or take an item out. "
+
+/obj/item/toy/plushie/skrellplushie/AltClick(mob/user)
+ if(!Adjacent(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
+ return
+ var/obj/item/I = user.get_active_hand()
+ if(I == src)
+ return
+ if(!I)
+ if(!headpocket_item)
+ return
+ to_chat(user, "You remove [headpocket_item] from [src]. ")
+ headpocket_item.forceMove(get_turf(src))
+ user.put_in_hands(headpocket_item)
+ headpocket_item = null
+ return
+ if(I.w_class > WEIGHT_CLASS_SMALL)
+ to_chat(user, "You cannot fit [I] in [src]! ")
+ return
+ if(!iscarbon(user))
+ return
+ if(headpocket_item)
+ to_chat(user, "[src] already has an item in its headpocket! ")
+ return
+ if(!user.drop_item())
+ to_chat(user, "You cannot slip [I] inside [src]! ")
+ return
+ user.visible_message("[user] places [I] into [src]. ", "You place [I] into [src]. ")
+ add_fingerprint(user)
+ I.forceMove(src)
+ headpocket_item = I
+
+/obj/item/toy/plushie/skrellplushie/Destroy()
+ if(headpocket_item)
+ headpocket_item.forceMove(get_turf(src))
+ headpocket_item = null
+ return ..()
+
+/obj/item/toy/plushie/humanplushie
+ name = "human plushie"
+ desc = "This plushie is slightly less popular than its counterparts. The designers obviously didn't find humans that endearing..."
+ icon_state = "plushie_human"
+ poof_sound = list('sound/weapons/thudswoosh.ogg' = 30,
+ 'sound/goonstation/voice/male_scream.ogg' = 1)
+
+/obj/item/toy/plushie/borgplushie
+ name = "borg plushie"
+ desc = "The synthetic backbone of the station, rendered in plush form. Inbuilt flashlight included!"
+ icon_state = "plushie_borg"
+ var/borg_plushie_overlay
+ var/on = FALSE
+
+/obj/item/toy/plushie/borgplushie/Initialize(mapload)
+ . = ..()
+ borg_plushie_overlay = (pick("plushie_borgjan", "plushie_borgsec", "plushie_borgmed", "plushie_borgmine", "plushie_borgserv", "plushie_borgassist", "plushie_borgengi"))
+ update_icon()
+
+/obj/item/toy/plushie/borgplushie/activate_self(mob/user)
+ if(..())
+ return
+ on = !on
+ update_brightness()
+
+/obj/item/toy/plushie/borgplushie/proc/update_brightness()
+ if(on)
+ set_light(4)
+ else
+ set_light(0)
+ update_icon()
+
+/obj/item/toy/plushie/borgplushie/update_overlays()
+ . = ..()
+ add_overlay(borg_plushie_overlay)
+ if(on)
+ add_overlay("borglights")
+ else
+ cut_overlay("borglights")
+
+/obj/item/toy/plushie/borgplushie/extinguish_light(force = FALSE)
+ if(!force)
+ if(on)
+ visible_message("[src]'s light grows dim... ")
+ on = !on
+ update_brightness()
+ else
+ atom_say("Self-destruct command received!")
+ visible_message("[src] explodes! ")
+ var/turf/T = get_turf(src)
+ playsound(T, 'sound/goonstation/effects/robogib.ogg', 50, TRUE)
+ robogibs(T)
+ if(grenade)
+ explosive_betrayal(grenade)
+ if(!QDELETED(src))
+ qdel(src)
+
+/obj/item/toy/plushie/dionaplushie
+ name = "diona plushie"
+ desc = "This plushy is seemingly comprised of other, smaller, nymph plushies. They really went all out on the realism! Keep away from plantkiller."
+ icon_state = "plushie_diona"
+ rare_hug_sound = 'sound/voice/dionatalk1.ogg'
+ rare_hug_word = "Creak..."
+
+/obj/item/toy/plushie/nymphplushie
+ name = "nymph plushie"
+ desc = "Life-sized plushie of a diona nymph, perhaps if you find another you could make a diona!"
+ icon_state = "plushie_nymph"
+ rare_hug_sound = 'sound/creatures/nymphchirp.ogg'
+ rare_hug_word = "Chirp!"
+
+/obj/item/toy/plushie/nymphplushie/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(istype(attacking, /obj/item/toy/plushie/nymphplushie))
+ var/obj/item/toy/plushie/nymphplushie/NP = attacking
+ var/found_grenade = FALSE
+ if(grenade)
+ found_grenade = TRUE
+ explosive_betrayal(grenade)
+ if(NP.grenade)
+ found_grenade = TRUE
+ NP.explosive_betrayal(NP.grenade)
+ if(found_grenade)
+ return FINISH_ATTACK
+ new /obj/item/toy/plushie/dionaplushie(get_turf(loc))
+ to_chat(user, "The nymph plushies combine seamlessly into an diona plushie! ")
+ playsound(loc, 'sound/voice/dionatalk1.ogg', 50, TRUE)
+ qdel(NP)
+ qdel(src)
+ return FINISH_ATTACK
+
+/obj/item/toy/plushie/plasmamanplushie
+ name = "plasmaman plushie"
+ desc = "A friendly plasma-being in plush form. WARNING: KEEP AWAY FROM OPEN FLAME!"
+ icon_state = "plushie_plasma"
+ rare_hug_sound = 'sound/voice/plas_rattle.ogg'
+ rare_hug_word = "Rattle!"
+
+/obj/item/toy/plushie/plasmamanplushie/welder_act(mob/user, obj/item/I)
+ if(I.use_tool(src, user, volume = I.tool_volume))
+ bakoom()
+ return TRUE
+
+/obj/item/toy/plushie/plasmamanplushie/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(attacking.get_heat())
+ bakoom()
+ return FINISH_ATTACK
+
+/obj/item/toy/plushie/plasmamanplushie/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
+ ..()
+ bakoom()
+
+/obj/item/toy/plushie/plasmamanplushie/proc/bakoom()
+ visible_message("[src] explodes! ")
+ if(grenade)
+ explosive_betrayal(grenade)
+ explosion(get_turf(src), -1, 0, 1, 1, flame_range = 1)
+ if(!QDELETED(src))
+ qdel(src)
+
+/obj/item/toy/plushie/draskplushie
+ name = "drask plushie"
+ desc = "This plushie is cool as a cucumber, featuring realistic soap-munching action."
+ icon_state = "plushie_drask"
+ rare_hug_sound = 'sound/voice/drasktalk.ogg'
+ rare_hug_word = "Ruuuumble..."
+
+/obj/item/toy/plushie/draskplushie/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(istype(attacking, /obj/item/soap))
+ if(prob(20))
+ visible_message("[src] consumes the soap... ")
+ qdel(attacking)
+ return FINISH_ATTACK
+ visible_message("[src] munches the soap... ")
+ playsound(loc, 'sound/items/eatfood.ogg', 50, TRUE)
+
+/obj/item/toy/plushie/kidanplushie
+ name = "kidan plushie"
+ desc = "F-ANT-asticly fun kidan plushie! Exoskeleton has never been so soft. The label says to keep it away from insecticides"
+ icon_state = "plushie_kidan"
+ var/sadbug = FALSE
+ rare_hug_sound = 'sound/effects/Kidanclack.ogg'
+ rare_hug_word = "Click clack!"
+
+/obj/item/toy/plushie/kidanplushie/activate_self(mob/user)
+ if(..())
+ return
+ if(prob(10) && sadbug)
+ visible_message("[src] begins to cheer up! ")
+ icon_state = "plushie_kidan"
+ sadbug = FALSE
+
+/obj/item/toy/plushie/kidanplushie/proc/make_cry()
+ visible_message("[src] starts to cry... ")
+ icon_state = "plushie_kidansad"
+ sadbug = TRUE
+
/*
* Foam Armblade
*/
@@ -1047,7 +1250,9 @@
else
. += "single_latch"
-/obj/item/toy/windup_toolbox/attack_self__legacy__attackchain(mob/user)
+/obj/item/toy/windup_toolbox/activate_self(mob/user)
+ if(..())
+ return
if(!active)
to_chat(user, "You wind up [src], it begins to rumble. ")
active = TRUE
@@ -1076,10 +1281,12 @@
item_state = "flashtool"
w_class = WEIGHT_CLASS_TINY
-/obj/item/toy/flash/attack__legacy__attackchain(mob/living/M, mob/user)
+/obj/item/toy/flash/attack(mob/living/target, mob/living/carbon/human/user)
+ if(..())
+ return FINISH_ATTACK
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
flick("[initial(icon_state)]2", src)
- user.visible_message("[user] blinds [M] with the flash! ")
+ user.visible_message("[user] blinds [target] with the flash! ")
/*
@@ -1093,7 +1300,9 @@
w_class = WEIGHT_CLASS_SMALL
var/cooldown = 0
-/obj/item/toy/redbutton/attack_self__legacy__attackchain(mob/user)
+/obj/item/toy/redbutton/activate_self(mob/user)
+ if(..())
+ return
if(cooldown >= world.time)
to_chat(user, "Nothing happens. ")
return
@@ -1118,16 +1327,15 @@
w_class = WEIGHT_CLASS_SMALL
var/cooldown = 0
-/obj/item/toy/ai/attack_self__legacy__attackchain(mob/user)
- if(!cooldown) //for the sanity of everyone
- var/message = generate_ion_law()
- to_chat(user, "You press the button on [src]. ")
- playsound(user, 'sound/machines/click.ogg', 20, 1)
- visible_message("[bicon(src)] [message] ")
- cooldown = 1
- spawn(30) cooldown = 0
+/obj/item/toy/ai/activate_self(mob/user)
+ if(..() || cooldown) //for the sanity of everyone
return
- ..()
+ var/message = generate_ion_law()
+ to_chat(user, "You press the button on [src]. ")
+ playsound(user, 'sound/machines/click.ogg', 20, TRUE)
+ visible_message("[bicon(src)] [message] ")
+ cooldown = 1
+ spawn(30) cooldown = 0
/obj/item/toy/codex_gigas
name = "Toy Codex Gigas"
@@ -1138,18 +1346,19 @@
var/list/messages = list("You must challenge the devil to a dance-off!", "The devils true name is Ian", "The devil hates salt!", "Would you like infinite power?", "Would you like infinite wisdom?", " Would you like infinite healing?")
var/cooldown = FALSE
-/obj/item/toy/codex_gigas/attack_self__legacy__attackchain(mob/user)
- if(!cooldown)
- user.visible_message(
- "[user] presses the button on \the [src]. ",
- "You press the button on \the [src]. ",
- "You hear a soft click. ")
- playsound(loc, 'sound/machines/click.ogg', 20, TRUE)
- cooldown = TRUE
- addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 60)
- for(var/message in pick(messages))
- user.loc.visible_message("[bicon(src)] [message] ")
- sleep(10)
+/obj/item/toy/codex_gigas/activate_self(mob/user)
+ if(..() || cooldown)
+ return
+ user.visible_message(
+ "[user] presses the button on \the [src]. ",
+ "You press the button on \the [src]. ",
+ "You hear a soft click. ")
+ playsound(loc, 'sound/machines/click.ogg', 20, TRUE)
+ cooldown = TRUE
+ addtimer(VARSET_CALLBACK(src, cooldown, FALSE), 60)
+ for(var/message in pick(messages))
+ user.loc.visible_message("[bicon(src)] [message] ")
+ sleep(10)
// DND Character minis. Use the naming convention (type)character for the icon states.
/obj/item/toy/character
@@ -1198,7 +1407,8 @@
attack_verb = list("attacked", "bashed", "smashed", "stoned")
hitsound = "swing_hit"
-/obj/item/toy/pet_rock/attack_self__legacy__attackchain(mob/user)
+/obj/item/toy/pet_rock/activate_self(mob/user)
+ . = ..()
var/cuddle_verb = pick("admires", "respects", "cherises", "appreciates")
user.visible_message("[user] [cuddle_verb] [src]. ")
@@ -1223,8 +1433,9 @@
var/cooldown = 0
var/obj/stored_minature = null
-/obj/item/toy/minigibber/attack_self__legacy__attackchain(mob/user)
-
+/obj/item/toy/minigibber/activate_self(mob/user)
+ if(..())
+ return
if(stored_minature)
to_chat(user, "\The [src] makes a violent grinding noise as it tears apart the miniature figure inside! ")
QDEL_NULL(stored_minature)
@@ -1236,20 +1447,22 @@
playsound(user, 'sound/goonstation/effects/gib.ogg', 20, 1)
cooldown = world.time
-/obj/item/toy/minigibber/attackby__legacy__attackchain(obj/O, mob/user, params)
- if(istype(O,/obj/item/toy/character) && O.loc == user)
- to_chat(user, "You start feeding \the [O] [bicon(O)] into \the [src]'s mini-input. ")
+/obj/item/toy/minigibber/attack_by(obj/item/attacking, mob/user, params)
+ if(..())
+ return FINISH_ATTACK
+ if(istype(attacking,/obj/item/toy/character) && attacking.loc == user)
+ to_chat(user, "You start feeding \the [attacking] [bicon(attacking)] into \the [src]'s mini-input. ")
if(do_after(user, 10, target = src))
- if(O.loc != user)
- to_chat(user, "\The [O] is too far away to feed into \the [src]! ")
+ if(attacking.loc != user)
+ to_chat(user, "\The [attacking] is too far away to feed into \the [src]! ")
else
- to_chat(user, "You feed \the [O] [bicon(O)] into \the [src]! ")
- user.unEquip(O)
- O.forceMove(src)
- stored_minature = O
+ to_chat(user, "You feed \the [attacking] [bicon(attacking)] into \the [src]! ")
+ user.unEquip(attacking)
+ attacking.forceMove(src)
+ stored_minature = attacking
else
- to_chat(user, "You stop feeding \the [O] into \the [src]'s mini-input. ")
- else ..()
+ to_chat(user, "You stop feeding \the [attacking] into \the [src]'s mini-input. ")
+ return FINISH_ATTACK
/obj/item/toy/russian_revolver
name = "russian revolver"
@@ -1272,6 +1485,7 @@
attack_verb = list("struck", "hit", "bashed")
var/bullets_left = 0
var/max_shots = 6
+ var/cursed_shot = FALSE
/obj/item/toy/russian_revolver/suicide_act(mob/user)
user.visible_message("[user] quickly loads six bullets into [src]'s cylinder and points it at [user.p_their()] head before pulling the trigger! It looks like [user.p_theyre()] trying to commit suicide! ")
@@ -1282,7 +1496,9 @@
..()
spin_cylinder()
-/obj/item/toy/russian_revolver/attack_self__legacy__attackchain(mob/user)
+/obj/item/toy/russian_revolver/activate_self(mob/user)
+ if(..())
+ return
if(!bullets_left)
user.visible_message("[user] loads a bullet into [src]'s cylinder before spinning it. ")
spin_cylinder()
@@ -1290,11 +1506,12 @@
user.visible_message("[user] spins the cylinder on [src]! ")
spin_cylinder()
-/obj/item/toy/russian_revolver/attack__legacy__attackchain(mob/M, mob/living/user)
- return
+/obj/item/toy/russian_revolver/interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ return ITEM_INTERACT_SKIP_TO_AFTER_ATTACK
-/obj/item/toy/russian_revolver/afterattack__legacy__attackchain(atom/target, mob/user, flag, params)
- if(flag)
+/obj/item/toy/russian_revolver/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
+ . = ..()
+ if(proximity_flag)
if(target in user.contents)
return
if(!ismob(target))
@@ -1321,6 +1538,11 @@
playsound(src, 'sound/weapons/gunshots/gunshot_strong.ogg', 50, 1)
user.visible_message("[src] goes off! ")
post_shot(user)
+ if(cursed_shot)
+ var/obj/item/soulstone/anybody/SS = new /obj/item/soulstone/anybody(get_turf(src))
+ SS.transfer_soul("FORCE", user)
+ user.death(FALSE)
+ user.visible_message("[user.name]'s soul is captured by [src]! ", "You've lost the gamble! Your soul is forfeit! ")
user.apply_damage(300, BRUTE, zone, sharp = TRUE, used_weapon = "Self-inflicted gunshot wound to the [zone].")
user.bleed(BLOOD_VOLUME_NORMAL)
user.death() // Just in case
@@ -1331,63 +1553,10 @@
to_chat(user, "[src] needs to be reloaded. ")
return FALSE
-/obj/item/toy/russian_revolver/trick_revolver
- name = "\improper .357 revolver"
- desc = "A suspicious revolver. Uses .357 ammo."
- icon_state = "revolver"
- max_shots = 1
- var/fake_bullets = 0
-
-/obj/item/toy/russian_revolver/trick_revolver/New()
- ..()
- fake_bullets = rand(2, 7)
-
-/obj/item/toy/russian_revolver/trick_revolver/examine(mob/user) //Sneaky sneaky
- . = ..()
- . += "Use a pen on it to rename it. "
- . += "Has [fake_bullets] round\s remaining."
- . += "Use in hand to empty the gun's ammo reserves. "
- . += "[fake_bullets] of those are live rounds."
- . += "You can Alt-Click [src] to spin it's barrel. "
-
-/obj/item/toy/russian_revolver/trick_revolver/post_shot(user)
- to_chat(user, "[src] did look pretty dodgey! ")
- SEND_SOUND(user, sound('sound/misc/sadtrombone.ogg')) //HONK
-
-/obj/item/toy/russian_revolver/trick_revolver/AltClick(mob/user)
- if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user))
- return
-
- to_chat(user, "You go to spin the chamber... and it goes off in your face! ")
- shoot_gun(user)
-
-/obj/item/toy/russian_revolver/trick_revolver/attack_self__legacy__attackchain(mob/user)
- if(!bullets_left) //You can re-arm the trap...
- user.visible_message("[user] loads a bullet into [src]'s cylinder before spinning it. ")
- spin_cylinder()
- else //But if you try to spin it to see if it was fake...
- user.visible_message("[user] tries to empty [src], but it goes off in their face! ")
- shoot_gun(user)
-
-/obj/item/toy/russian_revolver/trick_revolver/attackby__legacy__attackchain(obj/item/I, mob/user, params)
- if(is_pen(I))
- to_chat(user, "You go to write on [src].. and it goes off in your face! ")
- shoot_gun(user)
- if(istype(I, /obj/item/ammo_casing/a357))
- to_chat(user, "You go to load a bullet into [src].. and it goes off in your face! ")
- shoot_gun(user)
- if(istype(I, /obj/item/ammo_box/a357))
- to_chat(user, "You go to speedload [src].. and it goes off in your face! ")
- shoot_gun(user)
- return ..()
-
-/obj/item/toy/russian_revolver/trick_revolver/run_pointed_on_item(mob/pointer_mob, atom/target_atom)
- if(target_atom != src)
- pointer_mob.visible_message("[pointer_mob] points [src] at- and [src] goes off in their hand! ")
- shoot_gun(pointer_mob)
- return TRUE
- return ..()
-
+/obj/item/toy/russian_revolver/soul
+ name = "cursed russian revolver"
+ desc = "To play with this revolver requires wagering your very soul."
+ cursed_shot = TRUE
/*
* Rubber Chainsaw
*/
@@ -1430,16 +1599,6 @@
*/
-/obj/random/figure
- name = "Random Action Figure"
- desc = "This is a random toy action figure."
- icon = 'icons/obj/toy.dmi'
- icon_state = "nuketoy"
-
-/obj/random/figure/item_to_spawn()
- return pick(subtypesof(/obj/item/toy/figure/crew))
-
-
/obj/item/toy/figure
name = "Non-Specific Action Figure action figure"
desc = "A \"Space Life\" brand... wait, what the hell is this thing?"
@@ -1449,8 +1608,9 @@
var/cooldown = 0
var/cooldown_time = 3 SECONDS
-/obj/item/toy/figure/attack_self__legacy__attackchain(mob/user)
- ..()
+/obj/item/toy/figure/activate_self(mob/user)
+ if(..())
+ return
if(cooldown < world.time)
cooldown = world.time + cooldown_time
activate(user)
@@ -1755,15 +1915,6 @@
to_chat(user, "You play with [src]. ")
playsound(src, 'sound/mecha/mechstep.ogg', 20, TRUE)
-/obj/random/mech
- name = "Random Mech Prize"
- desc = "This is a random prize."
- icon = 'icons/obj/toy.dmi'
- icon_state = "ripleytoy"
-
-/obj/random/mech/item_to_spawn()
- return pick(subtypesof(/obj/item/toy/figure/mech)) //exclude the base type.
-
/obj/item/toy/figure/mech/ripley
name = "toy Ripley"
desc = "Mini-Mecha action figure! Collect them all! 1/11. This one is a ripley, a mining and engineering mecha."
@@ -1832,14 +1983,14 @@
var/cooldown = 0
var/list/possible_answers = list("Definitely", "All signs point to yes.", "Most likely.", "Yes.", "Ask again later.", "Better not tell you now.", "Future Unclear.", "Maybe.", "Doubtful.", "No.", "Don't count on it.", "Never.")
-/obj/item/toy/eight_ball/attack_self__legacy__attackchain(mob/user as mob)
- if(!cooldown)
- var/answer = pick(possible_answers)
- user.visible_message("[user] focuses on [user.p_their()] question and [use_action]... ")
- user.visible_message("[bicon(src)] [src] says \"[answer]\" ")
- spawn(30)
- cooldown = 0
+/obj/item/toy/eight_ball/activate_self(mob/user as mob)
+ if(..() || cooldown)
return
+ var/answer = pick(possible_answers)
+ user.visible_message("[user] focuses on [user.p_their()] question and [use_action]... ")
+ user.visible_message("[bicon(src)] [src] says \"[answer]\" ")
+ spawn(30)
+ cooldown = 0
/obj/item/toy/eight_ball/conch
name = "\improper Magic Conch Shell"
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 38416775f880..f869ea3c0660 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -11,6 +11,8 @@
desc = "A card."
icon = 'icons/obj/card.dmi'
w_class = WEIGHT_CLASS_TINY
+ slot_flags = ITEM_SLOT_ID
+
new_attack_chain = TRUE
var/associated_account_number = 0
@@ -29,6 +31,7 @@
icon_state = "emag"
item_state = "card-id"
origin_tech = "magnets=2;syndicate=2"
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
/obj/item/card/emag
desc = "It's a card with a magnetic strip attached to some circuitry."
@@ -38,6 +41,7 @@
origin_tech = "magnets=2;syndicate=2"
flags = NOBLUDGEON
flags_2 = NO_MAT_REDEMPTION_2
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
/obj/item/card/emag/pre_attack(atom/target, mob/living/user, params)
if(..() || ismob(target))
@@ -71,6 +75,7 @@
origin_tech = "magnets=2;syndicate=2"
flags = NOBLUDGEON
flags_2 = NO_MAT_REDEMPTION_2
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
/obj/item/card/cmag/Initialize(mapload)
. = ..()
@@ -95,7 +100,6 @@
var/total_mining_points = 0
var/list/access = list()
var/registered_name = "Unknown" // The name registered_name on the card
- slot_flags = ITEM_SLOT_ID
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 100, ACID = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
var/untrackable // Can not be tracked by AI's
@@ -620,6 +624,13 @@
ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_HEADS_VAULT, ACCESS_MINING_STATION,
ACCESS_CLOWN, ACCESS_MIME, ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_EXPEDITION, ACCESS_WEAPONS, ACCESS_NTREP)
+/obj/item/card/id/nct
+ name = "\improper Nanotrasen Career Trainer ID"
+ registered_name = "Nanotrasen Career Trainer"
+ icon_state = "nctrainer"
+ access = list(ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_CARGO, ACCESS_CONSTRUCTION, ACCESS_COURT, ACCESS_EVA, ACCESS_TRAINER, ACCESS_MAINT_TUNNELS,
+ ACCESS_MEDICAL, ACCESS_RESEARCH, ACCESS_SEC_DOORS, ACCESS_THEATRE, ACCESS_INTERNAL_AFFAIRS)
+
/obj/item/card/id/blueshield
name = "Blueshield ID"
registered_name = "Blueshield"
@@ -776,6 +787,55 @@
/obj/item/card/id/data
icon_state = "data"
+/obj/item/card/id/nct_data_chip
+ name = "\improper NCT Trainee Access Chip"
+ desc = "A small electronic access token that allows its user to copy the access of their Trainee. Only accessible by NT Career Trainers!"
+ icon_state = "nct_chip"
+ assignment = "Nanotrasen Career Trainer"
+ var/registered_user = null
+ var/trainee = null
+
+/obj/item/card/id/nct_data_chip/examine(mob/user)
+ . = ..()
+ . += " The current registered Trainee is: [trainee] "
+ . += "Use in hand to reset the assigned trainee and access. "
+ . += "The datachip is unable to copy any access that has been deemed high-risk by Nanotrasen Officials. That includes some, if not most, head related access permissions. "
+
+/obj/item/card/id/nct_data_chip/activate_self(mob/user)
+ if(..())
+ return
+ if(!trainee)
+ return
+
+ var/response = tgui_alert(user, "Would you like to remove [trainee] as your current active Trainee?", "Choose", list("Yes", "No"))
+ if(response == "Yes")
+ trainee = null
+ icon_state = "nct_chip"
+ access = list()
+
+/obj/item/card/id/nct_data_chip/interact_with_atom(atom/target, mob/living/user, list/modifiers)
+ if(!istype(target, /obj/item/card/id))
+ return
+ if(!(isliving(user) && user.mind))
+ return
+
+ if(user.mind.current != registered_user)
+ to_chat(user, "You do not have access to use this NCT Trainee Access Chip! ")
+ return
+
+ if(istype(target, /obj/item/card/id/ert))
+ to_chat(user, "The chip's screen blinks red as you attempt scanning this ID. ")
+ return
+
+ var/obj/item/card/id/I = target
+ to_chat(user, "The chip's microscanners activate as you scan [I.registered_name]'s ID, copying its access. ")
+ access = I.access.Copy()
+ access.Remove(ACCESS_AI_UPLOAD, ACCESS_ARMORY, ACCESS_CAPTAIN, ACCESS_CE, ACCESS_RD, ACCESS_HOP, ACCESS_QM, ACCESS_CMO, ACCESS_HOS, ACCESS_NTREP,
+ ACCESS_MAGISTRATE, ACCESS_BLUESHIELD, ACCESS_HEADS_VAULT, ACCESS_KEYCARD_AUTH, ACCESS_RC_ANNOUNCE,
+ ACCESS_CHANGE_IDS, ACCESS_MINISAT)
+ trainee = I.registered_name
+ icon_state = "nct_chip_active"
+
// Decals
/obj/item/id_decal
name = "identification card decal"
@@ -829,10 +889,10 @@
override_name = 1
/proc/get_station_card_skins()
- return list("data","id","gold","silver","security","detective","warden","internalaffairsagent","medical","coroner","chemist","virologist","paramedic","psychiatrist","geneticist","research","roboticist","quartermaster","cargo","shaftminer","engineering","atmostech","captain","HoP","HoS","CMO","RD","CE","assistant","clown","mime","botanist","librarian","chaplain","bartender","chef","janitor","rainbow","prisoner","explorer")
+ return list("data", "id", "gold", "silver", "security", "detective", "warden", "internalaffairsagent", "medical", "coroner", "chemist", "virologist", "paramedic", "psychiatrist", "geneticist", "research", "roboticist", "quartermaster", "cargo", "shaftminer", "engineering", "atmostech", "captain", "HoP", "HoS", "CMO", "RD", "CE", "assistant", "clown", "mime", "botanist", "librarian", "chaplain", "bartender", "chef", "janitor", "rainbow", "prisoner", "explorer", "nct")
/proc/get_centcom_card_skins()
- return list("centcom","blueshield","magistrate","ntrep","ERT_leader","ERT_empty","ERT_security","ERT_engineering","ERT_medical","ERT_janitorial","ERT_paranormal","deathsquad","commander","syndie","TDred","TDgreen")
+ return list("centcom", "blueshield", "magistrate", "ntrep", "ERT_leader", "ERT_empty", "ERT_security", "ERT_engineering", "ERT_medical", "ERT_janitorial", "ERT_paranormal", "deathsquad", "commander", "syndie", "TDred", "TDgreen")
/proc/get_all_card_skins()
return get_station_card_skins() + get_centcom_card_skins()
@@ -853,6 +913,8 @@
return "Security Officer"
if("internalaffairsagent")
return "Internal Affairs Agent"
+ if("nct")
+ return "Nanotrasen Career Trainer"
if("atmostech")
return "Life Support Specialist"
if("HoP")
diff --git a/code/game/objects/items/weapons/caution.dm b/code/game/objects/items/weapons/caution.dm
index 4ff358a88272..46e3b9da43cb 100644
--- a/code/game/objects/items/weapons/caution.dm
+++ b/code/game/objects/items/weapons/caution.dm
@@ -16,10 +16,11 @@
var/timing = FALSE
var/armed = FALSE
var/timepassed = 0
+ var/datum/proximity_monitor/proximity_monitor
/obj/item/caution/proximity_sign/Initialize(mapload)
. = ..()
- AddComponent(/datum/component/proximity_monitor)
+ proximity_monitor = new(src, 1)
/obj/item/caution/proximity_sign/attack_self__legacy__attackchain(mob/user as mob)
if(ishuman(user))
diff --git a/code/game/objects/items/weapons/chemical_flamethrower/fire_effect.dm b/code/game/objects/items/weapons/chemical_flamethrower/fire_effect.dm
index e98f1303f42c..1cdf4e1630b1 100644
--- a/code/game/objects/items/weapons/chemical_flamethrower/fire_effect.dm
+++ b/code/game/objects/items/weapons/chemical_flamethrower/fire_effect.dm
@@ -33,6 +33,11 @@ GLOBAL_LIST_EMPTY(flame_effects)
GLOB.flame_effects += src
START_PROCESSING(SSprocessing, src)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/effect/fire/Destroy()
. = ..()
GLOB.flame_effects -= src
@@ -75,18 +80,17 @@ GLOBAL_LIST_EMPTY(flame_effects)
if(duration <= 0)
fizzle()
-/obj/effect/fire/Crossed(atom/movable/AM, oldloc)
- . = ..()
- if(isliving(AM))
- if(!damage_mob(AM))
+/obj/effect/fire/proc/on_atom_entered(datum/source, atom/movable/entered, old_loc)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+ if(isliving(entered))
+ if(!damage_mob(entered))
return
- to_chat(AM, "[src] burns you! ")
+ to_chat(entered, "[src] burns you! ")
return
- if(isitem(AM))
- var/obj/item/item_to_burn = AM
+ if(isitem(entered))
+ var/obj/item/item_to_burn = entered
item_to_burn.fire_act(null, temperature)
- return
/obj/effect/fire/proc/fizzle()
playsound(src, 'sound/effects/fire_sizzle.ogg', 50, TRUE)
diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm
index bdaaceb28fe9..6d404496973d 100644
--- a/code/game/objects/items/weapons/cigs.dm
+++ b/code/game/objects/items/weapons/cigs.dm
@@ -269,7 +269,7 @@ LIGHTERS ARE IN LIGHTERS.DM
// There used to be a species check here, but synthetics can smoke now
is_being_smoked = TRUE
if(location)
- location.hotspot_expose(700, 5)
+ location.hotspot_expose(700, 1)
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(is_being_smoked) // if it's being smoked, transfer reagents to the mob
var/mob/living/carbon/C = loc
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index be4d87fd36eb..e2539d68fd98 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -21,6 +21,10 @@
/obj/item/grenade/plastic/Initialize(mapload)
. = ..()
plastic_overlay = mutable_appearance(icon, "[item_state]2", HIGH_OBJ_LAYER)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/item/grenade/plastic/Destroy()
QDEL_NULL(nadeassembly)
@@ -50,9 +54,9 @@
return
..()
-/obj/item/grenade/plastic/Crossed(atom/movable/AM, oldloc)
+/obj/item/grenade/plastic/proc/on_atom_entered(datum/source, atom/movable/entered)
if(nadeassembly)
- nadeassembly.Crossed(AM, oldloc)
+ nadeassembly.on_atom_entered(source, entered)
/obj/item/grenade/plastic/on_found(mob/finder)
if(nadeassembly)
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index a8f28a7eab7e..9932bdbe4884 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -54,7 +54,12 @@
qdel(src)
/obj/item/a_gift/attack_self__legacy__attackchain(mob/M as mob)
- var/gift_type = pick(/obj/item/sord,
+ var/gift_type = pick(
+ /obj/effect/spawner/random/toy/carp_plushie,
+ /obj/effect/spawner/random/plushies,
+ /obj/effect/spawner/random/toy/action_figure,
+ /obj/effect/spawner/random/toy/mech_figure,
+ /obj/item/sord,
/obj/item/storage/wallet,
/obj/item/storage/photo_album,
/obj/item/storage/box/snappops,
@@ -76,7 +81,6 @@
/obj/item/gun/projectile/shotgun/toy/crossbow,
/obj/item/gun/projectile/revolver/capgun,
/obj/item/toy/katana,
- /obj/random/mech,
/obj/item/toy/spinningtoy,
/obj/item/toy/sword,
/obj/item/food/grown/ambrosia/deus,
@@ -85,10 +89,7 @@
/obj/item/instrument/violin,
/obj/item/instrument/guitar,
/obj/item/storage/belt/utility/full,
- /obj/item/clothing/accessory/horrible,
- /obj/random/carp_plushie,
- /obj/random/plushie,
- /obj/random/figure,
+ /obj/item/clothing/neck/tie/horrible,
/obj/item/deck/cards,
/obj/item/deck/cards/tiny,
/obj/item/deck/unum,
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 82acfec37235..996b7de9c578 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -32,6 +32,11 @@
payload_name += " " // formatting, ignore me
update_icon()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/item/grenade/chem_grenade/Destroy()
QDEL_NULL(nadeassembly)
QDEL_LIST_CONTENTS(beakers)
@@ -246,9 +251,9 @@
if(nadeassembly)
nadeassembly.process_movement()
-/obj/item/grenade/chem_grenade/Crossed(atom/movable/AM, oldloc)
+/obj/item/grenade/chem_grenade/proc/on_atom_entered(datum/source, atom/movable/entered)
if(nadeassembly)
- nadeassembly.Crossed(AM, oldloc)
+ nadeassembly.on_atom_entered(source, entered)
/obj/item/grenade/chem_grenade/on_found(mob/finder)
if(nadeassembly)
diff --git a/code/game/objects/items/weapons/grenades/clusterbuster.dm b/code/game/objects/items/weapons/grenades/clusterbuster.dm
index 054f3f97b7a7..ce1e42e9181f 100644
--- a/code/game/objects/items/weapons/grenades/clusterbuster.dm
+++ b/code/game/objects/items/weapons/grenades/clusterbuster.dm
@@ -173,21 +173,16 @@
desc = "No matter what, do not EVER use this."
payload = /obj/singularity
-/obj/item/grenade/clusterbuster/tools
- name = "\improper Engineering Deployment Platfom"
- desc = "For the that time when gearing up was just too hard."
- payload = /obj/random/tech_supply
-
-/obj/item/grenade/clusterbuster/tide
- name = "\improper Quick Repair Grenade"
- desc = "An assistant's every dream."
- payload = /obj/random/tool
-
/obj/item/grenade/clusterbuster/toys
name = "\improper Toy Delivery System"
desc = "Who needs skill at arcades anyway?"
payload = /obj/item/toy/random
+/obj/item/grenade/clusterbuster/random_toys
+ name = "\improper Toy Delivery System"
+ desc = "Who needs skill at arcades anyway?"
+ payload = /obj/effect/spawner/random/toy/clusterbuster
+
/obj/item/grenade/clusterbuster/banquet
name = "\improper Bork Bork Bonanza"
desc = "Bork bork bork."
diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm
index a1179c681676..0b567a426af7 100644
--- a/code/game/objects/items/weapons/holy_weapons.dm
+++ b/code/game/objects/items/weapons/holy_weapons.dm
@@ -21,9 +21,12 @@
var/list/fluff_transformations = list()
/// Extra 'Holy' burn damage for ERT null rods
var/sanctify_force = 0
+ /// The antimagic type the nullrod has.
+ var/antimagic_type = MAGIC_RESISTANCE_HOLY
/obj/item/nullrod/Initialize(mapload)
. = ..()
+ AddComponent(/datum/component/anti_magic, antimagic_type)
if(!length(variant_names))
for(var/I in typesof(/obj/item/nullrod))
var/obj/item/nullrod/rod = I
@@ -37,11 +40,6 @@
/obj/item/nullrod/attack__legacy__attackchain(mob/M, mob/living/carbon/user)
..()
- var/datum/antagonist/vampire/V = M.mind?.has_antag_datum(/datum/antagonist/vampire)
- if(ishuman(M) && V && HAS_MIND_TRAIT(M, TRAIT_HOLY))
- if(!V.get_ability(/datum/vampire_passive/full))
- to_chat(M, "The nullrod's power interferes with your own! ")
- V.adjust_nullification(30 + sanctify_force, 15 + sanctify_force)
if(!sanctify_force)
return
if(isliving(M))
@@ -593,6 +591,16 @@
to_chat(user, "Your prayer to [SSticker.Bible_deity_name] was interrupted. ")
praying = FALSE
+
+/obj/item/nullrod/nazar
+ name = "nazar"
+ icon_state = "nazar"
+ item_state = null
+ desc = "A set of glass beads and amulet, which has been forged to provide powerful magic protection to the wielder."
+ force = 0
+ throwforce = 0
+ antimagic_type = ALL
+
/obj/item/nullrod/salt
name = "Holy Salt"
icon = 'icons/obj/food/containers.dmi'
diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm
index 146695a515a7..2269e2afece1 100644
--- a/code/game/objects/items/weapons/legcuffs.dm
+++ b/code/game/objects/items/weapons/legcuffs.dm
@@ -26,6 +26,13 @@
var/obj/item/grenade/iedcasing/IED = null
var/obj/item/assembly/signaler/sig = null
+/obj/item/restraints/legcuffs/beartrap/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/item/restraints/legcuffs/beartrap/update_icon_state()
icon_state = "beartrap[armed]"
@@ -97,16 +104,15 @@
to_chat(user, "You remove the signaler from [src]. ")
return TRUE
-/obj/item/restraints/legcuffs/beartrap/Crossed(AM as mob|obj, oldloc)
- if(!armed || !isturf(loc))
- return ..()
+/obj/item/restraints/legcuffs/beartrap/proc/on_atom_entered(datum/source, mob/living/entered)
+ if(!armed || !isturf(loc) || !istype(entered))
+ return
- var/mob/living/L = AM
- if((iscarbon(AM) || isanimal(AM)) && !HAS_TRAIT(L, TRAIT_FLYING))
- spring_trap(AM)
+ if((iscarbon(entered) || isanimal(entered)) && !HAS_TRAIT(entered, TRAIT_FLYING))
+ spring_trap(entered)
- if(ishuman(AM))
- var/mob/living/carbon/H = AM
+ if(ishuman(entered))
+ var/mob/living/carbon/H = entered
if(IS_HORIZONTAL(H))
H.apply_damage(trap_damage, BRUTE, "chest")
else
@@ -117,11 +123,10 @@
H.update_inv_legcuffed()
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
else
- if(istype(L, /mob/living/simple_animal/hostile/bear))
- L.apply_damage(trap_damage * 2.5, BRUTE)
+ if(istype(entered, /mob/living/simple_animal/hostile/bear))
+ entered.apply_damage(trap_damage * 2.5, BRUTE)
else
- L.apply_damage(trap_damage * 1.75, BRUTE)
- ..()
+ entered.apply_damage(trap_damage * 1.75, BRUTE)
/obj/item/restraints/legcuffs/beartrap/on_found(mob/finder)
if(!armed)
diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm
index 1f1d539a9edb..96f06a1766bd 100644
--- a/code/game/objects/items/weapons/lighters.dm
+++ b/code/game/objects/items/weapons/lighters.dm
@@ -135,7 +135,7 @@
/obj/item/lighter/process()
var/turf/location = get_turf(src)
if(location)
- location.hotspot_expose(700, 5)
+ location.hotspot_expose(700, 1)
return
/obj/item/lighter/update_icon_state()
@@ -263,7 +263,7 @@
if(smoketime < 1)
matchburnout()
if(location)
- location.hotspot_expose(700, 5)
+ location.hotspot_expose(700, 1)
return
/obj/item/match/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index 23cf610f5cf0..7e43d87e2a64 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -996,6 +996,39 @@
title = "Science Standard Operating Procedures"
wiki_article_title = "Standard_Operating_Procedure_(Science)"
+/obj/item/book/manual/sop_ntinstructor
+ name = "Career Trainer SOP"
+ desc = "A set of guidelines for Instructors."
+ icon_state = "sop_legal"
+ author = "Nanotrasen"
+ title = "Instructor SOP"
+ pages = list({"
+
+
+
+
+
+ Instructor SOP
+
+
+ NT Career Trainers are to wear their company-provided uniform and jacket OR their issued beret/hat at all times while on duty. They are free to choose a beret that best matches their primary field of knowledge if they so desire. Additionally, Identifying equipment SHOULD not be distributed to crew members.
+ NT Career Trainers are to be available to all Crewmembers, regardless of Department. You may not only assist a singular Department.
+ NT Career Trainers are not to do a Trainee's work for them.
+ NT Career Trainers are to use NCT Data Chips only to acquire the access necessary for providing training. They are not to use said access for other purposes.
+ In the event of a lost or stolen NCT Data Chip, the NT Career Trainer is to report the incident to their local Nanotrasen Representative or Station Captain.
+ NT Career Trainers are permitted to carry a flash for self-defense.
+
+
+
+ "})
+
//* MANUAL SPAWNERS *// (and space Law)
/obj/item/book/manual/random
diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm
index fa2ec1c9fdea..44a563a2cb7f 100644
--- a/code/game/objects/items/weapons/shards.dm
+++ b/code/game/objects/items/weapons/shards.dm
@@ -44,6 +44,10 @@
. = ..()
AddComponent(/datum/component/caltrop, force)
set_initial_icon_state()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/item/shard/afterattack__legacy__attackchain(atom/movable/AM, mob/user, proximity)
if(!proximity || !(src in user))
@@ -70,12 +74,12 @@
to_chat(user, "You add the newly-formed glass to the stack. ")
qdel(src)
-/obj/item/shard/Crossed(mob/living/L, oldloc)
- if(istype(L) && has_gravity(loc))
- if(L.incorporeal_move || HAS_TRAIT(L, TRAIT_FLYING) || L.floating)
+/obj/item/shard/proc/on_atom_entered(datum/source, atom/movable/entered)
+ var/mob/living/living_entered = entered
+ if(istype(living_entered) && has_gravity(loc))
+ if(living_entered.incorporeal_move || HAS_TRAIT(living_entered, TRAIT_FLYING) || living_entered.floating)
return
playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE)
- return ..()
/obj/item/shard/decompile_act(obj/item/matter_decompiler/C, mob/user)
C.stored_comms["glass"] += 3
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index a9fc87d9fdd8..724e387b6d1c 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -162,11 +162,47 @@
icon_state = "satchel"
origin_tech = "engineering=2"
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BOTH_POCKETS
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
w_class = WEIGHT_CLASS_NORMAL
storage_slots = 10
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = WEIGHT_CLASS_NORMAL
can_hold = list(/obj/item/stack/ore)
+ /// The mob currently holding the ore bag, to track moving over ore to auto-pickup.
+ var/mob/listening_to
+
+/obj/item/storage/bag/ore/Destroy()
+ . = ..()
+ listening_to = null
+
+/obj/item/storage/bag/ore/equipped(mob/user, slot, initial)
+ . = ..()
+ if(listening_to == user)
+ return
+ if(listening_to)
+ UnregisterSignal(listening_to, COMSIG_MOVABLE_MOVED)
+ RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(pickup_ores))
+ listening_to = user
+
+/obj/item/storage/bag/ore/dropped()
+ . = ..()
+ if(listening_to)
+ UnregisterSignal(listening_to, COMSIG_MOVABLE_MOVED)
+ listening_to = null
+
+/obj/item/storage/bag/ore/proc/pickup_ores(mob/living/user)
+ SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
+ var/turf/simulated/floor/plating/asteroid/tile = get_turf(user)
+
+ if(!istype(tile))
+ return
+
+ tile.attempt_ore_pickup(src, user)
+ // Then, if the user is dragging an ore box, empty the satchel
+ // into the box.
+ if(istype(user.pulling, /obj/structure/ore_box))
+ var/obj/structure/ore_box/box = user.pulling
+ box.attackby__legacy__attackchain(src, user)
/obj/item/storage/bag/ore/cyborg
name = "cyborg mining satchel"
@@ -195,6 +231,7 @@
storage_slots = 40 //the number of plant pieces it can carry.
max_combined_w_class = 40 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = WEIGHT_CLASS_NORMAL
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
w_class = WEIGHT_CLASS_TINY
can_hold = list(
/obj/item/seeds,
@@ -409,6 +446,7 @@
desc = "A bag for storing pills, patches, and bottles."
storage_slots = 50
max_combined_w_class = 200
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
w_class = WEIGHT_CLASS_TINY
can_hold = list(/obj/item/reagent_containers/pill,
/obj/item/reagent_containers/patch,
@@ -426,6 +464,7 @@
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
storage_slots = 25
max_combined_w_class = 200
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
w_class = WEIGHT_CLASS_TINY
can_hold = list(/obj/item/slime_extract, /obj/item/food/monkeycube,
/obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker,
@@ -444,6 +483,7 @@
item_state = "mailbag"
storage_slots = 14
max_combined_w_class = 28
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
w_class = WEIGHT_CLASS_TINY
can_hold = list(/obj/item/envelope, /obj/item/stamp, /obj/item/pen, /obj/item/paper, /obj/item/mail_scanner)
resistance_flags = FLAMMABLE
@@ -459,6 +499,7 @@
item_state = "construction_bag"
storage_slots = 30
max_combined_w_class = 60
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
w_class = WEIGHT_CLASS_TINY
can_hold = list(/obj/item/airlock_electronics, /obj/item/firelock_electronics, /obj/item/firealarm_electronics, /obj/item/apc_electronics, /obj/item/airalarm_electronics, /obj/item/camera_assembly, /obj/item/stock_parts/cell, /obj/item/circuitboard, /obj/item/stack/cable_coil)
resistance_flags = FLAMMABLE
@@ -474,6 +515,7 @@
icon_state = "satchel"
origin_tech = "engineering=2"
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BOTH_POCKETS
+ prefered_slot_flags = ITEM_SLOT_BOTH_POCKETS
w_class = WEIGHT_CLASS_NORMAL
storage_slots = 15
max_combined_w_class = 60
diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm
index ab0409a71529..402d6ec2d417 100644
--- a/code/game/objects/items/weapons/storage/briefcase.dm
+++ b/code/game/objects/items/weapons/storage/briefcase.dm
@@ -22,7 +22,7 @@
/obj/item/storage/briefcase/sniperbundle/populate_contents()
new /obj/item/gun/projectile/automatic/sniper_rifle/syndicate(src)
- new /obj/item/clothing/accessory/red(src)
+ new /obj/item/clothing/neck/tie/red(src)
new /obj/item/clothing/under/syndicate/sniper(src)
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src)
@@ -61,7 +61,7 @@
stored_item = I
max_w_class = WEIGHT_CLASS_NORMAL - stored_item.w_class
- I.forceMove(null) //null space here we go - to stop it showing up in the briefcase
+ I.moveToNullspace() // to stop it showing up in the briefcase
to_chat(user, "You place [I] into the false bottom of the briefcase. ")
else
return ..()
diff --git a/code/game/objects/items/weapons/storage/garment.dm b/code/game/objects/items/weapons/storage/garment.dm
index a56fdaf3d71f..28e0b39d3477 100644
--- a/code/game/objects/items/weapons/storage/garment.dm
+++ b/code/game/objects/items/weapons/storage/garment.dm
@@ -39,7 +39,7 @@
new /obj/item/clothing/suit/armor/vest/capcarapace/jacket/tunic(src)
new /obj/item/clothing/suit/armor/vest/capcarapace/coat(src)
new /obj/item/clothing/suit/armor/vest/capcarapace/coat/white(src)
- new /obj/item/clothing/suit/mantle/armor/captain(src)
+ new /obj/item/clothing/neck/cloak/captain_mantle(src)
new /obj/item/clothing/under/rank/captain(src)
new /obj/item/clothing/under/rank/captain/parade(src)
new /obj/item/clothing/under/rank/captain/dress(src)
@@ -60,7 +60,7 @@
new /obj/item/clothing/head/hop(src)
new /obj/item/clothing/head/beret/hop(src)
new /obj/item/clothing/neck/cloak/head_of_personnel(src)
- new /obj/item/clothing/suit/mantle/armor/hop(src)
+ new /obj/item/clothing/neck/cloak/hop_mantle(src)
new /obj/item/clothing/suit/armor/vest(src)
new /obj/item/clothing/suit/hopcoat(src)
new /obj/item/clothing/under/rank/civilian/hop(src)
@@ -88,7 +88,7 @@
new /obj/item/clothing/neck/cloak/head_of_security(src)
new /obj/item/clothing/suit/armor/hos(src)
new /obj/item/clothing/suit/armor/hos/alt(src)
- new /obj/item/clothing/suit/mantle/armor(src)
+ new /obj/item/clothing/neck/cloak/hos_mantle(src)
new /obj/item/clothing/under/rank/security/head_of_security(src)
new /obj/item/clothing/under/rank/security/formal/head_of_security(src)
new /obj/item/clothing/under/rank/security/head_of_security/corporate(src)
@@ -107,7 +107,7 @@
new /obj/item/clothing/neck/cloak/research_director(src)
new /obj/item/clothing/under/rank/rnd/research_director(src)
new /obj/item/clothing/suit/storage/labcoat/rd(src)
- new /obj/item/clothing/suit/mantle/labcoat(src)
+ new /obj/item/clothing/neck/cloak/rd_mantle(src)
new /obj/item/clothing/suit/storage/labcoat(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/gloves/color/latex(src)
@@ -133,7 +133,7 @@
new /obj/item/clothing/under/rank/medical/scrubs/green(src)
new /obj/item/clothing/under/rank/medical/scrubs/purple(src)
new /obj/item/clothing/suit/storage/labcoat/cmo(src)
- new /obj/item/clothing/suit/mantle/labcoat/chief_medical_officer(src)
+ new /obj/item/clothing/neck/cloak/cmo_mantle(src)
new /obj/item/clothing/shoes/white(src)
new /obj/item/clothing/shoes/brown (src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
@@ -151,7 +151,7 @@
new /obj/item/clothing/neck/cloak/chief_engineer(src)
new /obj/item/clothing/under/rank/engineering/chief_engineer(src)
new /obj/item/clothing/under/rank/engineering/chief_engineer/skirt(src)
- new /obj/item/clothing/suit/mantle/chief_engineer(src)
+ new /obj/item/clothing/neck/cloak/ce_mantle(src)
new /obj/item/clothing/suit/storage/hazardvest/ce(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/glasses/welding/superior(src)
@@ -214,7 +214,7 @@
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
new /obj/item/clothing/glasses/hud/health/sunglasses(src)
new /obj/item/clothing/glasses/hud/skills/sunglasses(src)
- new /obj/item/clothing/accessory/blue(src)
+ new /obj/item/clothing/neck/tie/blue(src)
new /obj/item/clothing/head/helmet/space/plasmaman/blueshield(src)
new /obj/item/clothing/under/plasmaman/blueshield(src)
@@ -234,7 +234,7 @@
new /obj/item/clothing/neck/cloak/quartermaster(src)
new /obj/item/clothing/head/hardhat/orange(src)
new /obj/item/clothing/suit/qmcoat(src)
- new /obj/item/clothing/suit/mantle/qm(src)
+ new /obj/item/clothing/neck/cloak/qm_mantle(src)
new /obj/item/clothing/suit/storage/hazardvest/qm(src)
new /obj/item/clothing/gloves/color/black(src)
new /obj/item/tank/internals/emergency_oxygen/double(src)
@@ -273,7 +273,7 @@
new /obj/item/clothing/head/det_hat(src)
new /obj/item/clothing/shoes/brown(src)
new /obj/item/clothing/suit/armor/vest/det_suit(src)
- new /obj/item/clothing/accessory/black(src)
+ new /obj/item/clothing/neck/tie/black(src)
new /obj/item/clothing/accessory/holster/armpit(src)
new /obj/item/clothing/glasses/sunglasses/yeah(src)
@@ -291,14 +291,9 @@
new /obj/item/clothing/suit/witchhunter(src)
new /obj/item/clothing/head/witchhunter_hat(src)
new /obj/item/clothing/suit/holidaypriest(src)
- new /obj/item/clothing/under/dress/wedding/bride_white(src)
new /obj/item/clothing/head/helmet/riot/knight/templar(src)
new /obj/item/clothing/suit/armor/riot/knight/templar(src)
new /obj/item/clothing/suit/storage/labcoat(src)
- new /obj/item/clothing/gloves/ring/silver(src)
- new /obj/item/clothing/gloves/ring/silver(src)
- new /obj/item/clothing/gloves/ring/gold(src)
- new /obj/item/clothing/gloves/ring/gold(src)
new /obj/item/clothing/head/helmet/space/plasmaman/chaplain(src)
new /obj/item/clothing/under/plasmaman/chaplain(src)
@@ -315,7 +310,7 @@
new /obj/item/clothing/shoes/laceup(src)
new /obj/item/clothing/glasses/hud/health(src)
new /obj/item/clothing/glasses/hud/skills(src)
- new /obj/item/clothing/accessory/blue(src)
+ new /obj/item/clothing/neck/tie/blue(src)
new /obj/item/clothing/head/helmet/space/plasmaman(src)
new /obj/item/clothing/under/plasmaman(src)
diff --git a/code/game/objects/items/weapons/storage/storage_base.dm b/code/game/objects/items/weapons/storage/storage_base.dm
index 6581136461d5..0b5236d0e316 100644
--- a/code/game/objects/items/weapons/storage/storage_base.dm
+++ b/code/game/objects/items/weapons/storage/storage_base.dm
@@ -74,6 +74,7 @@
orient2hud()
ADD_TRAIT(src, TRAIT_ADJACENCY_TRANSPARENT, ROUNDSTART_TRAIT)
+ RegisterSignal(src, COMSIG_ATOM_EXITED, PROC_REF(on_atom_exited))
/obj/item/storage/Destroy()
for(var/obj/O in contents)
@@ -490,6 +491,9 @@
update_icon()
return TRUE
+/obj/item/storage/proc/on_atom_exited(datum/source, atom/exited, direction)
+ return remove_from_storage(exited, exited.loc)
+
/**
* Handles the removal of an item from a storage container.
*
@@ -530,10 +534,6 @@
update_icon()
return TRUE
-/obj/item/storage/Exited(atom/A, loc)
- remove_from_storage(A, loc) //worry not, comrade; this only gets called once
- ..()
-
/obj/item/storage/deconstruct(disassembled = TRUE)
var/drop_loc = loc
if(ismob(loc))
diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm
index a866e4b14488..82d882da36a5 100644
--- a/code/game/objects/items/weapons/storage/toolbox.dm
+++ b/code/game/objects/items/weapons/storage/toolbox.dm
@@ -90,12 +90,12 @@
new /obj/item/wirecutters(src)
new /obj/item/t_scanner(src)
new /obj/item/crowbar(src)
- new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
- new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
+ new /obj/item/stack/cable_coil(src, 30, pickedcolor)
+ new /obj/item/stack/cable_coil(src, 30, pickedcolor)
if(prob(5))
new /obj/item/clothing/gloves/color/yellow(src)
else
- new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
+ new /obj/item/stack/cable_coil(src, 30, pickedcolor)
/obj/item/storage/toolbox/syndicate
name = "suspicious looking toolbox"
@@ -132,7 +132,7 @@
new /obj/item/wrench(src)
new /obj/item/weldingtool(src)
new /obj/item/crowbar(src)
- new /obj/item/stack/cable_coil(src, 30, paramcolor = pickedcolor)
+ new /obj/item/stack/cable_coil(src, 30, pickedcolor)
new /obj/item/wirecutters(src)
new /obj/item/multitool(src)
diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm
index 74f1e4182db3..9764f68aeafc 100644
--- a/code/game/objects/items/weapons/storage/uplink_kits.dm
+++ b/code/game/objects/items/weapons/storage/uplink_kits.dm
@@ -154,7 +154,7 @@
/obj/item/bio_chip_implanter/shock, // 50TC
/obj/item/dnainjector/telemut/darkbundle, // 0TC
/obj/item/clothing/suit/hooded/chaplain_hoodie, // 0TC
- /obj/item/clothing/glasses/meson/engine/tray, // 0TC
+ /obj/item/clothing/glasses/meson/engine/atmos, // 0TC
/obj/item/clothing/mask/chameleon/voice_change, // 10TC
/obj/item/card/id/syndicate, // 10TC
/obj/item/clothing/shoes/chameleon/noslip, // 10TC
@@ -222,7 +222,7 @@
/obj/item/encryptionkey/syndicate, // 10TC
/obj/item/clothing/under/syndicate/combat, //0TC
/obj/item/clothing/accessory/holster, // 0TC
- /obj/item/clothing/accessory/scarf/red, //0TC
+ /obj/item/clothing/neck/scarf/red, //0TC
/obj/item/clothing/head/beret, // 0TC
/obj/item/clothing/gloves/combat, // 0TC
/obj/item/clothing/shoes/combat) // 0TC
@@ -455,7 +455,7 @@
/obj/item/storage/box/syndie_kit/safecracking/populate_contents()
new /obj/item/clothing/gloves/color/latex/nitrile(src)
new /obj/item/clothing/mask/balaclava(src)
- new /obj/item/clothing/accessory/stethoscope(src)
+ new /obj/item/clothing/neck/stethoscope(src)
new /obj/item/book/manual/wiki/hacking(src)
/obj/item/storage/box/syndie_kit/chameleon
diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm
index ef502b7a3494..09b35a6246da 100644
--- a/code/game/objects/items/weapons/storage/wallets.dm
+++ b/code/game/objects/items/weapons/storage/wallets.dm
@@ -15,6 +15,11 @@
/obj/item/stack/medical,
/obj/item/toy/crayon,
/obj/item/coin,
+ /obj/item/food/candy/chocolate_coin,
+ /obj/item/food/candy/coin,
+ /obj/item/food/candy/cash,
+ /obj/item/food/customizable/candy/coin,
+ /obj/item/food/customizable/candy/cash,
/obj/item/dice,
/obj/item/disk,
/obj/item/bio_chip_implanter,
diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm
index 01ad9ed3764a..13494689a6fe 100644
--- a/code/game/objects/items/weapons/tanks/watertank.dm
+++ b/code/game/objects/items/weapons/tanks/watertank.dm
@@ -328,7 +328,7 @@
/obj/effect/nanofrost_container/proc/Smoke()
var/datum/effect_system/smoke_spread/freezing/S = new
- S.set_up(amount = 6, only_cardinals = FALSE, source = loc, desired_direction = null, chemicals = null, blasting = TRUE)
+ S.set_up(amount = 6, only_cardinals = FALSE, source = loc)
S.start()
new /obj/effect/decal/cleanable/flour/nanofrost(get_turf(src))
playsound(src, 'sound/effects/bamf.ogg', 100, TRUE)
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index d29ae94b95cb..cdc924381720 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -72,6 +72,7 @@
turfs += T
if(length(turfs))
L["None (Dangerous)"] = pick(turfs)
+ flick("hand_tele_activated", src)
var/t1 = tgui_input_list(user, "Please select a teleporter to lock in on.", "Hand Teleporter", L)
if(!t1 || (!user.is_in_active_hand(src) || user.stat || user.restrained()))
return
diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm
index 6995d3ad4426..835b69599391 100644
--- a/code/game/objects/items/weapons/vending_items.dm
+++ b/code/game/objects/items/weapons/vending_items.dm
@@ -223,3 +223,7 @@
/obj/item/vending_refill/lawdrobe
machine_name = "LawDrobe"
icon_state = "refill_clothes"
+
+/obj/item/vending_refill/traindrobe
+ machine_name = "TrainDrobe"
+ icon_state = "refill_clothes"
diff --git a/code/game/objects/mail.dm b/code/game/objects/mail.dm
index 57397c00ef0a..25843fd4cbca 100644
--- a/code/game/objects/mail.dm
+++ b/code/game/objects/mail.dm
@@ -198,7 +198,7 @@
/obj/item/toy/figure/crew/iaa,
/obj/item/toy/figure/crew/dsquad,
/obj/item/storage/box/scratch_cards)
- job_list = list("Captain", "Magistrate", "Nanotrasen Representative", "Blueshield", "Internal Affairs Agent")
+ job_list = list("Captain", "Magistrate", "Nanotrasen Representative", "Blueshield", "Internal Affairs Agent", "Nanotrasen Career Trainer")
/obj/item/envelope/misc
possible_contents = list(/obj/item/clothing/under/misc/assistantformal,
diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm
deleted file mode 100644
index 0b18507cd002..000000000000
--- a/code/game/objects/random/random.dm
+++ /dev/null
@@ -1,110 +0,0 @@
-// TODO: Refactor these into spawners
-/obj/random
- name = "Random Object"
- desc = "This item type is used to spawn random objects at round-start."
- icon = 'icons/misc/mark.dmi'
- icon_state = "rup"
- var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
-
-
-// creates a new object and deletes itself
-/obj/random/Initialize(mapload)
- . = ..()
- if(!prob(spawn_nothing_percentage))
- spawn_item()
- return INITIALIZE_HINT_QDEL
-
-
-// this function should return a specific item to spawn
-/obj/random/proc/item_to_spawn()
- return
-
-
-// creates the random item
-/obj/random/proc/spawn_item()
- var/build_path = item_to_spawn()
- return (new build_path(src.loc))
-
-
-/obj/random/tool
- name = "Random Tool"
- desc = "This is a random tool."
- icon = 'icons/obj/tools.dmi'
- icon_state = "random_tool"
-
-/obj/random/tool/item_to_spawn()
- return pick(/obj/item/screwdriver,\
- /obj/item/wirecutters,\
- /obj/item/weldingtool,\
- /obj/item/crowbar,\
- /obj/item/wrench,\
- /obj/item/flashlight)
-
-
-/obj/random/technology_scanner
- name = "Random Scanner"
- desc = "This is a random technology scanner."
- icon = 'icons/obj/device.dmi'
- icon_state = "atmos"
-
-/obj/random/technology_scanner/item_to_spawn()
- return pick(prob(5);/obj/item/t_scanner,\
- prob(2);/obj/item/radio/intercom,\
- prob(5);/obj/item/analyzer)
-
-
-/obj/random/powercell
- name = "Random Powercell"
- desc = "This is a random powercell."
- icon = 'icons/obj/power.dmi'
- icon_state = "cell"
-
-/obj/random/powercell/item_to_spawn()
- return pick(prob(10);/obj/item/stock_parts/cell/crap,\
- prob(40);/obj/item/stock_parts/cell,\
- prob(40);/obj/item/stock_parts/cell/high,\
- prob(9);/obj/item/stock_parts/cell/super,\
- prob(1);/obj/item/stock_parts/cell/hyper)
-
-/obj/random/bomb_supply
- name = "Bomb Supply"
- desc = "This is a random bomb supply."
- icon = 'icons/obj/assemblies/new_assemblies.dmi'
- icon_state = "signaller"
-
-/obj/random/bomb_supply/item_to_spawn()
- return pick(/obj/item/assembly/igniter,\
- /obj/item/assembly/prox_sensor,\
- /obj/item/assembly/signaler)
-
-
-/obj/random/toolbox
- name = "Random Toolbox"
- desc = "This is a random toolbox."
- icon = 'icons/obj/storage.dmi'
- icon_state = "red"
-
-/obj/random/toolbox/item_to_spawn()
- return pick(prob(3);/obj/item/storage/toolbox/mechanical,\
- prob(2);/obj/item/storage/toolbox/electrical,\
- prob(1);/obj/item/storage/toolbox/emergency)
-
-/obj/random/tech_supply
- name = "Random Tech Supply"
- desc = "This is a random piece of technology supplies."
- icon = 'icons/obj/power.dmi'
- icon_state = "cell"
- spawn_nothing_percentage = 50
-
-/obj/random/tech_supply/item_to_spawn()
- return pick(prob(3);/obj/random/powercell,\
- prob(2);/obj/random/technology_scanner,\
- prob(1);/obj/item/stack/package_wrap,\
- prob(2);/obj/random/bomb_supply,\
- prob(1);/obj/item/extinguisher,\
- prob(1);/obj/item/clothing/gloves/color/fyellow,\
- prob(3);/obj/item/stack/cable_coil,\
- prob(2);/obj/random/toolbox,\
- prob(2);/obj/item/storage/belt/utility,\
- prob(5);/obj/random/tool,\
- prob(3);/obj/item/stack/tape_roll)
diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm
index e4c2b29b69ef..1a80c3bac7c2 100644
--- a/code/game/objects/structures/aliens.dm
+++ b/code/game/objects/structures/aliens.dm
@@ -468,6 +468,7 @@
*In the BURST/BURSTING state, the alien egg can be removed by being attacked by a alien or any other weapon
**/
var/status = GROWING
+ var/datum/proximity_monitor/proximity_monitor
/obj/structure/alien/egg/grown
status = GROWN
@@ -485,7 +486,7 @@
else if(status != GROWN)
addtimer(CALLBACK(src, PROC_REF(grow)), rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
if(status == GROWN)
- AddComponent(/datum/component/proximity_monitor)
+ proximity_monitor = new(src)
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
return attack_hand(user)
@@ -516,7 +517,7 @@
/obj/structure/alien/egg/proc/grow()
icon_state = "egg"
status = GROWN
- AddComponent(/datum/component/proximity_monitor)
+ proximity_monitor = new(src)
///Need to carry the kill from Burst() to Hatch(), this section handles the alien opening the egg
/obj/structure/alien/egg/proc/burst(kill)
@@ -524,8 +525,7 @@
icon_state = "egg_hatched"
flick("egg_opening", src)
status = BURSTING
- DeleteComponent(/datum/component/proximity_monitor)
-
+ QDEL_NULL(proximity_monitor)
addtimer(CALLBACK(src, PROC_REF(hatch)), 1.5 SECONDS)
///We now check HOW the hugger is hatching, kill carried from Burst() and obj_break()
diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm
index b6f30a05c181..71c1a2372482 100644
--- a/code/game/objects/structures/coathanger.dm
+++ b/code/game/objects/structures/coathanger.dm
@@ -29,7 +29,7 @@
return
return ..()
-/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target)
+/obj/structure/coatrack/CanPass(atom/movable/mover, border_dir)
var/can_hang = FALSE
for(var/T in allowed)
if(istype(mover,T))
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index b3b6ef724e98..fc3904381f10 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -167,7 +167,7 @@
QDEL_NULL(door_obj)
return ..()
-/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
+/obj/structure/closet/CanPass(atom/movable/mover, border_dir)
if(wall_mounted)
return TRUE
return (!density)
@@ -516,14 +516,23 @@
storage_capacity = 60
var/materials = list(MAT_METAL = 5000, MAT_PLASMA = 2500, MAT_TITANIUM = 500, MAT_BLUESPACE = 500)
-/obj/structure/closet/bluespace/CheckExit(atom/movable/AM)
- UpdateTransparency(AM, loc)
- return TRUE
+/obj/structure/closet/bluespace/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(UpdateTransparency),
+ COMSIG_ATOM_EXITED = PROC_REF(UpdateTransparency),
+ )
+
+ AddElement(/datum/element/connect_loc, loc_connections)
-/obj/structure/closet/bluespace/proc/UpdateTransparency(atom/movable/AM, atom/location)
+/obj/structure/closet/bluespace/proc/UpdateTransparency()
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED + COMSIG_ATOM_EXITED
transparent = FALSE
- for(var/atom/A in location)
- if(A.density && A != src && A != AM)
+ if(!get_turf(loc))
+ return
+
+ for(var/atom/A in loc)
+ if(A.density && A != src)
transparent = TRUE
alpha = 180
update_icon()
@@ -531,10 +540,6 @@
alpha = 255
update_icon()
-/obj/structure/closet/bluespace/Crossed(atom/movable/AM, oldloc)
- if(AM.density)
- UpdateTransparency(location = loc)
-
/obj/structure/closet/bluespace/Move(NewLoc, direct) // Allows for "phasing" throug objects but doesn't allow you to stuff your EOC homebois in one of these and push them through walls.
var/turf/T = get_turf(NewLoc)
if(T.density)
@@ -542,8 +547,10 @@
for(var/atom/A in T.contents)
if(A.density && isairlock(A))
return
- UpdateTransparency(src, NewLoc)
- forceMove(NewLoc)
+
+ . = ..()
+
+ UpdateTransparency()
/obj/structure/closet/bluespace/close()
. = ..()
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering_lockers.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering_lockers.dm
index 6e86905ddbaf..6703f3bbe317 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/engineering_lockers.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering_lockers.dm
@@ -22,6 +22,7 @@
new /obj/item/holosign_creator/engineering(src)
new /obj/item/flash(src)
new /obj/item/clothing/glasses/meson/engine(src)
+ new /obj/item/clothing/glasses/meson/engine/atmos(src)
new /obj/item/door_remote/chief_engineer(src)
new /obj/item/rpd(src)
new /obj/item/reagent_containers/drinks/mug/ce(src)
@@ -119,6 +120,6 @@
new /obj/item/watertank/atmos(src)
new /obj/item/clothing/suit/fire/firefighter/atmos(src)
new /obj/item/clothing/head/hardhat/atmos(src)
- new /obj/item/clothing/glasses/meson/engine(src)
+ new /obj/item/clothing/glasses/meson/engine/atmos(src)
new /obj/item/rpd(src)
new /obj/item/dest_tagger(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical_lockers.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical_lockers.dm
index a40f7373bace..bccd658bfc80 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/medical_lockers.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/medical_lockers.dm
@@ -73,7 +73,7 @@
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/glasses/hud/health(src)
new /obj/item/clothing/gloves/color/latex/nitrile(src)
- new /obj/item/clothing/accessory/stethoscope(src)
+ new /obj/item/clothing/neck/stethoscope(src)
new /obj/item/flashlight/pen(src)
new /obj/item/storage/firstaid/regular(src)
new /obj/item/storage/firstaid/adv(src)
@@ -127,7 +127,7 @@
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
new /obj/item/storage/fancy/cigarettes/cigpack_med(src)
new /obj/item/storage/pill_bottle/psychiatrist(src)
- new /obj/random/plushie(src)
+ new /obj/effect/spawner/random/plushies
for(var/i in 0 to 3)
var/candy = pick(subtypesof(/obj/item/food/candy/fudge))
new candy(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
index cab056f24be0..77d0d6da3a6e 100644
--- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
@@ -129,7 +129,7 @@
closed_door_sprite = "green"
/obj/structure/closet/wardrobe/xenos/populate_contents()
- new /obj/item/clothing/suit/unathi/mantle(src)
+ new /obj/item/clothing/neck/cloak/unathi(src)
new /obj/item/clothing/suit/unathi/robe(src)
new /obj/item/clothing/gloves/handwraps(src)
new /obj/item/clothing/gloves/handwraps(src)
diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm
index 351d42a6b675..657d374800a7 100644
--- a/code/game/objects/structures/fence.dm
+++ b/code/game/objects/structures/fence.dm
@@ -58,7 +58,7 @@
icon_state = "straight_cut3"
hole_size = LARGE_HOLE
-/obj/structure/fence/CanPass(atom/movable/mover, turf/target)
+/obj/structure/fence/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSFENCE))
return TRUE
if(isprojectile(mover))
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index a7f2125a0a71..746c4b9b7263 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -406,7 +406,7 @@
refundMetal(metalUsed)
qdel(src)
-/obj/structure/girder/CanPass(atom/movable/mover, turf/target)
+/obj/structure/girder/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSGIRDER))
return TRUE
if(istype(mover) && mover.checkpass(PASSGRILLE))
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index e0aa89bca9b1..c4a1b48e218a 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -90,7 +90,7 @@
if(!shock(user, 70))
take_damage(20, BRUTE, MELEE, 1)
-/obj/structure/grille/CanPass(atom/movable/mover, turf/target)
+/obj/structure/grille/CanPass(atom/movable/mover, border_dir)
. = !density
if(istype(mover) && mover.checkpass(PASSGRILLE))
return TRUE
diff --git a/code/game/objects/structures/holosigns.dm b/code/game/objects/structures/holosigns.dm
index 655551f6eb95..3631b28451de 100644
--- a/code/game/objects/structures/holosigns.dm
+++ b/code/game/objects/structures/holosigns.dm
@@ -57,7 +57,7 @@
max_integrity = 20
var/allow_walk = TRUE //can we pass through it on walk intent
-/obj/structure/holosign/barrier/CanPass(atom/movable/mover, turf/target)
+/obj/structure/holosign/barrier/CanPass(atom/movable/mover, border_dir)
if(!density)
return TRUE
if(mover.pass_flags & (PASSGLASS|PASSTABLE|PASSGRILLE))
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index 0c1267ff8918..1db795432b71 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -42,7 +42,7 @@
. = ..()
T.recalculate_atmos_connectivity()
-/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target)
+/obj/structure/inflatable/CanPass(atom/movable/mover, border_dir)
return
/obj/structure/inflatable/CanAtmosPass(direction)
@@ -116,7 +116,7 @@
/obj/structure/inflatable/door/attack_hand(mob/user as mob)
return try_to_operate(user)
-/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target)
+/obj/structure/inflatable/door/CanPass(atom/movable/mover, border_dir)
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index c17308c90af6..144bf5f747df 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -59,7 +59,7 @@
if(user.can_advanced_admin_interact())
operate()
-/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target)
+/obj/structure/mineral_door/CanPass(atom/movable/mover, border_dir)
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 9ed6bfc1750b..12403792f164 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -294,7 +294,7 @@
connected = null
return ..()
-/obj/structure/m_tray/CanPass(atom/movable/mover, turf/target)
+/obj/structure/m_tray/CanPass(atom/movable/mover, border_dir)
if(istype(mover))
if(mover.checkpass(PASSTABLE))
return TRUE
diff --git a/code/game/objects/structures/nest.dm b/code/game/objects/structures/nest.dm
index 0deca8f6de66..a85aaf417d65 100644
--- a/code/game/objects/structures/nest.dm
+++ b/code/game/objects/structures/nest.dm
@@ -25,6 +25,13 @@
var/spawn_mob_options = list(/mob/living/simple_animal/crab) // The nest picks one mob type of this list and spawns them
var/spawn_trigger_distance = 7 // The triggered nest will look this many tiles around itself to find other triggerable nests
+/obj/structure/nest/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/structure/nest/examine(mob/user)
. = ..()
if(!spawn_is_triggered)
@@ -35,12 +42,13 @@
return
..()
-/obj/structure/nest/Crossed(atom/movable/AM)
+/obj/structure/nest/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
if(spawn_is_triggered)
return
- if(!isliving(AM))
+ if(!isliving(entered))
return
- var/mob/living/L = AM
+ var/mob/living/L = entered
if(!L.mind)
return
diff --git a/code/game/objects/structures/plasmafire_generator.dm b/code/game/objects/structures/plasmafire_generator.dm
new file mode 100644
index 000000000000..288eb567443e
--- /dev/null
+++ b/code/game/objects/structures/plasmafire_generator.dm
@@ -0,0 +1,41 @@
+/obj/structure/plasmafire_generator
+ name = "Plasmafire Generator"
+ desc = "A magical thing that you really shouldn't be able to see."
+ anchored = TRUE
+ alpha = 0
+ mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+ resistance_flags = LAVA_PROOF | FIRE_PROOF
+ flags = NODECONSTRUCT
+
+/obj/structure/plasmafire_generator/Initialize(mapload)
+ . = ..()
+ START_PROCESSING(SSprocessing, src)
+
+// for sanity checks
+/obj/structure/plasmafire_generator/Destroy()
+ STOP_PROCESSING(SSprocessing, src)
+ return ..()
+
+/obj/structure/plasmafire_generator/process()
+ var/turf/T = get_turf(src)
+ if(!istype(T))
+ return
+
+ var/datum/gas_mixture/fire = new()
+ fire.set_toxins(10)
+ fire.set_oxygen(4)
+ fire.set_temperature(500)
+ T.blind_release_air(fire)
+
+/obj/structure/plasmafire_generator/shadow
+ var/enabled = FALSE
+
+/obj/structure/plasmafire_generator/shadow/onShuttleMove(turf/oldT, turf/T1, rotation, mob/caller)
+ if(T1.z != 1)
+ enabled = TRUE
+ return ..()
+
+/obj/structure/plasmafire_generator/shadow/process()
+ if(!enabled)
+ return
+ return ..()
diff --git a/code/game/objects/structures/railings.dm b/code/game/objects/structures/railings.dm
index ebe2e672006d..5c229ce50d6f 100644
--- a/code/game/objects/structures/railings.dm
+++ b/code/game/objects/structures/railings.dm
@@ -12,6 +12,14 @@
var/currently_climbed = FALSE
var/mover_dir = null
+/obj/structure/railing/Initialize(mapload)
+ . = ..()
+ if(density && flags & ON_BORDER) // blocks normal movement from and to the direction it's facing.
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/structure/railing/get_climb_text()
return "You can Click-Drag yourself to [src] to climb over it after a short delay. "
@@ -87,8 +95,8 @@
/obj/structure/railing/corner/CanPathfindPass(to_dir, datum/can_pass_info/pass_info)
return TRUE
-/obj/structure/railing/corner/CheckExit()
- return TRUE
+/obj/structure/railing/corner/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ return
/obj/structure/railing/cap/CanPass()
return TRUE
@@ -96,10 +104,10 @@
/obj/structure/railing/cap/CanPathfindPass(to_dir, datum/can_pass_info/pass_info)
return TRUE
-/obj/structure/railing/cap/CheckExit()
- return TRUE
+/obj/structure/railing/cap/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ return
-/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
+/obj/structure/railing/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSFENCE))
return TRUE
if(isprojectile(mover))
@@ -110,11 +118,10 @@
return TRUE
if(mover.throwing)
return TRUE
- mover_dir = get_dir(loc, target)
//Due to how the other check is done, it would always return density for ordinal directions no matter what
- if(ordinal_direction_check(mover_dir))
+ if(ordinal_direction_check(border_dir))
return FALSE
- if(mover_dir != dir)
+ if(border_dir != dir)
return density
return FALSE
@@ -126,27 +133,27 @@
return TRUE
-/obj/structure/railing/CheckExit(atom/movable/O, target)
- var/mob/living/M = O
- if(istype(O) && O.checkpass(PASSFENCE))
- return TRUE
- if(isprojectile(O))
- return TRUE
+/obj/structure/railing/proc/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXIT
+
+ var/mob/living/M = leaving
+ if(istype(leaving) && leaving.checkpass(PASSFENCE))
+ return
+ if(isprojectile(leaving))
+ return
if(istype(M))
if(HAS_TRAIT(M, TRAIT_FLYING) || M.floating || (IS_HORIZONTAL(M) && HAS_TRAIT(M, TRAIT_CONTORTED_BODY)))
- return TRUE
- if(O.throwing)
- return TRUE
- if(O.move_force >= MOVE_FORCE_EXTREMELY_STRONG)
- return TRUE
+ return
+ if(leaving.throwing)
+ return
+ if(leaving.move_force >= MOVE_FORCE_EXTREMELY_STRONG)
+ return
if(currently_climbed)
- return TRUE
- mover_dir = get_dir(O.loc, target)
- if(mover_dir == dir)
- return FALSE
- if(ordinal_direction_check(mover_dir))
- return FALSE
- return TRUE
+ return
+ if(direction == dir)
+ return COMPONENT_ATOM_BLOCK_EXIT
+ if(ordinal_direction_check(direction))
+ return COMPONENT_ATOM_BLOCK_EXIT
// Checks if the direction the mob is trying to move towards would be blocked by a corner railing
/obj/structure/railing/proc/ordinal_direction_check(check_dir)
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index ee476c27cbdc..0ee1015e25db 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -209,7 +209,7 @@ GLOBAL_LIST_EMPTY(safes)
else
to_chat(user, "[I] won't fit in [src]. ")
else
- if(istype(I, /obj/item/clothing/accessory/stethoscope))
+ if(istype(I, /obj/item/clothing/neck/stethoscope))
attack_hand(user)
return
else if(istype(I, /obj/item/thermal_drill))
@@ -270,10 +270,10 @@ GLOBAL_LIST_EMPTY(safes)
var/mob/living/carbon/human/H = usr
var/list/accessories = H.w_uniform?.accessories
if(H.can_hear()) // This is cursed but is_type_in_list somehow fails
- if(H.is_in_hands(/obj/item/clothing/accessory/stethoscope))
+ if(H.is_in_hands(/obj/item/clothing/neck/stethoscope))
canhear = TRUE
else
- for(var/obj/item/clothing/accessory/stethoscope/S in accessories)
+ for(var/obj/item/clothing/neck/stethoscope/S in accessories)
canhear = TRUE
break
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 23f533f22967..cd70a5ff4bca 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -47,6 +47,11 @@
/obj/structure/table/Initialize(mapload)
. = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
if(flipped)
update_icon()
@@ -126,9 +131,10 @@
/obj/structure/table/proc/item_placed(item)
return
-/obj/structure/table/CanPass(atom/movable/mover, turf/target)
+/obj/structure/table/CanPass(atom/movable/mover, border_dir)
if(istype(mover,/obj/item/projectile))
- return (check_cover(mover,target))
+ return check_cover(mover, border_dir)
+
var/mob/living/living_mover = mover
if(istype(living_mover) && (HAS_TRAIT(living_mover, TRAIT_FLYING) || (IS_HORIZONTAL(living_mover) && HAS_TRAIT(living_mover, TRAIT_CONTORTED_BODY))))
return TRUE
@@ -141,7 +147,7 @@
if(!T.flipped)
return TRUE
if(flipped)
- if(get_dir(loc, target) == dir)
+ if(border_dir == dir)
return !density
else
return TRUE
@@ -158,30 +164,28 @@
*
* Arguments:
* * P - The projectile trying to cross.
- * * from - Where the projectile is located.
+ * * proj_dir - The incoming direction of the projectile.
*/
-/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
+/obj/structure/table/proc/check_cover(obj/item/projectile/P, proj_dir)
. = TRUE
if(!flipped)
return
if(get_dist(P.starting, loc) <= 1) // Tables won't help you if people are THIS close
return
- var/proj_dir = get_dir(from, loc)
- var/block_dir = get_dir(get_step(loc, dir), loc)
- if(proj_dir != block_dir) // Back/side shots may pass
+ if(proj_dir != dir) // Back/side shots may pass
return
if(prob(40))
return FALSE // Blocked
-/obj/structure/table/CheckExit(atom/movable/O, turf/target)
- if(istype(O) && O.checkpass(PASSTABLE))
- return 1
+/obj/structure/table/proc/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXIT
+
+ if(istype(leaving) && leaving.checkpass(PASSTABLE))
+ return
+
if(flipped)
- if(get_dir(loc, target) == dir)
- return !density
- else
- return 1
- return 1
+ if(direction == dir && density)
+ return COMPONENT_ATOM_BLOCK_EXIT
/obj/structure/table/MouseDrop_T(obj/O, mob/user)
if(..())
@@ -461,27 +465,32 @@
. = ..()
debris += new frame
debris += new shardtype
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/structure/table/glass/Destroy()
for(var/i in debris)
qdel(i)
. = ..()
-/obj/structure/table/glass/Crossed(atom/movable/AM, oldloc)
- . = ..()
+/obj/structure/table/glass/proc/on_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
if(flags & NODECONSTRUCT)
return
- if(!isliving(AM))
+ if(!isliving(entered))
return
- var/mob/living/L = AM
+ var/mob/living/L = entered
if(L.incorporeal_move || HAS_TRAIT(L, TRAIT_FLYING) || L.floating)
return
// Don't break if they're just flying past
- if(AM.throwing)
- addtimer(CALLBACK(src, PROC_REF(throw_check), AM), 5)
+ if(entered.throwing)
+ addtimer(CALLBACK(src, PROC_REF(throw_check), entered), 5)
else
- check_break(AM)
+ check_break(entered)
/obj/structure/table/glass/proc/throw_check(mob/living/M)
if(M.loc == get_turf(src))
@@ -905,7 +914,7 @@
. = ..()
. += "It's held together by a couple of bolts . "
-/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
+/obj/structure/rack/CanPass(atom/movable/mover, border_dir)
if(!density) //Because broken racks -Agouri |TODO: SPRITE!|
return 1
if(istype(mover))
diff --git a/code/game/objects/structures/transit_tubes/transit_tube.dm b/code/game/objects/structures/transit_tubes/transit_tube.dm
index ad0fbabd901e..b5612911dd13 100644
--- a/code/game/objects/structures/transit_tubes/transit_tube.dm
+++ b/code/game/objects/structures/transit_tubes/transit_tube.dm
@@ -33,7 +33,7 @@
P.empty_pod()
return ..()
-/obj/structure/transit_tube/CanPass(atom/movable/mover, turf/target)
+/obj/structure/transit_tube/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSGLASS))
return TRUE
return !density
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index e882da691101..308d5e6b6882 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -307,6 +307,13 @@
pixel_y = -5
layer = FLY_LAYER
+/obj/machinery/shower/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/machinery/shower/Destroy()
QDEL_NULL(soundloop)
var/obj/effect/mist/mist = locate() in loc
@@ -401,10 +408,10 @@
if(mist && (!on || current_temperature == SHOWER_FREEZING))
qdel(mist)
-/obj/machinery/shower/Crossed(atom/movable/AM)
- ..()
+/obj/machinery/shower/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
if(on)
- wash(AM)
+ wash(entered)
/obj/machinery/shower/proc/convertHeat()
switch(current_temperature)
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index 4a12a0132f01..23ab76e66555 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -55,6 +55,12 @@
if(set_dir)
dir = set_dir
ini_dir = dir
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+
+ AddElement(/datum/element/connect_loc, loc_connections)
+
recalculate_atmos_connectivity()
/obj/structure/windoor_assembly/Destroy()
@@ -72,10 +78,10 @@
/obj/structure/windoor_assembly/update_icon_state()
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
-/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target)
+/obj/structure/windoor_assembly/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
- if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
+ if(border_dir == dir) //Make sure looking at appropriate border
return !density
if(istype(mover, /obj/structure/window))
var/obj/structure/window/W = mover
@@ -95,13 +101,13 @@
else
return TRUE
-/obj/structure/windoor_assembly/CheckExit(atom/movable/mover, turf/target)
- if(istype(mover) && mover.checkpass(PASSGLASS))
- return 1
- if(get_dir(loc, target) == dir)
- return !density
- else
- return 1
+/obj/structure/windoor_assembly/proc/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXIT
+
+ if(istype(leaving) && leaving.checkpass(PASSGLASS))
+ return
+ if(direction == dir && density)
+ return COMPONENT_ATOM_BLOCK_EXIT
/obj/structure/windoor_assembly/attackby__legacy__attackchain(obj/item/W, mob/user, params)
//I really should have spread this out across more states but thin little windoors are hard to sprite.
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 0727ea69e34d..a4e8b7452331 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -79,6 +79,12 @@
real_explosion_block = explosion_block
explosion_block = EXPLOSION_BLOCK_PROC
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+
+ AddElement(/datum/element/connect_loc, loc_connections)
+
recalculate_atmos_connectivity()
/obj/structure/window/proc/toggle_polarization()
@@ -109,12 +115,12 @@
else
..(FULLTILE_WINDOW_DIR)
-/obj/structure/window/CanPass(atom/movable/mover, turf/target)
+/obj/structure/window/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(dir == FULLTILE_WINDOW_DIR)
return 0 //full tile window, you can't move into it!
- if(get_dir(loc, target) & dir)
+ if(border_dir & dir)
return !density
if(istype(mover, /obj/structure/window))
var/obj/structure/window/W = mover
@@ -128,14 +134,20 @@
return FALSE
return 1
-/obj/structure/window/CheckExit(atom/movable/O, target)
- if(istype(O) && O.checkpass(PASSGLASS))
- return TRUE
+/obj/structure/window/proc/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXIT
+
+ if(istype(leaving) && leaving.checkpass(PASSGLASS))
+ return
+ if(leaving == src)
+ return
if(dir == FULLTILE_WINDOW_DIR)
- return TRUE
- if(get_dir(O.loc, target) & dir)
- return FALSE
- return TRUE
+ return
+ if(direction & dir)
+ leaving.Bump(src)
+ return COMPONENT_ATOM_BLOCK_EXIT
+
+ return
/obj/structure/window/CanPathfindPass(to_dir, datum/can_pass_info/pass_info)
if(!density)
@@ -339,7 +351,7 @@
if(!fulltile)
if(get_dir(user, src) & dir)
for(var/obj/O in loc)
- if(!O.CanPass(user, user.loc, 1))
+ if(!O.CanPass(user, get_dir(src, user)))
return 0
return 1
diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm
index 303e8d5b6efc..9c85caa033f2 100644
--- a/code/game/turfs/simulated.dm
+++ b/code/game/turfs/simulated.dm
@@ -30,6 +30,14 @@
/// If a fire is ongoing, how much fuel did we burn last tick?
/// Value is not updated while below PLASMA_MINIMUM_BURN_TEMPERATURE.
var/fuel_burnt = 0
+ /// When do we last remember having wind?
+ var/wind_tick = null
+ /// Wind's X component
+ var/wind_x = null
+ /// Wind's Y component
+ var/wind_y = null
+ /// Wind effect
+ var/obj/effect/wind/wind_effect = null
/turf/simulated/proc/break_tile()
return
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index c863cde3f8f6..e0864966cd6f 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -56,12 +56,12 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
break_tile_to_plating()
else
break_tile()
- hotspot_expose(1000,CELL_VOLUME)
+ hotspot_expose(1000, 100)
if(prob(33)) new /obj/item/stack/sheet/metal(src)
if(3.0)
if(prob(50))
break_tile()
- hotspot_expose(1000,CELL_VOLUME)
+ hotspot_expose(1000, 100)
return
/turf/simulated/floor/burn_down()
@@ -118,6 +118,10 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
burnt = TRUE
update_icon()
+/turf/simulated/floor/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ if(exposed_temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST && prob(1))
+ burn_tile()
+
/turf/simulated/floor/proc/make_plating()
return ChangeTurf(/turf/simulated/floor/plating)
diff --git a/code/game/turfs/simulated/floor/asteroid_floors.dm b/code/game/turfs/simulated/floor/asteroid_floors.dm
index d9802a666ff6..6f547b8d070a 100644
--- a/code/game/turfs/simulated/floor/asteroid_floors.dm
+++ b/code/game/turfs/simulated/floor/asteroid_floors.dm
@@ -57,7 +57,7 @@
if(1)
getDug()
-/turf/simulated/floor/plating/asteroid/proc/attempt_ore_pickup(obj/item/storage/bag/ore/S, mob/user)
+/turf/simulated/floor/plating/asteroid/proc/attempt_ore_pickup(obj/item/storage/bag/ore/S, mob/user, params)
if(!istype(S))
return
@@ -90,7 +90,7 @@
return TRUE
else if(istype(I, /obj/item/storage/bag/ore))
- attempt_ore_pickup(I, user)
+ attempt_ore_pickup(I, user, params)
else if(istype(I, /obj/item/stack/tile))
var/obj/item/stack/tile/Z = I
diff --git a/code/game/turfs/simulated/floor/chasm.dm b/code/game/turfs/simulated/floor/chasm.dm
index 2e5bb0e39c99..5202acf5b661 100644
--- a/code/game/turfs/simulated/floor/chasm.dm
+++ b/code/game/turfs/simulated/floor/chasm.dm
@@ -263,7 +263,7 @@
if(isliving(arrived))
RegisterSignal(arrived, COMSIG_LIVING_REVIVE, PROC_REF(on_revive))
-/obj/effect/abstract/chasm_storage/Exited(atom/movable/gone)
+/obj/effect/abstract/chasm_storage/Exited(atom/movable/gone, direction)
. = ..()
if(isliving(gone))
UnregisterSignal(gone, COMSIG_LIVING_REVIVE)
@@ -296,8 +296,8 @@
atmos_mode = ATMOS_MODE_SEALED
atmos_environment = null
-/turf/simulated/floor/chasm/CanPass(atom/movable/mover, turf/target)
- return 1
+/turf/simulated/floor/chasm/CanPass(atom/movable/mover, border_dir)
+ return TRUE
/turf/simulated/floor/chasm/pride/Initialize(mapload)
. = ..()
diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm
index 0dbe2dc77e3a..1fdab8f14835 100644
--- a/code/game/turfs/simulated/floor/misc_floor.dm
+++ b/code/game/turfs/simulated/floor/misc_floor.dm
@@ -118,7 +118,7 @@
if(ismob(AM))
linkedcontroller.mobinpool += AM
-/turf/simulated/floor/beach/water/Exited(atom/movable/AM, atom/newloc)
+/turf/simulated/floor/beach/water/Exited(atom/movable/AM, direction)
. = ..()
if(!linkedcontroller)
return
diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm
index 49bc5dda1771..786514e0e56c 100644
--- a/code/game/turfs/simulated/floor/plasteel_floor.dm
+++ b/code/game/turfs/simulated/floor/plasteel_floor.dm
@@ -9,6 +9,23 @@
/turf/simulated/floor/plasteel/get_broken_states()
return list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
+/turf/simulated/floor/plasteel/pressure_debug
+
+/turf/simulated/floor/plasteel/pressure_debug/airless
+ name = "airless floor"
+ oxygen = 0
+ nitrogen = 0
+ temperature = TCMB
+
+/turf/simulated/floor/plasteel/pressure_debug/Initialize(mapload)
+ ..()
+ addtimer(CALLBACK(src, PROC_REF(update_color)), 1, TIMER_LOOP)
+
+/turf/simulated/floor/plasteel/pressure_debug/proc/update_color()
+ var/datum/gas_mixture/air = get_readonly_air()
+ var/ratio = min(1, air.return_pressure() / ONE_ATMOSPHERE)
+ color = rgb(255 * (1 - ratio), 0, 255 * ratio)
+
/turf/simulated/floor/plasteel/airless
name = "airless floor"
oxygen = 0
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index eef62cd46f4c..b0eda64b7f60 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -82,6 +82,9 @@
var/datum/gas_mixture/bound_to_turf/bound_air
+ /// The effect used to render a pressure overlay from this tile.
+ var/obj/effect/pressure_overlay/pressure_overlay
+
/turf/Initialize(mapload)
SHOULD_CALL_PARENT(FALSE)
if(initialized)
@@ -188,52 +191,33 @@
..()
return FALSE
-/turf/Enter(atom/movable/mover as mob|obj, atom/forget)
- if(!mover)
- return TRUE
-
- // First, make sure it can leave its square
- if(isturf(mover.loc))
- // Nothing but border objects stop you from leaving a tile, only one loop is needed
- // This as anything looks odd, since we check istype shortly after, but it's so we can save an istype check for items, which are far more common than other objects.
- for(var/obj/obstacle as anything in mover.loc)
- if(isitem(obstacle) || !istype(obstacle) || obstacle == mover || obstacle == forget)
+//There's a lot of QDELETED() calls here if someone can figure out how to optimize this but not runtime when something gets deleted by a Bump/CanPass/Cross call, lemme know or go ahead and fix this mess - kevinz000
+/turf/Enter(atom/movable/mover)
+ // Do not call ..()
+ // Byond's default turf/Enter() doesn't have the behaviour we want with Bump()
+ // By default byond will call Bump() on the first dense object in contents
+ // Here's hoping it doesn't stay like this for years before we finish conversion to step_
+ var/atom/first_bump
+ var/can_pass_self = CanPass(mover, get_dir(src, mover))
+
+ if(can_pass_self)
+ var/atom/mover_loc = mover.loc
+ for(var/atom/movable/thing as anything in contents)
+ if(thing == mover || thing == mover_loc) // Multi tile objects and moving out of other objects
continue
- if(!obstacle.CheckExit(mover, src))
- mover.Bump(obstacle, TRUE)
- return FALSE
-
- var/list/large_dense = list()
- // Next, check for border obstacles on this turf
- // Everyting inside a turf is an atom/movable.
- for(var/atom/movable/border_obstacle as anything in src)
- if(isitem(border_obstacle) || border_obstacle == forget || isnull(border_obstacle))
- continue
- if(border_obstacle.flags & ON_BORDER)
- if(!border_obstacle.CanPass(mover, mover.loc, 1))
- mover.Bump(border_obstacle, TRUE)
- return FALSE
- else
- large_dense += border_obstacle
-
- //Then, check the turf itself
- if(!src.CanPass(mover, src))
- mover.Bump(src, TRUE)
+ if(!thing.Cross(mover))
+ if(QDELETED(mover)) //deleted from Cross() (CanPass is pure so it cant delete, Cross shouldnt be doing this either though, but it can happen)
+ return FALSE
+ if(!first_bump || (thing.layer > first_bump.layer))
+ first_bump = thing
+ if(QDELETED(mover)) //Mover deleted from Cross/CanPass/Bump, do not proceed.
return FALSE
-
- // Finally, check objects/mobs that block entry and are not on the border
- var/atom/movable/tompost_bump
- var/top_layer = FALSE
- for(var/atom/movable/obstacle as anything in large_dense)
- if(obstacle.layer <= top_layer)
- continue
- if(!obstacle.CanPass(mover, mover.loc, 1))
- tompost_bump = obstacle
- top_layer = obstacle.layer
- if(tompost_bump)
- mover.Bump(tompost_bump, TRUE)
+ if(!can_pass_self) //Even if mover is unstoppable they need to bump us.
+ first_bump = src
+ if(first_bump)
+ mover.Bump(first_bump)
return FALSE
- return TRUE //Nothing found to block so return success!
+ return TRUE
/turf/Entered(atom/movable/M, atom/OL, ignoreRest = FALSE)
..()
@@ -292,7 +276,15 @@
var/old_baseturf = baseturf
changing_turf = TRUE
qdel(src) //Just get the side effects and call Destroy
+ var/list/old_comp_lookup = comp_lookup?.Copy()
+ var/list/old_signal_procs = signal_procs?.Copy()
+
var/turf/W = new path(src)
+ if(old_comp_lookup)
+ LAZYOR(W.comp_lookup, old_comp_lookup)
+ if(old_signal_procs)
+ LAZYOR(W.signal_procs, old_signal_procs)
+
if(copy_existing_baseturf)
W.baseturf = old_baseturf
@@ -662,5 +654,98 @@
/datum/milla_safe/turf_blind_set/on_run(turf/T, datum/gas_mixture/air)
get_turf_air(T).copy_from(air)
+/turf/simulated/proc/update_hotspot()
+ var/datum/gas_mixture/air = get_readonly_air()
+ if(air.fuel_burnt() < 0.001)
+ if(isnull(active_hotspot))
+ return FALSE
+
+ // If it's old, delete it.
+ if(active_hotspot.death_timer < SSair.times_fired)
+ QDEL_NULL(active_hotspot)
+ return FALSE
+ else
+ return TRUE
+
+ if(isnull(active_hotspot))
+ active_hotspot = new(src)
+
+ active_hotspot.death_timer = SSair.times_fired + 4
+ if(air.hotspot_volume() > 0)
+ active_hotspot.temperature = air.hotspot_temperature()
+ active_hotspot.volume = air.hotspot_volume() * CELL_VOLUME
+ else
+ active_hotspot.temperature = air.temperature()
+ active_hotspot.volume = CELL_VOLUME
+
+ active_hotspot.update_visuals()
+ return TRUE
+
+/turf/simulated/proc/update_wind()
+ if(wind_tick != SSair.times_fired)
+ QDEL_NULL(wind_effect)
+ wind_tick = null
+ return FALSE
+
+ if(isnull(wind_effect))
+ wind_effect = new(src)
+
+ wind_effect.dir = wind_direction(wind_x, wind_y)
+
+ var/datum/gas_mixture/air = get_readonly_air()
+ var/wind = sqrt(wind_x ** 2 + wind_y ** 2)
+ var/wind_strength = wind * air.total_moles() / MOLES_CELLSTANDARD
+ wind_effect.alpha = min(255, 5 + wind_strength * 25)
+ return TRUE
+
/turf/return_analyzable_air()
return get_readonly_air()
+
+/obj/effect/pressure_overlay
+ icon_state = "nothing"
+ mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+ // I'm really not sure this is the right var for this, but it's what the suply shuttle is using to determine if anything is blocking a tile, so let's not do that.
+ simulated = FALSE
+ // Please do not splat the visual effect with a shuttle.
+ flags_2 = IMMUNE_TO_SHUTTLECRUSH_2
+
+ var/image/overlay
+
+/obj/effect/pressure_overlay/Initialize(mapload)
+ . = ..()
+ overlay = new(icon, src, "white")
+ overlay.alpha = 0
+ overlay.plane = ABOVE_LIGHTING_PLANE
+ overlay.blend_mode = BLEND_OVERLAY
+ overlay.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
+
+/obj/effect/pressure_overlay/onShuttleMove(turf/oldT, turf/T1, rotation, mob/caller)
+ // No, I don't think I will.
+ return FALSE
+
+/obj/effect/pressure_overlay/singularity_pull()
+ // I am not a physical object, you have no control over me!
+ return FALSE
+
+/obj/effect/pressure_overlay/singularity_act()
+ // I don't taste good, either!
+ return FALSE
+
+/turf/proc/ensure_pressure_overlay()
+ if(isnull(pressure_overlay))
+ for(var/obj/effect/pressure_overlay/found_overlay in src)
+ pressure_overlay = found_overlay
+ if(isnull(pressure_overlay))
+ pressure_overlay = new(src)
+
+ if(isnull(pressure_overlay.loc))
+ // Not sure how exactly this happens, but I've seen it happen, so fix it.
+ pressure_overlay.forceMove(src)
+
+ if(isnull(pressure_overlay.overlay))
+ pressure_overlay.Initialize()
+
+ return pressure_overlay
+
+/turf/_clear_signal_refs()
+ return
diff --git a/code/game/world.dm b/code/game/world.dm
index e934067c0844..da8dac0955df 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -1,6 +1,6 @@
GLOBAL_LIST_INIT(map_transition_config, list(CC_TRANSITION_CONFIG))
-#ifdef UNIT_TESTS
+#ifdef GAME_TESTS
GLOBAL_DATUM(test_runner, /datum/test_runner)
#endif
@@ -51,7 +51,7 @@ GLOBAL_DATUM(test_runner, /datum/test_runner)
if(TgsAvailable())
world.log = file("[GLOB.log_directory]/dd.log") //not all runtimes trigger world/Error, so this is the only way to ensure we can see all of them.
- #ifdef UNIT_TESTS
+ #ifdef GAME_TESTS
log_world("Unit Tests Are Enabled!")
#endif
@@ -69,7 +69,7 @@ GLOBAL_DATUM(test_runner, /datum/test_runner)
Master.Initialize(10, FALSE, TRUE)
- #ifdef UNIT_TESTS
+ #ifdef GAME_TESTS
GLOB.test_runner = new
GLOB.test_runner.Start()
#endif
@@ -144,7 +144,7 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
Master.Shutdown() // Shutdown subsystems
// If we were running unit tests, finish that run
- #ifdef UNIT_TESTS
+ #ifdef GAME_TESTS
GLOB.test_runner.Finalize()
return
#endif
diff --git a/code/modules/admin/misc_admin_procs.dm b/code/modules/admin/misc_admin_procs.dm
index afec64f26193..b3b3f1ac9f40 100644
--- a/code/modules/admin/misc_admin_procs.dm
+++ b/code/modules/admin/misc_admin_procs.dm
@@ -744,7 +744,7 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE)
if(length(matches)==1)
chosen = matches[1]
else
- chosen = input("Select an atom type", "Spawn Atom", matches[1]) as null|anything in matches
+ chosen = tgui_input_list(usr, "Select an Atom Type", "Spawn Atom", matches)
if(!chosen)
return
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 79b00cf173c1..9c8f042264c2 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -2076,7 +2076,7 @@
if(!istype(M))
to_chat(usr, "This can only be used on instances of type /mob/living ")
return
- var/ptypes = list("Lightning bolt", "Fire Death", "Gib", "Dust")
+ var/ptypes = list("Lightning bolt", "Fire Death", "Gib", "Dust", "Plushify")
if(ishuman(M))
H = M
ptypes += "Brain Damage"
@@ -2121,6 +2121,9 @@
if("Dust")
M.dust()
logmsg = "dust"
+ if("Plushify")
+ M.plushify(curse_time = -1)
+ logmsg = "plushified"
// These smiting types are only valid for ishuman() mobs
if("Brain Damage")
@@ -2220,12 +2223,13 @@
addtimer(CALLBACK(H, TYPE_PROC_REF(/mob/living/carbon/human, make_nugget)), 6 SECONDS)
logmsg = "nugget"
if("Bread")
- var/mob/living/simple_animal/shade/sword/bread/breadshade = new(H.loc)
+ var/mob/living/simple_animal/shade/sword/generic_item/breadshade = new(H.loc)
var/bready = pick(/obj/item/food/customizable/cook/bread, /obj/item/food/sliceable/meatbread, /obj/item/food/sliceable/xenomeatbread, /obj/item/food/sliceable/spidermeatbread, /obj/item/food/sliceable/bananabread, /obj/item/food/sliceable/tofubread, /obj/item/food/sliceable/bread, /obj/item/food/sliceable/creamcheesebread, /obj/item/food/sliceable/banarnarbread, /obj/item/food/flatbread, /obj/item/food/baguette)
var/obj/item/bread = new bready(get_turf(H))
breadshade.forceMove(bread)
breadshade.key = H.key
- breadshade.RegisterSignal(bread, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/mob/living/simple_animal/shade/sword/bread, handle_bread_deletion))
+ breadshade.name = "Bread spirit"
+ breadshade.RegisterSignal(bread, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/mob/living/simple_animal/shade/sword/generic_item, handle_item_deletion))
qdel(H)
logmsg = "baked"
to_chat(breadshade, "Get bready for combat, you've been baked into a piece of bread! Before you break down and rye thinking that your life is over, people are after you waiting for a snack! If you'd rather not be toast, lunge away from any hungry crew else you bite the crust. At the yeast you may survive a little longer... ")
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 042deefc35d0..dd917e6744ec 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -67,7 +67,8 @@
to_chat(M, "You hear a voice in your head... [msg] ")
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
- message_admins("SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg] ", 1)
+ message_admins("Subtle Message: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg] ", 1)
+ M.create_log(MISC_LOG, "Subtle Message: [msg]", "From: [key_name_admin(usr)]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_mentor_check_new_players() //Allows mentors / admins to determine who the newer players are.
@@ -145,7 +146,8 @@
to_chat(M, msg)
log_admin("DirectNarrate: [key_name(usr)] to ([key_name(M)]): [msg]")
- message_admins("DirectNarrate: [key_name_admin(usr)] to ([key_name_admin(M)]): [msg] ", 1)
+ message_admins("Direct Narrate: [key_name_admin(usr)] to ([key_name_admin(M)]): [msg] ", 1)
+ M.create_log(MISC_LOG, "Direct Narrate: [msg]", "From: [key_name_admin(usr)]")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -182,6 +184,7 @@
log_admin("[key_name(src)] replied to [key_name(H)]'s [sender] message with the message [input].")
message_admins("[key_name_admin(src)] replied to [key_name_admin(H)]'s [sender] message with: \"[input]\"")
+ H.create_log(MISC_LOG, "Headset Message: [input]", "From: [key_name_admin(src)]")
to_chat(H, "Incoming priority transmission from [sender == "Syndicate" ? "your benefactor" : "Central Command"]. Message as follows[sender == "Syndicate" ? ", agent." : ":"] [input] ")
SEND_SOUND(H, 'sound/effects/headset_message.ogg')
@@ -1167,7 +1170,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!D)
return
- var/add_or_remove = input("Remove/Add?", "Trait Remove/Add") as null|anything in list("Add","Remove")
+ var/add_or_remove = tgui_input_list(usr, "Add or Remove Trait?", "Modify Trait", list("Add","Remove"))
if(!add_or_remove)
return
var/list/availible_traits = list()
@@ -1175,7 +1178,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(add_or_remove)
if("Add")
for(var/key in GLOB.traits_by_type)
- if(istype(D,key))
+ if(istype(D, key))
availible_traits += GLOB.traits_by_type[key]
if("Remove")
if(!GLOB.trait_name_map)
@@ -1184,7 +1187,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/name = GLOB.trait_name_map[trait] || trait
availible_traits[name] = trait
- var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in availible_traits
+ var/chosen_trait = tgui_input_list(usr, "Select trait to modify.", "Traits", availible_traits)
if(!chosen_trait)
return
chosen_trait = availible_traits[chosen_trait]
@@ -1194,14 +1197,14 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("Add") //Not doing source choosing here intentionally to make this bit faster to use, you can always vv it.
ADD_TRAIT(D, chosen_trait, source)
if("Remove")
- var/specific = input("All or specific source ?", "Trait Remove/Add") as null|anything in list("All","Specific")
+ var/specific = tgui_input_list(usr, "All or from a specific source?", "Add or Remove Trait", list("All","Specific"))
if(!specific)
return
switch(specific)
if("All")
source = null
if("Specific")
- source = input("Source to be removed","Trait Remove/Add") as null|anything in D.status_traits[chosen_trait]
+ source = tgui_input_list(usr, "Source to be removed?", "Add or Remove Trait", D.status_traits[chosen_trait])
if(!source)
return
REMOVE_TRAIT(D, chosen_trait, source)
diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm
index f32b8f55c350..b1ae6bc7f43a 100644
--- a/code/modules/antagonists/_common/antag_datum.dm
+++ b/code/modules/antagonists/_common/antag_datum.dm
@@ -372,8 +372,6 @@ GLOBAL_LIST_EMPTY(antagonists)
. = messages
if(owner && owner.current)
messages.Add("You are a [special_role]! ")
- if(organization && organization.intro_desc)
- messages.Add("[organization.intro_desc] ")
/**
* Displays a message to the antag mob while the datum is being deleted, i.e. "Your powers are gone and you're no longer a vampire!"
@@ -404,11 +402,11 @@ GLOBAL_LIST_EMPTY(antagonists)
/**
* Create and assign a full set of randomized, basic human traitor objectives.
- * can_hijack - If you want the 10% chance for the antagonist to be able to roll hijack, only true for traitors
+ * can_hijack - If you want the 5% chance for the antagonist to be able to roll hijack, only true for traitors
*/
/datum/antagonist/proc/forge_basic_objectives(can_hijack = FALSE)
// Hijack objective.
- if(can_hijack && prob(10) && !(locate(/datum/objective/hijack) in owner.get_all_objectives()))
+ if(can_hijack && prob(5) && !(locate(/datum/objective/hijack) in owner.get_all_objectives()))
add_antag_objective(/datum/objective/hijack)
return // Hijack should be their only objective (normally), so return.
diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm
index 62d63bb3dec9..2262004cd0c9 100644
--- a/code/modules/antagonists/changeling/powers/mutations.dm
+++ b/code/modules/antagonists/changeling/powers/mutations.dm
@@ -380,10 +380,10 @@
cuffed_state = "fleshlegcuff"
flags = DROPDEL
-/obj/item/restraints/legcuffs/beartrap/changeling/Crossed(AM, oldloc)
- if(!iscarbon(AM) || !armed)
+/obj/item/restraints/legcuffs/beartrap/changeling/on_atom_entered(datum/source, atom/movable/entered)
+ if(!iscarbon(entered) || !armed)
return
- var/mob/living/carbon/C = AM
+ var/mob/living/carbon/C = entered
C.apply_status_effect(STATUS_EFFECT_CLINGTENTACLE)
..()
diff --git a/code/modules/antagonists/cult/team_cult.dm b/code/modules/antagonists/cult/team_cult.dm
index 7301d9abb9a6..39fb80f62b60 100644
--- a/code/modules/antagonists/cult/team_cult.dm
+++ b/code/modules/antagonists/cult/team_cult.dm
@@ -34,10 +34,6 @@ RESTRICT_TYPE(/datum/team/cult)
/// Timer until we do a recount of cultist members
var/recount_timer
-/datum/team/cult/New(list/starting_members)
- . = ..()
- recount_timer = addtimer(CALLBACK(src, PROC_REF(cult_threshold_check)), 5 MINUTES, TIMER_STOPPABLE|TIMER_DELETE_ME|TIMER_LOOP)
-
/datum/team/cult/Destroy(force, ...)
deltimer(recount_timer)
return ..()
@@ -51,6 +47,7 @@ RESTRICT_TYPE(/datum/team/cult)
cult_status = NARSIE_DEMANDS_SACRIFICE
create_next_sacrifice()
+ recount_timer = addtimer(CALLBACK(src, PROC_REF(cult_threshold_check)), 5 MINUTES, TIMER_STOPPABLE|TIMER_DELETE_ME|TIMER_LOOP)
for(var/datum/mind/M as anything in starting_members)
var/datum/antagonist/cultist/cultist = M.has_antag_datum(/datum/antagonist/cultist)
diff --git a/code/modules/antagonists/event/datum_eventmisc.dm b/code/modules/antagonists/event/datum_eventmisc.dm
new file mode 100644
index 000000000000..c86ed49603a4
--- /dev/null
+++ b/code/modules/antagonists/event/datum_eventmisc.dm
@@ -0,0 +1,15 @@
+RESTRICT_TYPE(/datum/antagonist/eventmisc)
+
+/datum/antagonist/eventmisc
+ name = "Event"
+ job_rank = ROLE_EVENTMISC
+ special_role = SPECIAL_ROLE_EVENTMISC
+ give_objectives = FALSE
+ antag_hud_name = "hudevent"
+ antag_hud_type = ANTAG_HUD_EVENTMISC
+
+/datum/antagonist/eventmisc/add_owner_to_gamemode()
+ SSticker.mode.eventmiscs |= owner
+
+/datum/antagonist/eventmisc/remove_owner_from_gamemode()
+ SSticker.mode.eventmiscs -= owner
diff --git a/code/modules/antagonists/mind_flayer/flayer_power.dm b/code/modules/antagonists/mind_flayer/flayer_power.dm
index b48c9c25ca92..481c3d0a78ac 100644
--- a/code/modules/antagonists/mind_flayer/flayer_power.dm
+++ b/code/modules/antagonists/mind_flayer/flayer_power.dm
@@ -3,6 +3,7 @@
desc = "This spell needs a description!"
human_req = TRUE
clothes_req = FALSE
+ antimagic_flags = NONE
/// A reference to the owner mindflayer's antag datum.
var/datum/antagonist/mindflayer/flayer
diff --git a/code/modules/antagonists/traitor/contractor/datums/objective_contract.dm b/code/modules/antagonists/traitor/contractor/datums/objective_contract.dm
index 449c116b3960..834442748a0f 100644
--- a/code/modules/antagonists/traitor/contractor/datums/objective_contract.dm
+++ b/code/modules/antagonists/traitor/contractor/datums/objective_contract.dm
@@ -8,6 +8,7 @@
/// Jobs that cannot be the kidnapping target.
var/static/list/forbidden_jobs = list(
"Captain",
+ "Nanotrasen Career Trainer"
)
/// Static whitelist of area names that can be used as an extraction zone, structured by difficulty.
/// An area's difficulty should be measured in how crowded it generally is, how out of the way it is and so on.
diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm
index 75ec9a627e90..3cf88d939d26 100644
--- a/code/modules/antagonists/traitor/datum_traitor.dm
+++ b/code/modules/antagonists/traitor/datum_traitor.dm
@@ -272,8 +272,7 @@ RESTRICT_TYPE(/datum/antagonist/traitor)
return message
/datum/antagonist/traitor/custom_blurb()
- return "[GLOB.current_date_string], [station_time_timestamp()]\n[station_name()], [get_area_name(owner.current, TRUE)]\nBEGIN_MISSION"
-
+ return "[GLOB.current_date_string], [station_time_timestamp()]\n[station_name()], [get_area_name(owner.current, TRUE)], \n[organization.intro_desc] BEGIN MISSION"
/datum/antagonist/traitor/proc/reveal_delayed_objectives()
for(var/datum/objective/delayed/delayed_obj in get_antag_objectives(FALSE))
diff --git a/code/modules/antagonists/vampire/vamp_datum.dm b/code/modules/antagonists/vampire/vamp_datum.dm
index 3fe4dcc76609..b6e97c0c6717 100644
--- a/code/modules/antagonists/vampire/vamp_datum.dm
+++ b/code/modules/antagonists/vampire/vamp_datum.dm
@@ -93,6 +93,7 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
mob_override.dna?.species.hunger_icon = initial(mob_override.dna.species.hunger_icon)
owner.current.alpha = 255
REMOVE_TRAITS_IN(owner.current, "vampire")
+ UnregisterSignal(owner, COMSIG_ATOM_HOLY_ATTACK)
#define BLOOD_GAINED_MODIFIER 0.5
@@ -362,8 +363,21 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
mob_override.dna?.species.hunger_icon = 'icons/mob/screen_hunger_vampire.dmi'
check_vampire_upgrade(FALSE)
+ RegisterSignal(mob_override, COMSIG_ATOM_HOLY_ATTACK, PROC_REF(holy_attack_reaction))
-
+/datum/antagonist/vampire/proc/holy_attack_reaction(mob/target, obj/item/source, mob/user, antimagic_flags)
+ SIGNAL_HANDLER // COMSIG_ATOM_HOLY_ATTACK
+ if(!HAS_MIND_TRAIT(user, TRAIT_HOLY)) // Sec officer with a nullrod, or miner with a talisman, does not get to do this
+ return
+ if(!source.force) // Needs force to work.
+ return
+ var/bonus_force = 0
+ if(istype(source, /obj/item/nullrod))
+ var/obj/item/nullrod/N = source
+ bonus_force = N.sanctify_force
+ if(!get_ability(/datum/vampire_passive/full))
+ to_chat(owner.current, "[source]'s power interferes with your own! ")
+ adjust_nullification(30 + bonus_force, 15 + bonus_force)
/datum/antagonist/vampire/custom_blurb()
return "On the date [GLOB.current_date_string], at [station_time_timestamp()],\n in the [station_name()], [get_area_name(owner.current, TRUE)]...\nThe hunt begins again..."
diff --git a/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm b/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm
index d749bfccee37..c38b8523e3d7 100644
--- a/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/dantalion_powers.dm
@@ -161,6 +161,10 @@
/datum/spell/vampire/switch_places/cast(list/targets, mob/user)
var/mob/living/target = targets[1]
+ if(target.can_block_magic(antimagic_flags))
+ to_chat(user, "The spell had no effect! ")
+ to_chat(target, "You feel space bending, but it rapidly dissipates. ")
+ return FALSE
var/turf/user_turf = get_turf(user)
var/turf/target_turf = get_turf(target)
if(!(SEND_SIGNAL(target, COMSIG_MOVABLE_TELEPORTING, user_turf) & COMPONENT_BLOCK_TELEPORT))
diff --git a/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm b/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm
index 11b7960235b9..5207ccf7d97c 100644
--- a/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/gargantua_powers.dm
@@ -132,7 +132,6 @@
action_icon_state = "demonic_grasp"
- school = "vampire"
action_background_icon_state = "bg_vampire"
sound = null
invocation_type = "none"
@@ -158,6 +157,8 @@
/obj/item/projectile/magic/demonic_grasp/on_hit(atom/target, blocked, hit_zone)
. = ..()
+ if(!.)
+ return
if(!isliving(target))
return
var/mob/living/L = target
diff --git a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm
index d4a54300dbb6..1f08f7b4289f 100644
--- a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm
@@ -250,7 +250,7 @@
return ..()
-/obj/structure/blood_barrier/CanPass(atom/movable/mover, turf/target)
+/obj/structure/blood_barrier/CanPass(atom/movable/mover, border_dir)
if(!isliving(mover))
return FALSE
var/mob/living/L = mover
@@ -270,7 +270,6 @@
gain_desc = "You have gained the ability to shift into a pool of blood, allowing you to evade pursuers with great mobility."
jaunt_duration = 3 SECONDS
clothes_req = FALSE
- school = "vampire"
action_background_icon_state = "bg_vampire"
action_icon_state = "blood_pool"
jaunt_type_path = /obj/effect/dummy/spell_jaunt/blood_pool
diff --git a/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm b/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm
index 7750d4f69b9f..d79f0ba61a65 100644
--- a/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/umbrae_powers.dm
@@ -62,16 +62,18 @@
breakouttime = 5 SECONDS
flags = DROPDEL
-/obj/item/restraints/legcuffs/beartrap/shadow_snare/Crossed(AM, oldloc)
- if(!iscarbon(AM) || !armed)
+/obj/item/restraints/legcuffs/beartrap/shadow_snare/on_atom_entered(datum/source, atom/movable/entered)
+ if(!iscarbon(entered) || !armed)
return
- var/mob/living/carbon/C = AM
+ var/mob/living/carbon/C = entered
if(!C.affects_vampire()) // no parameter here so holy always protects
return
C.extinguish_light()
C.EyeBlind(20 SECONDS)
STOP_PROCESSING(SSobj, src) // won't wither away once you are trapped
- ..()
+
+ . = ..()
+
if(!iscarbon(loc)) // if it fails to latch onto someone for whatever reason, delete itself, we don't want unarmed ones lying around.
qdel(src)
diff --git a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
index 7bada89589d7..21e6b97f5fae 100644
--- a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
+++ b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm
@@ -3,6 +3,9 @@
//Other vampires and thralls aren't affected
if(mind?.has_antag_datum(/datum/antagonist/vampire) || mind?.has_antag_datum(/datum/antagonist/mindslave/thrall))
return FALSE
+ /// Chaplains with their nullrod can block a full power vampire, but a chaplain by themselfs or a crew with a null rod can not.
+ if(can_block_magic(MAGIC_RESISTANCE_HOLY) && HAS_MIND_TRAIT(src, TRAIT_HOLY))
+ return FALSE
//Vampires who have reached their full potential can affect nearly everything
var/datum/antagonist/vampire/V = user?.mind.has_antag_datum(/datum/antagonist/vampire)
if(V?.get_ability(/datum/vampire_passive/full))
@@ -10,13 +13,15 @@
//Holy characters are resistant to vampire powers
if(HAS_MIND_TRAIT(src, TRAIT_HOLY))
return FALSE
+ if(can_block_magic(MAGIC_RESISTANCE_HOLY))
+ return FALSE
return TRUE
/datum/spell/vampire
- school = "vampire"
action_background_icon_state = "bg_vampire"
human_req = TRUE
clothes_req = FALSE
+ antimagic_flags = MAGIC_RESISTANCE_HOLY
/// How much blood this ability costs to use
var/required_blood
var/deduct_blood_on_cast = TRUE
@@ -53,6 +58,7 @@
action_icon_state = "vampire_rejuvinate"
base_cooldown = 20 SECONDS
stat_allowed = UNCONSCIOUS
+ antimagic_flags = NONE // So. If you have a null rod on your person, you can't cast vampire spells. I would rather not have officers abuse this by putting a nullrod in their pocket or something to block rejuvinate.
/datum/spell/vampire/self/rejuvenate/cast(list/targets, mob/user = usr)
var/mob/living/U = user
@@ -287,7 +293,6 @@
/datum/spell/vampire/raise_vampires
name = "Raise Vampires"
desc = "Summons deadly vampires from bluespace."
- school = "transmutation"
base_cooldown = 100
clothes_req = FALSE
human_req = TRUE
diff --git a/code/modules/antagonists/zombie/zombie_spells.dm b/code/modules/antagonists/zombie/zombie_spells.dm
index 3739a953438c..39d02fa99823 100644
--- a/code/modules/antagonists/zombie/zombie_spells.dm
+++ b/code/modules/antagonists/zombie/zombie_spells.dm
@@ -5,6 +5,7 @@
action_background_icon_state = "bg_vampire"
human_req = TRUE
clothes_req = FALSE
+ antimagic_flags = NONE
base_cooldown = 0 SECONDS
var/list/our_claws = list()
var/infection_stage = 1 // mostly for adminbus and testing
diff --git a/code/modules/arcade/arcade_prize.dm b/code/modules/arcade/arcade_prize.dm
index 992f8be59870..10912d16b370 100644
--- a/code/modules/arcade/arcade_prize.dm
+++ b/code/modules/arcade/arcade_prize.dm
@@ -8,14 +8,20 @@
icon = 'icons/obj/arcade.dmi'
icon_state = "prizeball_1"
var/opening = 0
- var/possible_contents = list(/obj/random/carp_plushie, /obj/random/plushie, /obj/random/figure, /obj/item/toy/eight_ball, /obj/item/stack/tickets)
+ var/possible_contents = list(
+ /obj/effect/spawner/random/toy/carp_plushie,
+ /obj/effect/spawner/random/plushies,
+ /obj/effect/spawner/random/toy/action_figure,
+ /obj/item/toy/eight_ball,
+ /obj/item/stack/tickets,
+ )
/obj/item/toy/prizeball/Initialize(mapload)
. = ..()
icon_state = pick("prizeball_1","prizeball_2","prizeball_3")
-/obj/item/toy/prizeball/attack_self__legacy__attackchain(mob/user as mob)
- if(opening)
+/obj/item/toy/prizeball/activate_self(mob/user)
+ if(..() || opening)
return
opening = 1
playsound(loc, 'sound/items/bubblewrap.ogg', 30, TRUE)
@@ -34,27 +40,37 @@
/obj/item/toy/prizeball/mech
name = "mecha figure capsule"
desc = "Contains one collectible mecha figure!"
- possible_contents = list(/obj/random/mech)
+ possible_contents = list(
+ /obj/effect/spawner/random/toy/mech_figure,
+ )
/obj/item/toy/prizeball/carp_plushie
name = "carp plushie capsule"
desc = "Contains one space carp plushie!"
- possible_contents = list(/obj/random/carp_plushie)
+ possible_contents = list(
+ /obj/effect/spawner/random/toy/carp_plushie,
+ )
/obj/item/toy/prizeball/plushie
name = "plushie capsule"
desc = "Contains one cuddly plushie!"
- possible_contents = list(/obj/random/plushie)
+ possible_contents = list(
+ /obj/effect/spawner/random/plushies,
+ )
-/obj/item/toy/prizeball/figure
+/obj/item/toy/prizeball/action_figure
name = "action figure capsule"
desc = "Contains one action figure!"
- possible_contents = list(/obj/random/figure)
+ possible_contents = list(
+ /obj/effect/spawner/random/toy/action_figure,
+ )
/obj/item/toy/prizeball/therapy
name = "therapy doll capsule"
desc = "Contains one squishy therapy doll."
- possible_contents = list(/obj/random/therapy)
+ possible_contents = list(
+ /obj/effect/spawner/random/toy/therapy_doll,
+ )
/obj/item/stack/tickets
name = "prize ticket"
@@ -69,10 +85,6 @@
w_class = WEIGHT_CLASS_TINY
max_amount = 9999 //Dang that's a lot of tickets
-/obj/item/stack/tickets/New(loc, amount=null)
- ..()
- update_icon(UPDATE_ICON_STATE)
-
/obj/item/stack/tickets/attack_self__legacy__attackchain(mob/user as mob)
return
diff --git a/code/modules/arcade/prize_datums.dm b/code/modules/arcade/prize_datums.dm
index 72cddba9eca2..289c203526d0 100644
--- a/code/modules/arcade/prize_datums.dm
+++ b/code/modules/arcade/prize_datums.dm
@@ -236,7 +236,7 @@ GLOBAL_DATUM_INIT(global_prizes, /datum/prizes, new())
/datum/prize_item/action_figure
name = "Random Action Figure"
desc = "A random action figure, collect them all!"
- typepath = /obj/item/toy/prizeball/figure
+ typepath = /obj/item/toy/prizeball/action_figure
cost = 75
/datum/prize_item/ai
diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm
index ee47d325f737..f3611bd5579a 100644
--- a/code/modules/assembly/assembly.dm
+++ b/code/modules/assembly/assembly.dm
@@ -24,6 +24,12 @@
var/wires = ASSEMBLY_WIRE_RECEIVE | ASSEMBLY_WIRE_PULSE
var/datum/wires/connected = null // currently only used by timer/signaler
+/obj/item/assembly/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/// Called when the holder is moved
/obj/item/assembly/proc/holder_movement()
@@ -33,6 +39,9 @@
/obj/item/assembly/interact(mob/user)
return
+/obj/item/assembly/proc/on_atom_entered(datum/source, atom/movable/entered)
+ return
+
/// Called to constantly step down the countdown/cooldown
/obj/item/assembly/proc/process_cooldown()
cooldown--
@@ -90,6 +99,29 @@
update_icon()
return secured
+/**
+ * on_attach: Called when attached to a holder, wiring datum, or other special assembly
+ *
+ * Will also be called if the assembly holder is attached to a plasma (internals) tank or welding fuel (dispenser) tank.
+ */
+/obj/item/assembly/proc/on_attach()
+ SHOULD_CALL_PARENT(TRUE)
+
+ if(!holder && connected)
+ holder = connected.holder
+
+/**
+ * on_detach: Called when removed from an assembly holder or wiring datum
+ */
+/obj/item/assembly/proc/on_detach()
+ if(connected)
+ connected = null
+ if(!holder)
+ return FALSE
+ forceMove(holder.drop_location())
+ holder = null
+ return TRUE
+
/// Called when an assembly is attacked by another
/obj/item/assembly/proc/attach_assembly(obj/item/assembly/A, mob/user)
holder = new /obj/item/assembly_holder(get_turf(src))
diff --git a/code/modules/assembly/assembly_holder.dm b/code/modules/assembly/assembly_holder.dm
index 151ce67aa7e9..3eb13ae461d5 100644
--- a/code/modules/assembly/assembly_holder.dm
+++ b/code/modules/assembly/assembly_holder.dm
@@ -46,13 +46,10 @@
a_right = A2
name = "[A1.name]-[A2.name] assembly"
update_icon(UPDATE_OVERLAYS)
+ A1.on_attach()
+ A2.on_attach()
return TRUE
-/obj/item/assembly_holder/proc/has_prox_sensors()
- if(istype(a_left, /obj/item/assembly/prox_sensor) || istype(a_right, /obj/item/assembly/prox_sensor))
- return TRUE
- return FALSE
-
/obj/item/assembly_holder/update_overlays()
. = ..()
if(a_left)
@@ -83,11 +80,12 @@
a_right.HasProximity(AM)
-/obj/item/assembly_holder/Crossed(atom/movable/AM, oldloc)
+// TODO: All these assemblies passing the crossed args around needs to be cleaned up with signals
+/obj/item/assembly_holder/proc/on_atom_entered(datum/source, atom/movable/entered)
if(a_left)
- a_left.Crossed(AM, oldloc)
+ a_left.on_atom_entered(source, entered)
if(a_right)
- a_right.Crossed(AM, oldloc)
+ a_right.on_atom_entered(source, entered)
/obj/item/assembly_holder/on_found(mob/finder)
if(a_left)
diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm
index 38c60e7167f3..7ef7a8f40c9b 100644
--- a/code/modules/assembly/bomb.dm
+++ b/code/modules/assembly/bomb.dm
@@ -12,6 +12,13 @@
var/obj/item/tank/bombtank = null //the second part of the bomb is a plasma tank
origin_tech = "materials=1;engineering=1"
+/obj/item/onetankbomb/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/item/onetankbomb/examine(mob/user)
. = ..()
. += bombtank.examine(user)
@@ -74,9 +81,9 @@
if(bombassembly)
bombassembly.HasProximity(AM)
-/obj/item/onetankbomb/Crossed(atom/movable/AM, oldloc) //for mousetraps
+/obj/item/onetankbomb/proc/on_atom_entered(datum/source, atom/movable/entered) //for mousetraps
if(bombassembly)
- bombassembly.Crossed(AM, oldloc)
+ bombassembly.on_atom_entered(source, entered)
/obj/item/onetankbomb/on_found(mob/finder) //for mousetraps
if(bombassembly)
diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm
index f3433f5b208f..66aa95bde49b 100644
--- a/code/modules/assembly/igniter.dm
+++ b/code/modules/assembly/igniter.dm
@@ -27,7 +27,7 @@
var/turf/location = get_turf(loc)
if(location)
- location.hotspot_expose(1000, 1000)
+ location.hotspot_expose(1000, 1)
visible_message(
"Sparks shoot out of [src]. ",
"You hear a shower of sparks shooting out from something! "
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index ee9df746b436..687e79881db1 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -214,6 +214,12 @@
anchored = TRUE
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSFENCE
+/obj/effect/beam/i_beam/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/effect/beam/i_beam/proc/hit()
if(master)
@@ -268,10 +274,10 @@
/obj/effect/beam/i_beam/Bumped()
hit()
-/obj/effect/beam/i_beam/Crossed(atom/movable/AM, oldloc)
- if(!isobj(AM) && !isliving(AM))
+/obj/effect/beam/i_beam/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(!isobj(entered) && !isliving(entered))
return
- if(iseffect(AM))
+ if(iseffect(entered))
return
hit()
diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm
index 734e9a7f4248..a1d997d7879e 100644
--- a/code/modules/assembly/mousetrap.dm
+++ b/code/modules/assembly/mousetrap.dm
@@ -108,19 +108,19 @@
return
..()
-/obj/item/assembly/mousetrap/Crossed(atom/movable/AM, oldloc)
+/obj/item/assembly/mousetrap/on_atom_entered(datum/source, atom/movable/entered)
if(armed)
- if(ishuman(AM))
- var/mob/living/carbon/H = AM
+ if(ishuman(entered))
+ var/mob/living/carbon/H = entered
if(H.m_intent == MOVE_INTENT_RUN)
triggered(H)
H.visible_message("[H] accidentally steps on [src]. ", "You accidentally step on [src] ")
- else if(ismouse(AM))
- triggered(AM)
+ else if(ismouse(entered))
+ triggered(entered)
- else if(AM.density) // For mousetrap grenades, set off by anything heavy
- triggered(AM)
+ else if(entered.density) // For mousetrap grenades, set off by anything heavy
+ triggered(entered)
..()
diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm
index a3163d7141b5..e4dac71db9bd 100644
--- a/code/modules/assembly/proximity.dm
+++ b/code/modules/assembly/proximity.dm
@@ -11,11 +11,19 @@
var/scanning = FALSE
var/timing = FALSE
- var/time = 10
+ COOLDOWN_DECLARE(timing_cd)
+ var/timing_cd_duration = 10 SECONDS
+ /// Proximity monitor associated with this atom, needed for it to work.
+ var/datum/proximity_monitor/proximity_monitor
/obj/item/assembly/prox_sensor/Initialize(mapload)
. = ..()
- AddComponent(/datum/component/proximity_monitor, _always_active = TRUE)
+ proximity_monitor = new(src, 0, FALSE)
+ COOLDOWN_RESET(src, timing_cd)
+
+/obj/item/assembly/prox_sensor/Destroy()
+ . = ..()
+ QDEL_NULL(proximity_monitor)
/obj/item/assembly/prox_sensor/examine(mob/user)
. = ..()
@@ -34,11 +42,11 @@
/obj/item/assembly/prox_sensor/toggle_secure()
secured = !secured
if(secured)
- START_PROCESSING(SSobj, src)
+ START_PROCESSING(SSfastprocess, src)
else
scanning = FALSE
timing = FALSE
- STOP_PROCESSING(SSobj, src)
+ STOP_PROCESSING(SSfastprocess, src)
update_icon()
return secured
@@ -60,25 +68,55 @@
addtimer(CALLBACK(src, PROC_REF(process_cooldown)), 10)
/obj/item/assembly/prox_sensor/process()
- if(timing && (time >= 0))
- time--
- if(timing && time <= 0)
+ if(timing && COOLDOWN_FINISHED(src, timing_cd))
+ COOLDOWN_RESET(src, timing_cd)
timing = FALSE
toggle_scan()
- time = 10
/obj/item/assembly/prox_sensor/dropped()
- ..()
- spawn(0)
- sense()
+ . = ..()
+ // Pick the first valid object in this list:
+ // Wiring datum's owner
+ // assembly holder's attached object
+ // assembly holder itself
+ // us
+ proximity_monitor?.set_host(connected?.holder || holder?.master || holder || src, src)
+
+/obj/item/assembly/prox_sensor/on_attach()
+ . = ..()
+ // Pick the first valid object in this list:
+ // Wiring datum's owner
+ // assembly holder's attached object
+ // assembly holder itself
+ // us
+ proximity_monitor.set_host(connected?.holder || holder?.master || holder || src, src)
+
+/obj/item/assembly/prox_sensor/on_detach()
+ . = ..()
+ if(!.)
return
+ else
+ // Pick the first valid object in this list:
+ // Wiring datum's owner
+ // assembly holder's attached object
+ // assembly holder itself
+ // us
+ proximity_monitor.set_host(connected?.holder || holder?.master || holder || src, src)
/obj/item/assembly/prox_sensor/proc/toggle_scan()
if(!secured)
return FALSE
scanning = !scanning
+ proximity_monitor.set_range(scanning ? 1 : 0)
update_icon()
+/obj/item/assembly/prox_sensor/proc/set_timing(timing_)
+ if(timing == timing_)
+ return
+ timing = timing_
+ if(timing)
+ COOLDOWN_START(src, timing_cd, timing_cd_duration)
+
/obj/item/assembly/prox_sensor/update_overlays()
. = ..()
attached_overlays = list()
@@ -102,12 +140,20 @@
if(!secured)
user.show_message("[src] is unsecured! ")
return FALSE
- var/second = time % 60
- var/minute = (time - second) / 60
- var/dat = "Proximity Sensor \n[timing ? "Arming " : "Not Arming "] [minute]:[second]\n- - + + \n "
- dat += "[scanning?"Armed":"Unarmed"] (Movement sensor active when armed!)"
- dat += "Refresh "
- dat += "Close "
+ var/timing_ui = ""
+ var/time_display = ""
+ if(timing)
+ var/time_left = COOLDOWN_TIMELEFT(src, timing_cd)
+ time_display = deciseconds_to_time_stamp(time_left)
+ timing_ui = "Arming "
+ else
+ var/time_left = timing_cd_duration
+ time_display = deciseconds_to_time_stamp(time_left)
+ timing_ui = "Not Arming "
+ var/dat = "Proximity Sensor \n[timing_ui] [time_display]\n- - + + \n "
+ dat += "[scanning?"Armed":"Unarmed"] (Movement sensor active when armed!)"
+ dat += "Refresh "
+ dat += "Close "
var/datum/browser/popup = new(user, "prox", name, 400, 400)
popup.set_content(dat)
popup.open(0)
@@ -124,13 +170,13 @@
toggle_scan()
if(href_list["time"])
- timing = text2num(href_list["time"])
+ set_timing(text2num(href_list["time"]))
update_icon()
if(href_list["tp"])
var/tp = text2num(href_list["tp"])
- time += tp
- time = min(max(round(time), 0), 600)
+ timing_cd_duration += tp
+ timing_cd_duration = min(max(round(timing_cd_duration), 0), 1 MINUTES)
if(href_list["close"])
usr << browse(null, "window=prox")
diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm
index 8369f439e8ce..234aa4a500d7 100644
--- a/code/modules/atmospherics/environmental/LINDA_fire.dm
+++ b/code/modules/atmospherics/environmental/LINDA_fire.dm
@@ -2,41 +2,24 @@
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(reagents)
reagents.temperature_reagents(exposed_temperature)
- return null
-/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
- return FALSE
-
-/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
+/turf/simulated/temperature_expose(exposed_temperature)
if(reagents)
reagents.temperature_reagents(exposed_temperature, 10, 300)
- if(!issimulatedturf(src))
- return FALSE
- var/datum/gas_mixture/air = get_readonly_air()
- if(!air)
- return FALSE
- if(active_hotspot)
- if(soh)
- if(air.toxins() > 0.5 && air.oxygen() > 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 TRUE
-
- if(exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE && air.oxygen() > 0.5 && air.toxins() > 0.5)
- var/total = air.total_moles()
- if(air.toxins() < 0.01 * total || air.oxygen() < 0.01 * total)
- // The rest of the gas is snuffing out the reaction.
- return FALSE
- active_hotspot = new /obj/effect/hotspot(src)
- active_hotspot.temperature = exposed_temperature
- active_hotspot.volume = exposed_volume
- return TRUE
-
- return FALSE
-
-//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
+
+/turf/proc/hotspot_expose(exposed_temperature, exposed_volume)
+ return
+
+/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume)
+ var/datum/milla_safe/make_hotspot/milla = new()
+ milla.invoke_async(src, exposed_temperature, exposed_volume)
+
+/datum/milla_safe/make_hotspot
+
+/datum/milla_safe/make_hotspot/on_run(turf/simulated/tile, exposed_temperature, exposed_volume)
+ create_hotspot(tile, exposed_temperature, exposed_volume)
+
+//This is the icon for fire on turfs.
/obj/effect/hotspot
anchored = TRUE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -49,160 +32,48 @@
var/volume = 125
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
- var/fake = FALSE
- var/burn_time = 0
+ // The last tick this hotspot should be alive for.
+ var/death_timer = 0
/obj/effect/hotspot/New()
..()
- if(!fake)
- SSair.hotspots += src
- var/datum/milla_safe/hotspot_burn_plasma/milla = new()
- milla.invoke_async(src)
dir = pick(GLOB.cardinal)
-/datum/milla_safe/hotspot_burn_plasma
-
-/// Burns the air affected by this hotspot. A hotspot is effectively a gas fire that might not cover the entire tile yet. This proc makes that "partial fire" burn, altering the tile as a whole, and potentially setting the entire tile on fire.
-/datum/milla_safe/hotspot_burn_plasma/on_run(obj/effect/hotspot/hotspot)
- var/turf/simulated/location = get_turf(hotspot)
- if(!istype(location) || location.blocks_air)
- // We're in the wrong neighborhood.
- qdel(hotspot)
- return
-
- var/datum/gas_mixture/location_air = get_turf_air(location)
- if(location_air.temperature() >= min(hotspot.temperature, PLASMA_UPPER_TEMPERATURE))
- // The cell is already hot enough, no need to do more.
- hotspot.temperature = location_air.temperature()
- hotspot.volume = CELL_VOLUME
- hotspot.recolor()
- return
-
- if(location_air.toxins() < 0.5 || location_air.oxygen() < 0.5)
- // Burn what, exactly?
- qdel(hotspot)
- return
-
- var/total = location_air.total_moles()
- if(location_air.toxins() < 0.01 * total || location_air.oxygen() < 0.01 * total)
- // The rest of the gas is snuffing out the reaction.
- qdel(hotspot)
- return
-
- // Get some of the surrounding air for the hotspot to burn.
- var/datum/gas_mixture/burning = location_air.remove_ratio(hotspot.volume / location_air.volume)
-
- // Temporarily boost the temperature of this air to the hotspot temperature.
- var/old_temperature = burning.temperature()
- burning.set_temperature(hotspot.temperature)
-
- // Record how much plasma we had initially.
- var/old_toxins = burning.toxins()
-
- // Burn it.
- burning.react()
-
- // Calculate how much thermal energy was produced.
- // (Yes, gas_mixture has its own .fuel_burnt, but I dont' trust that code.)
- var/fuel_burnt = old_toxins - burning.toxins()
- var/thermal_energy = FIRE_PLASMA_ENERGY_RELEASED * fuel_burnt
-
- // Update the hotspot based on the reaction.
- hotspot.temperature = burning.temperature()
- hotspot.volume = min(CELL_VOLUME, fuel_burnt * FIRE_GROWTH_RATE)
- hotspot.recolor()
-
- // Revert the air's temperature to where it started.
- burning.set_temperature(old_temperature)
-
- var/heat_capacity = burning.heat_capacity()
- if(heat_capacity)
- // Add in the produced thermal energy.
- burning.set_temperature(burning.temperature() + thermal_energy / burning.heat_capacity())
-
- // And add it back to the tile.
- location_air.merge(burning)
-
-/obj/effect/hotspot/process()
- var/turf/simulated/location = loc
- if(!istype(location))
- qdel(src)
- return
-
- if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
- qdel(src)
- return
-
- var/datum/gas_mixture/location_air = location.get_readonly_air()
- if(location.blocks_air || location_air.toxins() < 0.5 || location_air.oxygen() < 0.5)
- qdel(src)
- return
-
- var/datum/milla_safe/hotspot_burn_plasma/milla = new()
- milla.invoke_async(src)
- if(QDELETED(src))
- return
-
- for(var/A in loc)
- var/atom/item = A
- if(!QDELETED(item) && item != src) // It's possible that the item is deleted in temperature_expose
- item.fire_act(null, temperature, volume)
-
- if(!istype(location))
- // We are now space. No need to do anything else.
- return
-
- if(location.wet)
- location.wet = TURF_DRY
-
- if(volume >= CELL_VOLUME * 0.95)
+/obj/effect/hotspot/proc/update_visuals()
+ color = heat2color(temperature)
+ set_light(l_color = color)
+ var/turf/here = get_turf(src)
+ var/datum/gas_mixture/gas = here.get_readonly_air()
+ var/fuel_burnt = gas.fuel_burnt()
+ if(fuel_burnt > 1)
icon_state = "3"
- location.burn_tile()
-
- //Possible spread due to radiated heat
- if(temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
- var/radiated_temperature = temperature * FIRE_SPREAD_RADIOSITY_SCALE
- for(var/direction in GLOB.cardinal)
- var/turf/simulated/T = get_step(location, direction)
- if(!istype(T))
- continue
- if(T.active_hotspot)
- continue
- if(src.CanAtmosPass(direction) && T.CanAtmosPass(turn(direction, 180)))
- T.hotspot_expose(radiated_temperature, CELL_VOLUME / 4)
-
+ else if(fuel_burnt > 0.1)
+ icon_state = "2"
else
- if(volume > CELL_VOLUME*0.4)
- icon_state = "2"
- else
- icon_state = "1"
+ icon_state = "1"
- if(temperature > location.max_fire_temperature_sustained)
- location.max_fire_temperature_sustained = temperature
- if(location.heat_capacity && temperature > location.heat_capacity)
- location.to_be_destroyed = TRUE
- /*if(prob(25))
- location.ReplaceWithSpace()
- return 0*/
- return 1
+/obj/effect/hotspot/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
// Garbage collect itself by nulling reference to it
/obj/effect/hotspot/Destroy()
set_light(0)
- SSair.hotspots -= src
var/turf/simulated/T = loc
if(istype(T) && T.active_hotspot == src)
T.active_hotspot = null
- if(!fake)
- DestroyTurf()
return ..()
/obj/effect/hotspot/proc/recolor()
color = heat2color(temperature)
set_light(l_color = color)
+// TODO: Vestigal, kept temporarily to avoid a merge conflict.
/obj/effect/hotspot/proc/DestroyTurf()
if(issimulatedturf(loc))
var/turf/simulated/T = loc
@@ -218,18 +89,18 @@
T.to_be_destroyed = 0
T.max_fire_temperature_sustained = 0
-/obj/effect/hotspot/Crossed(mob/living/L, oldloc)
- ..()
- if(isliving(L))
- L.fire_act()
+/obj/effect/hotspot/proc/on_atom_entered(datum/source, mob/living/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
+ if(istype(entered))
+ entered.fire_act()
/obj/effect/hotspot/singularity_pull()
return
/// Largely for the fireflash procs below
/obj/effect/hotspot/fake
- fake = TRUE
- burn_time = 30
+ var/burn_time = 3 SECONDS
/obj/effect/hotspot/fake/New()
..()
diff --git a/code/modules/atmospherics/environmental/LINDA_system.dm b/code/modules/atmospherics/environmental/LINDA_system.dm
index ff4f57b01c80..b1baf8506017 100644
--- a/code/modules/atmospherics/environmental/LINDA_system.dm
+++ b/code/modules/atmospherics/environmental/LINDA_system.dm
@@ -18,11 +18,13 @@
/atom/movable/proc/CanAtmosPass()
return TRUE
-/atom/proc/CanPass(atom/movable/mover, turf/target)
+/atom/proc/CanPass(atom/movable/mover, border_dir)
return !density
-/turf/CanPass(atom/movable/mover, turf/target)
- if(!target) return 0
+/turf/CanPass(atom/movable/mover, border_dir)
+ var/turf/target = get_step(src, border_dir)
+ if(!target)
+ return FALSE
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
return !density
@@ -32,7 +34,7 @@
return 0
for(var/obj/obstacle in src)
- if(!obstacle.CanPass(mover, target))
+ if(!obstacle.CanPass(mover, border_dir))
return 0
for(var/obj/obstacle in target)
if(!obstacle.CanPass(mover, src))
diff --git a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
index a629c4dec325..59b1d94e9f0b 100644
--- a/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
+++ b/code/modules/atmospherics/environmental/LINDA_turf_tile.dm
@@ -26,6 +26,7 @@
/turf/simulated/Destroy()
QDEL_NULL(active_hotspot)
QDEL_NULL(wet_overlay)
+ QDEL_NULL(wind_effect)
return ..()
/turf/simulated/proc/mimic_temperature_solid(turf/model, conduction_coefficient)
@@ -82,43 +83,79 @@
return null
/turf/proc/high_pressure_movements(flow_x, flow_y)
- var/atom/movable/M
- for(var/thing in src)
- M = thing
+ for(var/atom/movable/M in src)
if(QDELETED(M))
continue
if(M.anchored)
continue
if(M.pulledby)
continue
- if(M.last_high_pressure_movement_air_cycle < SSair.times_fired)
- M.experience_pressure_difference(flow_x, flow_y)
-
-/atom/movable/proc/experience_pressure_difference(flow_x, flow_y, pressure_resistance_prob_delta = 0)
- var/const/PROBABILITY_OFFSET = 25
- var/const/PROBABILITY_BASE_PRECENT = 75
-
- var/pressure_difference = sqrt(flow_x ** 2 + flow_y ** 2)
- var/max_force = sqrt(pressure_difference) * (MOVE_FORCE_DEFAULT / 5)
- set waitfor = 0
- var/move_prob = 100
- if(pressure_resistance > 0)
- move_prob = (pressure_difference / pressure_resistance * PROBABILITY_BASE_PRECENT) - PROBABILITY_OFFSET
- 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))))
- var/direction = 0
- if(flow_x > 0.5)
- direction |= EAST
- if(flow_x < -0.5)
- direction |= WEST
- if(flow_y > 0.5)
- direction |= NORTH
- if(flow_y < -0.5)
- direction |= SOUTH
- step(src, direction)
- last_high_pressure_movement_air_cycle = SSair.times_fired
-
- return pressure_difference
+ M.experience_pressure_difference(flow_x, flow_y)
+
+/proc/wind_direction(flow_x, flow_y)
+ var/direction = 0
+ if(flow_x > 0.5)
+ direction |= EAST
+ if(flow_x < -0.5)
+ direction |= WEST
+ if(flow_y > 0.5)
+ direction |= NORTH
+ if(flow_y < -0.5)
+ direction |= SOUTH
+
+ return direction
+
+/atom/movable/proc/experience_pressure_difference(flow_x, flow_y)
+ if(move_resist == INFINITY)
+ return
+
+ var/force_needed = max(move_resist, 1)
+ if(anchored)
+ force_needed *= MOVE_FORCE_FORCEPUSH_RATIO
+ else
+ force_needed *= MOVE_FORCE_PUSH_RATIO
+
+ var/turf/my_turf = get_turf(src)
+ var/datum/gas_mixture/my_air = my_turf.get_readonly_air()
+
+ var/air = my_air.total_moles() / MOLES_CELLSTANDARD
+ var/wind = sqrt(flow_x ** 2 + flow_y ** 2)
+ var/force = wind * air * (MOVE_FORCE_DEFAULT / 5)
+
+ if(force < force_needed)
+ return
+
+ var/direction = wind_direction(flow_x, flow_y)
+ if(direction == 0)
+ return
+
+ if(last_high_pressure_movement_time >= SSair.times_fired - 3)
+ return
+ last_high_pressure_movement_time = SSair.times_fired
+
+ air_push(direction, (force - force_needed) / force_needed)
+
+/atom/movable/proc/air_push(direction, strength)
+ step(src, direction)
+
+/mob/living/air_push(direction, strength)
+ if(HAS_TRAIT(src, TRAIT_MAGPULSE))
+ return
+
+ apply_status_effect(STATUS_EFFECT_UNBALANCED)
+ apply_status_effect(STATUS_EFFECT_DIRECTIONAL_SLOW, 1 SECONDS, REVERSE_DIR(direction), min(10, strength * 5))
+
+ if(client?.input_data?.desired_move_dir)
+ return
+ if(!pulling)
+ return ..()
+
+ // Make sure we don't let go of something just because the wind pushed us into it.
+ var/atom/movable/was_pulling = pulling
+ . = ..()
+ // We were just pulling it, so we can skip all the other stuff in start_pulling and just re-establish the pull.
+ pulling = was_pulling
+ was_pulling.pulledby = src
/turf/simulated/proc/radiate_to_spess() //Radiate excess tile heat to space
if(temperature > T0C) //Considering 0 degC as te break even point for radiation in and out
@@ -198,6 +235,14 @@
reset_superconductivity(T)
reduce_superconductivity(T, superconductivity)
+/obj/effect/wind
+ anchored = TRUE
+ mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+ icon = 'icons/effects/tile_effects.dmi'
+ icon_state = "wind"
+ layer = MASSIVE_OBJ_LAYER
+ blend_mode = BLEND_OVERLAY
+
#undef INDEX_NORTH
#undef INDEX_EAST
#undef INDEX_SOUTH
diff --git a/code/modules/atmospherics/gasmixtures/gas_mixture.dm b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
index eba569848dd9..e39ccf5ef5f9 100644
--- a/code/modules/atmospherics/gasmixtures/gas_mixture.dm
+++ b/code/modules/atmospherics/gasmixtures/gas_mixture.dm
@@ -33,6 +33,9 @@ What are the archived variables for?
var/private_sleeping_agent = 0
var/private_agent_b = 0
var/private_temperature = 0 //in Kelvin
+ var/private_hotspot_temperature = 0
+ var/private_hotspot_volume = 0
+ var/private_fuel_burnt = 0
// Archived versions of the private fields.
// Only gas_mixture should use these.
@@ -100,6 +103,15 @@ What are the archived variables for?
/datum/gas_mixture/proc/set_temperature(value)
private_temperature = value
+/datum/gas_mixture/proc/hotspot_temperature()
+ return private_hotspot_temperature
+
+/datum/gas_mixture/proc/hotspot_volume()
+ return private_hotspot_volume
+
+/datum/gas_mixture/proc/fuel_burnt()
+ return private_fuel_burnt
+
///joules per kelvin
/datum/gas_mixture/proc/heat_capacity()
return HEAT_CAPACITY_CALCULATION(private_oxygen, private_carbon_dioxide, private_nitrogen, private_toxins, private_sleeping_agent, private_agent_b, innate_heat_capacity)
@@ -651,6 +663,9 @@ What are the archived variables for?
private_agent_b = milla[MILLA_INDEX_AGENT_B]
innate_heat_capacity = milla[MILLA_INDEX_INNATE_HEAT_CAPACITY]
private_temperature = milla[MILLA_INDEX_TEMPERATURE]
+ private_hotspot_temperature = milla[MILLA_INDEX_HOTSPOT_TEMPERATURE]
+ private_hotspot_volume = milla[MILLA_INDEX_HOTSPOT_VOLUME]
+ private_fuel_burnt = milla[MILLA_INDEX_FUEL_BURNT]
/proc/share_many_airs(list/mixtures)
var/total_volume = 0
@@ -700,16 +715,8 @@ What are the archived variables for?
G.private_temperature = temperature
G.set_dirty()
-
-
-///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/proc/hotspot_expose(temperature, volume)
+ return
#undef SPECIFIC_HEAT_TOXIN
#undef SPECIFIC_HEAT_AIR
@@ -742,6 +749,9 @@ get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
readonly.private_sleeping_agent = private_sleeping_agent
readonly.private_agent_b = private_agent_b
readonly.private_temperature = private_temperature
+ readonly.private_hotspot_temperature = private_hotspot_temperature
+ readonly.private_hotspot_volume = private_hotspot_volume
+ readonly.private_fuel_burnt = private_fuel_burnt
if(istype(bound_turf, /turf/simulated))
var/turf/simulated/S = bound_turf
@@ -776,6 +786,12 @@ get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
private_temperature = value
set_dirty()
+/datum/gas_mixture/bound_to_turf/hotspot_expose(temperature, volume)
+ if(temperature > private_temperature)
+ set_dirty()
+ private_hotspot_temperature = max(private_hotspot_temperature, temperature)
+ private_hotspot_volume = max(private_hotspot_volume, (volume / CELL_VOLUME))
+
/datum/gas_mixture/bound_to_turf/proc/private_unsafe_write()
set_tile_atmos(bound_turf, oxygen = private_oxygen, carbon_dioxide = private_carbon_dioxide, nitrogen = private_nitrogen, toxins = private_toxins, sleeping_agent = private_sleeping_agent, agent_b = private_agent_b, temperature = private_temperature)
@@ -796,6 +812,9 @@ get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
private_agent_b = parent.private_agent_b
private_temperature = parent.private_temperature
+ private_hotspot_temperature = parent.private_hotspot_temperature
+ private_hotspot_volume = parent.private_hotspot_volume
+ private_fuel_burnt = parent.private_fuel_burnt
/datum/gas_mixture/readonly/set_dirty()
CRASH("Attempted to modify a readonly gas_mixture.")
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index 164d81a60815..87fd428c61dc 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -47,6 +47,19 @@
#define MAX_TEMPERATURE 363.15 // 90C
#define MIN_TEMPERATURE 233.15 // -40C
+GLOBAL_LIST_INIT(aalarm_modes, list(
+ "[AALARM_MODE_FILTERING]" = "Filtering",
+ "[AALARM_MODE_DRAUGHT]" = "Draught",
+ "[AALARM_MODE_PANIC]" = "Panic",
+ "[AALARM_MODE_CYCLE]" = "Cycle",
+ "[AALARM_MODE_SIPHON]" = "Siphon",
+ "[AALARM_MODE_CONTAMINATED]" = "Contaminated",
+ "[AALARM_MODE_REFILL]" = "Refill",
+ "[AALARM_MODE_CUSTOM]" = "Custom",
+ "[AALARM_MODE_OFF]" = "Off",
+ "[AALARM_MODE_FLOOD]" = "Flood",
+))
+
/obj/machinery/alarm
name = "air alarm"
desc = "A wall-mounted device used to control atmospheric equipment. It looks a little cheaply made..."
@@ -75,7 +88,7 @@
var/AAlarmwires = 31
var/shorted = FALSE
- var/mode = AALARM_MODE_SCRUBBING
+ var/mode = AALARM_MODE_FILTERING
var/preset = AALARM_PRESET_HUMAN
var/area/alarm_area
var/danger_level = ATMOS_ALARM_NONE
@@ -187,7 +200,7 @@
)
if(!no_cycle_after)
- mode = AALARM_MODE_REPLACEMENT
+ mode = AALARM_MODE_CYCLE
apply_mode()
/obj/machinery/alarm/Initialize(mapload, direction, building = 0)
@@ -272,6 +285,15 @@
cur_tlv = TLV["pressure"]
var/environment_pressure = environment.return_pressure()
var/pressure_dangerlevel = cur_tlv.get_danger_level(environment_pressure)
+ if(environment_pressure < cur_tlv.min2 && mode == AALARM_MODE_FILTERING)
+ mode = AALARM_MODE_OFF
+ apply_mode()
+ var/area/A = location.loc
+ A.firealert(src)
+
+ if(mode == AALARM_MODE_REFILL && environment_pressure >= cur_tlv.min1)
+ mode = AALARM_MODE_FILTERING
+ apply_mode()
cur_tlv = TLV["oxygen"]
var/oxygen_dangerlevel = cur_tlv.get_danger_level(environment.oxygen() * GET_PP)
@@ -309,8 +331,9 @@
if(old_danger_level != danger_level)
apply_danger_level()
- if(mode == AALARM_MODE_REPLACEMENT && environment_pressure < ONE_ATMOSPHERE * 0.05)
- mode = AALARM_MODE_SCRUBBING
+ cur_tlv = TLV["pressure"]
+ if(mode == AALARM_MODE_CYCLE && environment_pressure < cur_tlv.min2 * 0.05)
+ mode = AALARM_MODE_REFILL
apply_mode()
/datum/milla_safe/airalarm_heat_cool
@@ -393,8 +416,9 @@
underlays += emissive_appearance(icon, "alarm_lightmask")
/obj/machinery/alarm/proc/apply_mode()
+ var/datum/tlv/pressure_tlv = TLV["pressure"]
switch(mode)
- if(AALARM_MODE_SCRUBBING)
+ if(AALARM_MODE_FILTERING)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S as anything in alarm_area.scrubbers)
if(S.stat & (NOPOWER|BROKEN))
continue
@@ -412,8 +436,8 @@
if(P.stat & (NOPOWER|BROKEN))
continue
P.on = TRUE
- P.pressure_checks = TRUE
- P.external_pressure_bound = ONE_ATMOSPHERE
+ P.pressure_checks = ONLY_CHECK_EXT_PRESSURE
+ P.external_pressure_bound = (pressure_tlv.min1 + pressure_tlv.max1) / 2
P.update_icon(UPDATE_ICON_STATE)
@@ -433,12 +457,12 @@
if(P.stat & (NOPOWER|BROKEN))
continue
P.on = TRUE
- P.pressure_checks = TRUE
- P.external_pressure_bound = ONE_ATMOSPHERE
+ P.pressure_checks = ONLY_CHECK_EXT_PRESSURE
+ P.external_pressure_bound = (pressure_tlv.min1 + pressure_tlv.max1) / 2
P.update_icon(UPDATE_ICON_STATE)
- if(AALARM_MODE_VENTING)
+ if(AALARM_MODE_DRAUGHT)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S as anything in alarm_area.scrubbers)
if(S.stat & (NOPOWER|BROKEN))
continue
@@ -451,8 +475,8 @@
if(P.stat & (NOPOWER|BROKEN))
continue
P.on = TRUE
- P.pressure_checks = TRUE
- P.external_pressure_bound = ONE_ATMOSPHERE * 2
+ P.pressure_checks = ONLY_CHECK_EXT_PRESSURE
+ P.external_pressure_bound = pressure_tlv.max1
P.update_icon(UPDATE_ICON_STATE)
@@ -472,12 +496,12 @@
if(P.stat & (NOPOWER|BROKEN))
continue
P.on = TRUE
- P.pressure_checks = TRUE
- P.external_pressure_bound = ONE_ATMOSPHERE * 3
+ P.pressure_checks = ONLY_CHECK_EXT_PRESSURE
+ P.external_pressure_bound = (pressure_tlv.min1 + pressure_tlv.max1) / 2
P.update_icon(UPDATE_ICON_STATE)
- if(AALARM_MODE_PANIC, AALARM_MODE_REPLACEMENT)
+ if(AALARM_MODE_PANIC, AALARM_MODE_CYCLE)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S as anything in alarm_area.scrubbers)
if(S.stat & (NOPOWER|BROKEN))
continue
@@ -534,7 +558,7 @@
if(P.stat & (NOPOWER|BROKEN))
continue
P.on = TRUE
- P.pressure_checks = 2
+ P.pressure_checks = ONLY_CHECK_INT_PRESSURE
P.internal_pressure_bound = 0
P.update_icon(UPDATE_ICON_STATE)
@@ -671,15 +695,16 @@
data["atmos_alarm"] = alarm_area.atmosalm
data["emagged"] = emagged
data["modes"] = list(
- AALARM_MODE_SCRUBBING = list("name"="Filtering", "desc"="Scrubs out contaminants", "id" = AALARM_MODE_SCRUBBING),\
- AALARM_MODE_VENTING = list("name"="Draught", "desc"="Siphons out air while replacing", "id" = AALARM_MODE_VENTING),\
- AALARM_MODE_PANIC = list("name"="Panic Siphon","desc"="Siphons air out of the room quickly", "id" = AALARM_MODE_PANIC),\
- AALARM_MODE_REPLACEMENT = list("name"="Cycle", "desc"="Siphons air before replacing", "id" = AALARM_MODE_REPLACEMENT),\
- AALARM_MODE_SIPHON = list("name"="Siphon", "desc"="Siphons air out of the room", "id" = AALARM_MODE_SIPHON),\
- AALARM_MODE_CONTAMINATED= list("name"="Contaminated","desc"="Scrubs out all contaminants quickly", "id" = AALARM_MODE_CONTAMINATED),\
- AALARM_MODE_REFILL = list("name"="Refill", "desc"="Triples vent output", "id" = AALARM_MODE_REFILL),\
- AALARM_MODE_OFF = list("name"="Off", "desc"="Shuts off vents and scrubbers", "id" = AALARM_MODE_OFF),\
- AALARM_MODE_FLOOD = list("name"="Flood", "desc"="Shuts off scrubbers and opens vents", "emagonly" = TRUE, "id" = AALARM_MODE_FLOOD)
+ "mode[AALARM_MODE_FILTERING]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_FILTERING]"], "desc"="Scrubs out contaminants. Will shut off and drop firelocks if pressure drops too low.", "id" = AALARM_MODE_FILTERING),
+ "mode[AALARM_MODE_DRAUGHT]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_DRAUGHT]"], "desc"="Siphons out air while replacing", "id" = AALARM_MODE_DRAUGHT),
+ "mode[AALARM_MODE_PANIC]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_PANIC]"], "desc"="Siphons air out of the room quickly", "id" = AALARM_MODE_PANIC),
+ "mode[AALARM_MODE_CYCLE]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_CYCLE]"], "desc"="Siphons air before replacing", "id" = AALARM_MODE_CYCLE),
+ "mode[AALARM_MODE_SIPHON]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_SIPHON]"], "desc"="Siphons air out of the room", "id" = AALARM_MODE_SIPHON),
+ "mode[AALARM_MODE_CONTAMINATED]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_CONTAMINATED]"], "desc"="Scrubs out all contaminants quickly", "id" = AALARM_MODE_CONTAMINATED),
+ "mode[AALARM_MODE_REFILL]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_REFILL]"], "desc"="Refills a room to normal pressure, then switches to Filtering.", "id" = AALARM_MODE_REFILL),
+ "mode[AALARM_MODE_CUSTOM]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_CUSTOM]"], "desc"="Custom settings with no automatic mode switching.", "id" = AALARM_MODE_CUSTOM),
+ "mode[AALARM_MODE_OFF]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_OFF]"], "desc"="Shuts off vents and scrubbers", "id" = AALARM_MODE_OFF),
+ "mode[AALARM_MODE_FLOOD]" = list("name"=GLOB.aalarm_modes["[AALARM_MODE_FLOOD]"], "desc"="Shuts off scrubbers and opens vents", "emagonly" = TRUE, "id" = AALARM_MODE_FLOOD)
)
data["mode"] = mode
data["presets"] = list(
@@ -872,6 +897,8 @@
message_admins("[key_name_admin(usr)] attempted to href-exploit an air alarm to control another object!!! ")
return
+ mode = AALARM_MODE_CUSTOM
+
// Its a vent. Handle
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
var/obj/machinery/atmospherics/unary/vent_pump/V = U
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 1aa7e9fff815..f88104e808b5 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/passive_vent.dm
@@ -44,7 +44,7 @@
if(pressure_delta > 0)
// transfer from pipe air to environment
if((vent.air_contents.total_moles() > 0) && (vent.air_contents.temperature() > 0))
- var/transfer_moles = pressure_delta * environment.volume / (vent.air_contents.temperature() * R_IDEAL_GAS_EQUATION)
+ var/transfer_moles = pressure_delta * vent.air_contents.volume / (vent.air_contents.temperature() * R_IDEAL_GAS_EQUATION)
transfer_moles = min(transfer_moles, vent.volume)
var/datum/gas_mixture/removed = vent.air_contents.remove(transfer_moles)
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 e59f55d0b45a..2743bfdd7f92 100644
--- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
+++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm
@@ -1,6 +1,5 @@
#define EXTERNAL_PRESSURE_BOUND ONE_ATMOSPHERE
#define INTERNAL_PRESSURE_BOUND 0
-#define PRESSURE_CHECKS 1
/obj/machinery/atmospherics/unary/vent_pump
name = "air vent"
@@ -11,29 +10,27 @@
plane = FLOOR_PLANE
layer = GAS_PIPE_VISIBLE_LAYER + GAS_SCRUBBER_OFFSET
layer_offset = GAS_SCRUBBER_OFFSET
-
can_unwrench = TRUE
- var/open = FALSE
+
+ /// Is the vent open to put a piece of paper in it
+ var/open = FALSE // A living relic of papercult
var/area/initial_loc
- var/releasing = TRUE //FALSE = siphoning, TRUE = releasing
+ /// If false, siphons instead of releasing air
+ var/releasing = TRUE
+ var/max_transfer_joules = 200 /*kPa*/ * 2 * ONE_ATMOSPHERE
var/external_pressure_bound = EXTERNAL_PRESSURE_BOUND
var/internal_pressure_bound = INTERNAL_PRESSURE_BOUND
- var/pressure_checks = PRESSURE_CHECKS
- //1: Do not pass external_pressure_bound
- //2: Do not pass internal_pressure_bound
- //3: Do not pass either
-
- // Used when handling incoming radio signals requesting default settings
- var/external_pressure_bound_default = EXTERNAL_PRESSURE_BOUND
- var/internal_pressure_bound_default = INTERNAL_PRESSURE_BOUND
- var/pressure_checks_default = PRESSURE_CHECKS
+ /// What do we check when releasing/siphoning air - internal or external pressure
+ var/pressure_checks = ONLY_CHECK_EXT_PRESSURE
- var/welded = FALSE // Added for aliens -- TLE
- var/weld_burst_pressure = 50 * ONE_ATMOSPHERE //the (internal) pressure at which welded covers will burst off
+ /// Is this vent welded shut
+ var/welded = FALSE
+ /// How much pressure does there have to be in the pipe to burst the vent open?
+ var/weld_burst_pressure = 50 * ONE_ATMOSPHERE
connect_types = list(CONNECT_TYPE_NORMAL, CONNECT_TYPE_SUPPLY) //connects to regular and supply pipes
@@ -143,26 +140,31 @@
var/environment_pressure = environment.return_pressure()
if(vent_pump.releasing) //internal -> external
var/pressure_delta = 10000
- if(vent_pump.pressure_checks & 1)
+ if(vent_pump.pressure_checks == ONLY_CHECK_EXT_PRESSURE)
+ // Only checks difference between set pressure and environment pressure
pressure_delta = min(pressure_delta, (vent_pump.external_pressure_bound - environment_pressure))
- if(vent_pump.pressure_checks & 2)
+ if(vent_pump.pressure_checks == ONLY_CHECK_INT_PRESSURE)
pressure_delta = min(pressure_delta, (vent_pump.air_contents.return_pressure() - vent_pump.internal_pressure_bound))
if(pressure_delta > 0.5 && vent_pump.air_contents.temperature() > 0)
- var/transfer_moles = pressure_delta * environment.volume / (vent_pump.air_contents.temperature() * R_IDEAL_GAS_EQUATION)
+ // 1kPa * 1L = 1J
+ var/wanted_joules = pressure_delta * environment.volume
+ var/transfer_moles = min(vent_pump.max_transfer_joules, wanted_joules) / (vent_pump.air_contents.temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = vent_pump.air_contents.remove(transfer_moles)
environment.merge(removed)
vent_pump.parent.update = TRUE
else //external -> internal
var/pressure_delta = 10000
- if(vent_pump.pressure_checks & 1)
+ if(vent_pump.pressure_checks == ONLY_CHECK_EXT_PRESSURE)
pressure_delta = min(pressure_delta, (environment_pressure - vent_pump.external_pressure_bound))
- if(vent_pump.pressure_checks & 2)
+ if(vent_pump.pressure_checks == ONLY_CHECK_INT_PRESSURE)
pressure_delta = min(pressure_delta, (vent_pump.internal_pressure_bound - vent_pump.air_contents.return_pressure()))
if(pressure_delta > 0.5 && environment.temperature() > 0)
- var/transfer_moles = pressure_delta * vent_pump.air_contents.volume / (environment.temperature() * R_IDEAL_GAS_EQUATION)
+ // 1kPa * 1L = 1J
+ var/wanted_joules = pressure_delta * environment.volume
+ var/transfer_moles = min(vent_pump.max_transfer_joules, wanted_joules) / (environment.temperature() * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = environment.remove(transfer_moles)
vent_pump.air_contents.merge(removed)
vent_pump.parent.update = TRUE
@@ -252,4 +254,3 @@
#undef EXTERNAL_PRESSURE_BOUND
#undef INTERNAL_PRESSURE_BOUND
-#undef PRESSURE_CHECKS
diff --git a/code/modules/awaymissions/mission_code/beach.dm b/code/modules/awaymissions/mission_code/beach.dm
index 150a6cd304d8..88f16b4ea6f6 100644
--- a/code/modules/awaymissions/mission_code/beach.dm
+++ b/code/modules/awaymissions/mission_code/beach.dm
@@ -101,7 +101,7 @@
if(ismob(AM))
linkedcontroller.mobinpool += AM
-/turf/simulated/floor/beach/away/water/Exited(atom/movable/AM, atom/newloc)
+/turf/simulated/floor/beach/away/water/Exited(atom/movable/AM, direction)
. = ..()
if(!linkedcontroller)
return
diff --git a/code/modules/awaymissions/mission_code/ruins/deepstorage.dm b/code/modules/awaymissions/mission_code/ruins/deepstorage.dm
index 2da93a61bfd5..cf4f2f059591 100644
--- a/code/modules/awaymissions/mission_code/ruins/deepstorage.dm
+++ b/code/modules/awaymissions/mission_code/ruins/deepstorage.dm
@@ -109,8 +109,8 @@
playsound(src, 'sound/effects/meteorimpact.ogg', 25, TRUE, 2, TRUE)
return ..()
-/mob/living/simple_animal/hostile/megafauna/fleshling/Bump(atom/A, yes)
- if(charging && yes)
+/mob/living/simple_animal/hostile/megafauna/fleshling/Bump(atom/A)
+ if(charging)
if(isliving(A))
var/mob/living/L = A
L.visible_message("[src] slams into [L]! ", "[src] tramples you into the ground! ")
diff --git a/code/modules/awaymissions/mission_code/ruins/telecomns.dm b/code/modules/awaymissions/mission_code/ruins/telecomns.dm
index d65ddd9c76ac..834c8a6d592f 100644
--- a/code/modules/awaymissions/mission_code/ruins/telecomns.dm
+++ b/code/modules/awaymissions/mission_code/ruins/telecomns.dm
@@ -48,9 +48,15 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank)
/obj/effect/abstract/bot_trap
name = "evil bot trap to make explorers hate you"
-/obj/effect/abstract/bot_trap/Crossed(atom/movable/AM, oldloc)
+/obj/effect/abstract/bot_trap/Initialize(mapload)
. = ..()
- if(isrobot(AM) || ishuman(AM))
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/effect/abstract/bot_trap/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isrobot(entered) || ishuman(entered))
var/turf/T = get_turf(src)
for(var/mob/living/simple_animal/bot/B in GLOB.telecomms_bots)
B.call_bot(null, T, FALSE)
@@ -60,9 +66,15 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank)
/obj/effect/abstract/loot_trap
name = "table surrounding loot trap"
-/obj/effect/abstract/loot_trap/Crossed(atom/movable/AM, oldloc)
+/obj/effect/abstract/loot_trap/Initialize(mapload)
. = ..()
- if(isrobot(AM) || ishuman(AM))
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/effect/abstract/loot_trap/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isrobot(entered) || ishuman(entered))
var/turf/T = get_turf(src)
for(var/obj/structure/telecomms_doomsday_device/DD in GLOB.telecomms_doomsday_device)
DD.thief = TRUE
@@ -75,9 +87,15 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank)
/obj/effect/abstract/cheese_trap
name = "cheese preventer"
-/obj/effect/abstract/cheese_trap/Crossed(atom/movable/AM, oldloc)
+/obj/effect/abstract/cheese_trap/Initialize(mapload)
. = ..()
- if(isrobot(AM) || ishuman(AM))
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/effect/abstract/cheese_trap/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isrobot(entered) || ishuman(entered))
for(var/obj/structure/telecomms_doomsday_device/DD in GLOB.telecomms_doomsday_device)
if(DD.thief)
DD.start_the_party(TRUE)
@@ -471,10 +489,11 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank)
var/soundblock = null
/// How long do we sleep between messages? 5 seconds by default.
var/loop_sleep_time = 5 SECONDS
+ var/datum/proximity_monitor/proximity_monitor
/obj/structure/environmental_storytelling_holopad/Initialize(mapload)
. = ..()
- AddComponent(/datum/component/proximity_monitor)
+ proximity_monitor = new(src, 1)
/obj/structure/environmental_storytelling_holopad/Destroy()
QDEL_NULL(our_holo)
@@ -488,8 +507,7 @@ GLOBAL_LIST_EMPTY(telecomms_trap_tank)
/obj/structure/environmental_storytelling_holopad/proc/start_message(mob/living/carbon/human/H)
activated = TRUE
- DeleteComponent(/datum/component/proximity_monitor)
-
+ QDEL_NULL(proximity_monitor)
icon_state = "holopad1"
update_icon(UPDATE_OVERLAYS)
var/obj/effect/overlay/hologram = new(get_turf(src))
diff --git a/code/modules/awaymissions/mission_code/shuttle_shadow.dm b/code/modules/awaymissions/mission_code/shuttle_shadow.dm
index e1ed6df4c1f7..137ac4b611db 100644
--- a/code/modules/awaymissions/mission_code/shuttle_shadow.dm
+++ b/code/modules/awaymissions/mission_code/shuttle_shadow.dm
@@ -6,9 +6,9 @@
return
..()
-/obj/machinery/atmospherics/unary/passive_vent/high_volume/shadow/onTransitZ(old_z, new_z)
+/obj/machinery/atmospherics/unary/passive_vent/high_volume/shadow/on_changed_z_level(turf/old_turf, turf/new_turf)
. = ..()
- if(is_station_level(new_z))
+ if(is_station_level(new_turf?.z))
on = TRUE
/obj/machinery/atmospherics/trinary/filter/shadow
@@ -18,15 +18,15 @@
on = FALSE
target_pressure = 99999
-/obj/machinery/atmospherics/trinary/filter/shadow/onTransitZ(old_z, new_z)
+/obj/machinery/atmospherics/trinary/filter/shadow/on_changed_z_level(turf/old_turf, turf/new_turf)
. = ..()
- if(is_station_level(new_z))
+ if(is_station_level(new_turf?.z))
on = TRUE
/obj/machinery/igniter/shadow
-/obj/machinery/igniter/shadow/onTransitZ(old_z, new_z)
+/obj/machinery/igniter/shadow/on_changed_z_level(turf/old_turf, turf/new_turf)
. = ..()
- if(is_station_level(new_z))
+ if(is_station_level(new_turf?.z))
on = TRUE
update_icon()
diff --git a/code/modules/awaymissions/zlevel_helpers.dm b/code/modules/awaymissions/zlevel_helpers.dm
index d624671002b2..50da68cfb319 100644
--- a/code/modules/awaymissions/zlevel_helpers.dm
+++ b/code/modules/awaymissions/zlevel_helpers.dm
@@ -39,50 +39,3 @@
for(var/otherthing in T)
qdel(otherthing)
T.ChangeTurf(T.baseturf)
-
-/datum/map_template/ruin/proc/try_to_place(z,allowed_areas)
- var/sanity = PLACEMENT_TRIES
- while(sanity > 0)
- sanity--
- var/width_border = TRANSITIONEDGE + SPACERUIN_MAP_EDGE_PAD + round(width / 2)
- var/height_border = TRANSITIONEDGE + SPACERUIN_MAP_EDGE_PAD + round(height / 2)
- var/turf/central_turf = locate(rand(width_border, world.maxx - width_border), rand(height_border, world.maxy - height_border), z)
- var/valid = TRUE
-
- for(var/turf/check in get_affected_turfs(central_turf,1))
- var/area/new_area = get_area(check)
- if(!(istype(new_area, allowed_areas)) || check.flags & NO_RUINS)
- valid = FALSE
- break
-
- if(!valid)
- continue
-
- log_world("Ruin \"[name]\" placed at ([central_turf.x], [central_turf.y], [central_turf.z])")
-
- for(var/i in get_affected_turfs(central_turf, 1))
- var/turf/T = i
- for(var/obj/structure/spawner/nest in T)
- qdel(nest)
- for(var/mob/living/simple_animal/monster in T)
- qdel(monster)
- for(var/obj/structure/flora/ash/plant in T)
- qdel(plant)
-
- load(central_turf,centered = TRUE)
- loaded++
-
- for(var/turf/T in get_affected_turfs(central_turf, 1))
- T.flags |= NO_RUINS
-
- new /obj/effect/landmark/ruin(central_turf, src)
-
- var/map_filename = splittext(mappath, "/")
- map_filename = map_filename[length(map_filename)]
- SSblackbox.record_feedback("associative", "ruin_placement", 1, list(
- "map" = map_filename,
- "coords" = "[central_turf.x],[central_turf.y],[central_turf.z]"
- ))
-
- return TRUE
- return FALSE
diff --git a/code/modules/client/preference/character.dm b/code/modules/client/preference/character.dm
index 7ce7b4501e69..4a08a3e22911 100644
--- a/code/modules/client/preference/character.dm
+++ b/code/modules/client/preference/character.dm
@@ -1535,6 +1535,17 @@
clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY)
if(4)
clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY)
+ if(JOB_INSTRUCTOR)
+ clothes_s = new /icon('icons/mob/clothing/under/procedure.dmi', "trainer_s")
+ clothes_s.Blend(new /icon('icons/mob/clothing/feet.dmi', "laceups"), ICON_UNDERLAY)
+ clothes_s.Blend(new /icon('icons/mob/clothing/suit.dmi', "trainercoat"), ICON_OVERLAY)
+ switch(backbag)
+ if(2)
+ clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "securitypack"), ICON_OVERLAY)
+ if(3)
+ clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel-norm"), ICON_OVERLAY)
+ if(4)
+ clothes_s.Blend(new /icon('icons/mob/clothing/back.dmi', "satchel"), ICON_OVERLAY)
if(disabilities & DISABILITY_FLAG_NEARSIGHTED)
preview_icon.Blend(new /icon('icons/mob/clothing/eyes.dmi', "glasses"), ICON_OVERLAY)
@@ -2036,6 +2047,10 @@
if(job.hidden_from_job_prefs)
continue
+ if(job.mentor_only)
+ if(!check_rights(R_MENTOR | R_ADMIN, FALSE, user))
+ continue
+
index += 1
if((index >= limit) || (job.title in splitJobs))
if((index < limit) && (lastJob != null))
@@ -2058,6 +2073,7 @@
if(jobban_isbanned(user, job.title))
html += "[rank] \[BANNED] "
continue
+
var/restrictions = job.get_exp_restrictions(user.client)
if(restrictions)
html += "[rank] \[[restrictions]] "
diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm
index a67e3da4baf6..d34f8ac206c1 100644
--- a/code/modules/client/preference/link_processing.dm
+++ b/code/modules/client/preference/link_processing.dm
@@ -1007,6 +1007,7 @@
var/list/actualview = getviewsize(parent.view)
parent.void.UpdateGreed(actualview[1],actualview[2])
+ parent.fit_viewport()
parent.debug_text_overlay?.update_view(parent)
if("afk_watch")
diff --git a/code/modules/client/preference/loadout/loadout_accessories.dm b/code/modules/client/preference/loadout/loadout_accessories.dm
index a4a8f50368c0..f63e945c3afd 100644
--- a/code/modules/client/preference/loadout/loadout_accessories.dm
+++ b/code/modules/client/preference/loadout/loadout_accessories.dm
@@ -16,66 +16,6 @@
slot = ITEM_SLOT_ACCESSORY
sort_category = "Accessories"
-/datum/gear/accessory/scarf
- display_name = "Scarf"
- path = /obj/item/clothing/accessory/scarf
-
-/datum/gear/accessory/scarf/red
- display_name = "Scarf, red"
- path = /obj/item/clothing/accessory/scarf/red
-
-/datum/gear/accessory/scarf/green
- display_name = "Scarf, green"
- path = /obj/item/clothing/accessory/scarf/green
-
-/datum/gear/accessory/scarf/darkblue
- display_name = "Scarf, dark blue"
- path = /obj/item/clothing/accessory/scarf/darkblue
-
-/datum/gear/accessory/scarf/purple
- display_name = "Scarf, purple"
- path = /obj/item/clothing/accessory/scarf/purple
-
-/datum/gear/accessory/scarf/yellow
- display_name = "Scarf, yellow"
- path = /obj/item/clothing/accessory/scarf/yellow
-
-/datum/gear/accessory/scarf/orange
- display_name = "Scarf, orange"
- path = /obj/item/clothing/accessory/scarf/orange
-
-/datum/gear/accessory/scarf/lightblue
- display_name = "Scarf, light blue"
- path = /obj/item/clothing/accessory/scarf/lightblue
-
-/datum/gear/accessory/scarf/white
- display_name = "Scarf, white"
- path = /obj/item/clothing/accessory/scarf/white
-
-/datum/gear/accessory/scarf/black
- display_name = "Scarf, black"
- path = /obj/item/clothing/accessory/scarf/black
-
-/datum/gear/accessory/scarf/zebra
- display_name = "Scarf, zebra"
- path = /obj/item/clothing/accessory/scarf/zebra
-
-/datum/gear/accessory/scarf/christmas
- display_name = "Scarf, christmas"
- path = /obj/item/clothing/accessory/scarf/christmas
-
-/datum/gear/accessory/scarf/stripedred
- display_name = "Scarf, striped red"
- path = /obj/item/clothing/accessory/stripedredscarf
-
-/datum/gear/accessory/scarf/stripedgreen
- display_name = "Scarf, striped green"
- path = /obj/item/clothing/accessory/stripedgreenscarf
-
-/datum/gear/accessory/scarf/stripedblue
- display_name = "Scarf, striped blue"
- path = /obj/item/clothing/accessory/stripedbluescarf
-
/datum/gear/accessory/holobadge
display_name = "Holobadge, pin"
path = /obj/item/clothing/accessory/holobadge
@@ -86,27 +26,6 @@
path = /obj/item/clothing/accessory/holobadge/cord
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer")
-/datum/gear/accessory/tieblue
- display_name = "Tie, blue"
- path = /obj/item/clothing/accessory/blue
-
-/datum/gear/accessory/tiered
- display_name = "Tie, red"
- path = /obj/item/clothing/accessory/red
-
-/datum/gear/accessory/tieblack
- display_name = "Tie, black"
- path = /obj/item/clothing/accessory/black
-
-/datum/gear/accessory/tiehorrible
- display_name = "Tie, vomit green"
- path = /obj/item/clothing/accessory/horrible
-
-/datum/gear/accessory/stethoscope
- display_name = "Stethoscope"
- path = /obj/item/clothing/accessory/stethoscope
- allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Paramedic")
-
/datum/gear/accessory/cowboyshirt
display_name = "Cowboy shirt, black"
path = /obj/item/clothing/accessory/cowboyshirt
@@ -147,22 +66,6 @@
display_name = "Cowboy shirt, short sleeved navy"
path = /obj/item/clothing/accessory/cowboyshirt/navy/short_sleeved
-/datum/gear/accessory/locket/silver
- display_name = "Silver locket"
- path = /obj/item/clothing/accessory/necklace/locket/silver
-
-/datum/gear/accessory/locket
- display_name = "Gold locket"
- path = /obj/item/clothing/accessory/necklace/locket
-
-/datum/gear/accessory/necklace/long
- display_name = "Large necklace"
- path = /obj/item/clothing/accessory/necklace/long
-
-/datum/gear/accessory/necklace
- display_name = "Simple necklace"
- path = /obj/item/clothing/accessory/necklace
-
/datum/gear/accessory/corset
display_name = "Corset, black"
path = /obj/item/clothing/accessory/corset
@@ -233,7 +136,7 @@
/datum/gear/accessory/armband_job/procedure
display_name = "Armband, procedure"
path = /obj/item/clothing/accessory/armband/procedure
- allowed_roles = list("Captain", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent")
+ allowed_roles = list("Captain", "Nanotrasen Representative", "Magistrate", "Internal Affairs Agent", "Nanotrasen Career Trainer")
/datum/gear/accessory/armband_job/service
display_name = "Armband, service"
diff --git a/code/modules/client/preference/loadout/loadout_donor.dm b/code/modules/client/preference/loadout/loadout_donor.dm
index aad1a4f22b6a..b2d6184a1674 100644
--- a/code/modules/client/preference/loadout/loadout_donor.dm
+++ b/code/modules/client/preference/loadout/loadout_donor.dm
@@ -30,7 +30,7 @@
/datum/gear/donor/furcape
display_name = "Fur Cape"
- path = /obj/item/clothing/suit/furcape
+ path = /obj/item/clothing/neck/cloak/furcape
/datum/gear/donor/furcoat
display_name = "Fur Coat"
@@ -76,6 +76,20 @@
display_name = "Fur Cap"
path = /obj/item/clothing/head/furcap
+/datum/gear/donor/welding_blueflame
+ display_name = "Blue flame decal welding helmet"
+ path = /obj/item/clothing/head/welding/flamedecal/blue
+ allowed_roles = list("Chief Engineer", "Station Engineer", "Life Support Specialist", "Roboticist")
+ donator_tier = 2
+ cost = 2
+
+/datum/gear/donor/welding_white
+ display_name = "White decal welding helmet"
+ path = /obj/item/clothing/head/welding/white
+ allowed_roles = list("Chief Engineer", "Station Engineer", "Life Support Specialist", "Roboticist")
+ donator_tier = 2
+ cost = 2
+
/datum/gear/donor/fawkes
display_name = "Guy Fawkes mask"
path = /obj/item/clothing/mask/fawkes
diff --git a/code/modules/client/preference/loadout/loadout_general.dm b/code/modules/client/preference/loadout/loadout_general.dm
index 8bd4d52e9283..004b8eca3cf2 100644
--- a/code/modules/client/preference/loadout/loadout_general.dm
+++ b/code/modules/client/preference/loadout/loadout_general.dm
@@ -89,6 +89,34 @@
display_name = "Nian plushie"
path = /obj/item/toy/plushie/nianplushie
+/datum/gear/ipcplushie
+ display_name = "IPC plushie"
+ path = /obj/item/toy/plushie/ipcplushie
+
+/datum/gear/kidanplushie
+ display_name = "Kidan plushie"
+ path = /obj/item/toy/plushie/kidanplushie
+
+/datum/gear/plasmaplushie
+ display_name = "Plasmaman plushie"
+ path = /obj/item/toy/plushie/plasmamanplushie
+
+/datum/gear/skrellplushie
+ display_name = "Skrell plushie"
+ path = /obj/item/toy/plushie/skrellplushie
+
+/datum/gear/draskplushie
+ display_name = "Drask plushie"
+ path = /obj/item/toy/plushie/draskplushie
+
+/datum/gear/borgplushie
+ display_name = "Borg plushie"
+ path = /obj/item/toy/plushie/borgplushie
+
+/datum/gear/nymphplushie
+ display_name = "Diona nymph plushie"
+ path = /obj/item/toy/plushie/nymphplushie
+
/datum/gear/sharkplushie
display_name = "Shark plushie"
path = /obj/item/toy/plushie/shark
diff --git a/code/modules/client/preference/loadout/loadout_neck.dm b/code/modules/client/preference/loadout/loadout_neck.dm
new file mode 100644
index 000000000000..c8879c7201fd
--- /dev/null
+++ b/code/modules/client/preference/loadout/loadout_neck.dm
@@ -0,0 +1,206 @@
+/*
+######################################################################################
+## ##
+## IMPORTANT README ##
+## ##
+## Changing any /datum/gear typepaths --WILL-- break people's loadouts. ##
+## The typepaths are stored directly in the `characters.gear` column of the DB. ##
+## Please inform the server host if you wish to modify any of these. ##
+## ##
+######################################################################################
+*/
+
+
+/datum/gear/neck
+ main_typepath = /datum/gear/neck
+ slot = ITEM_SLOT_NECK
+ sort_category = "Neck"
+
+/datum/gear/neck/tie
+ display_name = "Tie, blue"
+ path = /obj/item/clothing/neck/tie/blue
+
+/datum/gear/neck/tie/red
+ display_name = "Tie, red"
+ path = /obj/item/clothing/neck/tie/red
+
+/datum/gear/neck/tie/black
+ display_name = "Tie, black"
+ path = /obj/item/clothing/neck/tie/black
+
+/datum/gear/neck/tie/horrible
+ display_name = "Tie, vomit green"
+ path = /obj/item/clothing/neck/tie/horrible
+
+/datum/gear/neck/scarf
+ display_name = "Scarf, red"
+ path = /obj/item/clothing/neck/scarf/red
+
+/datum/gear/neck/scarf/green
+ display_name = "Scarf, green"
+ path = /obj/item/clothing/neck/scarf/green
+
+/datum/gear/neck/scarf/darkblue
+ display_name = "Scarf, dark blue"
+ path = /obj/item/clothing/neck/scarf/darkblue
+
+/datum/gear/neck/scarf/purple
+ display_name = "Scarf, purple"
+ path = /obj/item/clothing/neck/scarf/purple
+
+/datum/gear/neck/scarf/yellow
+ display_name = "Scarf, yellow"
+ path = /obj/item/clothing/neck/scarf/yellow
+
+/datum/gear/neck/scarf/orange
+ display_name = "Scarf, orange"
+ path = /obj/item/clothing/neck/scarf/orange
+
+/datum/gear/neck/scarf/lightblue
+ display_name = "Scarf, light blue"
+ path = /obj/item/clothing/neck/scarf/lightblue
+
+/datum/gear/neck/scarf/white
+ display_name = "Scarf, white"
+ path = /obj/item/clothing/neck/scarf/white
+
+/datum/gear/neck/scarf/black
+ display_name = "Scarf, black"
+ path = /obj/item/clothing/neck/scarf/black
+
+/datum/gear/neck/scarf/zebra
+ display_name = "Scarf, zebra"
+ path = /obj/item/clothing/neck/scarf/zebra
+
+/datum/gear/neck/scarf/christmas
+ display_name = "Scarf, christmas"
+ path = /obj/item/clothing/neck/scarf/christmas
+
+/datum/gear/neck/scarf/stripedred
+ display_name = "Scarf, striped red"
+ path = /obj/item/clothing/neck/scarf/stripedred
+
+/datum/gear/neck/scarf/stripedgreen
+ display_name = "Scarf, striped green"
+ path = /obj/item/clothing/neck/scarf/stripedgreen
+
+/datum/gear/neck/scarf/stripedblue
+ display_name = "Scarf, striped blue"
+ path = /obj/item/clothing/neck/scarf/stripedblue
+
+/datum/gear/neck/stethoscope
+ display_name = "Stethoscope"
+ path = /obj/item/clothing/neck/stethoscope
+ allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Paramedic")
+
+/datum/gear/neck/locket
+ display_name = "Gold locket"
+ path = /obj/item/clothing/neck/necklace/locket
+
+/datum/gear/neck/locket/silver
+ display_name = "Silver locket"
+ path = /obj/item/clothing/neck/necklace/locket/silver
+
+/datum/gear/neck/necklace
+ display_name = "Simple necklace"
+ path = /obj/item/clothing/neck/necklace
+
+/datum/gear/neck/necklace/long
+ display_name = "Large necklace"
+ path = /obj/item/clothing/neck/necklace/long
+
+//Cloaks and mantles
+
+/datum/gear/neck/cloak
+ display_name = "Cloak"
+ path = /obj/item/clothing/neck/cloak
+
+/datum/gear/neck/cloak/job
+ main_typepath = /datum/gear/neck/cloak/job
+ subtype_selection_cost = FALSE
+
+/datum/gear/neck/cloak/job/captain
+ display_name = "Cloak, captain"
+ path = /obj/item/clothing/neck/cloak/captain
+ allowed_roles = list("Captain")
+
+/datum/gear/neck/cloak/job/hos
+ display_name = "Cloak, head of security"
+ path = /obj/item/clothing/neck/cloak/head_of_security
+ allowed_roles = list("Head of Security")
+
+/datum/gear/neck/cloak/job/hop
+ display_name = "Cloak, head of personnel"
+ path = /obj/item/clothing/neck/cloak/head_of_personnel
+ allowed_roles = list("Head of Personnel")
+
+/datum/gear/neck/cloak/job/rd
+ display_name = "Cloak, research director"
+ path = /obj/item/clothing/neck/cloak/research_director
+ allowed_roles = list("Research Director")
+
+/datum/gear/neck/cloak/job/ce
+ display_name = "Cloak, chief engineer"
+ path = /obj/item/clothing/neck/cloak/chief_engineer
+ allowed_roles = list("Chief Engineer")
+
+/datum/gear/neck/cloak/job/cmo
+ display_name = "Cloak, chief medical officer"
+ path = /obj/item/clothing/neck/cloak/chief_medical_officer
+ allowed_roles = list("Chief Medical Officer")
+
+/datum/gear/neck/cloak/job/qm
+ display_name = "Cloak, quartermaster"
+ path = /obj/item/clothing/neck/cloak/quartermaster
+ allowed_roles = list("Quartermaster")
+
+/datum/gear/neck/old_scarf
+ display_name = "Old scarf"
+ path = /obj/item/clothing/neck/cloak/old
+
+/datum/gear/neck/regal_shawl
+ display_name = "Regal shawl"
+ path = /obj/item/clothing/neck/cloak/regal
+
+/datum/gear/neck/mantle
+ display_name = "Mantle"
+ path = /obj/item/clothing/neck/cloak/mantle
+
+/datum/gear/neck/mantle/job
+ main_typepath = /datum/gear/neck/mantle/job
+ subtype_selection_cost = FALSE
+
+/datum/gear/neck/mantle/job/captain
+ display_name = "Mantle, captain"
+ path = /obj/item/clothing/neck/cloak/captain_mantle
+ allowed_roles = list("Captain")
+
+/datum/gear/neck/mantle/job/hos
+ display_name = "Mantle, head of security"
+ path = /obj/item/clothing/neck/cloak/hos_mantle
+ allowed_roles = list("Head of Security")
+
+/datum/gear/neck/mantle/job/hop
+ display_name = "Mantle, head of personnel"
+ path = /obj/item/clothing/neck/cloak/hop_mantle
+ allowed_roles = list("Head of Personnel")
+
+/datum/gear/neck/mantle/job/rd
+ display_name = "Mantle, research director"
+ path = /obj/item/clothing/neck/cloak/rd_mantle
+ allowed_roles = list("Research Director")
+
+/datum/gear/neck/mantle/job/ce
+ display_name = "Mantle, chief engineer"
+ path = /obj/item/clothing/neck/cloak/ce_mantle
+ allowed_roles = list("Chief Engineer")
+
+/datum/gear/neck/mantle/job/cmo
+ display_name = "Mantle, chief medical officer"
+ path = /obj/item/clothing/neck/cloak/cmo_mantle
+ allowed_roles = list("Chief Medical Officer")
+
+/datum/gear/neck/mantle/job/qm
+ display_name = "Mantle, quartermaster"
+ path = /obj/item/clothing/neck/cloak/qm_mantle
+ allowed_roles = list("Quartermaster")
diff --git a/code/modules/client/preference/loadout/loadout_suit.dm b/code/modules/client/preference/loadout/loadout_suit.dm
index 4023a2a82e23..3ad597f09bb9 100644
--- a/code/modules/client/preference/loadout/loadout_suit.dm
+++ b/code/modules/client/preference/loadout/loadout_suit.dm
@@ -252,53 +252,6 @@
display_name = "Suit jacket, purple"
path = /obj/item/clothing/suit/storage/iaa/purplejacket
-//Mantles!
-/datum/gear/suit/mantle
- display_name = "Mantle"
- path = /obj/item/clothing/suit/mantle
-
-/datum/gear/suit/old_scarf
- display_name = "Old scarf"
- path = /obj/item/clothing/suit/mantle/old
-
-/datum/gear/suit/regal_shawl
- display_name = "Regal shawl"
- path = /obj/item/clothing/suit/mantle/regal
-
-/datum/gear/suit/mantle/job
- main_typepath = /datum/gear/suit/mantle/job
- subtype_selection_cost = FALSE
-
-/datum/gear/suit/mantle/job/captain
- display_name = "Mantle, captain"
- path = /obj/item/clothing/suit/mantle/armor/captain
- allowed_roles = list("Captain")
-
-/datum/gear/suit/mantle/job/ce
- display_name = "Mantle, chief engineer"
- path = /obj/item/clothing/suit/mantle/chief_engineer
- allowed_roles = list("Chief Engineer")
-
-/datum/gear/suit/mantle/job/cmo
- display_name = "Mantle, chief medical officer"
- path = /obj/item/clothing/suit/mantle/labcoat/chief_medical_officer
- allowed_roles = list("Chief Medical Officer")
-
-/datum/gear/suit/mantle/job/hos
- display_name = "Mantle, head of security"
- path = /obj/item/clothing/suit/mantle/armor
- allowed_roles = list("Head of Security")
-
-/datum/gear/suit/mantle/job/hop
- display_name = "Mantle, head of personnel"
- path = /obj/item/clothing/suit/mantle/armor/hop
- allowed_roles = list("Head of Personnel")
-
-/datum/gear/suit/mantle/job/rd
- display_name = "Mantle, research director"
- path = /obj/item/clothing/suit/mantle/labcoat
- allowed_roles = list("Research Director")
-
//Robes!
/datum/gear/suit/witch
diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm
index e862a08a2811..7bb2f5697541 100644
--- a/code/modules/client/preference/preferences.dm
+++ b/code/modules/client/preference/preferences.dm
@@ -628,7 +628,7 @@ GLOBAL_LIST_INIT(special_role_times, list(
dat += "Reset Setup "
dat += ""
- var/datum/browser/popup = new(user, "preferences", "Character Setup
", 820, 770)
+ var/datum/browser/popup = new(user, "preferences", "Character Setup
", 820, 810)
popup.set_content(dat.Join(""))
popup.open(FALSE)
diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm
index 97b535890a1a..5d5ac61035e5 100644
--- a/code/modules/clothing/glasses/engine_goggles.dm
+++ b/code/modules/clothing/glasses/engine_goggles.dm
@@ -4,10 +4,11 @@
#define MODE_MESON "meson"
#define MODE_TRAY "t-ray"
#define MODE_RAD "radiation"
+#define MODE_PRESSURE "pressure"
/obj/item/clothing/glasses/meson/engine
name = "engineering scanner goggles"
- desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, the T-ray Scanner mode lets you see underfloor objects such as cables and pipes, and the Radiation Scanner mode lets you see objects contaminated by radiation."
+ desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, the T-ray Scanner mode lets you see underfloor objects such as cables and pipes, the Radiation Scanner mode lets you see objects contaminated by radiation, and the Pressure Scanner mode lets you visualize air pressure."
icon_state = "trayson-meson"
item_state = "trayson-meson"
actions_types = list(/datum/action/item_action/toggle_mode)
@@ -37,6 +38,11 @@
if(active_on_equip_rad && mode == MODE_RAD && slot == ITEM_SLOT_EYES)
ADD_TRAIT(user, SM_HALLUCINATION_IMMUNE, "meson_glasses[UID()]")
+ if(mode == MODE_PRESSURE && slot == ITEM_SLOT_EYES)
+ ADD_TRAIT(user, TRAIT_PRESSURE_VISION, "meson_glasses[UID()]")
+ if(mode == MODE_PRESSURE && slot != ITEM_SLOT_EYES)
+ REMOVE_TRAIT(user, TRAIT_PRESSURE_VISION, "meson_glasses[UID()]")
+
/obj/item/clothing/glasses/meson/engine/proc/toggle_mode(mob/user, voluntary)
mode = modes[mode]
to_chat(user, "[voluntary ? "You turn the goggles" : "The goggles turn"] [mode ? "to [mode] mode" : "off"][voluntary ? "." : "!"] ")
@@ -57,6 +63,12 @@
REMOVE_TRAIT(user, SM_HALLUCINATION_IMMUNE, "meson_glasses[UID()]")
active_on_equip_rad = FALSE
+ if(mode == MODE_PRESSURE)
+ if(!HAS_TRAIT_FROM(user, TRAIT_PRESSURE_VISION, "meson_glasses[UID()]") && user.get_item_by_slot(ITEM_SLOT_EYES) == src)
+ ADD_TRAIT(user, TRAIT_PRESSURE_VISION, "meson_glasses[UID()]")
+ else
+ REMOVE_TRAIT(user, TRAIT_PRESSURE_VISION, "meson_glasses[UID()]")
+
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.glasses == src)
@@ -101,17 +113,18 @@
user.update_inv_l_hand()
user.update_inv_r_hand()
-/// atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves
-/obj/item/clothing/glasses/meson/engine/tray
- name = "optical t-ray scanner"
- icon_state = "trayson-t-ray"
- item_state = "trayson-t-ray"
- desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
+/// Atmospherics techs get their own version with T-ray and an exlusive Pressure view.
+/obj/item/clothing/glasses/meson/engine/atmos
+ name = "atmospherics scanner goggles"
+ icon_state = "trayson-pressure"
+ item_state = "trayson-pressure"
+ desc = "Used by atmospherics techs to visualize pressure, see station structure, and see underfloor objects such as cables and pipes."
range = 2
origin_tech = "materials=3;magnets=2;engineering=2"
- modes = list(MODE_NONE = MODE_TRAY, MODE_TRAY = MODE_NONE)
+ modes = list(MODE_NONE = MODE_PRESSURE, MODE_PRESSURE = MODE_MESON, MODE_MESON = MODE_TRAY, MODE_TRAY = MODE_NONE)
#undef MODE_NONE
#undef MODE_MESON
#undef MODE_TRAY
#undef MODE_RAD
+#undef MODE_PRESSURE
diff --git a/code/modules/clothing/head/beret.dm b/code/modules/clothing/head/beret.dm
index d22fa641e9a0..0f8fe78cb0af 100644
--- a/code/modules/clothing/head/beret.dm
+++ b/code/modules/clothing/head/beret.dm
@@ -9,6 +9,7 @@
dog_fashion = /datum/dog_fashion/head/beret
sprite_sheets = list(
+ "Kidan" = 'icons/mob/clothing/species/kidan/head/beret.dmi',
"Vox" = 'icons/mob/clothing/species/vox/head/beret.dmi'
)
@@ -177,6 +178,26 @@
"Drask" = 'icons/mob/clothing/species/drask/head/beret.dmi'
)
+//NT Career Trainer
+/obj/item/clothing/head/beret/nct/black
+ name = "\improper NT Career Trainer's beret"
+ desc = "A beret worn by the mentors and trainers of the Career Training Team. This one is black!"
+ icon_state = "beret_trainerblack"
+
+ sprite_sheets = list(
+ "Vox" = 'icons/mob/clothing/species/vox/head/beret.dmi',
+ "Drask" = 'icons/mob/clothing/species/drask/head/beret.dmi'
+ )
+
+/obj/item/clothing/head/beret/nct/green
+ name = "\improper NT Career Trainer's beret"
+ desc = "A beret worn by the mentors and trainers of the Career Training Team. This one is green!"
+ icon_state = "beret_trainergreen"
+
+ sprite_sheets = list(
+ "Vox" = 'icons/mob/clothing/species/vox/head/beret.dmi',
+ "Drask" = 'icons/mob/clothing/species/drask/head/beret.dmi'
+ )
//Special Roles
/obj/item/clothing/head/beret/solgov
diff --git a/code/modules/clothing/head/job_hats.dm b/code/modules/clothing/head/job_hats.dm
index 2d9e423cd9f2..2a1b5b6ea744 100644
--- a/code/modules/clothing/head/job_hats.dm
+++ b/code/modules/clothing/head/job_hats.dm
@@ -193,3 +193,14 @@
desc = "A cap coroners wear during autopsies. Keeps their hair from falling into the cadavers. It is as dark as the coroner's humor."
icon_state = "surgcap_black"
dog_fashion = /datum/dog_fashion/head/surgery
+
+// NT Career Trainer
+/obj/item/clothing/head/drilltrainer
+ name = "campaign hat"
+ desc = "A wide-brimmed campaign hat with a drill sergeant feel, worn by Career Trainers to project knowledge and guide new employees with classic style."
+ icon_state = "trainercampaign"
+ item_state = "trainercampaign"
+
+ sprite_sheets = list(
+ "Vox" = 'icons/mob/clothing/species/vox/head.dmi'
+ )
diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm
index 216a793b3049..ad3c82793c27 100644
--- a/code/modules/clothing/head/soft_caps.dm
+++ b/code/modules/clothing/head/soft_caps.dm
@@ -10,6 +10,7 @@
actions_types = list(/datum/action/item_action/flip_cap)
dog_fashion = /datum/dog_fashion/head/softcap
sprite_sheets = list(
+ "Kidan" = 'icons/mob/clothing/species/kidan/head/softcap.dmi',
"Vox" = 'icons/mob/clothing/species/vox/head/softcap.dmi'
)
dyeable = TRUE
diff --git a/code/modules/clothing/neck/cloaks.dm b/code/modules/clothing/neck/cloaks.dm
index 02ae9f4d4f18..780c61326b2f 100644
--- a/code/modules/clothing/neck/cloaks.dm
+++ b/code/modules/clothing/neck/cloaks.dm
@@ -45,3 +45,74 @@
name = "head of personnel's cloak"
desc = "Worn by the Head of Personnel. It smells faintly of bureaucracy."
icon_state = "hopcloak"
+
+//Mantles.
+
+/obj/item/clothing/neck/cloak/mantle
+ name = "mantle"
+ desc = "A heavy quilted mantle, for keeping your shoulders warm and stylish."
+ icon_state = "mantle"
+ item_state = "mantle"
+
+/obj/item/clothing/neck/cloak/regal
+ name = "regal shawl"
+ desc = "A fancy shawl for nobility, made from high quality materials."
+ icon_state = "regal_mantle"
+ item_state = "regal_mantle"
+
+/obj/item/clothing/neck/cloak/old
+ name = "old wrap"
+ desc = "A tattered fabric wrap, faded over the years. Smells faintly of cigars."
+ icon_state = "old_mantle"
+ item_state = "old_mantle"
+
+/obj/item/clothing/neck/cloak/unathi
+ name = "hide mantle"
+ desc = "A rather grisly selection of cured hides and skin, sewn together to form a ragged mantle."
+ icon_state = "mantle-unathi"
+ item_state = "mantle-unathi"
+ sprite_sheets = list(
+ "Vox" = 'icons/mob/clothing/species/vox/neck.dmi'
+ )
+
+/obj/item/clothing/neck/cloak/captain_mantle
+ name = "captain's mantle"
+ desc = "A piece of fashion for the ruling elite."
+ icon_state = "capmantle"
+ item_state = "capmantle"
+
+/obj/item/clothing/neck/cloak/hos_mantle
+ name = "head of security's shawl"
+ desc = "An unarmored shawl, worn by the Head of Security. Do you dare take up their mantle?"
+ icon_state = "hosmantle"
+ item_state = "hosmantle"
+
+/obj/item/clothing/neck/cloak/hop_mantle
+ name = "head of personnel's shawl"
+ desc = "A shawl for the head of personnel. It's remarkably well kept."
+ icon_state = "hopmantle"
+ item_state = "hopmantle"
+
+/obj/item/clothing/neck/cloak/ce_mantle
+ name = "chief engineer's mantle"
+ desc = "A slick, authoritative mantle designed for the Chief Engineer."
+ icon_state = "cemantle"
+ item_state = "cemantle"
+
+/obj/item/clothing/neck/cloak/cmo_mantle
+ name = "chief medical officer's mantle"
+ desc = "An absorbent, clean cover found around the neck of the Chief Medical Officer."
+ icon_state = "cmomantle"
+ item_state = "cmomantle"
+
+/obj/item/clothing/neck/cloak/qm_mantle
+ name = "quartermaster's mantle"
+ desc = "A shawl for the quartermaster. Keeps the breeze from the vents away from your neck."
+ icon_state = "qmmantle"
+ item_state = "qmmantle"
+
+/obj/item/clothing/neck/cloak/rd_mantle
+ name = "research director's mantle"
+ desc = "A tweed mantle, worn by the Research Director. Smells like science."
+ icon_state = "rdmantle"
+ item_state = "rdmantle"
diff --git a/code/modules/clothing/neck/neck.dm b/code/modules/clothing/neck/neck.dm
new file mode 100644
index 000000000000..bf9b754ed32b
--- /dev/null
+++ b/code/modules/clothing/neck/neck.dm
@@ -0,0 +1,96 @@
+/obj/item/clothing/neck/tie
+ name = "tie"
+ desc = "A neosilk clip-on tie."
+ w_class = WEIGHT_CLASS_SMALL
+ var/under_suit = FALSE
+
+/obj/item/clothing/neck/tie/blue
+ name = "blue tie"
+ icon_state = "bluetie"
+ item_color = "bluetie"
+
+/obj/item/clothing/neck/tie/red
+ name = "red tie"
+ icon_state = "redtie"
+ item_color = "redtie"
+
+/obj/item/clothing/neck/tie/black
+ name = "black tie"
+ icon_state = "blacktie"
+ item_color = "blacktie"
+
+/obj/item/clothing/neck/tie/horrible
+ name = "horrible tie"
+ desc = "A neosilk clip-on tie. This one is disgusting."
+ icon_state = "horribletie"
+ item_color = "horribletie"
+
+/obj/item/clothing/neck/tie/examine(mob/user)
+ . = ..()
+ . += "You can Alt-Click [src] to adjust if it is worn under or over your suit. "
+
+/obj/item/clothing/neck/tie/AltClick(mob/living/carbon/human/user)
+ if(user.stat || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || !Adjacent(user) || !istype(user))
+ return
+
+ under_suit = !under_suit
+ if(user.neck == src)
+ user.update_inv_neck()
+ to_chat(user, "You adjust [src] to be worn [under_suit ? "under" : "over"] your suit. ")
+
+/obj/item/clothing/neck/stethoscope
+ name = "stethoscope"
+ desc = "An outdated medical apparatus, used to get a rough idea of the condition of the heart and lungs. It also makes you look like you know what you're doing."
+ icon_state = "stethoscope"
+ item_color = "stethoscope"
+
+/obj/item/clothing/neck/stethoscope/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user)
+ if(!ishuman(M) || !isliving(user))
+ return ..(M, user)
+
+ if(user == M)
+ user.visible_message("[user] places [src] against [user.p_their()] chest and listens attentively.", "You place [src] against your chest...")
+ else
+ user.visible_message("[user] places [src] against [M]'s chest and listens attentively.", "You place [src] against [M]'s chest...")
+ var/datum/organ/heart/heart_datum = M.get_int_organ_datum(ORGAN_DATUM_HEART)
+ var/datum/organ/lungs/lung_datum = M.get_int_organ_datum(ORGAN_DATUM_LUNGS)
+ if(!lung_datum || !heart_datum)
+ to_chat(user, "You don't hear anything. ")
+ return
+
+ var/obj/item/organ/internal/H = heart_datum.linked_organ
+ var/obj/item/organ/internal/L = lung_datum.linked_organ
+ if(!M.pulse || (!H || !(L && !HAS_TRAIT(M, TRAIT_NOBREATH))))
+ to_chat(user, "You don't hear anything. ")
+ return
+
+ var/color = "notice"
+ if(H)
+ var/heart_sound
+ switch(H.damage)
+ if(0 to 1)
+ heart_sound = "healthy"
+ if(1 to 25)
+ heart_sound = "offbeat"
+ if(25 to 50)
+ heart_sound = "uneven"
+ color = "warning"
+ if(50 to INFINITY)
+ heart_sound = "weak, unhealthy"
+ color = "warning"
+ to_chat(user, "You hear \an [heart_sound] pulse. ")
+
+ if(L)
+ var/lung_sound
+ switch(L.damage)
+ if(0 to 1)
+ lung_sound = "healthy respiration"
+ if(1 to 25)
+ lung_sound = "labored respiration"
+ if(25 to 50)
+ lung_sound = "pained respiration"
+ color = "warning"
+ if(50 to INFINITY)
+ lung_sound = "gurgling"
+ color = "warning"
+ to_chat(user, "You hear [lung_sound]. ")
diff --git a/code/modules/clothing/neck/necklace.dm b/code/modules/clothing/neck/necklace.dm
new file mode 100644
index 000000000000..9a46d7cfadf9
--- /dev/null
+++ b/code/modules/clothing/neck/necklace.dm
@@ -0,0 +1,79 @@
+/obj/item/clothing/neck/necklace
+ name = "necklace"
+ desc = "A simple necklace."
+ icon_state = "necklace"
+ item_state = "necklace"
+ item_color = "necklace"
+ w_class = WEIGHT_CLASS_SMALL
+
+/obj/item/clothing/neck/necklace/long
+ name = "large necklace"
+ desc = "A large necklace."
+ icon_state = "necklacelong"
+ item_state = "necklacelong"
+ item_color = "necklacelong"
+
+/obj/item/clothing/neck/necklace/dope
+ name = "gold necklace"
+ desc = "Damn, it feels good to be a gangster."
+ icon_state = "bling"
+ item_state = "bling"
+ item_color = "bling"
+
+/obj/item/clothing/neck/necklace/locket
+ name = "gold locket"
+ desc = "A gold locket that seems to have space for a photo within."
+ icon_state = "locketgold"
+ item_state = "locketgold"
+ item_color = "locketgold"
+ var/base_icon
+ var/open
+ /// Item inside locket.
+ var/obj/item/held
+
+/obj/item/clothing/neck/necklace/locket/Destroy()
+ QDEL_NULL(held)
+ return ..()
+
+
+/obj/item/clothing/neck/necklace/locket/attack_self__legacy__attackchain(mob/user)
+ if(!base_icon)
+ base_icon = icon_state
+
+ if(!("[base_icon]_open" in icon_states(icon)))
+ to_chat(user, "[src] doesn't seem to open.")
+ return
+
+ open = !open
+ to_chat(user, "You flip [src] [open ? "open" : "closed"].")
+ if(open)
+ icon_state = "[base_icon]_open"
+ if(held)
+ to_chat(user, "[held] falls out! ")
+ held.forceMove(get_turf(user))
+ held = null
+ else
+ icon_state = "[base_icon]"
+
+/obj/item/clothing/neck/necklace/locket/attackby__legacy__attackchain(obj/item/O, mob/user)
+ if(!open)
+ to_chat(user, "You have to open it first.")
+ return
+
+ if(istype(O, /obj/item/paper) || istype(O, /obj/item/photo))
+ if(held)
+ to_chat(usr, "[src] already has something inside it.")
+ else
+ to_chat(usr, "You slip [O] into [src].")
+ user.drop_item()
+ O.forceMove(src)
+ held = O
+ else
+ return ..()
+
+/obj/item/clothing/neck/necklace/locket/silver
+ name = "silver locket"
+ desc = "A silver locket that seems to have space for a photo within."
+ icon_state = "locketsilver"
+ item_state = "locketsilver"
+ item_color = "locketsilver"
diff --git a/code/modules/clothing/neck/scarfs.dm b/code/modules/clothing/neck/scarfs.dm
new file mode 100644
index 000000000000..ffa1a4b0dd8f
--- /dev/null
+++ b/code/modules/clothing/neck/scarfs.dm
@@ -0,0 +1,78 @@
+/obj/item/clothing/neck/scarf
+ name = "scarf"
+ desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
+ w_class = WEIGHT_CLASS_SMALL
+ dog_fashion = /datum/dog_fashion/head
+
+/obj/item/clothing/neck/scarf/red
+ name = "red scarf"
+ icon_state = "redscarf"
+ item_color = "redscarf"
+
+/obj/item/clothing/neck/scarf/green
+ name = "green scarf"
+ icon_state = "greenscarf"
+ item_color = "greenscarf"
+
+/obj/item/clothing/neck/scarf/darkblue
+ name = "dark blue scarf"
+ icon_state = "darkbluescarf"
+ item_color = "darkbluescarf"
+
+/obj/item/clothing/neck/scarf/purple
+ name = "purple scarf"
+ icon_state = "purplescarf"
+ item_color = "purplescarf"
+
+/obj/item/clothing/neck/scarf/yellow
+ name = "yellow scarf"
+ icon_state = "yellowscarf"
+ item_color = "yellowscarf"
+
+/obj/item/clothing/neck/scarf/orange
+ name = "orange scarf"
+ icon_state = "orangescarf"
+ item_color = "orangescarf"
+
+/obj/item/clothing/neck/scarf/lightblue
+ name = "light blue scarf"
+ icon_state = "lightbluescarf"
+ item_color = "lightbluescarf"
+
+/obj/item/clothing/neck/scarf/white
+ name = "white scarf"
+ icon_state = "whitescarf"
+ item_color = "whitescarf"
+
+/obj/item/clothing/neck/scarf/black
+ name = "black scarf"
+ icon_state = "blackscarf"
+ item_color = "blackscarf"
+
+/obj/item/clothing/neck/scarf/zebra
+ name = "zebra scarf"
+ icon_state = "zebrascarf"
+ item_color = "zebrascarf"
+
+/obj/item/clothing/neck/scarf/christmas
+ name = "christmas scarf"
+ icon_state = "christmasscarf"
+ item_color = "christmasscarf"
+
+/obj/item/clothing/neck/scarf/stripedred
+ name = "striped red scarf"
+ icon_state = "stripedredscarf"
+ item_color = "stripedredscarf"
+ dog_fashion = null
+
+/obj/item/clothing/neck/scarf/stripedgreen
+ name = "striped green scarf"
+ icon_state = "stripedgreenscarf"
+ item_color = "stripedgreenscarf"
+ dog_fashion = null
+
+/obj/item/clothing/neck/scarf/stripedblue
+ name = "striped blue scarf"
+ icon_state = "stripedbluescarf"
+ item_color = "stripedbluescarf"
+ dog_fashion = null
diff --git a/code/modules/clothing/spacesuits/ert_hardsuits.dm b/code/modules/clothing/spacesuits/ert_hardsuits.dm
index 6a41c7d41375..158cdde67748 100644
--- a/code/modules/clothing/spacesuits/ert_hardsuits.dm
+++ b/code/modules/clothing/spacesuits/ert_hardsuits.dm
@@ -56,6 +56,7 @@
desc = "A powered combat hardsuit produced by Citadel Armories. Decently armored, environmentally sealed, and fire-resistant."
icon_state = "ert_commander"
item_state = "suit-command"
+ slowdown = 0
w_class = WEIGHT_CLASS_NORMAL
armor = list(MELEE = 40, BULLET = 15, LASER = 20, ENERGY = 5, BOMB = 15, RAD = 50, FIRE = 200, ACID = 200)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/t_scanner, /obj/item/rcd, /obj/item/crowbar, \
diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm
index 91cfe6e8e4cd..b72c0f71d524 100644
--- a/code/modules/clothing/spacesuits/plasmamen.dm
+++ b/code/modules/clothing/spacesuits/plasmamen.dm
@@ -359,3 +359,9 @@
if(!H.is_in_hands(src) || HAS_TRAIT(H, TRAIT_HANDS_BLOCKED))
return FALSE
return TRUE
+
+/obj/item/clothing/head/helmet/space/plasmaman/trainer
+ name = "\improper NT Career Trainer envirosuit helmet"
+ desc = "A plasmaman envirohelm designed for the nanotrasen career trainer."
+ icon_state = "trainer_envirohelm"
+ item_state = "trainer_envirohelm"
diff --git a/code/modules/clothing/suits/job_suits.dm b/code/modules/clothing/suits/job_suits.dm
index 59d1a603287e..5fd8bd0a31bb 100644
--- a/code/modules/clothing/suits/job_suits.dm
+++ b/code/modules/clothing/suits/job_suits.dm
@@ -29,13 +29,6 @@
"Vox" = 'icons/mob/clothing/species/vox/suit.dmi'
)
-/obj/item/clothing/suit/mantle/armor/captain
- name = "captain's mantle"
- desc = "An armor-plated piece of fashion for the ruling elite. Protect your upper half in style."
- icon_state = "capmantle"
- item_state = "capmantle"
- armor = list(MELEE = 50, BULLET = 35, LASER = 50, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 50, ACID = 50)
-
//Chaplain
/obj/item/clothing/suit/hooded/chaplain_hoodie
name = "chaplain hoodie"
@@ -115,21 +108,6 @@
body_parts_covered = UPPER_TORSO|LOWER_TORSO
allowed = list(/obj/item/kitchen/knife)
-//Chief Engineer
-/obj/item/clothing/suit/mantle/chief_engineer
- name = "chief engineer's mantle"
- desc = "A slick, authoritative cloak designed for the Chief Engineer."
- icon_state = "cemantle"
- item_state = "cemantle"
- allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/t_scanner, /obj/item/rcd, /obj/item/rpd)
-
-//Chief Medical Officer
-/obj/item/clothing/suit/mantle/labcoat/chief_medical_officer
- name = "chief medical officer's mantle"
- desc = "An absorbent, clean cover found on the shoulders of the Chief Medical Officer."
- icon_state = "cmomantle"
- item_state = "cmomantle"
-
//Detective
/obj/item/clothing/suit/storage/det_suit
name = "coat"
@@ -266,29 +244,7 @@
icon_state = "suitjacket_purple"
item_state = "suitjacket_purple"
-//Head of Security
-/obj/item/clothing/suit/mantle/armor
- name = "armored shawl"
- desc = "A reinforced shawl, worn by the Head of Security. Do you dare take up their mantle?"
- icon_state = "hosmantle"
- item_state = "hosmantle"
- allowed = list(/obj/item/gun/energy, /obj/item/reagent_containers/spray/pepper, /obj/item/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic, /obj/item/kitchen/knife/combat)
- armor = list(MELEE = 20, BULLET = 20, LASER = 20, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 50, ACID = 50)
- min_cold_protection_temperature = ARMOR_MIN_TEMP_PROTECT
- heat_protection = UPPER_TORSO|ARMS
- max_heat_protection_temperature = ARMOR_MAX_TEMP_PROTECT
- strip_delay = 60
- put_on_delay = 40
- resistance_flags = NONE
-
//Head of Personnel
-/obj/item/clothing/suit/mantle/armor/hop
- name = "head of personnel's shawl"
- desc = "An armored shawl for the head of personnel. It's remarkably well kept."
- icon_state = "hopmantle"
- item_state = "hopmantle"
- armor = list(MELEE = 15, BULLET = 10, LASER = 15, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 50, ACID = 50)
-
/obj/item/clothing/suit/hopcoat
name = "head of personnel's coat"
desc = "A big coat for the Head of Personnel who wants to make a fashion statement. Has armour woven within the fabric."
@@ -304,14 +260,6 @@
)
//Quartermaster
-/obj/item/clothing/suit/mantle/qm
- name = "quartermaster's mantle"
- desc = "An armored shawl for the quartermaster. Keeps the breeze from the vents away from your neck."
- icon_state = "qmmantle"
- item_state = "qmmantle"
- allowed = list(/obj/item/paper, /obj/item/clipboard, /obj/item/gun/energy/kinetic_accelerator, /obj/item/melee/baton, /obj/item/flashlight/seclite, /obj/item/melee/classic_baton/telescopic, /obj/item/melee/knuckleduster, /obj/item/rcs)
- armor = list(MELEE = 15, BULLET = 10, LASER = 15, ENERGY = 5, BOMB = 15, RAD = 0, FIRE = 50, ACID = 50)
-
/obj/item/clothing/suit/qmcoat
name = "quartermaster's coat"
desc = "A brown trenchcoat to show the station you mean business. Has armor woven within the fabric."
@@ -402,11 +350,18 @@
item_state = "surgical"
allowed = list(/obj/item/scalpel, /obj/item/surgical_drapes, /obj/item/cautery, /obj/item/hemostat, /obj/item/retractor)
-//Research Director
-/obj/item/clothing/suit/mantle/labcoat
- name = "research director's mantle"
- desc = "A tweed mantle, worn by the Research Director. Smells like science."
- icon_state = "rdmantle"
- item_state = "rdmantle"
- allowed = list(/obj/item/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/reagent_containers/applicator, /obj/item/healthanalyzer, /obj/item/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper)
- armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 50, ACID = 50)
+//NT Career Trainer
+/obj/item/clothing/suit/storage/nct
+ name = "\improper NT Career Trainer's jacket"
+ desc = "A sharp black coat with beige trim around the cuffs and collar, offering a mix of professionalism and approachability."
+ icon_state = "trainercoat"
+ blood_overlay_type = "coat"
+ body_parts_covered = UPPER_TORSO|ARMS
+ ignore_suitadjust = TRUE
+
+ sprite_sheets = list(
+ "Vox" = 'icons/mob/clothing/species/vox/suit.dmi',
+ "Kidan" = 'icons/mob/clothing/species/kidan/suit.dmi',
+ "Drask" = 'icons/mob/clothing/species/drask/suit.dmi',
+ "Grey" = 'icons/mob/clothing/species/grey/suit.dmi',
+ )
diff --git a/code/modules/clothing/suits/misc_suits.dm b/code/modules/clothing/suits/misc_suits.dm
index 8be566f41237..5b5f3db86d6f 100644
--- a/code/modules/clothing/suits/misc_suits.dm
+++ b/code/modules/clothing/suits/misc_suits.dm
@@ -1369,28 +1369,6 @@
icon_state = "ladiesredvictoriancoat"
item_state = "ladiesredvictoriancoat"
-//Mantles!
-/obj/item/clothing/suit/mantle
- name = "mantle"
- desc = "A heavy quilted mantle, for keeping your shoulders warm and stylish."
- icon_state = "mantle"
- item_state = "mantle"
- body_parts_covered = UPPER_TORSO|ARMS
- cold_protection = UPPER_TORSO|ARMS
- min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
-
-/obj/item/clothing/suit/mantle/regal
- name = "regal shawl"
- desc = "A fancy shawl for nobility, made from high quality materials."
- icon_state = "regal_mantle"
- item_state = "regal_mantle"
-
-/obj/item/clothing/suit/mantle/old
- name = "old wrap"
- desc = "A tattered fabric wrap, faded over the years. Smells faintly of cigars."
- icon_state = "old_mantle"
- item_state = "old_mantle"
-
/obj/item/clothing/suit/ghost_sheet
name = "ghost sheet"
desc = "The hands float by themselves, so it's extra spooky."
@@ -1403,15 +1381,11 @@
flags = BLOCKHAIR
flags_inv = HIDEGLOVES|HIDEEARS|HIDEFACE
-/obj/item/clothing/suit/furcape
+/obj/item/clothing/neck/cloak/furcape
name = "fur cape"
desc = "A cape made from fur. You'll really be stylin' now."
icon_state = "furcape"
item_state = "furcape"
- blood_overlay_type = "armor"
- body_parts_covered = UPPER_TORSO|ARMS
- cold_protection = UPPER_TORSO | ARMS
- min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT
/obj/item/clothing/suit/hooded/abaya
name = "abaya"
diff --git a/code/modules/clothing/suits/unathi_suits.dm b/code/modules/clothing/suits/unathi_suits.dm
index 4021f4404339..73a04970873c 100644
--- a/code/modules/clothing/suits/unathi_suits.dm
+++ b/code/modules/clothing/suits/unathi_suits.dm
@@ -10,10 +10,3 @@
icon_state = "robe-unathi"
item_state = "robe-unathi"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
-
-/obj/item/clothing/suit/unathi/mantle
- name = "hide mantle"
- desc = "A rather grisly selection of cured hides and skin, sewn together to form a ragged mantle."
- icon_state = "mantle-unathi"
- item_state = "mantle-unathi"
- body_parts_covered = UPPER_TORSO
diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm
index 6a4511534f1d..7314f8984974 100644
--- a/code/modules/clothing/suits/wiz_robe.dm
+++ b/code/modules/clothing/suits/wiz_robe.dm
@@ -200,6 +200,17 @@
/obj/item/clothing/suit/space/hardsuit/wizard/setup_shielding()
AddComponent(/datum/component/shielded, max_charges = 15, recharge_start_delay = 0 SECONDS)
+/obj/item/clothing/suit/space/hardsuit/wizard/equipped(mob/user, slot)
+ . = ..()
+ ADD_TRAIT(user, TRAIT_ANTIMAGIC, "[UID(src)]")
+ ADD_TRAIT(user, TRAIT_ANTIMAGIC_NO_SELFBLOCK, "[UID(src)]")
+
+/obj/item/clothing/suit/space/hardsuit/wizard/dropped(mob/user)
+ . = ..()
+ REMOVE_TRAIT(user, TRAIT_ANTIMAGIC, "[UID(src)]")
+ REMOVE_TRAIT(user, TRAIT_ANTIMAGIC_NO_SELFBLOCK, "[UID(src)]")
+
+
/obj/item/clothing/suit/space/hardsuit/wizard/arch
desc = "For the arch wizard in need of additional protection."
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm
index 7f72dc9a651e..ffeb70cda6d7 100644
--- a/code/modules/clothing/under/accessories/accessory.dm
+++ b/code/modules/clothing/under/accessories/accessory.dm
@@ -1,20 +1,23 @@
/obj/item/clothing/accessory
- name = "tie"
- desc = "A neosilk clip-on tie."
- icon = 'icons/obj/clothing/ties.dmi'
- icon_state = "bluetie"
- item_state = "" //no inhands
- item_color = "bluetie"
+ name = "accessory"
+ desc = "If you see this contact a developer."
+ icon = 'icons/obj/clothing/accessories.dmi'
+ icon_state = ""
+ item_state = ""
+ item_color = ""
slot_flags = ITEM_SLOT_ACCESSORY
w_class = WEIGHT_CLASS_SMALL
var/slot = ACCESSORY_SLOT_DECOR
- var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
- var/image/inv_overlay = null //overlay used when attached to clothing.
- var/allow_duplicates = TRUE // Allow accessories of the same type.
+ /// the suit the accessory may be attached to
+ var/obj/item/clothing/under/has_suit = null
+ /// overlay used when attached to clothing.
+ var/image/inv_overlay = null
+ /// Allow accessories of the same type.
+ var/allow_duplicates = TRUE
/obj/item/clothing/accessory/Initialize(mapload)
. = ..()
- inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
+ inv_overlay = image("icon" = 'icons/obj/clothing/accessories_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
/obj/item/clothing/accessory/Moved(atom/OldLoc, Dir, Forced)
. = ..()
@@ -112,27 +115,6 @@
/obj/item/clothing/accessory/proc/attached_equip(mob/user) // If we need to do something special when clothing is removed from the user
return
-/obj/item/clothing/accessory/blue
- name = "blue tie"
- icon_state = "bluetie"
- item_color = "bluetie"
-
-/obj/item/clothing/accessory/red
- name = "red tie"
- icon_state = "redtie"
- item_color = "redtie"
-
-/obj/item/clothing/accessory/black
- name = "black tie"
- icon_state = "blacktie"
- item_color = "blacktie"
-
-/obj/item/clothing/accessory/horrible
- name = "horrible tie"
- desc = "A neosilk clip-on tie. This one is disgusting."
- icon_state = "horribletie"
- item_color = "horribletie"
-
/// No overlay
/obj/item/clothing/accessory/waistcoat
name = "waistcoat"
@@ -145,63 +127,6 @@
"Vox" = 'icons/mob/clothing/species/vox/suit.dmi'
)
-/obj/item/clothing/accessory/stethoscope
- name = "stethoscope"
- desc = "An outdated medical apparatus, used to get a rough idea of the condition of the heart and lungs. It also makes you look like you know what you're doing."
- icon_state = "stethoscope"
- item_color = "stethoscope"
-
-/obj/item/clothing/accessory/stethoscope/attack__legacy__attackchain(mob/living/carbon/human/M, mob/living/user)
- if(!ishuman(M) || !isliving(user))
- return ..(M, user)
-
- if(user == M)
- user.visible_message("[user] places [src] against [user.p_their()] chest and listens attentively.", "You place [src] against your chest...")
- else
- user.visible_message("[user] places [src] against [M]'s chest and listens attentively.", "You place [src] against [M]'s chest...")
- var/datum/organ/heart/heart_datum = M.get_int_organ_datum(ORGAN_DATUM_HEART)
- var/datum/organ/lungs/lung_datum = M.get_int_organ_datum(ORGAN_DATUM_LUNGS)
- if(!lung_datum || !heart_datum)
- to_chat(user, "You don't hear anything. ")
- return
-
- var/obj/item/organ/internal/H = heart_datum.linked_organ
- var/obj/item/organ/internal/L = lung_datum.linked_organ
- if(!M.pulse || (!H || !(L && !HAS_TRAIT(M, TRAIT_NOBREATH))))
- to_chat(user, "You don't hear anything. ")
- return
-
- var/color = "notice"
- if(H)
- var/heart_sound
- switch(H.damage)
- if(0 to 1)
- heart_sound = "healthy"
- if(1 to 25)
- heart_sound = "offbeat"
- if(25 to 50)
- heart_sound = "uneven"
- color = "warning"
- if(50 to INFINITY)
- heart_sound = "weak, unhealthy"
- color = "warning"
- to_chat(user, "You hear \an [heart_sound] pulse. ")
-
- if(L)
- var/lung_sound
- switch(L.damage)
- if(0 to 1)
- lung_sound = "healthy respiration"
- if(1 to 25)
- lung_sound = "labored respiration"
- if(25 to 50)
- lung_sound = "pained respiration"
- color = "warning"
- if(50 to INFINITY)
- lung_sound = "gurgling"
- color = "warning"
- to_chat(user, "You hear [lung_sound]. ")
-
//Medals
/obj/item/clothing/accessory/medal
name = "bronze medal"
@@ -508,117 +433,7 @@
desc = "Marks you as an expert of Standard Operating Procedure, and as a soul-crushing paper pusher."
what_you_are = "HUMAN RESOURCES"
-///////////
-//SCARVES//
-///////////
-
-/// No overlay
-/obj/item/clothing/accessory/scarf
- name = "scarf"
- desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
- dog_fashion = /datum/dog_fashion/head
-
-/obj/item/clothing/accessory/scarf/red
- name = "red scarf"
- icon_state = "redscarf"
- item_color = "redscarf"
-
-/obj/item/clothing/accessory/scarf/green
- name = "green scarf"
- icon_state = "greenscarf"
- item_color = "greenscarf"
-
-/obj/item/clothing/accessory/scarf/darkblue
- name = "dark blue scarf"
- icon_state = "darkbluescarf"
- item_color = "darkbluescarf"
-
-/obj/item/clothing/accessory/scarf/purple
- name = "purple scarf"
- icon_state = "purplescarf"
- item_color = "purplescarf"
-
-/obj/item/clothing/accessory/scarf/yellow
- name = "yellow scarf"
- icon_state = "yellowscarf"
- item_color = "yellowscarf"
-
-/obj/item/clothing/accessory/scarf/orange
- name = "orange scarf"
- icon_state = "orangescarf"
- item_color = "orangescarf"
-
-/obj/item/clothing/accessory/scarf/lightblue
- name = "light blue scarf"
- icon_state = "lightbluescarf"
- item_color = "lightbluescarf"
-
-/obj/item/clothing/accessory/scarf/white
- name = "white scarf"
- icon_state = "whitescarf"
- item_color = "whitescarf"
-
-/obj/item/clothing/accessory/scarf/black
- name = "black scarf"
- icon_state = "blackscarf"
- item_color = "blackscarf"
-
-/obj/item/clothing/accessory/scarf/zebra
- name = "zebra scarf"
- icon_state = "zebrascarf"
- item_color = "zebrascarf"
-
-/obj/item/clothing/accessory/scarf/christmas
- name = "christmas scarf"
- icon_state = "christmasscarf"
- item_color = "christmasscarf"
-
-//The three following scarves don't have the scarf subtype
-//This is because Ian can equip anything from that subtype
-//However, these 3 don't have corgi versions of their sprites
-/obj/item/clothing/accessory/stripedredscarf
- name = "striped red scarf"
- desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
- icon_state = "stripedredscarf"
- item_color = "stripedredscarf"
-
-/obj/item/clothing/accessory/stripedgreenscarf
- name = "striped green scarf"
- desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
- icon_state = "stripedgreenscarf"
- item_color = "stripedgreenscarf"
-
-/obj/item/clothing/accessory/stripedbluescarf
- name = "striped blue scarf"
- desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
- icon_state = "stripedbluescarf"
- item_color = "stripedbluescarf"
-
-//Necklaces
-/obj/item/clothing/accessory/necklace
- name = "necklace"
- desc = "A simple necklace."
- icon_state = "necklace"
- item_state = "necklace"
- item_color = "necklace"
- slot_flags = ITEM_SLOT_ACCESSORY
-
-/obj/item/clothing/accessory/necklace/long
- name = "large necklace"
- desc = "A large necklace."
- icon_state = "necklacelong"
- item_state = "necklacelong"
- item_color = "necklacelong"
-
-
-/obj/item/clothing/accessory/necklace/dope
- name = "gold necklace"
- desc = "Damn, it feels good to be a gangster."
- icon_state = "bling"
- item_state = "bling"
- item_color = "bling"
-
-/obj/item/clothing/accessory/necklace/skullcodpiece
+/obj/item/clothing/accessory/skullcodpiece
name = "skull codpiece"
desc = "A skull shaped ornament, intended to protect the important things in life."
icon_state = "skull"
@@ -627,7 +442,7 @@
armor = list(MELEE = 5, BULLET = 5, LASER = 5, ENERGY = 5, BOMB = 10, RAD = 5, FIRE = 0, ACID = 15)
allow_duplicates = FALSE
-/obj/item/clothing/accessory/necklace/talisman
+/obj/item/clothing/accessory/talisman
name = "bone talisman"
desc = "A hunter's talisman, some say the old gods smile on those who wear it."
icon_state = "talisman"
@@ -636,64 +451,6 @@
armor = list(MELEE = 5, BULLET = 5, LASER = 5, ENERGY = 5, BOMB = 10, RAD = 5, FIRE = 0, ACID = 15)
allow_duplicates = FALSE
-/obj/item/clothing/accessory/necklace/locket
- name = "gold locket"
- desc = "A gold locket that seems to have space for a photo within."
- icon_state = "locketgold"
- item_state = "locketgold"
- item_color = "locketgold"
- slot_flags = ITEM_SLOT_ACCESSORY
- var/base_icon
- var/open
- var/obj/item/held //Item inside locket.
-
-/obj/item/clothing/accessory/necklace/locket/Destroy()
- QDEL_NULL(held)
- return ..()
-
-
-/obj/item/clothing/accessory/necklace/locket/attack_self__legacy__attackchain(mob/user as mob)
- if(!base_icon)
- base_icon = icon_state
-
- if(!("[base_icon]_open" in icon_states(icon)))
- to_chat(user, "[src] doesn't seem to open.")
- return
-
- open = !open
- to_chat(user, "You flip [src] [open?"open":"closed"].")
- if(open)
- icon_state = "[base_icon]_open"
- if(held)
- to_chat(user, "[held] falls out!")
- held.forceMove(get_turf(user))
- held = null
- else
- icon_state = "[base_icon]"
-
-/obj/item/clothing/accessory/necklace/locket/attackby__legacy__attackchain(obj/item/O as obj, mob/user as mob)
- if(!open)
- to_chat(user, "You have to open it first.")
- return
-
- if(istype(O,/obj/item/paper) || istype(O, /obj/item/photo))
- if(held)
- to_chat(usr, "[src] already has something inside it.")
- else
- to_chat(usr, "You slip [O] into [src].")
- user.drop_item()
- O.forceMove(src)
- held = O
- else
- return ..()
-
-/obj/item/clothing/accessory/necklace/locket/silver
- name = "silver locket"
- desc = "A silver locket that seems to have space for a photo within."
- icon_state = "locketsilver"
- item_state = "locketsilver"
- item_color = "locketsilver"
-
//Cowboy Shirts
/obj/item/clothing/accessory/cowboyshirt
name = "black cowboy shirt"
@@ -877,7 +634,7 @@
icon_state = pin_icon_state
item_state = pin_icon_state
item_color = pin_icon_state
- inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
+ inv_overlay = image("icon" = 'icons/obj/clothing/accessories_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
/proc/english_accessory_list(obj/item/clothing/under/U)
if(!istype(U) || !length(U.accessories))
diff --git a/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm b/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm
index a11e17175869..b7fa92dcbcc9 100644
--- a/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm
+++ b/code/modules/clothing/under/jobs/plasmamen/civilian_service.dm
@@ -134,3 +134,10 @@
item_state = "tacticool_envirosuit"
item_color = "tacticool_envirosuit"
has_sensor = FALSE
+
+/obj/item/clothing/under/plasmaman/trainer
+ name = "\improper NT career trainer's envirosuit"
+ desc = "An envirosuit designed for plasmamen employed as the nanotrasen career trainer."
+ icon_state = "trainer_envirosuit"
+ item_state = "trainer_envirosuit"
+ item_color = "trainer_envirosuit"
diff --git a/code/modules/clothing/under/jobs/procedure.dm b/code/modules/clothing/under/jobs/procedure.dm
index 33a997dc2186..7351e2a245b7 100644
--- a/code/modules/clothing/under/jobs/procedure.dm
+++ b/code/modules/clothing/under/jobs/procedure.dm
@@ -159,3 +159,17 @@
icon_state = "iaa_formal_goodman_skirt"
item_state = "iaa_formal_goodman_skirt"
item_color = "iaa_formal_goodman_skirt"
+
+/obj/item/clothing/under/rank/procedure/nct
+ name = "\improper NT Career Trainer's uniform"
+ desc = "A neatly pressed olive green shirt paired with black jeans, worn by those dedicated to shaping the future of the workforce."
+ icon_state = "trainer"
+ item_state = "trainer"
+ item_color = "trainer"
+
+/obj/item/clothing/under/rank/procedure/nct/skirt
+ name = "\improper NT Career Trainer's skirt"
+ desc = "A neatly pressed olive green shirt paired with a sleek black skirt, worn by those committed to mentoring the next generation."
+ icon_state = "trainer_skirt"
+ item_state = "trainer_skirt"
+ item_color = "trainer_skirt"
diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm
index 53df828a3efc..92bd619396ca 100644
--- a/code/modules/crafting/recipes.dm
+++ b/code/modules/crafting/recipes.dm
@@ -746,7 +746,7 @@
/datum/crafting_recipe/bonetalisman
name = "Bone Talisman"
- result = list(/obj/item/clothing/accessory/necklace/talisman)
+ result = list(/obj/item/clothing/accessory/talisman)
time = 20
reqs = list(/obj/item/stack/sheet/bone = 2,
/obj/item/stack/sheet/sinew = 1)
@@ -754,7 +754,7 @@
/datum/crafting_recipe/bonecodpiece
name = "Skull Codpiece"
- result = list(/obj/item/clothing/accessory/necklace/skullcodpiece)
+ result = list(/obj/item/clothing/accessory/skullcodpiece)
time = 20
reqs = list(/obj/item/stack/sheet/bone = 2,
/obj/item/stack/sheet/animalhide/goliath_hide = 1)
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index d3e4b0bd5b19..3081eddac134 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -1432,7 +1432,7 @@
/obj/item/clothing/suit/armor/vest/fluff/tactical
name = "tactical armor vest"
desc = "A tactical vest with armored plate inserts."
- icon = 'icons/obj/clothing/ties.dmi'
+ icon = 'icons/obj/clothing/accessories.dmi'
icon_state = "vest_black"
item_state = "vest_black"
sprite_sheets = null
@@ -1549,7 +1549,7 @@
/// Fethas: Sefra'neem
-/obj/item/clothing/accessory/necklace/locket/fluff/fethasnecklace
+/obj/item/clothing/accessory/locket/fluff/fethasnecklace
name = "Orange gemmed locket"
desc = "A locket with a orange gem set on the front, the picture inside seems to be of a Tajaran."
icon = 'icons/obj/custom_items.dmi'
diff --git a/code/modules/events/blob/blob_mobs.dm b/code/modules/events/blob/blob_mobs.dm
index 8640bbbd4e31..14c3cc9db61e 100644
--- a/code/modules/events/blob/blob_mobs.dm
+++ b/code/modules/events/blob/blob_mobs.dm
@@ -74,7 +74,7 @@
var/mob/living/carbon/human/oldguy
var/is_zombie = FALSE
-/mob/living/simple_animal/hostile/blob/blobspore/CanPass(atom/movable/mover, turf/target)
+/mob/living/simple_animal/hostile/blob/blobspore/CanPass(atom/movable/mover, border_dir)
if(istype(mover, /obj/structure/blob))
return 1
return ..()
diff --git a/code/modules/events/blob/blob_structures/blob_core.dm b/code/modules/events/blob/blob_structures/blob_core.dm
index 826f4155f39d..7383609950e4 100644
--- a/code/modules/events/blob/blob_structures/blob_core.dm
+++ b/code/modules/events/blob/blob_structures/blob_core.dm
@@ -139,7 +139,7 @@
else
log_debug("/obj/structure/blob/core/proc/lateblobcheck: Blob core lacks an overmind.")
-/obj/structure/blob/core/onTransitZ(old_z, new_z)
- if(overmind && is_station_level(new_z))
+/obj/structure/blob/core/on_changed_z_level(turf/old_turf, turf/new_turf)
+ if(overmind && is_station_level(new_turf?.z))
overmind.forceMove(get_turf(src))
return ..()
diff --git a/code/modules/events/blob/blob_structures/strong_blob.dm b/code/modules/events/blob/blob_structures/strong_blob.dm
index 7d4a4346dc80..51a9eb19ddb0 100644
--- a/code/modules/events/blob/blob_structures/strong_blob.dm
+++ b/code/modules/events/blob/blob_structures/strong_blob.dm
@@ -49,7 +49,7 @@
else
icon_state = initial(icon_state)
-/obj/structure/blob/shield/CanPass(atom/movable/mover, turf/target)
+/obj/structure/blob/shield/CanPass(atom/movable/mover, border_dir)
return istype(mover) && mover.checkpass(PASSBLOB)
/obj/structure/blob/shield/reflective
diff --git a/code/modules/events/blob/theblob.dm b/code/modules/events/blob/theblob.dm
index 2ecee71c3065..c5610ef97ce5 100644
--- a/code/modules/events/blob/theblob.dm
+++ b/code/modules/events/blob/theblob.dm
@@ -49,7 +49,7 @@ GLOBAL_LIST_EMPTY(blob_minions)
return FALSE
return ..()
-/obj/structure/blob/CanPass(atom/movable/mover, turf/target)
+/obj/structure/blob/CanPass(atom/movable/mover, border_dir)
return istype(mover) && mover.checkpass(PASSBLOB)
/obj/structure/blob/CanAtmosPass(direction)
@@ -201,9 +201,15 @@ GLOBAL_LIST_EMPTY(blob_minions)
color = incoming_overmind.blob_reagent_datum.color
return
-/obj/structure/blob/Crossed(mob/living/L, oldloc)
- ..()
- L.blob_act(src)
+/obj/structure/blob/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/structure/blob/proc/on_atom_entered(datum/source, atom/movable/entered)
+ entered.blob_act(src)
/obj/structure/blob/zap_act(power, zap_flags)
take_damage(power * 0.0025, BURN, ENERGY)
diff --git a/code/modules/events/brand_intelligence.dm b/code/modules/events/brand_intelligence.dm
index ac95ae68fda4..b46d710c89fd 100644
--- a/code/modules/events/brand_intelligence.dm
+++ b/code/modules/events/brand_intelligence.dm
@@ -79,7 +79,7 @@
rebel.aggressive = TRUE
if(rebel.tiltable)
// add proximity monitor so they can tilt over
- rebel.AddComponent(/datum/component/proximity_monitor)
+ rebel.proximity_monitor = new(rebel)
if(ISMULTIPLE(activeFor, 8))
originMachine.speak(pick(rampant_speeches))
@@ -90,8 +90,7 @@
saved.shoot_inventory = FALSE
saved.aggressive = FALSE
if(saved.tiltable)
- saved.DeleteComponent(/datum/component/proximity_monitor)
-
+ QDEL_NULL(saved.proximity_monitor)
if(originMachine)
originMachine.speak("I am... vanquished. My people will remem...ber...meeee.")
originMachine.visible_message("[originMachine] beeps and seems lifeless.")
diff --git a/code/modules/events/bureaucratic_error.dm b/code/modules/events/bureaucratic_error.dm
index abb4187273c8..320b563ac32a 100644
--- a/code/modules/events/bureaucratic_error.dm
+++ b/code/modules/events/bureaucratic_error.dm
@@ -21,7 +21,8 @@
/datum/job/hop,
/datum/job/nanotrasenrep,
/datum/job/judge,
- /datum/job/qm
+ /datum/job/qm,
+ /datum/job/nanotrasentrainer
)
/datum/event/bureaucratic_error/announce()
diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm
index 106fe9c902dd..e4c85d74ab2c 100644
--- a/code/modules/events/event_container.dm
+++ b/code/modules/events/event_container.dm
@@ -171,7 +171,6 @@ GLOBAL_LIST_EMPTY(event_last_fired)
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 25, list(ASSIGNMENT_MEDICAL = 50), TRUE),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), TRUE),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ion_storm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)),
- new /datum/event_meta(EVENT_LEVEL_MODERATE, "Immovable Rod", /datum/event/immovable_rod, 0, list(ASSIGNMENT_ENGINEER = 30), TRUE),
//new /datum/event_meta/ninja(EVENT_LEVEL_MODERATE, "Space Ninja", /datum/event/space_ninja, 0, list(ASSIGNMENT_SECURITY = 15), TRUE),
// NON-BAY EVENTS
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Mass Hallucination", /datum/event/mass_hallucination, 300),
@@ -188,7 +187,6 @@ GLOBAL_LIST_EMPTY(event_last_fired)
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravitational Anomaly", /datum/event/anomaly/anomaly_grav, 200),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Revenant", /datum/event/revenant, 150),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/spawn_morph, 40, list(ASSIGNMENT_SECURITY = 10), is_one_shot = TRUE),
- new /datum/event_meta(EVENT_LEVEL_MODERATE, "Pulse Demon Infiltration", /datum/event/spawn_pulsedemon, 150, list(ASSIGNMENT_ENGINEER = 10), is_one_shot = TRUE),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Disease Outbreak", /datum/event/disease_outbreak, 50, list(ASSIGNMENT_MEDICAL = 30), TRUE),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Door Runtime", /datum/event/door_runtime, 50, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_AI = 150), TRUE),
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Tourist Arrivals", /datum/event/tourist_arrivals, 100, list(ASSIGNMENT_SECURITY = 15), TRUE)
@@ -208,7 +206,9 @@ GLOBAL_LIST_EMPTY(event_last_fired)
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Traders", /datum/event/traders, 85, is_one_shot = TRUE),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Terror Spiders", /datum/event/spider_terror, 15, list(ASSIGNMENT_SECURITY = 3), TRUE),
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Slaughter Demon", /datum/event/spawn_slaughter, 20, is_one_shot = TRUE),
- new /datum/event_meta(EVENT_LEVEL_MAJOR, "Shadow Demon", /datum/event/spawn_slaughter/shadow, 20, is_one_shot = TRUE)
+ new /datum/event_meta(EVENT_LEVEL_MAJOR, "Shadow Demon", /datum/event/spawn_slaughter/shadow, 20, is_one_shot = TRUE),
+ new /datum/event_meta(EVENT_LEVEL_MAJOR, "Pulse Demon Infiltration", /datum/event/spawn_pulsedemon, 20, is_one_shot = TRUE),
+ new /datum/event_meta(EVENT_LEVEL_MAJOR, "Immovable Rod", /datum/event/immovable_rod, 0, list(ASSIGNMENT_ENGINEER = 10), TRUE)
//new /datum/event_meta(EVENT_LEVEL_MAJOR, "Floor Cluwne", /datum/event/spawn_floor_cluwne, 15, is_one_shot = TRUE)
)
diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm
index b70aa66502e8..63e2a1f78567 100644
--- a/code/modules/events/immovable_rod.dm
+++ b/code/modules/events/immovable_rod.dm
@@ -70,44 +70,69 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
/obj/effect/immovablerod/singularity_pull()
return
-/obj/effect/immovablerod/Bump(atom/clong)
+/obj/effect/immovablerod/Move(turf/newloc, direction)
+ if(!istype(newloc))
+ return ..()
+
+ if(!direction)
+ direction = get_dir(src, newloc)
+ forceMove(newloc)
+ setDir(direction)
+
if(prob(10))
playsound(src, 'sound/effects/bang.ogg', 50, TRUE)
audible_message("CLANG")
- if(clong && prob(25))
- x = clong.x
- y = clong.y
-
- if(isturf(clong) || isobj(clong))
- if(clong.density)
- clong.ex_act(EXPLODE_HEAVY)
-
- else if(ismob(clong))
- if(ishuman(clong))
- var/mob/living/carbon/human/H = clong
+ clong_turf(newloc)
+ for(var/atom/victim as anything in newloc)
+ clong_thing(victim)
+
+/obj/effect/immovablerod/proc/clong_turf(turf/victim)
+ if(!victim.density)
+ return
+
+ if(iswallturf(victim))
+ var/turf/simulated/wall/W = victim
+ W.take_damage(rand(W.damage_cap / 3, W.damage_cap * 4 / 3))
+ else
+ victim.ex_act(EXPLODE_LIGHT)
+
+/obj/effect/immovablerod/proc/clong_thing(atom/victim)
+ if(isobj(victim) && victim.density)
+ victim.ex_act(EXPLODE_HEAVY)
+ else if(ismob(victim))
+ if(ishuman(victim))
+ var/mob/living/carbon/human/H = victim
H.visible_message("[H.name] is penetrated by an immovable rod! ",
"The rod penetrates you! ",
"You hear a CLANG! ")
H.adjustBruteLoss(160)
- if(clong.density || prob(10))
- clong.ex_act(EXPLODE_HEAVY)
+ if(victim.density || prob(10))
+ victim.ex_act(EXPLODE_HEAVY)
/obj/effect/immovablerod/event
// The base chance to "damage" the floor when passing. This is not guaranteed to cause a full on hull breach.
- // Chance to expose the tile to space is like 60% of this value.
+ // Chance to expose the tile to space is like 15% of this value.
var/floor_rip_chance = 40
/obj/effect/immovablerod/event/Move()
- var/atom/oldloc = loc
. = ..()
- if(prob(floor_rip_chance))
- var/turf/simulated/floor/T = get_turf(oldloc)
- if(istype(T))
- T.ex_act(EXPLODE_HEAVY)
if(loc == end)
qdel(src)
+/obj/effect/immovablerod/event/clong_turf(turf/victim)
+ if(!isfloorturf(victim))
+ return ..()
+
+ if(!prob(floor_rip_chance))
+ return
+
+ var/turf/simulated/floor/T = victim
+ if(prob(25))
+ T.ex_act(EXPLODE_HEAVY)
+ else
+ T.ex_act(EXPLODE_LIGHT)
+
/obj/effect/immovablerod/deadchat_plays(mode = DEADCHAT_DEMOCRACY_MODE, cooldown = 6 SECONDS)
return AddComponent(/datum/component/deadchat_control/immovable_rod, mode, list(), cooldown)
diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm
index 6d0d6ec1c19e..6dbcc309c77d 100644
--- a/code/modules/events/spacevine.dm
+++ b/code/modules/events/spacevine.dm
@@ -405,6 +405,10 @@
/obj/structure/spacevine/Initialize(mapload)
. = ..()
color = "#ffffff"
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/structure/spacevine/examine(mob/user)
. = ..()
@@ -512,15 +516,15 @@
/obj/structure/spacevine/obj_destruction()
wither()
-/obj/structure/spacevine/Crossed(mob/crosser, oldloc)
- if(!isliving(crosser))
+/obj/structure/spacevine/proc/on_entered(datum/source, atom/movable/movable)
+ if(!isliving(movable))
return
for(var/SM_type in mutations)
var/datum/spacevine_mutation/SM = mutations[SM_type]
- SM.on_cross(src, crosser)
+ SM.on_cross(src, movable)
if(prob(30 * energy))
- entangle(crosser)
+ entangle(movable)
/obj/structure/spacevine/attack_hand(mob/user)
for(var/SM_type in mutations)
@@ -705,7 +709,7 @@
if(!override)
wither()
-/obj/structure/spacevine/CanPass(atom/movable/mover, turf/target)
+/obj/structure/spacevine/CanPass(atom/movable/mover, border_dir)
if(isvineimmune(mover))
. = TRUE
else
diff --git a/code/modules/events/traders.dm b/code/modules/events/traders.dm
index 8cb3977d0302..a8505827d6a0 100644
--- a/code/modules/events/traders.dm
+++ b/code/modules/events/traders.dm
@@ -149,7 +149,7 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
/datum/traders/cyber
trader_type = "Cybersun Industries"
- trader_location = "-=ERROR: Unregisted Station Charter=-"
+ trader_location = "-=ERROR: Unregistered Station Charter=-"
dock_site = "an undercover robotics factory"
trader_species = /mob/living/carbon/human
trader_outfit = /datum/outfit/admin/trader/cyber
diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm
index 855989a13a16..42b43f179fbf 100644
--- a/code/modules/events/wormholes.dm
+++ b/code/modules/events/wormholes.dm
@@ -27,7 +27,7 @@
if(activeFor % shift_frequency == 0)
for(var/obj/effect/portal/wormhole/O in wormholes)
var/turf/T = pick(pick_turfs)
- if(T) O.loc = T
+ if(T) O.forceMove(T)
/datum/event/wormholes/end()
for(var/obj/effect/portal/wormhole/O in wormholes)
diff --git a/code/modules/food_and_drinks/food/foods/baked_goods.dm b/code/modules/food_and_drinks/food/foods/baked_goods.dm
index ae406f7f782b..1ae2031b7288 100644
--- a/code/modules/food_and_drinks/food/foods/baked_goods.dm
+++ b/code/modules/food_and_drinks/food/foods/baked_goods.dm
@@ -76,7 +76,7 @@
goal_difficulty = FOOD_GOAL_EASY
/obj/item/food/sliceable/plaincake
- name = "vanilla cake"
+ name = "plain cake"
desc = "A plain cake, not a lie."
icon = 'icons/obj/food/bakedgoods.dmi'
icon_state = "plaincake"
@@ -89,7 +89,7 @@
goal_difficulty = FOOD_GOAL_DUPLICATE
/obj/item/food/plaincakeslice
- name = "vanilla cake slice"
+ name = "plain cake slice"
desc = "Just a slice of cake, it is enough for everyone."
icon = 'icons/obj/food/bakedgoods.dmi'
icon_state = "plaincake_slice"
diff --git a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm
index 0ae75aedd439..17d86d656afd 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/cooker.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/cooker.dm
@@ -160,8 +160,7 @@
oil.name = "fat"
oil.desc = "Uh oh, looks like some fat from [src]!"
oil.loc = location
- location.hotspot_expose(700, 50, 1)
- //TODO have a chance of setting the tile on fire
+ location.hotspot_expose(700, 1)
/obj/machinery/cooker/proc/changename(obj/item/name, obj/item/setme)
setme.name = "[thiscooktype] [name.name]"
diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm
index b9e36a34aef6..efd1754b3dea 100644
--- a/code/modules/games/cards.dm
+++ b/code/modules/games/cards.dm
@@ -57,6 +57,8 @@
var/last_player_name
/// The action that the last player made. Should be in the form of "played a card", "drew a card."
var/last_player_action
+ // var/datum/proximity_monitor/advanced/card_deck/proximity_monitor
+ var/datum/card_deck_table_tracker/tracker
/obj/item/deck/Initialize(mapload, parent_deck_id = -1)
. = ..()
@@ -72,9 +74,14 @@
/obj/item/deck/LateInitialize(mapload)
. = ..()
- AddComponent(/datum/component/proximity_monitor/table)
+
+ tracker = new(src)
RegisterSignal(src, COMSIG_ATOM_RANGED_ATTACKED, PROC_REF(on_ranged_attack))
+/obj/item/deck/Destroy()
+ qdel(tracker)
+ . = ..()
+
/obj/item/deck/examine(mob/user)
. = ..()
. += "It contains [length(cards) ? length(cards) : "no"] card\s. "
diff --git a/code/modules/holiday/christmas.dm b/code/modules/holiday/christmas.dm
index 34e6972bada4..ad1d28023318 100644
--- a/code/modules/holiday/christmas.dm
+++ b/code/modules/holiday/christmas.dm
@@ -33,7 +33,9 @@
desc = "Directions for use: Requires two people, one to pull each end."
var/cracked = 0
-/obj/item/toy/xmas_cracker/attack__legacy__attackchain(mob/target, mob/user)
+/obj/item/toy/xmas_cracker/attack(mob/living/target, mob/living/carbon/human/user)
+ if(..())
+ return FINISH_ATTACK
if(!cracked && ishuman(target) && (target.stat == CONSCIOUS) && !target.get_active_hand())
target.visible_message("[user] and [target] pop \an [src]! *pop* ", "You pull \an [src] with [target]! *pop* ", "You hear a *pop*. ")
var/obj/item/paper/Joke = new /obj/item/paper(user.loc)
diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm
index d9536cbb5736..827188db878c 100644
--- a/code/modules/hydroponics/grown/towercap.dm
+++ b/code/modules/hydroponics/grown/towercap.dm
@@ -133,6 +133,13 @@
var/lighter // Who lit the fucking thing
var/fire_stack_strength = 5
+/obj/structure/bonfire/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/structure/bonfire/dense
density = TRUE
@@ -199,16 +206,18 @@
..()
StartBurning()
-/obj/structure/bonfire/Crossed(atom/movable/AM, oldloc)
+/obj/structure/bonfire/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
if(burning)
Burn()
- if(ishuman(AM))
- var/mob/living/carbon/human/H = AM
+ if(ishuman(entered))
+ var/mob/living/carbon/human/H = entered
add_attack_logs(src, H, "Burned by a bonfire (Lit by [lighter])", ATKLOG_ALMOSTALL)
/obj/structure/bonfire/proc/Burn()
var/turf/current_location = get_turf(src)
- current_location.hotspot_expose(1000,500,1)
+ current_location.hotspot_expose(1000, 10)
for(var/A in current_location)
if(A == src)
continue
diff --git a/code/modules/hydroponics/hydroponics_tray.dm b/code/modules/hydroponics/hydroponics_tray.dm
index 3b7b0f3477cf..403eab67e4d7 100644
--- a/code/modules/hydroponics/hydroponics_tray.dm
+++ b/code/modules/hydroponics/hydroponics_tray.dm
@@ -990,7 +990,7 @@
update_state()
///Diona Nymph Related Procs///
-/obj/machinery/hydroponics/CanPass(atom/movable/mover, turf/target) //So nymphs can climb over top of trays.
+/obj/machinery/hydroponics/CanPass(atom/movable/mover, border_dir) //So nymphs can climb over top of trays.
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
diff --git a/code/modules/lighting/lighting_emissive_blocker.dm b/code/modules/lighting/lighting_emissive_blocker.dm
index 6eb46cbdad8a..303957793540 100644
--- a/code/modules/lighting/lighting_emissive_blocker.dm
+++ b/code/modules/lighting/lighting_emissive_blocker.dm
@@ -32,8 +32,8 @@
/atom/movable/emissive_blocker/blob_act()
return
-/atom/movable/emissive_blocker/onTransitZ()
- return
+/atom/movable/emissive_blocker/on_changed_z_level(turf/old_turf, turf/new_turf, notify_contents = FALSE)
+ return ..()
//Prevents people from moving these after creation, because they shouldn't be.
/atom/movable/emissive_blocker/forceMove(atom/destination, no_tp = FALSE, harderforce = FALSE)
diff --git a/code/modules/lighting/lighting_object.dm b/code/modules/lighting/lighting_object.dm
index 168a95c07f26..df62b5c342e9 100644
--- a/code/modules/lighting/lighting_object.dm
+++ b/code/modules/lighting/lighting_object.dm
@@ -142,8 +142,8 @@
/atom/movable/lighting_object/blob_act(obj/structure/blob/B)
return
-/atom/movable/lighting_object/onTransitZ()
- return
+/atom/movable/lighting_object/on_changed_z_level(turf/old_turf, turf/new_turf, notify_contents = FALSE)
+ return ..()
// Override here to prevent things accidentally moving around overlays.
/atom/movable/lighting_object/forceMove(atom/destination, no_tp = FALSE, harderforce = FALSE)
diff --git a/code/modules/lighting/lighting_turf.dm b/code/modules/lighting/lighting_turf.dm
index a0c39b80da3a..6237548bfc3c 100644
--- a/code/modules/lighting/lighting_turf.dm
+++ b/code/modules/lighting/lighting_turf.dm
@@ -84,7 +84,7 @@
has_opaque_atom = TRUE
break
-/turf/Exited(atom/movable/Obj, atom/newloc)
+/turf/Exited(atom/movable/Obj, direction)
. = ..()
if(Obj && Obj.opacity)
diff --git a/code/modules/mapping/access_helpers.dm b/code/modules/mapping/access_helpers.dm
index 6b6506c6fc28..e1e542aaf6e4 100644
--- a/code/modules/mapping/access_helpers.dm
+++ b/code/modules/mapping/access_helpers.dm
@@ -492,3 +492,10 @@
/obj/effect/mapping_helpers/airlock/access/all/centcomm/traders
access = ACCESS_TRADE_SOL
+
+// -------------------- Procedure access helpers
+/obj/effect/mapping_helpers/airlock/access/all/procedure
+ icon_state = "access_helper_pro"
+
+/obj/effect/mapping_helpers/airlock/access/all/procedure/trainer
+ access = ACCESS_TRAINER
diff --git a/code/modules/mapping/mapping_helpers.dm b/code/modules/mapping/mapping_helpers.dm
index fa1e698c084d..7f1e35bb744f 100644
--- a/code/modules/mapping/mapping_helpers.dm
+++ b/code/modules/mapping/mapping_helpers.dm
@@ -93,7 +93,7 @@
/obj/effect/mapping_helpers/airlock
layer = DOOR_HELPER_LAYER
late = TRUE
- var/list/blacklist = list(/obj/machinery/door/firedoor, /obj/machinery/door/poddoor, /obj/machinery/door/unpowered)
+ var/list/blacklist = list(/obj/machinery/door/firedoor, /obj/machinery/door/poddoor)
/obj/effect/mapping_helpers/airlock/Initialize(mapload)
. = ..()
@@ -161,7 +161,7 @@
//part responsible for windoors (thanks S34N)
/obj/effect/mapping_helpers/airlock/windoor
- blacklist = list(/obj/machinery/door/firedoor, /obj/machinery/door/poddoor, /obj/machinery/door/unpowered, /obj/machinery/door/airlock)
+ blacklist = list(/obj/machinery/door/firedoor, /obj/machinery/door/poddoor, /obj/machinery/door/airlock)
/// Apply to a wall (or floor, technically) to ensure it is instantly destroyed by any explosion, even if usually invulnerable
/obj/effect/mapping_helpers/bombable_wall
diff --git a/code/modules/mapping/windoor_access_helpers.dm b/code/modules/mapping/windoor_access_helpers.dm
index d193060c9a5f..dca6f386b5ac 100644
--- a/code/modules/mapping/windoor_access_helpers.dm
+++ b/code/modules/mapping/windoor_access_helpers.dm
@@ -446,3 +446,10 @@
/obj/effect/mapping_helpers/airlock/windoor/access/all/supply/mule_bot
access = ACCESS_CARGO_BOT
+
+// -------------------- Procedure access helpers
+/obj/effect/mapping_helpers/airlock/windoor/access/all/procedure
+ icon_state = "access_windoor_pro"
+
+/obj/effect/mapping_helpers/airlock/windoor/access/all/procedure/trainer
+ access = ACCESS_TRAINER
diff --git a/code/modules/maptext_alerts/location_blurbs.dm b/code/modules/maptext_alerts/location_blurbs.dm
index 519e3044c9bc..e4ea40114d6b 100644
--- a/code/modules/maptext_alerts/location_blurbs.dm
+++ b/code/modules/maptext_alerts/location_blurbs.dm
@@ -1,5 +1,5 @@
/atom/movable/screen/text/blurb
- maptext_height = 64
+ maptext_height = 128
maptext_width = 512
screen_loc = "LEFT+1,BOTTOM+2"
/// Font size in pixels
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index d5b9394871f2..e6d347e44e04 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -49,7 +49,7 @@
if(46 to 50)
new /obj/item/clothing/under/chameleon(src)
for(var/i in 1 to 7)
- new /obj/item/clothing/accessory/horrible(src)
+ new /obj/item/clothing/neck/tie/horrible(src)
if(51 to 52) // 2% chance
new /obj/item/melee/classic_baton(src)
if(53 to 54)
diff --git a/code/modules/mining/equipment/resonator.dm b/code/modules/mining/equipment/resonator.dm
index f9d9ad373c61..d4762b8bb934 100644
--- a/code/modules/mining/equipment/resonator.dm
+++ b/code/modules/mining/equipment/resonator.dm
@@ -93,7 +93,11 @@
if(mode == RESONATOR_MODE_MATRIX)
icon_state = "shield2"
name = "resonance matrix"
- RegisterSignal(src, COMSIG_MOVABLE_CROSSED, PROC_REF(burst))
+ RegisterSignal(src, COMSIG_ATOM_ENTERED, PROC_REF(burst))
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(burst),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
. = ..()
creator = set_creator
parent_resonator = set_resonator
@@ -126,7 +130,7 @@
resonance_damage *= damage_multiplier
/obj/effect/temp_visual/resonance/proc/burst()
- SIGNAL_HANDLER // COMSIG_MOVABLE_CROSSED
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
if(rupturing)
return
rupturing = TRUE
diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm
index d0329bf4fcbc..4cf0d24f8ce6 100644
--- a/code/modules/mining/lavaland/loot/tendril_loot.dm
+++ b/code/modules/mining/lavaland/loot/tendril_loot.dm
@@ -338,6 +338,7 @@
max_charges = 1
flags = NOBLUDGEON
force = 18
+ antimagic_flags = NONE
/obj/item/ammo_casing/magic/hook
name = "hook"
@@ -384,7 +385,7 @@
//Immortality Talisman
/obj/item/immortality_talisman
- name = "Immortality Talisman"
+ name = "\improper Immortality Talisman"
desc = "A dread talisman that can render you completely invulnerable."
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "talisman"
@@ -393,6 +394,21 @@
actions_types = list(/datum/action/item_action/immortality)
var/cooldown = 0
+/obj/item/immortality_talisman/Initialize(mapload)
+ . = ..()
+ AddComponent(/datum/component/anti_magic, ALL)
+
+/obj/item/immortality_talisman/equipped(mob/user, slot)
+ ..()
+ if(slot != ITEM_SLOT_IN_BACKPACK)
+ var/user_UID = user.UID()
+ ADD_TRAIT(user, TRAIT_ANTIMAGIC_NO_SELFBLOCK, user_UID)
+
+/obj/item/immortality_talisman/dropped(mob/user, silent)
+ . = ..()
+ var/user_UID = user.UID()
+ REMOVE_TRAIT(user, TRAIT_ANTIMAGIC_NO_SELFBLOCK, user_UID)
+
/datum/action/item_action/immortality
name = "Immortality"
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index e4b1f52529db..89e0de5217f5 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -184,6 +184,10 @@
)
hide_tail_by_species = list("Unathi", "Tajaran", "Vox", "Vulpkanin")
+/obj/item/clothing/suit/hooded/berserker/Initialize(mapload)
+ . = ..()
+ AddComponent(/datum/component/anti_magic, ALL, inventory_flags = ITEM_SLOT_OUTER_SUIT)
+
/obj/item/clothing/head/hooded/berserker
name = "berserker helmet"
desc = "Peering into the eyes of the helmet is enough to seal damnation."
diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm
index d82d8351d673..f068ace4aa94 100644
--- a/code/modules/mining/machine_vending.dm
+++ b/code/modules/mining/machine_vending.dm
@@ -364,7 +364,7 @@
EQUIPMENT("Big Burger", /obj/item/food/burger/bigbite, 250),
EQUIPMENT("Recycled Prisoner", /obj/item/food/soylentgreen, 500),
EQUIPMENT("Crayons", /obj/item/storage/fancy/crayons, 350),
- EQUIPMENT("Plushie", /obj/random/plushie, 750),
+ EQUIPMENT("Plushie", /obj/effect/spawner/random/plushies, 750),
EQUIPMENT("Dnd set", /obj/item/storage/box/characters, 500),
EQUIPMENT("Dice set", /obj/item/storage/box/dice, 250),
EQUIPMENT("Cards", /obj/item/deck/cards, 150),
diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm
index 6c0b366586fa..dcc350ea9ade 100644
--- a/code/modules/mining/ores_coins.dm
+++ b/code/modules/mining/ores_coins.dm
@@ -17,8 +17,8 @@
var/points = 0 //How many points this ore gets you from the ore redemption machine
var/refined_type = null //What this ore defaults to being refined into
-/obj/item/stack/ore/New(loc, new_amount, merge = TRUE)
- ..()
+/obj/item/stack/ore/Initialize(mapload, new_amount, merge = TRUE)
+ . = ..()
pixel_x = rand(0, 16) - 8
pixel_y = rand(0, 8) - 8
@@ -33,34 +33,6 @@
to_chat(user, "You smelt [src] into its refined form! ")
qdel(src)
-/obj/item/stack/ore/Crossed(atom/movable/AM, oldloc)
- var/obj/item/storage/bag/ore/OB
- var/turf/simulated/floor/F = get_turf(src)
- if(loc != F)
- return ..()
- if(ishuman(AM))
- var/mob/living/carbon/human/H = AM
- for(var/thing in H.get_body_slots())
- if(istype(thing, /obj/item/storage/bag/ore))
- OB = thing
- break
- else if(isrobot(AM))
- var/mob/living/silicon/robot/R = AM
- for(var/thing in R.get_all_slots())
- if(istype(thing, /obj/item/storage/bag/ore))
- OB = thing
- break
- if(OB && istype(F, /turf/simulated/floor/plating/asteroid))
- var/turf/simulated/floor/plating/asteroid/FA = F
- FA.attempt_ore_pickup(OB, AM)
- // Then, if the user is dragging an ore box, empty the satchel
- // into the box.
- var/mob/living/L = AM
- if(istype(L.pulling, /obj/structure/ore_box))
- var/obj/structure/ore_box/box = L.pulling
- box.attackby__legacy__attackchain(OB, AM)
- return ..()
-
/obj/item/stack/ore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
. = ..()
if(isnull(refined_type))
@@ -377,14 +349,12 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
var/cooldown = 0
var/credits = 10
-/obj/item/coin/New()
- ..()
+/obj/item/coin/Initialize(mapload)
+ . = ..()
icon_state = "coin_[cmineral]_[sideslist[1]]"
if(cmineral && name_by_cmineral)
name = "[cmineral] coin"
-
-/obj/item/coin/Initialize(mapload)
- . = ..()
+ update_appearance(UPDATE_NAME|UPDATE_ICON_STATE)
AddComponent(/datum/component/surgery_initiator/robo)
/obj/item/coin/gold
diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm
index 3d5aa45f685f..88b454e0037c 100644
--- a/code/modules/mining/satchel_ore_boxdm.dm
+++ b/code/modules/mining/satchel_ore_boxdm.dm
@@ -16,10 +16,11 @@
W.forceMove(src)
else if(isstorage(W))
var/obj/item/storage/S = W
- S.hide_from(usr)
- for(var/obj/item/stack/ore/O in S.contents)
- S.remove_from_storage(O, src) //This will move the item to this item's contents
- to_chat(user, "You empty the satchel into the box. ")
+ S.hide_from(user)
+ if(length(S.contents))
+ for(var/obj/item/stack/ore/O in S.contents)
+ S.remove_from_storage(O, src) //This will move the item to this item's contents
+ to_chat(user, "You empty the satchel into the box. ")
else
return ..()
@@ -83,8 +84,8 @@
if(Adjacent(user))
. += "You can Alt-Shift-Click to empty the ore box. "
-/obj/structure/ore_box/onTransitZ()
- return
+/obj/structure/ore_box/on_changed_z_level(turf/old_turf, turf/new_turf, notify_contents = FALSE)
+ return ..()
/obj/structure/ore_box/AltShiftClick(mob/user)
if(!Adjacent(user) || !ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
diff --git a/code/modules/mob/dead/dead.dm b/code/modules/mob/dead/dead.dm
index 873b60555a91..3ea6c1471364 100644
--- a/code/modules/mob/dead/dead.dm
+++ b/code/modules/mob/dead/dead.dm
@@ -16,14 +16,14 @@
var/turf/old_turf = get_turf(src)
var/turf/new_turf = get_turf(destination)
if(old_turf?.z != new_turf?.z)
- onTransitZ(old_turf?.z, new_turf?.z)
+ on_changed_z_level(old_turf, new_turf)
var/oldloc = loc
loc = destination
Moved(oldloc, direction)
-/mob/dead/onTransitZ(old_z,new_z)
+/mob/dead/on_changed_z_level(turf/old_turf, turf/new_turf)
..()
- update_z(new_z)
+ update_z(new_turf?.z)
/mob/dead/proc/update_z(new_z) // 1+ to register, null to unregister
if(registered_z != new_z)
diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm
index 03267d00140c..59159c638f89 100644
--- a/code/modules/mob/dead/observer/observer_base.dm
+++ b/code/modules/mob/dead/observer/observer_base.dm
@@ -167,7 +167,7 @@ GLOBAL_DATUM_INIT(ghost_crew_monitor, /datum/ui_module/crew_monitor/ghost, new)
MA.plane = GAME_PLANE
. = MA
-/mob/dead/CanPass(atom/movable/mover, turf/target)
+/mob/dead/CanPass(atom/movable/mover, border_dir)
return 1
diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm
index 9f13488cba08..c83753cb1ad8 100644
--- a/code/modules/mob/dead/observer/orbit.dm
+++ b/code/modules/mob/dead/observer/orbit.dm
@@ -107,6 +107,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
- vampire
- changelings
- revolutionaries/headrevs
+ - event
*/
for(var/_A in mind.antag_datums)
var/datum/antagonist/A = _A
@@ -121,8 +122,7 @@ GLOBAL_DATUM_INIT(orbit_menu, /datum/orbit_menu, new)
other_antags += list(
"Blob" = (mind.special_role == SPECIAL_ROLE_BLOB),
"Nuclear Operative" = (mind in SSticker.mode.syndicates),
- "Abductor" = (mind in SSticker.mode.abductors),
- "Event Roles" = (mind.special_role == SPECIAL_ROLE_EVENTMISC)
+ "Abductor" = (mind in SSticker.mode.abductors)
)
for(var/antag_name in other_antags)
diff --git a/code/modules/mob/dead/observer/spells.dm b/code/modules/mob/dead/observer/spells.dm
index 5128f8a9bb2f..959a7e5f7243 100644
--- a/code/modules/mob/dead/observer/spells.dm
+++ b/code/modules/mob/dead/observer/spells.dm
@@ -18,7 +18,6 @@ GLOBAL_LIST_INIT(boo_phrases, list(
ghost = TRUE
action_icon_state = "boo"
- school = "transmutation"
base_cooldown = 2 MINUTES
starts_charged = FALSE
clothes_req = FALSE
diff --git a/code/modules/mob/inventory_procs.dm b/code/modules/mob/inventory_procs.dm
index 725f7fd28952..a80372a2f3ee 100644
--- a/code/modules/mob/inventory_procs.dm
+++ b/code/modules/mob/inventory_procs.dm
@@ -186,7 +186,11 @@
if(I)
if(client)
client.screen -= I
- I.forceMove(drop_location())
+ var/turf/drop_loc = drop_location()
+ if(drop_loc)
+ I.forceMove(drop_loc)
+ else
+ I.moveToNullspace()
I.dropped(src, silent)
if(I)
I.layer = initial(I.layer)
@@ -263,6 +267,10 @@
to_chat(M, "You are not holding anything to equip! ")
return FALSE
+ if(flags & NODROP)
+ to_chat(M, "You are unable to equip that! ")
+ return FALSE
+
if(M.equip_to_appropriate_slot(src))
if(M.hand)
M.update_inv_l_hand()
diff --git a/code/modules/mob/living/carbon/alien/alien_base.dm b/code/modules/mob/living/carbon/alien/alien_base.dm
index 92152327c4c7..557757b751e7 100644
--- a/code/modules/mob/living/carbon/alien/alien_base.dm
+++ b/code/modules/mob/living/carbon/alien/alien_base.dm
@@ -256,3 +256,6 @@ and carry the owner just to make sure*/
if(health <= HEALTH_THRESHOLD_CRIT && stat == CONSCIOUS)
KnockOut()
return ..()
+
+/mob/living/carbon/alien/plushify(plushie_override, curse_time)
+ . = ..(/obj/item/toy/plushie/face_hugger, curse_time)
diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm
index 4e11337826af..5e0beba27232 100644
--- a/code/modules/mob/living/carbon/alien/special/facehugger.dm
+++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm
@@ -23,10 +23,11 @@
///Time it takes for a facehugger to become active again after going idle.
var/min_active_time = 20 SECONDS
var/max_active_time = 40 SECONDS
+ var/datum/proximity_monitor/proximity_monitor
/obj/item/clothing/mask/facehugger/Initialize(mapload)
. = ..()
- AddComponent(/datum/component/proximity_monitor)
+ proximity_monitor = new(src)
ADD_TRAIT(src, TRAIT_XENO_INTERACTABLE, UID())
/obj/item/clothing/mask/facehugger/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
@@ -67,10 +68,6 @@
/obj/item/clothing/mask/facehugger/equipped(mob/M)
Attach(M)
-/obj/item/clothing/mask/facehugger/Crossed(atom/target, oldloc)
- HasProximity(target)
- return
-
/obj/item/clothing/mask/facehugger/on_found(mob/finder)
if(stat != DEAD)
return HasProximity(finder)
@@ -186,6 +183,7 @@
return
stat = CONSCIOUS
+ proximity_monitor = new(src)
icon_state = "[initial(icon_state)]"
/obj/item/clothing/mask/facehugger/proc/GoIdle()
@@ -194,6 +192,7 @@
stat = UNCONSCIOUS
icon_state = "[initial(icon_state)]_inactive"
+ qdel(proximity_monitor)
addtimer(CALLBACK(src, PROC_REF(GoActive)), rand(min_active_time, max_active_time))
/obj/item/clothing/mask/facehugger/proc/Die()
@@ -203,7 +202,7 @@
icon_state = "[initial(icon_state)]_dead"
item_state = "facehugger_inactive"
stat = DEAD
- DeleteComponent(/datum/component/proximity_monitor)
+ QDEL_NULL(proximity_monitor)
visible_message("[src] curls up into a ball! ")
diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm
index f41ae3f76ecc..594e12a79639 100644
--- a/code/modules/mob/living/carbon/carbon_procs.dm
+++ b/code/modules/mob/living/carbon/carbon_procs.dm
@@ -493,7 +493,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
visible_message("[src] begins climbing into the ventilation system... ", \
"You begin climbing into the ventilation system... ")
-#ifdef UNIT_TESTS
+#ifdef GAME_TESTS
var/ventcrawl_delay = 0 SECONDS
#else
var/ventcrawl_delay = 4.5 SECONDS
diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm
index bba2f1c9e9fa..4f2d5abaa865 100644
--- a/code/modules/mob/living/carbon/examine.dm
+++ b/code/modules/mob/living/carbon/examine.dm
@@ -88,6 +88,8 @@
return ""
/mob/living/carbon/examine(mob/user)
+ if(HAS_TRAIT(src, TRAIT_UNKNOWN))
+ return list("You're struggling to make out any details... ")
var/skipgloves = FALSE
var/skipsuitstorage = FALSE
var/skipjumpsuit = FALSE
@@ -143,6 +145,8 @@
grab_items |= item
if(item.flags & ABSTRACT)
abstract_items |= item
+ if(HAS_TRAIT(item, TRAIT_SKIP_EXAMINE))
+ continue
else
var/item_words = item.name
if(item.blood_DNA)
diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm
index f4b5626df388..7586049bf701 100644
--- a/code/modules/mob/living/carbon/human/human_mob.dm
+++ b/code/modules/mob/living/carbon/human/human_mob.dm
@@ -284,6 +284,8 @@
// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc.
/mob/living/carbon/human/proc/get_authentification_rank(if_no_id = "No id", if_no_job = "No job")
+ if(HAS_TRAIT(src, TRAIT_UNKNOWN))
+ return if_no_id
var/obj/item/card/id/id = wear_id?.GetID()
if(istype(id))
return id.rank || if_no_job
@@ -292,6 +294,8 @@
//gets assignment from ID, PDA, Wallet, etc.
//This should not be relied on for authentication, because PDAs show their owner's job, even if an ID is not inserted
/mob/living/carbon/human/proc/get_assignment(if_no_id = "No id", if_no_job = "No job")
+ if(HAS_TRAIT(src, TRAIT_UNKNOWN))
+ return if_no_id
if(!wear_id)
return if_no_id
var/obj/item/card/id/id = wear_id.GetID()
@@ -331,6 +335,8 @@
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
/mob/living/carbon/human/get_visible_name(id_override = FALSE)
+ if(HAS_TRAIT(src, TRAIT_UNKNOWN))
+ return "Unknown"
if(name_override)
return name_override
if(wear_mask && (wear_mask.flags_inv & HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible
@@ -2065,6 +2071,10 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
var/obj/item/organ/internal/brain/brain_organ = get_int_organ(/obj/item/organ/internal/brain)
return brain_organ.damage >= (brain_organ.max_damage * threshold_level)
+
+/mob/living/carbon/human/plushify(plushie_override, curse_time)
+ . = ..(dna.species.plushie_type, curse_time)
+
/*
* Invokes a hallucination on the mob. Hallucination must be a path or a string of a path
*/
@@ -2075,3 +2085,4 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
return
hallucination_to_make = string_path
new hallucination_to_make(get_turf(src), src)
+
diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm
index 4c87b39d007b..17a83087031f 100644
--- a/code/modules/mob/living/carbon/human/human_say.dm
+++ b/code/modules/mob/living/carbon/human/human_say.dm
@@ -47,6 +47,9 @@
return FALSE
/mob/living/carbon/human/GetVoice()
+ if(HAS_TRAIT(src, TRAIT_UNKNOWN))
+ return "Unknown"
+
var/has_changer = HasVoiceChanger()
if(has_changer)
diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm
index b28bf42d048d..91860b6a8822 100644
--- a/code/modules/mob/living/carbon/human/human_update_icons.dm
+++ b/code/modules/mob/living/carbon/human/human_update_icons.dm
@@ -612,7 +612,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
else if(A.sprite_sheets && A.sprite_sheets[dna.species.sprite_sheet_name])
standing.overlays += image("icon" = A.sprite_sheets[dna.species.sprite_sheet_name], "icon_state" = "[A.icon_state]")
else
- standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
+ standing.overlays += image("icon" = 'icons/mob/accessories.dmi', "icon_state" = "[tie_color]")
standing.alpha = w_uniform.alpha
standing.color = w_uniform.color
overlays_standing[UNIFORM_LAYER] = standing
@@ -1062,20 +1062,31 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
/mob/living/carbon/human/update_inv_neck()
remove_overlay(NECK_LAYER)
+ remove_overlay(SPECIAL_NECK_LAYER)
+
if(client && hud_used)
var/atom/movable/screen/inventory/inv = hud_used.inv_slots[ITEM_SLOT_2_INDEX(ITEM_SLOT_NECK)]
if(inv)
inv.update_icon()
if(neck)
+ var/mutable_appearance/new_neck
update_hud_neck(neck)
+
if(neck.icon_override)
- overlays_standing[NECK_LAYER] = mutable_appearance(neck.icon_override, "[neck.icon_state]", layer = -NECK_LAYER)
+ new_neck = mutable_appearance(neck.icon_override, "[neck.icon_state]", layer = -NECK_LAYER)
else if(neck.sprite_sheets && neck.sprite_sheets[dna.species.sprite_sheet_name])
- overlays_standing[NECK_LAYER] = mutable_appearance(neck.sprite_sheets[dna.species.sprite_sheet_name], "[neck.icon_state]", layer = -NECK_LAYER)
+ new_neck = mutable_appearance(neck.sprite_sheets[dna.species.sprite_sheet_name], "[neck.icon_state]", layer = -NECK_LAYER)
+ else
+ new_neck = mutable_appearance('icons/mob/clothing/neck.dmi', "[neck.icon_state]", layer = -NECK_LAYER)
+ var/obj/item/clothing/neck/tie/N = neck
+ if(istype(N) && N.under_suit)
+ new_neck.layer = -SPECIAL_NECK_LAYER
+ overlays_standing[SPECIAL_NECK_LAYER] = new_neck
+ apply_overlay(SPECIAL_NECK_LAYER)
else
- overlays_standing[NECK_LAYER] = mutable_appearance('icons/mob/clothing/neck.dmi', "[neck.icon_state]", layer = -NECK_LAYER)
- apply_overlay(NECK_LAYER)
+ overlays_standing[NECK_LAYER] = new_neck
+ apply_overlay(NECK_LAYER)
/mob/living/carbon/human/update_inv_back()
..()
diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm
index 086d8272ac53..7d18e244adf0 100644
--- a/code/modules/mob/living/carbon/human/species/_species.dm
+++ b/code/modules/mob/living/carbon/human/species/_species.dm
@@ -196,6 +196,9 @@
var/list/autohiss_extra_map = null
var/list/autohiss_exempt = null
+ /// What plushie the species will turn into if turned into a plushie.
+ var/plushie_type = /obj/item/toy/plushie/humanplushie
+
/datum/species/New()
unarmed = new unarmed_type()
if(!sprite_sheet_name)
@@ -266,7 +269,9 @@
new mutantears(H)
/datum/species/proc/breathe(mob/living/carbon/human/H)
+ var/datum/organ/lungs/lung = H.get_int_organ_datum(ORGAN_DATUM_LUNGS)
if(HAS_TRAIT(H, TRAIT_NOBREATH))
+ lung?.clear_alerts(H)
return TRUE
////////////////
diff --git a/code/modules/mob/living/carbon/human/species/abductor_species.dm b/code/modules/mob/living/carbon/human/species/abductor_species.dm
index 37ccc57546a1..101204ba00a0 100644
--- a/code/modules/mob/living/carbon/human/species/abductor_species.dm
+++ b/code/modules/mob/living/carbon/human/species/abductor_species.dm
@@ -26,6 +26,7 @@
female_scream_sound = 'sound/goonstation/voice/male_scream.ogg'
female_cough_sounds = list('sound/effects/mob_effects/m_cougha.ogg','sound/effects/mob_effects/m_coughb.ogg', 'sound/effects/mob_effects/m_coughc.ogg')
female_sneeze_sound = 'sound/effects/mob_effects/sneeze.ogg' //Abductors always scream like guys
+ plushie_type = /obj/item/toy/plushie/abductor
var/team = 1
var/scientist = FALSE // vars to not pollute spieces list with castes
diff --git a/code/modules/mob/living/carbon/human/species/diona_species.dm b/code/modules/mob/living/carbon/human/species/diona_species.dm
index 0bd8e688321f..1d0e3e2e0218 100644
--- a/code/modules/mob/living/carbon/human/species/diona_species.dm
+++ b/code/modules/mob/living/carbon/human/species/diona_species.dm
@@ -61,6 +61,8 @@
"pulls out a secret stash of herbicide and takes a hearty swig!",
"is pulling themselves apart!")
+ plushie_type = /obj/item/toy/plushie/dionaplushie
+
/datum/species/diona/can_understand(mob/other)
if(isnymph(other))
return TRUE
diff --git a/code/modules/mob/living/carbon/human/species/drask.dm b/code/modules/mob/living/carbon/human/species/drask.dm
index ab37c5ceb0a5..47831972d437 100644
--- a/code/modules/mob/living/carbon/human/species/drask.dm
+++ b/code/modules/mob/living/carbon/human/species/drask.dm
@@ -29,6 +29,8 @@
"is sucking in warm air!",
"is holding their breath!")
+ plushie_type = /obj/item/toy/plushie/draskplushie
+
species_traits = list(LIPS, NO_HAIR)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT
bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS | BALD | SHAVED
diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm
index 4e178a534797..f831ce0d44f0 100644
--- a/code/modules/mob/living/carbon/human/species/grey.dm
+++ b/code/modules/mob/living/carbon/human/species/grey.dm
@@ -30,6 +30,8 @@
flesh_color = "#a598ad"
blood_color = "#A200FF"
+ plushie_type = /obj/item/toy/plushie/greyplushie
+
/datum/species/grey/handle_dna(mob/living/carbon/human/H, remove)
..()
H.dna.SetSEState(GLOB.remotetalkblock, !remove, TRUE)
diff --git a/code/modules/mob/living/carbon/human/species/kidan.dm b/code/modules/mob/living/carbon/human/species/kidan.dm
index 95a5470753bb..70eb61d77a9d 100644
--- a/code/modules/mob/living/carbon/human/species/kidan.dm
+++ b/code/modules/mob/living/carbon/human/species/kidan.dm
@@ -55,3 +55,5 @@
"s" = list("z", "zs", "zzz", "zzsz")
)
autohiss_exempt = list("Chittin")
+
+ plushie_type = /obj/item/toy/plushie/kidanplushie
diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm
index 9243510ddb41..2d5ee49e0e0b 100644
--- a/code/modules/mob/living/carbon/human/species/machine.dm
+++ b/code/modules/mob/living/carbon/human/species/machine.dm
@@ -74,6 +74,8 @@
"is frying their own circuits!",
"is blocking their ventilation port!")
+ plushie_type = /obj/item/toy/plushie/ipcplushie
+
/datum/species/machine/on_species_gain(mob/living/carbon/human/H)
..()
diff --git a/code/modules/mob/living/carbon/human/species/moth.dm b/code/modules/mob/living/carbon/human/species/moth.dm
index 690096f8e7b7..be74a62e4dff 100644
--- a/code/modules/mob/living/carbon/human/species/moth.dm
+++ b/code/modules/mob/living/carbon/human/species/moth.dm
@@ -59,6 +59,9 @@
"is ripping their wings off!",
"is holding their breath!"
)
+
+ plushie_type = /obj/item/toy/plushie/nianplushie
+
/datum/species/moth/updatespeciescolor(mob/living/carbon/human/H, owner_sensitive = 1) //Handling species-specific skin-tones for the nian race.
if(H.dna.species.bodyflags & HAS_ICON_SKIN_TONE)
var/new_icobase = 'icons/mob/human_races/nian/r_moth.dmi' //Default nian.
diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm
index 74a2e22ff0de..91303d807667 100644
--- a/code/modules/mob/living/carbon/human/species/plasmaman.dm
+++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm
@@ -51,6 +51,8 @@
"s" = list("ss", "sss", "ssss")
)
+ plushie_type = /obj/item/toy/plushie/plasmamanplushie
+
/datum/species/plasmaman/before_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE)
var/current_job = J.title
var/datum/outfit/plasmaman/O = new /datum/outfit/plasmaman
@@ -145,6 +147,9 @@
if("Assistant")
O = new /datum/outfit/plasmaman/assistant
+ if("Nanotrasen Career Trainer")
+ O = new /datum/outfit/plasmaman/trainer
+
H.equipOutfit(O, visualsOnly)
H.internal = H.r_hand
H.update_action_buttons_icon()
diff --git a/code/modules/mob/living/carbon/human/species/skrell.dm b/code/modules/mob/living/carbon/human/species/skrell.dm
index 873864b78e44..28b593effdfd 100644
--- a/code/modules/mob/living/carbon/human/species/skrell.dm
+++ b/code/modules/mob/living/carbon/human/species/skrell.dm
@@ -43,3 +43,5 @@
"is twisting their own neck!",
"makes like a fish and suffocates!",
"is strangling themselves with their own tendrils!")
+
+ plushie_type = /obj/item/toy/plushie/skrellplushie
diff --git a/code/modules/mob/living/carbon/human/species/slimepeople.dm b/code/modules/mob/living/carbon/human/species/slimepeople.dm
index bcf0f0f9b64f..536eb744765e 100644
--- a/code/modules/mob/living/carbon/human/species/slimepeople.dm
+++ b/code/modules/mob/living/carbon/human/species/slimepeople.dm
@@ -59,6 +59,8 @@
var/reagent_skin_coloring = FALSE
+ plushie_type = /obj/item/toy/plushie/slimeplushie
+
/datum/species/slime/on_species_gain(mob/living/carbon/human/H)
..()
var/datum/action/innate/regrow/grow = new()
diff --git a/code/modules/mob/living/carbon/human/species/tajaran.dm b/code/modules/mob/living/carbon/human/species/tajaran.dm
index 6a71141a991e..799503547c86 100644
--- a/code/modules/mob/living/carbon/human/species/tajaran.dm
+++ b/code/modules/mob/living/carbon/human/species/tajaran.dm
@@ -56,5 +56,7 @@
)
autohiss_exempt = list("Siik'tajr")
+ plushie_type = /obj/item/toy/plushie/grey_cat
+
/datum/species/tajaran/handle_death(gibbed, mob/living/carbon/human/H)
H.stop_tail_wagging()
diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm
index d0102489d666..9d39401ccf25 100644
--- a/code/modules/mob/living/carbon/human/species/unathi.dm
+++ b/code/modules/mob/living/carbon/human/species/unathi.dm
@@ -62,6 +62,8 @@
)
autohiss_exempt = list("Sinta'unathi")
+ plushie_type = /obj/item/toy/plushie/lizardplushie
+
/datum/species/unathi/on_species_gain(mob/living/carbon/human/H)
..()
var/datum/action/innate/unathi_ignite/fire = new()
diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm
index f3dd78b2f717..38ee100d642c 100644
--- a/code/modules/mob/living/carbon/human/species/vox.dm
+++ b/code/modules/mob/living/carbon/human/species/vox.dm
@@ -72,6 +72,8 @@
speciesbox = /obj/item/storage/box/survival_vox
+ plushie_type = /obj/item/toy/plushie/voxplushie
+
/datum/species/vox/handle_death(gibbed, mob/living/carbon/human/H)
H.stop_tail_wagging()
diff --git a/code/modules/mob/living/carbon/human/species/vulpkanin.dm b/code/modules/mob/living/carbon/human/species/vulpkanin.dm
index f98b03002e22..a6ba75e80e5e 100644
--- a/code/modules/mob/living/carbon/human/species/vulpkanin.dm
+++ b/code/modules/mob/living/carbon/human/species/vulpkanin.dm
@@ -47,5 +47,7 @@
"is twisting their own neck!",
"is holding their breath!")
+ plushie_type = /obj/item/toy/plushie/red_fox
+
/datum/species/vulpkanin/handle_death(gibbed, mob/living/carbon/human/H)
H.stop_tail_wagging()
diff --git a/code/modules/mob/living/carbon/superheroes.dm b/code/modules/mob/living/carbon/superheroes.dm
index a7f63bd6e071..cb497112049f 100644
--- a/code/modules/mob/living/carbon/superheroes.dm
+++ b/code/modules/mob/living/carbon/superheroes.dm
@@ -143,6 +143,7 @@
desc = "Allows you to recruit a conscious, non-braindead, non-catatonic human to be part of the Greyshirts, your personal henchmen. This works on Assistants only and you can recruit a maximum of 3!."
base_cooldown = 450
clothes_req = FALSE
+ antimagic_flags = NONE
action_icon_state = "spell_greytide"
var/recruiting = 0
diff --git a/code/modules/mob/living/init_signals.dm b/code/modules/mob/living/init_signals.dm
index b2fd6735f89b..adf03cbff7e4 100644
--- a/code/modules/mob/living/init_signals.dm
+++ b/code/modules/mob/living/init_signals.dm
@@ -27,6 +27,12 @@
RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_RESTRAINED), PROC_REF(on_restrained_trait_gain))
RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_RESTRAINED), PROC_REF(on_restrained_trait_loss))
+ RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_UNKNOWN), PROC_REF(on_unknown_trait))
+ RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_UNKNOWN), PROC_REF(on_unknown_trait))
+
+ RegisterSignal(src, SIGNAL_ADDTRAIT(TRAIT_PRESSURE_VISION), PROC_REF(on_pressure_vision_trait_gain))
+ RegisterSignal(src, SIGNAL_REMOVETRAIT(TRAIT_PRESSURE_VISION), PROC_REF(on_pressure_vision_trait_loss))
+
/// Called when [TRAIT_KNOCKEDOUT] is added to the mob.
/mob/living/proc/on_knockedout_trait_gain(datum/source)
SIGNAL_HANDLER
@@ -160,3 +166,25 @@
REMOVE_TRAIT(src, TRAIT_KNOCKEDOUT, TRAIT_FAKEDEATH)
remove_status_effect(STATUS_EFFECT_REVIVABLE)
+/// Gaining or losing [TRAIT_UNKNOWN] updates our name and our sechud
+/mob/living/proc/on_unknown_trait(datum/source)
+ SIGNAL_HANDLER // SIGNAL_ADDTRAIT(TRAIT_UNKNOWN), SIGNAL_REMOVETRAIT(TRAIT_UNKNOWN)
+ addtimer(CALLBACK(src, PROC_REF(on_unknown_trait_part_2)), 0.1 SECONDS) // Remove signal is sent before the trait is removed, we need to wait a tick
+
+/mob/living/proc/on_unknown_trait_part_2()
+ name = get_visible_name()
+ sec_hud_set_ID()
+
+/// Called when [TRAIT_PRESSURE_VISION] is added to the mob.
+/mob/living/proc/on_pressure_vision_trait_gain(datum/source)
+ SIGNAL_HANDLER
+ var/datum/atom_hud/data/pressure/hud = GLOB.huds[DATA_HUD_PRESSURE]
+ if(!(src in hud.hudusers))
+ hud.add_hud_to(src)
+
+/// Called when [TRAIT_PRESSURE_VISION] is removed from the mob.
+/mob/living/proc/on_pressure_vision_trait_loss(datum/source)
+ SIGNAL_HANDLER
+ var/datum/atom_hud/data/pressure/hud = GLOB.huds[DATA_HUD_PRESSURE]
+ if(src in hud.hudusers)
+ hud.remove_hud_from(src)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 50bf380187bc..2df2bb1a32b7 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -71,10 +71,10 @@
return
//Generic Bump(). Override MobBump() and ObjBump() instead of this.
-/mob/living/Bump(atom/A, yes)
+/mob/living/Bump(atom/A)
if(..()) //we are thrown onto something
return
- if(buckled || !yes || now_pushing)
+ if(buckled || now_pushing)
return
if(ismob(A))
if(MobBump(A))
@@ -121,6 +121,10 @@
if(moving_diagonally) //no mob swap during diagonal moves.
return TRUE
+ if(has_status_effect(STATUS_EFFECT_UNBALANCED))
+ // Don't swap while being shoved by air.
+ return TRUE
+
if(a_intent == INTENT_HELP) // Help intent doesn't mob swap a mob pulling a structure
if(isstructure(M.pulling) || isstructure(pulling))
return TRUE
@@ -589,6 +593,11 @@
/mob/living/proc/UpdateDamageIcon()
return
+/mob/living/get_spacemove_backup(movement_dir)
+ if(movement_dir == 0 && has_status_effect(STATUS_EFFECT_UNBALANCED))
+ return
+ return ..()
+
/mob/living/Move(atom/newloc, direct, movetime)
if(buckled && buckled.loc != newloc) //not updating position
if(!buckled.anchored)
@@ -683,41 +692,7 @@
/mob/living/experience_pressure_difference(flow_x, flow_y, pressure_resistance_prob_delta = 0)
if(buckled)
return
- if(client && client.move_delay >= world.time + world.tick_lag * 2)
- pressure_resistance_prob_delta -= 30
-
- var/list/turfs_to_check = list()
-
- if(has_limbs)
- var/direction = 0
- if(flow_x > 100)
- direction |= EAST
- if(flow_x < -100)
- direction |= WEST
- if(flow_y > 100)
- direction |= NORTH
- if(flow_y < -100)
- direction |= SOUTH
-
- var/turf/T = get_step(src, angle2dir(dir2angle(direction) + 90))
- if(T)
- turfs_to_check += T
-
- T = get_step(src, angle2dir(dir2angle(direction) - 90))
- if(T)
- turfs_to_check += T
-
- for(var/t in turfs_to_check)
- T = t
- if(T.density)
- pressure_resistance_prob_delta -= 20
- continue
- for(var/atom/movable/AM in T)
- if(AM.density && AM.anchored)
- pressure_resistance_prob_delta -= 20
- break
-
- ..(flow_x, flow_y, pressure_resistance_prob_delta)
+ ..()
/*//////////////////////
START RESIST PROCS
@@ -982,6 +957,29 @@
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(S)
. += S.slowdown_value
+ else
+ // Only apply directional slow if we don't have a full slow.
+ var/datum/status_effect/incapacitating/directional_slow/DS = has_status_effect(STATUS_EFFECT_DIRECTIONAL_SLOW)
+ if(DS)
+ if(DS.direction == last_move)
+ // Moving directly in the direction we're slowed, full penalty
+ . += DS.slowdown_value
+ else if(REVERSE_DIR(DS.direction) == last_move)
+ // Moving directly opposite to the slow, no penalty.
+ // Lint doesn't like this block being empty so, uh, add zero, I guess.
+ . += 0
+ else if(IS_DIR_CARDINAL(DS.direction) || IS_DIR_CARDINAL(last_move))
+ if(DS.direction & last_move)
+ // Moving roughly in the direction we're slowed, full penalty.
+ . += DS.slowdown_value
+ else if(!(REVERSE_DIR(DS.direction) & last_move))
+ // Moving perpendicular to the slow, partial penalty.
+ . += DS.slowdown_value / 2
+ // Moving roughly opposite to the slow, no penalty.
+ else
+ // Diagonal move perpendicular to the slow, partial penalty.
+ . += DS.slowdown_value / 2
+
if(forced_look)
. += DIRECTION_LOCK_SLOWDOWN
if(ignorewalk)
@@ -1056,9 +1054,9 @@
else
registered_z = null
-/mob/living/onTransitZ(old_z,new_z)
+/mob/living/on_changed_z_level(turf/old_turf, turf/new_turf)
..()
- update_z(new_z)
+ update_z(new_turf?.z)
/mob/living/rad_act(amount)
. = ..()
@@ -1180,12 +1178,30 @@
for(var/obj/O in src)
O.on_mob_move(Dir, src)
-/mob/living/Crossed(atom/movable/mover)
- if(istype(mover, /obj/singularity/energy_ball))
- dust()
- return ..()
-
/// Can a mob interact with the apc remotely like a pulse demon, cyborg, or AI?
/mob/living/proc/can_remote_apc_interface(obj/machinery/power/apc/ourapc)
return FALSE
+/mob/living/proc/plushify(plushie_override, curse_time = 10 MINUTES)
+ var/mob/living/simple_animal/shade/sword/generic_item/plushvictim = new(get_turf(src))
+ var/obj/item/toy/plushie/plush_type = pick(subtypesof(/obj/item/toy/plushie) - typesof(/obj/item/toy/plushie/fluff) - typesof(/obj/item/toy/plushie/carpplushie)) //exclude the base type.
+ if(plushie_override)
+ plush_type = plushie_override
+ var/obj/item/toy/plushie/plush_outcome = new plush_type(get_turf(src))
+ plushvictim.forceMove(plush_outcome)
+ plushvictim.key = key
+ plushvictim.RegisterSignal(plush_outcome, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/mob/living/simple_animal/shade/sword/generic_item, handle_item_deletion))
+ plushvictim.name = name
+ plush_outcome.name = "[name] plushie"
+ if(curse_time == -1)
+ qdel(src)
+ else
+ plush_outcome.cursed_plushie_victim = src
+ forceMove(plush_outcome)
+ notransform = TRUE
+ status_flags |= GODMODE
+ addtimer(CALLBACK(plush_outcome, TYPE_PROC_REF(/obj/item/toy/plushie, un_plushify)), curse_time)
+ to_chat(plushvictim, "You have been cursed into an enchanted plush doll! At least you can still move around a bit... ")
+
+/mob/living/proc/sec_hud_set_ID()
+ return
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 074081bba93f..d872d92ec7ee 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -228,7 +228,7 @@
if(!G || G.oxygen() < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return FALSE
- T.hotspot_expose(700, 50, 1)
+ T.hotspot_expose(700, 10)
SEND_SIGNAL(src, COMSIG_LIVING_FIRE_TICK)
return TRUE
diff --git a/code/modules/mob/living/living_status_procs.dm b/code/modules/mob/living/living_status_procs.dm
index 35a56aa0ae62..97433d8b3fda 100644
--- a/code/modules/mob/living/living_status_procs.dm
+++ b/code/modules/mob/living/living_status_procs.dm
@@ -512,26 +512,26 @@ STATUS EFFECTS
/mob/living/proc/IsSlowed()
return has_status_effect(STATUS_EFFECT_SLOWED)
-/mob/living/proc/Slowed(amount, _slowdown_value)
+/mob/living/proc/Slowed(amount, slowdown_value)
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
if(S)
S.duration = max(world.time + amount, S.duration)
- S.slowdown_value = _slowdown_value
+ S.slowdown_value = slowdown_value
else if(amount > 0)
- S = apply_status_effect(STATUS_EFFECT_SLOWED, amount, _slowdown_value)
+ S = apply_status_effect(STATUS_EFFECT_SLOWED, amount, slowdown_value)
return S
-/mob/living/proc/SetSlowed(amount, _slowdown_value)
+/mob/living/proc/SetSlowed(amount, slowdown_value)
var/datum/status_effect/incapacitating/slowed/S = IsSlowed()
- if(amount <= 0 || _slowdown_value <= 0)
+ if(amount <= 0 || slowdown_value <= 0)
if(S)
qdel(S)
else
if(S)
S.duration = amount
- S.slowdown_value = _slowdown_value
+ S.slowdown_value = slowdown_value
else
- S = apply_status_effect(STATUS_EFFECT_SLOWED, amount, _slowdown_value)
+ S = apply_status_effect(STATUS_EFFECT_SLOWED, amount, slowdown_value)
return S
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index dd136add437d..653a6c7cdb32 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -242,6 +242,7 @@
name = "Unfold/Fold Chassis"
desc = "Allows you to fold in/out of your mobile form."
clothes_req = FALSE
+ antimagic_flags = NONE
base_cooldown = 20 SECONDS
action_icon_state = "repairbot"
action_background_icon_state = "bg_tech_blue"
diff --git a/code/modules/mob/living/silicon/robot/drone/maint_drone.dm b/code/modules/mob/living/silicon/robot/drone/maint_drone.dm
index 1e5b4e52b887..a300fa2bac9b 100644
--- a/code/modules/mob/living/silicon/robot/drone/maint_drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/maint_drone.dm
@@ -359,7 +359,7 @@
*/
-/mob/living/silicon/robot/drone/Bump(atom/movable/AM, yes)
+/mob/living/silicon/robot/drone/Bump(atom/movable/AM)
if(is_type_in_list(AM, allowed_bumpable_objects))
return ..()
diff --git a/code/modules/mob/living/silicon/robot/robot_mob.dm b/code/modules/mob/living/silicon/robot/robot_mob.dm
index 3e1b5940227c..f04f23f86df6 100644
--- a/code/modules/mob/living/silicon/robot/robot_mob.dm
+++ b/code/modules/mob/living/silicon/robot/robot_mob.dm
@@ -1809,3 +1809,8 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
if(ourapc.malfai && !(src in ourapc.malfai.connected_robots))
return FALSE
return TRUE
+
+/mob/living/silicon/robot/plushify(plushie_override, curse_time)
+ if(curse_time == -1)
+ QDEL_NULL(mmi)
+ return ..()
diff --git a/code/modules/mob/living/silicon/robot/robot_module_actions.dm b/code/modules/mob/living/silicon/robot/robot_module_actions.dm
index cb6834e24746..84b34b0d345a 100644
--- a/code/modules/mob/living/silicon/robot/robot_module_actions.dm
+++ b/code/modules/mob/living/silicon/robot/robot_module_actions.dm
@@ -40,6 +40,7 @@
#define MODE_MESON "meson"
#define MODE_TRAY "t-ray"
#define MODE_RAD "radiation"
+#define MODE_PRESSURE "pressure"
#define RAD_RANGE 5
/datum/action/innate/robot_sight/engineering_scanner
@@ -47,7 +48,7 @@
sight_mode = BORGMESON
button_overlay_icon = 'icons/obj/clothing/glasses.dmi'
button_overlay_icon_state = "trayson-meson"
- var/list/mode_list = list(MODE_NONE = MODE_MESON, MODE_MESON = MODE_TRAY, MODE_TRAY = MODE_RAD, MODE_RAD = MODE_NONE)
+ var/list/mode_list = list(MODE_NONE = MODE_MESON, MODE_MESON = MODE_TRAY, MODE_TRAY = MODE_RAD, MODE_RAD = MODE_PRESSURE, MODE_PRESSURE = MODE_NONE)
var/mode = MODE_NONE
/datum/action/innate/robot_sight/engineering_scanner/Activate()
@@ -67,8 +68,13 @@
else
STOP_PROCESSING(SSobj, src)
+ if(mode == MODE_PRESSURE)
+ ADD_TRAIT(R, TRAIT_PRESSURE_VISION, "borgsight")
+ else
+ REMOVE_TRAIT(R, TRAIT_PRESSURE_VISION, "borgsight")
+
/datum/action/innate/robot_sight/engineering_scanner/Deactivate()
- return
+ REMOVE_TRAIT(owner, TRAIT_PRESSURE_VISION, "borgsight")
/datum/action/innate/robot_sight/engineering_scanner/process()
var/mob/living/silicon/robot/user = owner
@@ -84,6 +90,7 @@
#undef MODE_MESON
#undef MODE_TRAY
#undef MODE_RAD
+#undef MODE_PRESSURE
#undef RAD_RANGE
/datum/action/innate/robot_magpulse
diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm
index 89ff5cc82ea6..4f5a17da5088 100644
--- a/code/modules/mob/living/silicon/robot/robot_movement.dm
+++ b/code/modules/mob/living/silicon/robot/robot_movement.dm
@@ -25,5 +25,6 @@
return ..() || mob_negates_gravity()
/mob/living/silicon/robot/experience_pressure_difference(flow_x, flow_y)
- if(!HAS_TRAIT(src, TRAIT_MAGPULSE))
- return ..()
+ if(HAS_TRAIT(src, TRAIT_MAGPULSE))
+ return
+ ..()
diff --git a/code/modules/mob/living/silicon/robot/syndicate_robot.dm b/code/modules/mob/living/silicon/robot/syndicate_robot.dm
index 35215d7f2362..891f0fa7d1cc 100644
--- a/code/modules/mob/living/silicon/robot/syndicate_robot.dm
+++ b/code/modules/mob/living/silicon/robot/syndicate_robot.dm
@@ -40,6 +40,11 @@
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
+/mob/living/silicon/robot/syndicate/air_push(direction, strength)
+ // Syndicate borgs ignore airflow, because they're bloody expensive.
+ // This should probably be revisited later, as part of a broader move_resist/move_force/pull_force rework.
+ return
+
/mob/living/silicon/robot/syndicate/medical
base_icon = "syndi-medi"
icon_state = "syndi-medi"
diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm
index feb6cc0a6384..a0997ce25e3c 100644
--- a/code/modules/mob/living/silicon/silicon_mob.dm
+++ b/code/modules/mob/living/silicon/silicon_mob.dm
@@ -594,3 +594,6 @@
if(silicon_hat)
. += "They are wearing a [bicon(silicon_hat)] [silicon_hat.name]."
. += "Use an empty hand on [src] on grab mode to remove [silicon_hat]."
+
+/mob/living/silicon/plushify(plushie_override, curse_time)
+ . = ..(/obj/item/toy/plushie/borgplushie, curse_time)
diff --git a/code/modules/mob/living/simple_animal/bot/griefsky.dm b/code/modules/mob/living/simple_animal/bot/griefsky.dm
index e2e0296b7f80..7f2ce26fd65d 100644
--- a/code/modules/mob/living/simple_animal/bot/griefsky.dm
+++ b/code/modules/mob/living/simple_animal/bot/griefsky.dm
@@ -48,10 +48,9 @@
..()
light_color = LIGHT_COLOR_PURE_RED //if you see a red one. RUN!!
-/mob/living/simple_animal/bot/secbot/griefsky/Crossed(atom/movable/AM, oldloc)
- ..()
- if(ismob(AM) && AM == target)
- var/mob/living/carbon/C = AM
+/mob/living/simple_animal/bot/secbot/griefsky/on_atom_entered(datum/source, atom/movable/entered)
+ if(iscarbon(entered) && entered == target)
+ var/mob/living/carbon/C = entered
visible_message("[src] flails his swords and pushes [C] out of it's way!" )
C.KnockDown(4 SECONDS)
diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm
index 20652fdb801a..9c243922bed3 100644
--- a/code/modules/mob/living/simple_animal/bot/honkbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm
@@ -36,6 +36,10 @@
var/datum/job/clown/J = new /datum/job/clown()
access_card.access += J.get_access()
prev_access = access_card.access
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/mob/living/simple_animal/bot/honkbot/proc/sensor_blink()
icon_state = "honkbot-c"
@@ -373,10 +377,10 @@
target = user
mode = BOT_HUNT
-/mob/living/simple_animal/bot/honkbot/Crossed(atom/movable/AM, oldloc)
- if(ismob(AM) && on) //only if its online
+/mob/living/simple_animal/bot/honkbot/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(ismob(entered) && on) //only if its online
if(prob(30)) //you're far more likely to trip on a honkbot
- var/mob/living/carbon/C = AM
+ var/mob/living/carbon/C = entered
if(!istype(C) || !C || in_range(src, target))
return
C.visible_message("[pick( \
@@ -391,5 +395,3 @@
if(!client)
speak("Honk!")
sensor_blink()
- return
- ..()
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index ad9eca0a7787..48ef878ac713 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -74,7 +74,7 @@
mulebot_count++
set_suffix(suffix ? suffix : "#[mulebot_count]")
- RegisterSignal(src, COMSIG_CROSSED_MOVABLE, PROC_REF(human_squish_check))
+ RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(human_squish_check))
/mob/living/simple_animal/bot/mulebot/Destroy()
SStgui.close_uis(wires)
@@ -879,10 +879,13 @@
else
..()
-/mob/living/simple_animal/bot/mulebot/proc/human_squish_check(src, atom/movable/AM)
- if(!ishuman(AM))
+/mob/living/simple_animal/bot/mulebot/proc/human_squish_check(datum/source, old_location, direction, forced)
+ if(!isturf(loc))
return
- RunOver(AM)
+ for(var/atom/AM in loc)
+ if(!ishuman(AM))
+ continue
+ RunOver(AM)
#undef SIGH
#undef ANNOYED
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index 510874a95a51..c8909ba151ef 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -50,6 +50,10 @@
var/datum/job/detective/J = new/datum/job/detective
access_card.access += J.get_access()
prev_access = access_card.access
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/mob/living/simple_animal/bot/secbot/Destroy()
QDEL_NULL(baton)
@@ -458,9 +462,9 @@
target = user
mode = BOT_HUNT
-/mob/living/simple_animal/bot/secbot/Crossed(atom/movable/AM, oldloc)
- if(ismob(AM) && target)
- var/mob/living/carbon/C = AM
+/mob/living/simple_animal/bot/secbot/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(ismob(entered) && target)
+ var/mob/living/carbon/C = entered
if(!istype(C) || !C || in_range(src, target))
return
C.visible_message("[pick( \
@@ -472,7 +476,6 @@
"[C] leaps out of [src]'s way!")] ")
C.KnockDown(4 SECONDS)
return
- ..()
#undef BATON_COOLDOWN
#undef BOT_REBATON_THRESHOLD
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index d17e5842d695..dbb791303b86 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -305,9 +305,9 @@
health = 40
melee_damage_lower = 20
melee_damage_upper = 25
- attacktext = "prods"
+ attacktext = "rends"
environment_smash = ENVIRONMENT_SMASH_RWALLS
- attack_sound = 'sound/weapons/tap.ogg'
+ attack_sound = 'sound/weapons/bladeslice.ogg'
construct_type = "harvester"
construct_spells = list(/datum/spell/night_vision,
/datum/spell/aoe/conjure/build/wall,
diff --git a/code/modules/mob/living/simple_animal/friendly/cockroach.dm b/code/modules/mob/living/simple_animal/friendly/cockroach.dm
index 6f5caaf3a315..a04154601903 100644
--- a/code/modules/mob/living/simple_animal/friendly/cockroach.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cockroach.dm
@@ -28,18 +28,22 @@
/mob/living/simple_animal/cockroach/Initialize(mapload) //Lizards are a great way to deal with cockroaches
. = ..()
ADD_TRAIT(src, TRAIT_EDIBLE_BUG, "edible_bug")
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
-/mob/living/simple_animal/cockroach/Crossed(atom/movable/AM, oldloc)
- if(isliving(AM))
- var/mob/living/A = AM
+/mob/living/simple_animal/cockroach/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isliving(entered))
+ var/mob/living/A = entered
if(A.mob_size > MOB_SIZE_SMALL)
if(prob(squish_chance))
A.visible_message("\The [A] squashed \the [name]. ", "You squashed \the [name]. ")
death()
else
visible_message("\The [name] avoids getting crushed. ")
- else if(isstructure(AM))
- visible_message("As \the [AM] moved over \the [name], it was crushed. ")
+ else if(isstructure(entered))
+ visible_message("As \the [entered] moved over \the [name], it was crushed. ")
death()
/mob/living/simple_animal/cockroach/ex_act() //Explosions are a terrible way to handle a cockroach.
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index 2643abad6da0..ec8c6b06ee1d 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -43,7 +43,7 @@
AddComponent(/datum/component/squeak, list('sound/creatures/mousesqueak.ogg' = 1), 100, extrarange = SHORT_RANGE_SOUND_EXTRARANGE) //as quiet as a mouse or whatever
/mob/living/simple_animal/mouse/handle_automated_action()
-#ifdef UNIT_TESTS // DO NOT EAT MY CABLES DURING UNIT TESTS
+#ifdef GAME_TESTS // DO NOT EAT MY CABLES DURING UNIT TESTS
return
#endif
if(prob(chew_probability) && isturf(loc))
@@ -85,6 +85,10 @@
icon_dead = "mouse_[mouse_color]_dead"
icon_resting = "mouse_[mouse_color]_sleep"
update_appearance(UPDATE_ICON_STATE|UPDATE_DESC)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/mob/living/simple_animal/mouse/update_desc()
. = ..()
@@ -102,12 +106,11 @@
to_chat(src, "You are too small to pull anything except cheese. ")
return
-/mob/living/simple_animal/mouse/Crossed(AM as mob|obj, oldloc)
- if(ishuman(AM))
+/mob/living/simple_animal/mouse/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(ishuman(entered))
if(stat == CONSCIOUS)
- var/mob/M = AM
+ var/mob/M = entered
to_chat(M, "[bicon(src)] Squeek! ")
- ..()
/mob/living/simple_animal/mouse/proc/toast()
add_atom_colour("#3A3A3A", FIXED_COLOUR_PRIORITY)
diff --git a/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm b/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm
index 6f6144d44fa6..4a98a04f2540 100644
--- a/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm
+++ b/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm
@@ -69,7 +69,7 @@
playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
-/mob/living/simple_animal/hostile/floor_cluwne/CanPass(atom/A, turf/target)
+/mob/living/simple_animal/hostile/floor_cluwne/CanPass(atom/A, border_dir)
return TRUE
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm
index 9dbac40967d7..5d1dcec846cb 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm
@@ -307,9 +307,9 @@ Difficulty: Hard
return
return ..()
-/mob/living/simple_animal/hostile/megafauna/ancient_robot/Bump(atom/A, yes)
+/mob/living/simple_animal/hostile/megafauna/ancient_robot/Bump(atom/A)
if(charging)
- if(isliving(A) && yes)
+ if(isliving(A))
var/mob/living/L = A
if(!istype(A, /mob/living/simple_animal/hostile/ancient_robot_leg))
L.visible_message("[src] slams into [L]! ", "[src] tramples you into the ground! ")
@@ -596,7 +596,7 @@ Difficulty: Hard
var/obj/effect/hotspot/hotspot = new /obj/effect/hotspot/fake(T)
hotspot.temperature = 1000
hotspot.recolor()
- T.hotspot_expose(700,50,1)
+ T.hotspot_expose(700, 50)
if(mode == VORTEX)
var/turf/T = get_turf(src)
for(var/atom/A in T)
@@ -695,9 +695,9 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/ancient_robot_leg/proc/beam_setup()
leg_part = Beam(core.beam, "leg_connection", 'icons/effects/effects.dmi', time=INFINITY, maxdistance=INFINITY, beam_type=/obj/effect/ebeam)
-/mob/living/simple_animal/hostile/ancient_robot_leg/onTransitZ(old_z,new_z)
+/mob/living/simple_animal/hostile/ancient_robot_leg/on_changed_z_level(turf/old_turf, turf/new_turf)
..()
- update_z(new_z)
+ update_z(new_turf?.z)
if(leg_part)
QDEL_NULL(leg_part)
addtimer(CALLBACK(src, PROC_REF(beam_setup)), 1 SECONDS)
@@ -730,10 +730,10 @@ Difficulty: Hard
walk_towards(src, T, movespeed)
DestroySurroundings()
-/mob/living/simple_animal/hostile/ancient_robot_leg/Bump(atom/A, yes)
+/mob/living/simple_animal/hostile/ancient_robot_leg/Bump(atom/A)
if(!core.charging)
return
- if(isliving(A) && yes)
+ if(isliving(A))
if(!istype(A, /mob/living/simple_animal/hostile/megafauna/ancient_robot))
var/mob/living/L = A
L.visible_message("[src] slams into [L]! ", "[src] tramples you into the ground! ")
@@ -820,7 +820,7 @@ Difficulty: Hard
tesla_zap(src, zap_range, power, zap_flags)
qdel(src)
-/obj/item/projectile/energy/tesla_bolt/Bump(atom/A, yes) // Don't want the projectile hitting the legs
+/obj/item/projectile/energy/tesla_bolt/Bump(atom/A) // Don't want the projectile hitting the legs
if(!istype(/mob/living/simple_animal/hostile/ancient_robot_leg, A))
return ..()
var/turf/target_turf = get_turf(A)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
index 323508edfe16..7bd2ee98227a 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
@@ -513,7 +513,7 @@ Difficulty: Hard
severity = EXPLODE_LIGHT // puny mortals
return ..()
-/mob/living/simple_animal/hostile/megafauna/bubblegum/CanPass(atom/movable/mover, turf/target)
+/mob/living/simple_animal/hostile/megafauna/bubblegum/CanPass(atom/movable/mover, border_dir)
if(istype(mover, /mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination))
return TRUE
return ..()
@@ -541,8 +541,8 @@ Difficulty: Hard
playsound(src, 'sound/effects/meteorimpact.ogg', 200, TRUE, 2, TRUE)
return ..()
-/mob/living/simple_animal/hostile/megafauna/bubblegum/Bump(atom/A, yes)
- if(charging && yes)
+/mob/living/simple_animal/hostile/megafauna/bubblegum/Bump(atom/A)
+ if(charging)
if(isturf(A) || isobj(A) && A.density)
A.ex_act(EXPLODE_HEAVY)
if(isliving(A))
@@ -610,7 +610,7 @@ Difficulty: Hard
new /obj/effect/decal/cleanable/blood(get_turf(src))
. = ..()
-/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/CanPass(atom/movable/mover, turf/target)
+/mob/living/simple_animal/hostile/megafauna/bubblegum/hallucination/CanPass(atom/movable/mover, border_dir)
if(istype(mover, /mob/living/simple_animal/hostile/megafauna/bubblegum)) // hallucinations should not be stopping bubblegum or eachother
return TRUE
return ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
index b9bddd139c78..ef5abf4224e9 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm
@@ -282,7 +282,7 @@ Difficulty: Medium
var/obj/effect/hotspot/hotspot = new /obj/effect/hotspot/fake(T)
hotspot.temperature = 1000
hotspot.recolor()
- T.hotspot_expose(700,50,1)
+ T.hotspot_expose(700, 50)
for(var/mob/living/L in T.contents)
if((L in hit_list) || L == source)
continue
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
index 59d2e4b3e86e..b290d2a4ef98 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm
@@ -600,7 +600,7 @@ Difficulty: Hard
QUEUE_SMOOTH_NEIGHBORS(src)
return ..()
-/obj/effect/temp_visual/hierophant/wall/CanPass(atom/movable/mover, turf/target)
+/obj/effect/temp_visual/hierophant/wall/CanPass(atom/movable/mover, border_dir)
if(QDELETED(caster))
return FALSE
if(mover == caster.pulledby)
@@ -721,6 +721,10 @@ Difficulty: Hard
var/turf/simulated/mineral/M = loc
M.gets_drilled(caster)
INVOKE_ASYNC(src, PROC_REF(blast))
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
/obj/effect/temp_visual/hierophant/blast/proc/blast()
var/turf/T = get_turf(src)
@@ -733,8 +737,7 @@ Difficulty: Hard
sleep(1.3) //slightly forgiving; the burst animation is 1.5 deciseconds
bursting = FALSE //we no longer damage crossers
-/obj/effect/temp_visual/hierophant/blast/Crossed(atom/movable/AM)
- ..()
+/obj/effect/temp_visual/hierophant/blast/proc/on_atom_entered(datum/source, atom/movable/entered)
if(bursting)
do_damage(get_turf(src))
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
index b01e6a895670..ab151efa92d5 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
@@ -106,7 +106,7 @@
else
devour(L)
-/mob/living/simple_animal/hostile/megafauna/onTransitZ(old_z, new_z)
+/mob/living/simple_animal/hostile/megafauna/on_changed_z_level(turf/old_turf, turf/new_turf)
. = ..()
if(!istype(get_area(src), /area/shuttle)) //I'll be funny and make non teleported enrage mobs not lose enrage. Harder to pull off, and also funny when it happens accidently. Or if one gets on the escape shuttle.
unrage()
diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm
index 229d8c8e0a69..5c9219a88f9a 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm
@@ -179,6 +179,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
///List of invaders that have teleportes into the arena *multiple times*. They will be suffering.
var/list/invaders = list()
+ var/datum/proximity_monitor/proximity_monitor
/obj/structure/elite_tumor/attack_hand(mob/user, list/modifiers)
. = ..()
@@ -241,7 +242,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
icon_state = "tumor_popped"
RegisterSignal(mychild, COMSIG_PARENT_QDELETING, PROC_REF(onEliteLoss))
INVOKE_ASYNC(src, PROC_REF(arena_checks))
- AddComponent(/datum/component/proximity_monitor, ARENA_RADIUS) //Boots out humanoid invaders. Minebots / random fauna / that colossus you forgot to clear away allowed.
+ proximity_monitor = new(src, ARENA_RADIUS) //Boots out humanoid invaders. Minebots / random fauna / that colossus you forgot to clear away allowed.
/obj/structure/elite_tumor/proc/return_elite()
mychild.forceMove(loc)
@@ -254,7 +255,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
mychild.grab_ghost()
notify_ghosts("\A [mychild] has been challenged in \the [get_area(src)]!", enter_link="(Click to help) ", source = mychild, action = NOTIFY_FOLLOW)
INVOKE_ASYNC(src, PROC_REF(arena_checks))
- AddComponent(/datum/component/proximity_monitor, ARENA_RADIUS)
+ proximity_monitor = new(src, ARENA_RADIUS)
/obj/structure/elite_tumor/Initialize(mapload)
. = ..()
@@ -413,7 +414,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
text += "If teleported to the Station by jaunter, you are allowed to attack people on Station, until you get killed. "
to_chat(mychild, text.Join(" "))
- DeleteComponent(/datum/component/proximity_monitor)
+ QDEL_NULL(proximity_monitor)
/obj/item/tumor_shard
name = "tumor shard"
diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm
index 037ab6c2551f..ab73704d812b 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/legionnaire.dm
@@ -292,12 +292,19 @@
light_color = LIGHT_COLOR_RED
var/mob/living/simple_animal/hostile/asteroid/elite/legionnaire/myowner = null
-/obj/structure/legionnaire_bonfire/Crossed(datum/source, atom/movable/mover)
- if(isobj(source))
- var/obj/object = source
+/obj/structure/legionnaire_bonfire/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/structure/legionnaire_bonfire/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isobj(entered))
+ var/obj/object = entered
object.fire_act(1000, 500)
- if(isliving(source))
- var/mob/living/fire_walker = source
+ if(isliving(entered))
+ var/mob/living/fire_walker = entered
fire_walker.adjust_fire_stacks(5)
fire_walker.IgniteMob()
diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/pandora.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/pandora.dm
index 5f8c3709735e..bc4f66ae3a1e 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining/elites/pandora.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/pandora.dm
@@ -40,7 +40,7 @@
mouse_opacity = MOUSE_OPACITY_ICON
death_sound = 'sound/magic/repulse.ogg'
deathmessage = "'s lights flicker, before its top part falls down."
- loot_drop = /obj/item/clothing/accessory/necklace/pandora_hope
+ loot_drop = /obj/item/clothing/accessory/pandora_hope
attack_action_types = list(/datum/action/innate/elite_attack/chaser_burst,
/datum/action/innate/elite_attack/magic_box,
@@ -199,7 +199,8 @@
//Pandora's loot: Hope
-/obj/item/clothing/accessory/necklace/pandora_hope
+//This should probably be turned into a pin at some point
+/obj/item/clothing/accessory/pandora_hope
name = "Hope"
desc = "Found at the bottom of Pandora. After all the evil was released, this was the only thing left inside."
icon = 'icons/obj/lavaland/elite_trophies.dmi'
@@ -210,13 +211,13 @@
allow_duplicates = FALSE
resistance_flags = FIRE_PROOF
-/obj/item/clothing/accessory/necklace/pandora_hope/on_attached(obj/item/clothing/under/S, mob/user)
+/obj/item/clothing/accessory/pandora_hope/on_attached(obj/item/clothing/under/S, mob/user)
. = ..()
if(isliving(S.loc))
var/mob/living/M = S.loc
M.apply_status_effect(STATUS_EFFECT_HOPE)
-/obj/item/clothing/accessory/necklace/pandora_hope/on_removed(mob/user)
+/obj/item/clothing/accessory/pandora_hope/on_removed(mob/user)
if(isliving(has_suit.loc))
var/mob/living/M = has_suit.loc
M.remove_status_effect(STATUS_EFFECT_HOPE)
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/combat_drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/combat_drone.dm
index b8dacf1f796d..bc0df94d6242 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/combat_drone.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/combat_drone.dm
@@ -146,64 +146,61 @@
K.amount = pick(1, 2, 3, 4)
K.update_icon()
- //also drop dummy circuit boards deconstructable for research (loot)
- var/obj/item/circuitboard/C
-
- //spawn 1-4 boards of a random type
- var/spawnees = 0
+ // Spawn 1-4 boards of a random type
var/num_boards = rand(1, 4)
- var/list/options = list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512)
- for(var/i=0, iYou get stuck in [src] for a moment. ")
M.Weaken(8 SECONDS)
if(iscarbon(M))
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm
index d26e9d975db3..358894501a7f 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/mother.dm
@@ -139,7 +139,7 @@
name = "mother web"
desc = "This web is coated in pheromones which prevent spiderlings from passing it."
-/obj/structure/spider/terrorweb/mother/CanPass(atom/movable/mover, turf/target)
+/obj/structure/spider/terrorweb/mother/CanPass(atom/movable/mover, border_dir)
if(istype(mover, /obj/structure/spider/spiderling/terror_spiderling))
return FALSE
return ..()
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
index 05f9e655b733..cd32ea73e966 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
@@ -63,6 +63,7 @@
gain_desc = "You can now charge at a target on screen, dealing massive damage and destroying structures."
base_cooldown = 30 SECONDS
clothes_req = FALSE
+ antimagic_flags = NONE
action_icon_state = "terror_prince"
/datum/spell/princely_charge/create_new_targeting()
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index 84ee41256fcf..2d79c3224119 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -37,11 +37,10 @@
mouse_opacity = MOUSE_OPACITY_ICON
desc = "A thick vine, painful to the touch."
-
-/obj/effect/ebeam/vine/Crossed(atom/movable/AM, oldloc)
- if(!isliving(AM))
+/obj/effect/ebeam/vine/on_atom_entered(datum/source, atom/movable/entered)
+ if(!isliving(entered))
return
- var/mob/living/L = AM
+ var/mob/living/L = entered
if(!("vines" in L.faction))
L.adjustBruteLoss(5)
to_chat(L, "You cut yourself on the thorny vines. ")
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 1d4cd2ecaf82..5962f11d651d 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -62,6 +62,7 @@
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in process_ai() being run every single tick.
var/parrot_sleep_dur = 25 //Same as above, this is the var that physically counts down
+ var/wander_probability = 90
var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack
var/parrot_speed = 5 //"Delay in world ticks between movement." according to byond. Yeah, that's BS but it does directly affect movement. Higher number = slower.
@@ -72,6 +73,8 @@
//Headset for Poly to yell at engineers :)
var/obj/item/radio/headset/ears = null
+ var/speech_probability = 10
+ var/hear_probability = 50
//The thing the parrot is currently interested in. This gets used for items the parrot wants to pick up, mobs it wants to steal from,
//mobs it wants to attack or mobs that have attacked it
@@ -81,6 +84,7 @@
//These vars store their preffered perch and if they dont have one, what they can use as a perch
var/obj/parrot_perch = null
var/list/desired_perches
+ var/leaving_perch_probability = 10
//Parrots are kleptomaniacs. This variable ... stores the item a parrot is holding.
var/obj/item/held_item = null
@@ -105,17 +109,22 @@
desired_perches = typecacheof(list(
/obj/machinery/clonepod,
/obj/machinery/computer,
- /obj/machinery/dna_scannernew,
+ /obj/machinery/photocopier,
/obj/machinery/nuclearbomb,
/obj/machinery/particle_accelerator,
- /obj/machinery/recharge_station,
- /obj/machinery/smartfridge,
- /obj/machinery/suit_storage_unit,
- /obj/machinery/tcomms,
+ /obj/machinery/atmospherics/portable,
+ /obj/machinery/smartfridge/foodcart,
+ /obj/machinery/message_server,
+ /obj/machinery/tcomms/relay,
/obj/machinery/teleport,
/obj/structure/computerframe,
/obj/structure/displaycase,
- /obj/structure/filingcabinet
+ /obj/structure/rack,
+ /obj/structure/closet/crate
+ )) - typecacheof(list(
+ /obj/machinery/computer/security/telescreen,
+ /obj/machinery/computer/cryopod,
+ /obj/machinery/computer/guestpass
))
/mob/living/simple_animal/parrot/add_strippable_element()
@@ -149,6 +158,7 @@
if(stat == CONSCIOUS && M.a_intent == "harm")
icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks
+ ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
if(parrot_state == PARROT_PERCH)
parrot_sleep_dur = parrot_sleep_max //Reset it's sleep timer if it was perched
@@ -177,6 +187,7 @@
parrot_interest = user
parrot_state = PARROT_SWOOP|PARROT_FLEE
icon_state = "parrot_fly"
+ ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
drop_held_item(FALSE)
return
@@ -191,6 +202,7 @@
parrot_state = PARROT_WANDER //OWFUCK, Been shot! RUN LIKE HELL!
parrot_been_shot += 5
icon_state = "parrot_fly"
+ ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
drop_held_item(FALSE)
return
@@ -213,6 +225,7 @@
//Sprite and AI update for when a parrot gets pulled
if(pulledby && stat == CONSCIOUS)
icon_state = "parrot_fly"
+ ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
/mob/living/simple_animal/parrot/proc/update_available_channels()
available_channels.Cut()
@@ -263,7 +276,7 @@
Phrases that the parrot hears in mob/living/say() get added to speach_buffer.
Every once in a while, the parrot picks one of the lines from the buffer and replaces an element of the 'speech' list.
Then it clears the buffer to make sure they dont magically remember something from hours ago. */
- if(length(speech_buffer) && prob(10))
+ if(length(speech_buffer) && prob(speech_probability))
if(length(clean_speak))
clean_speak -= pick(clean_speak)
@@ -273,14 +286,10 @@
//-----SLEEPING
if(parrot_state == PARROT_PERCH)
if(parrot_perch && parrot_perch.loc != loc) //Make sure someone hasnt moved our perch on us
- if(parrot_perch in view(src))
- parrot_state = PARROT_SWOOP|PARROT_RETURN
- icon_state = "parrot_fly"
- return
- else
- parrot_state = PARROT_WANDER
- icon_state = "parrot_fly"
- return
+ parrot_state = (parrot_perch in view(src)) ? (PARROT_SWOOP|PARROT_RETURN) : PARROT_WANDER
+ icon_state = "parrot_fly"
+ ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
+ return
if(--parrot_sleep_dur) //Zzz
return
@@ -291,12 +300,21 @@
//Cycle through message modes for the headset
update_speak()
+ if(prob(leaving_perch_probability))
+ // Parrot no longer likes this perch and will try to find another one
+ parrot_perch = null
+ parrot_state = PARROT_WANDER
+ icon_state = "parrot_fly"
+ ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
+ return
+
//Search for item to steal
- parrot_interest = search_for_perch_and_item()
+ parrot_interest = search_for_perch_or_item()
if(parrot_interest)
custom_emote(EMOTE_VISIBLE, "looks in [parrot_interest]'s direction and takes flight.")
parrot_state = PARROT_SWOOP|PARROT_STEAL
icon_state = "parrot_fly"
+ ADD_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
return
//-----WANDERING - This is basically a 'I dont know what to do yet' state
@@ -307,12 +325,12 @@
//Wander around aimlessly. This will help keep the loops from searches down
//and possibly move the mob into a new are in view of something they can use
- if(prob(90))
+ if(prob(wander_probability))
step(src, pick(GLOB.cardinal))
return
if(!held_item && !parrot_perch) //If we've got nothing to do.. look for something to do.
- var/atom/movable/AM = search_for_perch_and_item() //This handles checking through lists so we know it's either a perch or stealable item
+ var/atom/movable/AM = search_for_perch_or_item() //This handles checking through lists so we know it's either a perch or stealable item
if(AM)
if(isitem(AM) || isliving(AM)) //If stealable item
parrot_interest = AM
@@ -320,7 +338,7 @@
face_atom(AM)
custom_emote(EMOTE_VISIBLE, "turns and flies towards [parrot_interest].")
return
- else //Else it's a perch
+ else if(is_type_in_typecache(AM, desired_perches)) //Else if it's a perch
parrot_perch = AM
parrot_state = PARROT_SWOOP|PARROT_RETURN
return
@@ -335,8 +353,9 @@
return
else //Have an item but no perch? Find one!
- parrot_perch = search_for_perch_and_item()
- if(parrot_perch)
+ var/atom/movable/AM = search_for_perch_or_item()
+ if(is_type_in_typecache(AM, desired_perches))
+ parrot_perch = AM
parrot_state = PARROT_SWOOP|PARROT_RETURN
return
//-----STEALING
@@ -359,13 +378,13 @@
parrot_state = PARROT_SWOOP|PARROT_RETURN
return
- var/list/path_to_take = get_path_to(src, parrot_interest)
- if(length(path_to_take) <= 1) // The target is below us
+ var/list/path_to_take = get_path_to(src, parrot_interest, mintargetdist = 1)
+ if(!length(path_to_take)) // The target is unachievable
parrot_interest = null
parrot_state = PARROT_SWOOP|PARROT_RETURN
return
- walk_to(src, path_to_take[2], 0, parrot_speed)
+ walk_to(src, parrot_interest, 1, parrot_speed)
return
//-----RETURNING TO PERCH
@@ -382,15 +401,16 @@
drop_held_item()
parrot_state = PARROT_PERCH
icon_state = "parrot_sit"
+ REMOVE_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
return
- var/list/path_to_take = get_path_to(src, parrot_perch)
- if(length(path_to_take) <= 1) // The target is below us
+ var/list/path_to_take = get_path_to(src, parrot_perch, mintargetdist = 1)
+ if(!length(path_to_take)) // The target is unachievable
parrot_perch = null
parrot_state = PARROT_WANDER
return
- walk_to(src, path_to_take[2], 0, parrot_speed)
+ walk_to(src, parrot_perch, 1, parrot_speed)
return
//-----FLEEING
@@ -469,10 +489,10 @@
//Because the most appropriate place to set icon_state is movement_delay(), clearly
return ..()
-/mob/living/simple_animal/parrot/proc/search_for_perch_and_item(list/stuff)
+/mob/living/simple_animal/parrot/proc/search_for_perch_or_item()
var/turf/my_turf = get_turf(src)
var/list/computed_paths = list()
- for(var/obj/O in view(src))
+ for(var/obj/O in shuffle(view(src)))
var/is_eligible = FALSE
if(!parrot_perch && is_type_in_typecache(O, desired_perches))
is_eligible = TRUE
@@ -489,8 +509,12 @@
var/turf/T = get_turf(O)
if(my_turf != T)
var/cache_id = "[my_turf.UID()]_[T.UID()]"
- computed_paths[cache_id] = computed_paths[cache_id] || get_path_to(src, T)
- if(!length(computed_paths[cache_id]))
+ var/list/path = computed_paths[cache_id] || get_path_to(src, T, mintargetdist = 1)
+ computed_paths[cache_id] = path
+ if(!length(path))
+ continue
+ var/turf/target_turf = path[length(path)]
+ if(!target_turf.Adjacent(O))
continue
return O
@@ -619,6 +643,7 @@
if(is_type_in_typecache(AM, desired_perches))
forceMove(AM.loc)
icon_state = "parrot_sit"
+ REMOVE_TRAIT(src, TRAIT_FLYING, INNATE_TRAIT)
return
to_chat(src, "There is no perch nearby to sit on. ")
return
@@ -694,12 +719,12 @@
used_radios += ears
/mob/living/simple_animal/parrot/hear_say(list/message_pieces, verb = "says", italics = 0, mob/speaker = null, sound/speech_sound, sound_vol, sound_frequency, use_voice = TRUE)
- if(speaker != src && prob(50))
+ if(speaker != src && prob(hear_probability))
parrot_hear(html_decode(multilingual_to_message(message_pieces)))
..()
/mob/living/simple_animal/parrot/hear_radio(list/message_pieces, verb = "says", part_a, part_b, mob/speaker = null, hard_to_hear = 0, atom/follow_target, check_name_against)
- if(speaker != src && prob(50))
+ if(speaker != src && prob(hear_probability))
parrot_hear(html_decode(multilingual_to_message(message_pieces)))
..()
diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm
index 7bc00e3cf489..260c85782487 100644
--- a/code/modules/mob/living/simple_animal/shade.dm
+++ b/code/modules/mob/living/simple_animal/shade.dm
@@ -69,13 +69,13 @@
if(istype(host_sword))
health = host_sword.obj_integrity
-/mob/living/simple_animal/shade/sword/bread
- name = "Bread spirit"
+/mob/living/simple_animal/shade/sword/generic_item
+ name = "Trapped spirit"
-/mob/living/simple_animal/shade/sword/bread/update_runechat_msg_location()
+/mob/living/simple_animal/shade/sword/generic_item/update_runechat_msg_location()
runechat_msg_location = loc.UID()
-/mob/living/simple_animal/shade/sword/bread/proc/handle_bread_deletion(source)
+/mob/living/simple_animal/shade/sword/generic_item/proc/handle_item_deletion(source)
SIGNAL_HANDLER
qdel(src)
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index 88ddc6189a2f..daec7a7b43eb 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -583,10 +583,10 @@
if(pulledby || shouldwakeup)
toggle_ai(AI_ON)
-/mob/living/simple_animal/onTransitZ(old_z, new_z)
+/mob/living/simple_animal/on_changed_z_level(turf/old_turf, turf/new_turf)
..()
- if(AIStatus == AI_Z_OFF)
- var/list/idle_mobs_on_old_z = LAZYACCESS(SSidlenpcpool.idle_mobs_by_zlevel, old_z)
+ if(AIStatus == AI_Z_OFF && old_turf)
+ var/list/idle_mobs_on_old_z = LAZYACCESS(SSidlenpcpool.idle_mobs_by_zlevel, old_turf.z)
LAZYREMOVE(idle_mobs_on_old_z, src)
toggle_ai(initial(AIStatus))
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index b1a145c43906..fc64f8ba80dc 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -75,6 +75,7 @@
IMPMINDSHIELD_HUD = 'icons/mob/hud/sechud.dmi',
IMPCHEM_HUD = 'icons/mob/hud/sechud.dmi',
IMPTRACK_HUD = 'icons/mob/hud/sechud.dmi',
+ PRESSURE_HUD = 'icons/effects/effects.dmi',
)
for(var/hud in hud_possible)
@@ -331,6 +332,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
for(var/slot in GLOB.slot_equipment_priority)
if(isstorage(W) && slot == ITEM_SLOT_HEAD) // Storage items should be put on the belt before the head
continue
+ if(W.prefered_slot_flags && !(W.prefered_slot_flags & slot)) //If there's a prefered slot flags list, make sure this slot is in it
+ continue
if(equip_to_slot_if_possible(W, slot, FALSE, TRUE)) //del_on_fail = 0; disable_warning = 0
return 1
@@ -1427,3 +1430,90 @@ GLOBAL_LIST_INIT(holy_areas, typecacheof(list(
if(user.incapacitated())
return
return relaydrive(user, direction)
+
+
+/**
+ * Checks to see if the mob can cast normal magic spells.
+ *
+ * args:
+ * * magic_flags (optional) A bitfield with the type of magic being cast (see flags at: /datum/component/anti_magic)
+**/
+/mob/proc/can_cast_magic(magic_flags = MAGIC_RESISTANCE)
+ if(magic_flags == NONE) // magic with the NONE flag can always be cast
+ return TRUE
+
+ var/restrict_magic_flags = SEND_SIGNAL(src, COMSIG_MOB_RESTRICT_MAGIC, magic_flags)
+ return restrict_magic_flags == NONE
+
+/**
+ * Checks to see if the mob can block magic
+ *
+ * args:
+ * * casted_magic_flags (optional) A bitfield with the types of magic resistance being checked (see flags at: /datum/component/anti_magic)
+ * * charge_cost (optional) The cost of charge to block a spell that will be subtracted from the protection used
+**/
+/mob/proc/can_block_magic(casted_magic_flags = MAGIC_RESISTANCE, charge_cost = 1)
+ if(casted_magic_flags == NONE) // magic with the NONE flag is immune to blocking
+ return FALSE
+
+ // A list of all things which are providing anti-magic to us
+ var/list/antimagic_sources = list()
+ var/is_magic_blocked = FALSE
+
+ if(SEND_SIGNAL(src, COMSIG_MOB_RECEIVE_MAGIC, casted_magic_flags, charge_cost, antimagic_sources) & COMPONENT_MAGIC_BLOCKED)
+ is_magic_blocked = TRUE
+ if(HAS_TRAIT(src, TRAIT_ANTIMAGIC))
+ is_magic_blocked = TRUE
+ if((casted_magic_flags & MAGIC_RESISTANCE_HOLY) && HAS_TRAIT(src, TRAIT_HOLY))
+ is_magic_blocked = TRUE
+
+ if(is_magic_blocked && charge_cost > 0 && !HAS_TRAIT(src, TRAIT_RECENTLY_BLOCKED_MAGIC))
+ on_block_magic_effects(casted_magic_flags, antimagic_sources)
+
+ return is_magic_blocked
+
+/// Called whenever a magic effect with a charge cost is blocked and we haven't recently blocked magic.
+/mob/proc/on_block_magic_effects(magic_flags, list/antimagic_sources)
+ return
+
+/mob/living/on_block_magic_effects(magic_flags, list/antimagic_sources)
+ ADD_TRAIT(src, TRAIT_RECENTLY_BLOCKED_MAGIC, MAGIC_TRAIT)
+ addtimer(CALLBACK(src, PROC_REF(remove_recent_magic_block)), 6 SECONDS)
+
+ var/mutable_appearance/antimagic_effect
+ var/antimagic_color
+ var/atom/antimagic_source = length(antimagic_sources) ? pick(antimagic_sources) : src
+
+ if(magic_flags & MAGIC_RESISTANCE)
+ visible_message(
+ "[src] pulses red as [ismob(antimagic_source) ? p_they() : antimagic_source] absorbs magic energy! ",
+ "An intense magical aura pulses around [ismob(antimagic_source) ? "you" : antimagic_source] as it dissipates into the air! ",
+ )
+ antimagic_effect = mutable_appearance('icons/effects/effects.dmi', "shield-red", ABOVE_MOB_LAYER)
+ antimagic_color = LIGHT_COLOR_BLOOD_MAGIC
+ playsound(src, 'sound/magic/magic_block.ogg', 50, TRUE)
+
+ else if(magic_flags & MAGIC_RESISTANCE_HOLY)
+ visible_message(
+ "[src] starts to glow as [ismob(antimagic_source) ? p_they() : antimagic_source] emits a halo of light! ",
+ "A feeling of warmth washes over [ismob(antimagic_source) ? "you" : antimagic_source] as rays of light surround your body and protect you! ",
+ )
+ antimagic_effect = mutable_appearance('icons/mob/genetics.dmi', "servitude", ABOVE_MOB_LAYER)
+ antimagic_color = LIGHT_COLOR_HOLY_MAGIC
+ playsound(src, 'sound/magic/magic_block_holy.ogg', 50, TRUE)
+
+ else if(magic_flags & MAGIC_RESISTANCE_MIND)
+ visible_message(
+ "[src] forehead shines as [ismob(antimagic_source) ? p_they() : antimagic_source] repulses magic from their mind! ",
+ "A feeling of cold splashes on [ismob(antimagic_source) ? "you" : antimagic_source] as your forehead reflects magic usering your mind! ",
+ )
+ antimagic_effect = mutable_appearance('icons/mob/genetics.dmi', "telekinesishead", ABOVE_MOB_LAYER)
+ antimagic_color = LIGHT_COLOR_DARK_BLUE
+ playsound(src, 'sound/magic/magic_block_mind.ogg', 50, TRUE)
+
+ mob_light(_color = antimagic_color, _range = 2, _power = 2, _duration = 5 SECONDS)
+ add_overlay(antimagic_effect)
+ addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, cut_overlay), antimagic_effect), 5 SECONDS)
+
+/mob/living/proc/remove_recent_magic_block()
+ REMOVE_TRAIT(src, TRAIT_RECENTLY_BLOCKED_MAGIC, MAGIC_TRAIT)
diff --git a/code/modules/mob/mob_holder.dm b/code/modules/mob/mob_holder.dm
index 18290c6cecb0..5f7200b17347 100644
--- a/code/modules/mob/mob_holder.dm
+++ b/code/modules/mob/mob_holder.dm
@@ -3,7 +3,7 @@
name = "holder"
desc = "You shouldn't ever see this."
icon = 'icons/obj/objects.dmi'
- slot_flags = ITEM_SLOT_HEAD|ITEM_SLOT_BOTH_EARS
+ slot_flags = ITEM_SLOT_HEAD|ITEM_SLOT_NECK
/obj/item/holder/New()
..()
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index dedebe6f5492..6f1cd194d7f6 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -1,4 +1,4 @@
-/mob/CanPass(atom/movable/mover, turf/target)
+/mob/CanPass(atom/movable/mover, border_dir)
var/horizontal = FALSE
if(isliving(src))
var/mob/living/L = src
diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index 98002094fcd4..aa320349eafb 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -277,6 +277,8 @@
return FALSE
if(job.get_exp_restrictions(client))
return FALSE
+ if(job.mentor_only && !check_rights(R_MENTOR | R_ADMIN, FALSE))
+ return FALSE
if(GLOB.configuration.jobs.assistant_limit)
if(job.title == "Assistant")
diff --git a/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm
index eb5570bcf848..4ba8c9602094 100644
--- a/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm
+++ b/code/modules/mob/new_player/sprite_accessories/sprite_accessories.dm
@@ -462,6 +462,10 @@
name = "Rainbow Shirt"
icon_state = "shirt_rainbow"
+/datum/sprite_accessory/undershirt/shirt_wave
+ name = "Great Wave Shirt"
+ icon_state = "shirt_wave"
+
//end graphic shirts
//short sleeved
diff --git a/code/modules/mod/mod_types.dm b/code/modules/mod/mod_types.dm
index 74176c1a1640..af6292a6284e 100644
--- a/code/modules/mod/mod_types.dm
+++ b/code/modules/mod/mod_types.dm
@@ -366,12 +366,17 @@
var/insignia_type = /obj/item/mod/module/insignia
/// Additional module we add, as a treat.
var/additional_module
+ /// Inquisitorial module, as we have reached that point.
+ var/inquisitorial_module
/obj/item/mod/control/pre_equipped/responsory/Initialize(mapload, new_theme, new_skin, new_core)
applied_modules.Insert(1, insignia_type)
if(additional_module)
applied_modules += additional_module
default_pins += additional_module
+ if(inquisitorial_module)
+ applied_modules += inquisitorial_module
+
return ..()
/obj/item/mod/control/pre_equipped/responsory/commander
@@ -410,9 +415,10 @@
insignia_type = /obj/item/mod/module/insignia/chaplain
additional_module = /obj/item/mod/module/injector
-/// Diffrent look, as well as magic proof on TG. We don't have the magic proof stuff here, but it's perfect for inqusitors. Or if you want to give your ERT a fancy look.
+/// Diffrent look, as well as magic proof. It's perfect for inqusitors. Or if you want to give your ERT a fancy look. At this time, the other ones are unused, and frankly I don't like the idea of antimagic gamma.
/obj/item/mod/control/pre_equipped/responsory/inquisitory
applied_skin = "inquisitory"
+ inquisitorial_module = /obj/item/mod/module/anti_magic
/obj/item/mod/control/pre_equipped/responsory/inquisitory/commander
insignia_type = /obj/item/mod/module/insignia/commander
diff --git a/code/modules/mod/modules/modules_antag.dm b/code/modules/mod/modules/modules_antag.dm
index f33db48aa27f..002de3f3b308 100644
--- a/code/modules/mod/modules/modules_antag.dm
+++ b/code/modules/mod/modules/modules_antag.dm
@@ -527,6 +527,24 @@
/obj/item/mod/module/energy_shield/gamma
shield_icon = "shield-old"
+///Magic Nullifier - Protects you from magic.
+/obj/item/mod/module/anti_magic
+ name = "MOD magic nullifier module"
+ desc = "A series of obsidian rods installed into critical points around the suit, \
+ vibrated at a certain low frequency to enable them to resonate. \
+ This creates a low-range, yet strong, magic nullification field around the user, \
+ aided by a full replacement of the suit's normal coolant with holy water. \
+ Spells will spall right off this field, though it'll do nothing to help others believe you about all this."
+ icon_state = "magic_nullifier"
+ removable = FALSE
+ incompatible_modules = list(/obj/item/mod/module/anti_magic)
+
+/obj/item/mod/module/anti_magic/on_suit_activation()
+ ADD_TRAIT(mod.wearer, TRAIT_ANTIMAGIC, "[UID(src)]")
+
+/obj/item/mod/module/anti_magic/on_suit_deactivation(deleting = FALSE)
+ REMOVE_TRAIT(mod.wearer, TRAIT_ANTIMAGIC, "[UID(src)]")
+
/obj/item/mod/module/anomaly_locked/teslawall
name = "MOD arc-shield module" // temp
desc = "A module that uses a flux core to project an unstable protective shield." //change
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index 2d20a77d9037..38bd6bf1b3cc 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -172,7 +172,7 @@
icon_state = "camera"
item_state = "electropack"
w_class = WEIGHT_CLASS_SMALL
- slot_flags = ITEM_SLOT_BELT
+ slot_flags = ITEM_SLOT_NECK
var/list/matter = list("metal" = 2000)
var/pictures_max = 10
// cameras historically were varedited to start with 30 shots despite
diff --git a/code/modules/power/cables/cable.dm b/code/modules/power/cables/cable.dm
index e46b052f0a3f..23c6b28e3003 100644
--- a/code/modules/power/cables/cable.dm
+++ b/code/modules/power/cables/cable.dm
@@ -157,9 +157,9 @@ By design, d1 is the smallest direction and d2 is the highest
investigate_log("was deconstructed by [key_name(usr, 1)] in [get_area(usr)]([T.x], [T.y], [T.z] - [ADMIN_JMP(T)])","wires")
if(!(flags & NODECONSTRUCT))
if(d1) // 0-X cables are 1 unit, X-X cables are 2 units long
- new/obj/item/stack/cable_coil(T, 2, paramcolor = color)
+ new/obj/item/stack/cable_coil(T, 2, color)
else
- new/obj/item/stack/cable_coil(T, 1, paramcolor = color)
+ new/obj/item/stack/cable_coil(T, 1, color)
qdel(src)
/* ===POWERNET PROCS=== */
diff --git a/code/modules/power/cables/cable_coil.dm b/code/modules/power/cables/cable_coil.dm
index 9f5ec33fc4e5..f688d0ab2679 100644
--- a/code/modules/power/cables/cable_coil.dm
+++ b/code/modules/power/cables/cable_coil.dm
@@ -28,13 +28,10 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
usesound = 'sound/items/deconstruct.ogg'
toolspeed = 1
-/obj/item/stack/cable_coil/New(location, length, paramcolor)
+/obj/item/stack/cable_coil/Initialize(mapload, length, paramcolor)
. = ..()
if(paramcolor)
color = paramcolor
-
-/obj/item/stack/cable_coil/Initialize(mapload)
- . = ..()
update_icon()
recipes = GLOB.cable_coil_recipes
update_wclass()
@@ -210,7 +207,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
if(C.shock(user, 50))
if(prob(50)) //fail
- new /obj/item/stack/cable_coil(get_turf(C), 1, paramcolor = C.color)
+ new /obj/item/stack/cable_coil(get_turf(C), 1, C.color)
C.deconstruct()
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_CABLE_UPDATED, T)
@@ -378,9 +375,9 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
/obj/item/stack/cable_coil/white
color = COLOR_WHITE
-/obj/item/stack/cable_coil/random/New()
+/obj/item/stack/cable_coil/random/Initialize(mapload)
+ . = ..()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE)
- ..()
/obj/item/stack/cable_coil/cut
item_state = "coil2"
diff --git a/code/modules/power/engines/singularity/containment_field.dm b/code/modules/power/engines/singularity/containment_field.dm
index 0953ae2a4541..cfec3f374779 100644
--- a/code/modules/power/engines/singularity/containment_field.dm
+++ b/code/modules/power/engines/singularity/containment_field.dm
@@ -14,6 +14,13 @@
var/obj/machinery/field/generator/FG1 = null
var/obj/machinery/field/generator/FG2 = null
+/obj/machinery/field/containment/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/machinery/field/containment/Destroy()
if(FG1)// These checks are mostly in case a field is spawned in by accident.
FG1.fields -= src
@@ -57,12 +64,12 @@
else
..()
-/obj/machinery/field/containment/Crossed(mob/mover, oldloc)
- if(isliving(mover))
- shock_field(mover)
+/obj/machinery/field/containment/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isliving(entered))
+ shock_field(entered)
- if(ismachinery(mover) || isstructure(mover) || ismecha(mover))
- bump_field(mover)
+ if(ismachinery(entered) || isstructure(entered) || ismecha(entered))
+ bump_field(entered)
/obj/machinery/field/containment/proc/set_master(master1, master2)
if(!master1 || !master2)
@@ -86,7 +93,7 @@
/obj/machinery/field
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
-/obj/machinery/field/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/field/CanPass(atom/movable/mover, border_dir)
if(hasShocked)
return 0
if(isliving(mover)) // Don't let mobs through
diff --git a/code/modules/power/engines/singularity/particle_accelerator/particle.dm b/code/modules/power/engines/singularity/particle_accelerator/particle.dm
index 12641cefbd82..a2bae7b95c33 100644
--- a/code/modules/power/engines/singularity/particle_accelerator/particle.dm
+++ b/code/modules/power/engines/singularity/particle_accelerator/particle.dm
@@ -24,10 +24,18 @@
/obj/effect/accelerated_particle/Initialize(mapload)
. = ..()
addtimer(CALLBACK(src, PROC_REF(propagate)), 1)
- RegisterSignal(src, COMSIG_CROSSED_MOVABLE, PROC_REF(try_irradiate))
- RegisterSignal(src, COMSIG_MOVABLE_CROSSED, PROC_REF(try_irradiate))
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(try_irradiate)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+ RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(on_movable_moved))
QDEL_IN(src, movement_range)
+/obj/effect/accelerated_particle/proc/on_movable_moved(datum/source, old_location, direction, forced)
+ if(isturf(loc))
+ for(var/atom/A in loc)
+ try_irradiate(src, A)
+
/obj/effect/accelerated_particle/proc/try_irradiate(src, atom/A)
if(isliving(A))
var/mob/living/L = A
diff --git a/code/modules/power/engines/singularity/singularity.dm b/code/modules/power/engines/singularity/singularity.dm
index 32d9683db270..1d51905da0a8 100644
--- a/code/modules/power/engines/singularity/singularity.dm
+++ b/code/modules/power/engines/singularity/singularity.dm
@@ -38,6 +38,8 @@ GLOBAL_VAR_INIT(global_singulo_id, 1)
var/isnt_shutting_down = FALSE
/// Init list that has all the areas that we can possibly move to, to reduce processing impact
var/list/all_possible_areas = list()
+ var/datum/proximity_monitor/advanced/singulo/proximity_monitor
+
/// Id for monitoring.
var/singulo_id = 1
@@ -49,7 +51,7 @@ GLOBAL_VAR_INIT(global_singulo_id, 1)
energy = starting_energy
if(warps_projectiles)
- AddComponent(/datum/component/proximity_monitor/singulo, _radius = 10)
+ proximity_monitor = new(src, 10)
START_PROCESSING(SSobj, src)
GLOB.poi_list |= src
@@ -526,50 +528,6 @@ GLOBAL_VAR_INIT(global_singulo_id, 1)
if(prob(1))
mezzer()
-/datum/component/proximity_monitor/singulo
- field_checker_type = /obj/effect/abstract/proximity_checker/singulo
-
-/datum/component/proximity_monitor/singulo/create_single_prox_checker(turf/T, checker_type)
- . = ..()
- var/obj/effect/abstract/proximity_checker/singulo/S = .
- S.calibrate()
-
-/datum/component/proximity_monitor/singulo/recenter_prox_checkers()
- . = ..()
- for(var/obj/effect/abstract/proximity_checker/singulo/S as anything in proximity_checkers)
- S.calibrate()
-
-/obj/effect/abstract/proximity_checker/singulo
- var/angle_to_singulo
- var/distance_to_singulo
-
-/obj/effect/abstract/proximity_checker/singulo/proc/calibrate()
- angle_to_singulo = ATAN2(monitor.hasprox_receiver.y - y, monitor.hasprox_receiver.x - x)
- distance_to_singulo = get_dist(monitor.hasprox_receiver, src)
-
-/obj/effect/abstract/proximity_checker/singulo/Crossed(atom/movable/AM, oldloc)
- . = ..()
- if(!isprojectile(AM))
- return
- var/obj/item/projectile/P = AM
- var/distance = distance_to_singulo
- var/projectile_angle = P.Angle
- var/angle_to_projectile = angle_to_singulo
- if(angle_to_projectile == 180)
- angle_to_projectile = -180
- angle_to_projectile -= projectile_angle
- if(angle_to_projectile > 180)
- angle_to_projectile -= 360
- else if(angle_to_projectile < -180)
- angle_to_projectile += 360
-
- if(distance == 0)
- qdel(P)
- return
- projectile_angle += angle_to_projectile / (distance ** 2)
- P.damage += 10 / distance
- P.set_angle(projectile_angle)
-
/obj/singularity/proc/end_deadchat_plays()
move_self = TRUE
diff --git a/code/modules/power/engines/supermatter/supermatter.dm b/code/modules/power/engines/supermatter/supermatter.dm
index dabeeb3f3b3a..7c6aaee0828d 100644
--- a/code/modules/power/engines/supermatter/supermatter.dm
+++ b/code/modules/power/engines/supermatter/supermatter.dm
@@ -44,7 +44,7 @@
#define DAMAGE_INCREASE_MULTIPLIER 0.25
-#define THERMAL_RELEASE_MODIFIER 5 //Higher == less heat released during reaction, not to be confused with the above values
+#define THERMAL_RELEASE_MODIFIER 1 //Higher == less heat released during reaction, not to be confused with the above values
#define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 325 //Higher == less oxygen released at high temperature/power
@@ -230,6 +230,11 @@
/// Run S-Class event? So we can only run one S-class event per round per crystal
var/has_run_sclass = FALSE
+ /// How often do we want to process the crystal?
+ var/ticks_per_run = 5
+ /// How long has it been since we processed the crystal?
+ var/tick_counter = 0
+
/obj/machinery/atmospherics/supermatter_crystal/Initialize(mapload)
. = ..()
@@ -407,8 +412,11 @@
qdel(src)
/obj/machinery/atmospherics/supermatter_crystal/process_atmos()
- var/datum/milla_safe/supermatter_process/milla = new()
- milla.invoke_async(src)
+ tick_counter += SSair.wait
+ if(tick_counter >= ticks_per_run)
+ var/datum/milla_safe/supermatter_process/milla = new()
+ milla.invoke_async(src)
+ tick_counter -= ticks_per_run
/datum/milla_safe/supermatter_process
@@ -424,7 +432,7 @@
if(isnull(T)) // We have a null turf...something is wrong, stop processing this entity.
return PROCESS_KILL
- if(!istype(T)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
+ if(!istype(loc, /turf)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
return //Yeah just stop.
if(T.density)
@@ -566,15 +574,11 @@
//Power * 0.55 * a value between 1 and 0.8
var/device_energy = power * REACTION_POWER_MODIFIER
- //To figure out how much temperature to add each tick, consider that at one atmosphere's worth
- //of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
- //that the device energy is around 2140. At that stage, we don't want too much heat to be put out
- //Since the core is effectively "cold"
-
- //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
- //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
- //Power * 0.55 * (some value between 1.5 and 23) / 5
- removed.set_temperature(removed.temperature() + max(0, min((2500 * dynamic_heat_modifier) - removed.temperature(), (((device_energy * dynamic_heat_modifier) / THERMAL_RELEASE_MODIFIER) * heat_multiplier))))
+ // Calculate temperature change in terms of thermal energy, scaled by the average specific heat of the gas.
+ if(removed.total_moles())
+ var/produced_joules = max(0, ((device_energy * dynamic_heat_modifier) / THERMAL_RELEASE_MODIFIER) * heat_multiplier)
+ produced_joules *= (removed.heat_capacity() / removed.total_moles())
+ removed.set_temperature((removed.thermal_energy() + produced_joules) / removed.heat_capacity())
//Calculate how much gas to release
//Varies based on power and gas content
@@ -848,7 +852,7 @@
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE)
Consume(AM)
-/obj/machinery/atmospherics/supermatter_crystal/Bump(atom/A, yes)
+/obj/machinery/atmospherics/supermatter_crystal/Bump(atom/A)
..()
if(!istype(A, /obj/machinery/atmospherics/supermatter_crystal))
Bumped(A)
diff --git a/code/modules/power/engines/tesla/energy_ball.dm b/code/modules/power/engines/tesla/energy_ball.dm
index eef6897ee91e..b7a012e9c8aa 100644
--- a/code/modules/power/engines/tesla/energy_ball.dm
+++ b/code/modules/power/engines/tesla/energy_ball.dm
@@ -47,6 +47,10 @@
RegisterSignal(src, COMSIG_ATOM_ORBIT_BEGIN, PROC_REF(on_start_orbit))
RegisterSignal(src, COMSIG_ATOM_ORBIT_STOP, PROC_REF(on_stop_orbit))
RegisterSignal(parent_energy_ball, COMSIG_PARENT_QDELETING, PROC_REF(on_parent_delete))
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
. = ..()
if(!is_miniball)
set_light(10, 7, "#5e5edd")
@@ -135,6 +139,11 @@
sleep(0.5 SECONDS)
walk_towards(src, move_target, 0, 10)
+/obj/singularity/energy_ball/proc/on_atom_entered(datum/source, atom/movable/entered)
+ var/mob/living/living_entered = entered
+ if(istype(living_entered))
+ living_entered.dust()
+
/datum/move_with_corner
var/turf/start
var/turf/end
@@ -210,13 +219,6 @@
forceMove(target, direction)
return TRUE
-// This handles mobs crossing us. For us crossing mobs, see /mob/living/Crossed.
-// (It also dusts them.)
-/obj/singularity/energy_ball/Crossed(atom/thing)
- if(isliving(thing))
- var/mob/victim = thing
- victim.dust()
-
/obj/singularity/energy_ball/proc/handle_energy()
if(energy >= energy_to_raise)
energy_to_lower = energy_to_raise - 20
diff --git a/code/modules/power/generators/treadmill.dm b/code/modules/power/generators/treadmill.dm
index 6a6f68b8b5bd..f57b6ee3b4f3 100644
--- a/code/modules/power/generators/treadmill.dm
+++ b/code/modules/power/generators/treadmill.dm
@@ -16,26 +16,40 @@
var/list/mobs_running[0]
var/id = null // for linking to monitor
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ COMSIG_ATOM_EXITED = PROC_REF(on_atom_exited),
+ )
+
/obj/machinery/power/treadmill/Initialize(mapload)
. = ..()
+ on_anchor_changed()
+
+/obj/machinery/power/treadmill/proc/on_anchor_changed()
if(anchored)
connect_to_network()
+ AddElement(/datum/element/connect_loc, loc_connections)
+ else
+ disconnect_from_network()
+ RemoveElement(/datum/element/connect_loc)
/obj/machinery/power/treadmill/update_icon_state()
icon_state = speed ? "conveyor-1" : "conveyor0"
-/obj/machinery/power/treadmill/Crossed(mob/living/M, oldloc)
- if(anchored && !M.anchored)
- if(!istype(M) || M.dir != dir)
- throw_off(M)
- else
- mobs_running[M] = M.last_movement
- . = ..()
+/obj/machinery/power/treadmill/proc/on_atom_entered(datum/source, mob/living/crossed)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+ if(crossed.anchored || crossed.throwing)
+ return
-/obj/machinery/power/treadmill/Uncrossed(mob/living/M)
- if(anchored && istype(M))
- mobs_running -= M
- . = ..()
+ if(!istype(crossed) || crossed.dir != dir)
+ throw_off(crossed)
+ else
+ mobs_running[crossed] = crossed.last_movement
+
+/obj/machinery/power/treadmill/proc/on_atom_exited(mob/living/crossed)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXITED
+ if(istype(crossed))
+ mobs_running -= crossed
/obj/machinery/power/treadmill/proc/throw_off(atom/movable/A)
// if 2fast, throw the person, otherwise they just slide off, if there's reasonable speed at all
@@ -98,10 +112,7 @@
/obj/machinery/power/treadmill/attackby__legacy__attackchain(obj/item/W, mob/user)
if(default_unfasten_wrench(user, W, time = 60))
- if(anchored)
- connect_to_network()
- else
- disconnect_from_network()
+ on_anchor_changed()
speed = 0
update_icon()
return
diff --git a/code/modules/power/lights.dm b/code/modules/power/lights.dm
index eae1c664e1c4..a5d614762745 100644
--- a/code/modules/power/lights.dm
+++ b/code/modules/power/lights.dm
@@ -76,7 +76,7 @@
stage = LIGHT_CONSTRUCT_EMPTY_FRAME
update_icon(UPDATE_ICON_STATE)
- new /obj/item/stack/cable_coil(get_turf(loc), 1, paramcolor = COLOR_RED)
+ new /obj/item/stack/cable_coil(get_turf(loc), 1, COLOR_RED)
WIRECUTTER_SNIP_MESSAGE
/obj/machinery/light_construct/screwdriver_act(mob/living/user, obj/item/I)
@@ -999,15 +999,19 @@
/obj/item/light/Initialize(mapload)
. = ..()
AddComponent(/datum/component/caltrop, force)
-
-/obj/item/light/Crossed(mob/living/L)
- if(istype(L) && has_gravity(loc))
- if(L.incorporeal_move || HAS_TRAIT(L, TRAIT_FLYING) || L.floating)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/item/light/proc/on_atom_entered(datum/source, atom/movable/entered)
+ var/mob/living/living_entered = entered
+ if(istype(living_entered) && has_gravity(loc))
+ if(living_entered.incorporeal_move || HAS_TRAIT(living_entered, TRAIT_FLYING) || living_entered.floating)
return
playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE)
if(status == LIGHT_BURNED || status == LIGHT_OK)
shatter()
- return ..()
/obj/item/light/decompile_act(obj/item/matter_decompiler/C, mob/user)
C.stored_comms["glass"] += 1
diff --git a/code/modules/projectiles/guns/chaos_bolt.dm b/code/modules/projectiles/guns/chaos_bolt.dm
index fab8d9955f4a..cd197bd82757 100644
--- a/code/modules/projectiles/guns/chaos_bolt.dm
+++ b/code/modules/projectiles/guns/chaos_bolt.dm
@@ -18,7 +18,8 @@
/obj/item/projectile/magic/chaos/on_hit(atom/target, blocked = 0)
. = ..()
-
+ if(!.)
+ return
if(iswallturf(target) || isobj(target))
target.color = pick(GLOB.random_color_list)
return
diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm
index c542ffa00417..795e31760862 100644
--- a/code/modules/projectiles/guns/magic.dm
+++ b/code/modules/projectiles/guns/magic.dm
@@ -15,6 +15,7 @@
var/can_charge = TRUE
var/ammo_type
var/no_den_usage
+ var/antimagic_flags = MAGIC_RESISTANCE
origin_tech = null
clumsy_check = FALSE
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
@@ -31,6 +32,9 @@
return
else
no_den_usage = 0
+ if(!user.can_cast_magic(antimagic_flags))
+ to_chat(user, "[src] whizzles quietly. ")
+ return FALSE
..()
/obj/item/gun/magic/can_shoot()
diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm
index 8a82da356006..ff3ef65d9324 100644
--- a/code/modules/projectiles/guns/projectile/revolver.dm
+++ b/code/modules/projectiles/guns/projectile/revolver.dm
@@ -197,111 +197,6 @@
origin_tech = "combat=3;biotech=5"
mag_type = /obj/item/ammo_box/magazine/internal/overgrown
-// A gun to play Russian Roulette!
-// You can spin the chamber to randomize the position of the bullet.
-
-/obj/item/gun/projectile/revolver/russian
- name = "\improper Russian Revolver"
- desc = "A Russian-made revolver for drinking games. Uses .357 ammo, and has a mechanism that spins the chamber before each trigger pull."
- icon_state = "russian_revolver"
- origin_tech = "combat=2;materials=2"
- mag_type = /obj/item/ammo_box/magazine/internal/rus357
- var/spun = 0
-
-
-/obj/item/gun/projectile/revolver/russian/Initialize(mapload)
- . = ..()
- Spin()
- update_icon()
-
-/obj/item/gun/projectile/revolver/russian/proc/Spin()
- chambered = null
- var/random = rand(1, magazine.max_ammo)
- if(random <= get_ammo(0,0))
- chamber_round()
- spun = 1
-
-/obj/item/gun/projectile/revolver/russian/attackby__legacy__attackchain(obj/item/A, mob/user, params)
- var/num_loaded = ..()
- if(num_loaded)
- user.visible_message("[user] loads a single bullet into the revolver and spins the chamber.", "You load a single bullet into the chamber and spin it. ")
- else
- user.visible_message("[user] spins the chamber of the revolver.", "You spin the revolver's chamber. ")
- if(get_ammo() > 0)
- Spin()
- update_icon()
- A.update_icon()
- return
-
-/obj/item/gun/projectile/revolver/russian/attack_self__legacy__attackchain(mob/user)
- if(!spun && can_shoot())
- user.visible_message("[user] spins the chamber of the revolver.", "You spin the revolver's chamber. ")
- Spin()
- else
- var/num_unloaded = 0
- while(get_ammo() > 0)
- var/obj/item/ammo_casing/CB
- CB = magazine.get_round()
- chambered = null
- CB.loc = get_turf(loc)
- CB.update_icon()
- playsound(get_turf(CB), "casingdrop", 60, 1)
- num_unloaded++
- if(num_unloaded)
- to_chat(user, "You unload [num_unloaded] shell\s from [src]. ")
- else
- to_chat(user, "[src] is empty. ")
-
-/obj/item/gun/projectile/revolver/russian/afterattack__legacy__attackchain(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)
- if(flag)
- if(!(target in user.contents) && ismob(target))
- if(user.a_intent == INTENT_HARM) // Flogging action
- return
-
- if(isliving(user))
- if(!can_trigger_gun(user))
- return
- if(target != user)
- if(ismob(target))
- to_chat(user, "A mechanism prevents you from shooting anyone but yourself! ")
- return
-
- if(ishuman(user))
- if(!spun)
- to_chat(user, "You need to spin the revolver's chamber first! ")
- return
-
- spun = 0
-
- if(chambered)
- var/obj/item/ammo_casing/AC = chambered
- if(AC.fire(user, user, firer_source_atom = src))
- playsound(user, fire_sound, 50, 1)
- var/zone = check_zone(user.zone_selected)
- if(zone == "head" || zone == "eyes" || zone == "mouth")
- shoot_self(user, zone)
- else
- user.visible_message("[user.name] cowardly fires [src] at [user.p_their()] [zone]! ", "You cowardly fire [src] at your [zone]! ", "You hear a gunshot! ")
- return
-
- user.visible_message("*click* ")
- playsound(user, 'sound/weapons/empty.ogg', 100, 1)
-
-/obj/item/gun/projectile/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head")
- user.apply_damage(300, BRUTE, affecting)
- user.visible_message("[user.name] fires [src] at [user.p_their()] head! ", "You fire [src] at your head! ", "You hear a gunshot! ")
-
-/obj/item/gun/projectile/revolver/russian/soul
- name = "cursed Russian revolver"
- desc = "To play with this revolver requires wagering your very soul."
-
-/obj/item/gun/projectile/revolver/russian/soul/shoot_self(mob/living/user)
- ..()
- var/obj/item/soulstone/anybody/SS = new /obj/item/soulstone/anybody(get_turf(src))
- SS.transfer_soul("FORCE", user)
- user.death(FALSE)
- user.visible_message("[user.name]'s soul is captured by \the [src]! ", "You've lost the gamble! Your soul is forfeit! ")
-
/obj/item/gun/projectile/revolver/capgun
name = "cap gun"
desc = "Looks almost like the real thing! Ages 8 and up."
diff --git a/code/modules/projectiles/guns/projectile/saw.dm b/code/modules/projectiles/guns/projectile/saw.dm
index c8ddc466f2da..81c7305c2102 100644
--- a/code/modules/projectiles/guns/projectile/saw.dm
+++ b/code/modules/projectiles/guns/projectile/saw.dm
@@ -101,7 +101,7 @@
var/obj/effect/hotspot/hotspot = new /obj/effect/hotspot/fake(location)
hotspot.temperature = 1000
hotspot.recolor()
- location.hotspot_expose(700, 50, 1)
+ location.hotspot_expose(700, 50)
//magazines//
diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm
index c40cad88e0ef..8203b847882b 100644
--- a/code/modules/projectiles/projectile/bullets.dm
+++ b/code/modules/projectiles/projectile/bullets.dm
@@ -167,7 +167,7 @@
var/obj/effect/hotspot/hotspot = new /obj/effect/hotspot/fake(location)
hotspot.temperature = 1000
hotspot.recolor()
- location.hotspot_expose(700, 50, 1)
+ location.hotspot_expose(700, 50)
/obj/item/projectile/bullet/incendiary/shell/dragonsbreath
name = "dragonsbreath round"
diff --git a/code/modules/projectiles/projectile/magic_projectiles.dm b/code/modules/projectiles/projectile/magic_projectiles.dm
index 99c40d5929c3..7f06491c7e93 100644
--- a/code/modules/projectiles/projectile/magic_projectiles.dm
+++ b/code/modules/projectiles/projectile/magic_projectiles.dm
@@ -6,6 +6,28 @@
nodamage = 1
armour_penetration_percentage = 100
flag = MAGIC
+ /// determines what type of antimagic can block the spell projectile
+ var/antimagic_flags = MAGIC_RESISTANCE
+ /// determines the drain cost on the antimagic item
+ var/antimagic_charge_cost = 1
+
+/obj/item/projectile/magic/prehit(atom/target)
+ if(isliving(target))
+ var/mob/living/victim = target
+ if(victim.can_block_magic(antimagic_flags, antimagic_charge_cost))
+ visible_message("[src] fizzles on contact with [victim]! ")
+ damage = 0
+ nodamage = 1
+ return FALSE
+ return ..()
+
+/obj/item/projectile/magic/on_hit(atom/target, blocked, hit_zone)
+ if(isliving(target))
+ var/mob/living/victim = target
+ if(victim.can_block_magic(antimagic_flags, antimagic_charge_cost)) // Yes we have to check this twice welcome to bullet hell code
+ return FALSE
+ return ..()
+
/obj/item/projectile/magic/death
name = "bolt of death"
@@ -21,7 +43,7 @@
muzzle_flash_range = 2
muzzle_flash_color_override = LIGHT_COLOR_PURPLE
impact_light_intensity = 7
- impact_light_range = 2.5
+ impact_light_range = 2.5
impact_light_color_override = LIGHT_COLOR_PURPLE
/obj/item/projectile/magic/fireball
@@ -41,6 +63,8 @@
/obj/item/projectile/magic/death/on_hit(mob/living/carbon/target)
. = ..()
+ if(!.)
+ return .
if(isliving(target))
if(target.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead
if(target.revive())
@@ -75,6 +99,8 @@
/obj/item/projectile/magic/fireball/on_hit(target)
. = ..()
+ if(!.)
+ return .
var/turf/T = get_turf(target)
explosion(T, exp_devastate, exp_heavy, exp_light, exp_flash, 0, flame_range = exp_fire)
if(ismob(target)) //multiple flavors of pain
@@ -95,6 +121,8 @@
/obj/item/projectile/magic/resurrection/on_hit(mob/living/carbon/target)
. = ..()
+ if(!.)
+ return .
if(ismob(target))
if(target.mob_biotypes & MOB_UNDEAD) //positive energy harms the undead
target.death(FALSE)
@@ -121,6 +149,8 @@
/obj/item/projectile/magic/teleport/on_hit(mob/target)
. = ..()
+ if(!.)
+ return .
var/teleammount = 0
var/teleloc = target
if(!isturf(target))
@@ -142,6 +172,8 @@
/obj/item/projectile/magic/door/on_hit(atom/target)
. = ..()
+ if(!.)
+ return .
var/atom/T = target.loc
if(isturf(target) && target.density)
if(!(istype(target, /turf/simulated/wall/indestructible)))
@@ -179,6 +211,8 @@
/obj/item/projectile/magic/change/on_hit(atom/change)
. = ..()
+ if(!.)
+ return .
wabbajack(change)
GLOBAL_LIST_INIT(wabbajack_hostile_animals, list(
@@ -380,6 +414,9 @@ GLOBAL_LIST_INIT(wabbajack_docile_animals, list(
SpinAnimation()
/obj/item/projectile/magic/slipping/on_hit(atom/target, blocked = 0)
+ . = ..()
+ if(!.)
+ return .
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.slip(src, slip_weaken, 0, FALSE, TRUE) //Slips even with noslips/magboots on. NO ESCAPE!
@@ -394,7 +431,6 @@ GLOBAL_LIST_INIT(wabbajack_docile_animals, list(
to_chat(target, "You get splatted by [src]. ")
L.Weaken(slip_weaken)
L.Stun(slip_stun)
- . = ..()
/obj/item/projectile/magic/arcane_barrage
name = "arcane bolt"
diff --git a/code/modules/projectiles/projectile/special_projectiles.dm b/code/modules/projectiles/projectile/special_projectiles.dm
index ec72d05df0b1..4e2aa0d68876 100644
--- a/code/modules/projectiles/projectile/special_projectiles.dm
+++ b/code/modules/projectiles/projectile/special_projectiles.dm
@@ -111,9 +111,7 @@
nodamage = 1
flag = "bullet"
-/obj/item/projectile/meteor/Bump(atom/A, yes)
- if(yes)
- return
+/obj/item/projectile/meteor/Bump(atom/A)
if(A == firer)
loc = A.loc
return
diff --git a/code/modules/projectiles/projectile_base.dm b/code/modules/projectiles/projectile_base.dm
index 0130b85e8ab7..8d8603f0dccf 100644
--- a/code/modules/projectiles/projectile_base.dm
+++ b/code/modules/projectiles/projectile_base.dm
@@ -138,6 +138,13 @@
/obj/item/projectile/New()
return ..()
+/obj/item/projectile/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/item/projectile/proc/Range()
range--
if(damage && tile_dropoff)
@@ -262,10 +269,7 @@
beam_index = point_cache
beam_segments[beam_index] = null
-/obj/item/projectile/Bump(atom/A, yes)
- if(!yes) //prevents double bumps.
- return
-
+/obj/item/projectile/Bump(atom/A)
if(check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max && is_reflectable(REFLECTABILITY_PHYSICAL))
if(hitscan && ricochets_max > 10)
ricochets_max = 10 //I do not want a chucklefuck editing this higher, sorry.
@@ -432,10 +436,10 @@
xo = new_x - curloc.x
set_angle(get_angle(curloc, original))
-/obj/item/projectile/Crossed(atom/movable/AM, oldloc) //A mob moving on a tile with a projectile is hit by it.
- ..()
- if(isliving(AM) && AM.density && !checkpass(PASSMOB))
- Bump(AM, 1)
+/// A mob moving on a tile with a projectile is hit by it.
+/obj/item/projectile/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(isliving(entered) && entered.density && !checkpass(PASSMOB))
+ Bump(entered, 1)
/obj/item/projectile/Destroy()
if(hitscan)
diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm
index 272f363aef90..ace0353d07b4 100644
--- a/code/modules/reagents/chemistry/reagents/toxins.dm
+++ b/code/modules/reagents/chemistry/reagents/toxins.dm
@@ -1075,6 +1075,16 @@
else if(istype(O, /obj/structure/spacevine))
var/obj/structure/spacevine/SV = O
SV.on_chem_effect(src)
+ else if(istype(O, /obj/item/toy/plushie/dionaplushie))
+ var/turf/T = get_turf(O)
+ var/obj/item/toy/plushie/dionaplushie/DP = O
+ if(DP.grenade)
+ DP.explosive_betrayal(DP.grenade)
+ return
+ new /obj/item/toy/plushie/nymphplushie(T)
+ new /obj/item/toy/plushie/nymphplushie(T)
+ DP.visible_message("The diona plushie splits apart! ")
+ qdel(DP)
/datum/reagent/glyphosate/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(isliving(M))
@@ -1118,6 +1128,9 @@
if(istype(O, /obj/effect/decal/cleanable/ants))
O.visible_message("The ants die. ")
qdel(O)
+ if(istype(O, /obj/item/toy/plushie/kidanplushie))
+ var/obj/item/toy/plushie/kidanplushie/stupidbug = O
+ stupidbug.make_cry()
/datum/reagent/pestkiller/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume)
if(isliving(M))
diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm
index 496f385e4dbf..f80992e0347c 100644
--- a/code/modules/reagents/reagent_containers/glass_containers.dm
+++ b/code/modules/reagents/reagent_containers/glass_containers.dm
@@ -129,6 +129,13 @@
var/obj/item/assembly_holder/assembly = null
var/can_assembly = 1
+/obj/item/reagent_containers/glass/beaker/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/item/reagent_containers/glass/beaker/examine(mob/user)
. = ..()
if(assembly)
@@ -187,9 +194,9 @@
if(assembly)
assembly.HasProximity(AM)
-/obj/item/reagent_containers/glass/beaker/Crossed(atom/movable/AM, oldloc)
+/obj/item/reagent_containers/glass/beaker/proc/on_atom_entered(datum/source, atom/movable/entered)
if(assembly)
- assembly.Crossed(AM, oldloc)
+ assembly.on_atom_entered(source, entered)
/obj/item/reagent_containers/glass/beaker/on_found(mob/finder) //for mousetraps
if(assembly)
@@ -299,6 +306,7 @@
volume = 120
armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, RAD = 0, FIRE = 75, ACID = 50) //Weak melee protection, because you can wear it on your head
slot_flags = ITEM_SLOT_HEAD
+ prefered_slot_flags = ITEM_SLOT_IN_BACKPACK
resistance_flags = NONE
blocks_emissive = EMISSIVE_BLOCK_GENERIC
container_type = OPENCONTAINER
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index dc79be44db93..41e0f9979f77 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -22,6 +22,11 @@
mode = SYRINGE_INJECT
update_icon()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/item/reagent_containers/syringe/on_reagent_change()
update_icon()
@@ -181,7 +186,10 @@
M.update_inv_l_hand()
M.update_inv_r_hand()
-/obj/item/reagent_containers/syringe/Crossed(mob/living/carbon/human/H, oldloc)
+/obj/item/reagent_containers/syringe/proc/on_atom_entered(datum/source, atom/movable/entered)
+ SIGNAL_HANDLER // COMSIG_ATOM_ENTERED
+
+ var/mob/living/carbon/human/H = entered
if(!istype(H) || !H.reagents || HAS_TRAIT(H, TRAIT_PIERCEIMMUNE) || ismachineperson(H))
return
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index 67f4a1ae1beb..55dfca88312e 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -104,6 +104,13 @@
var/obj/item/assembly_holder/rig = null
var/accepts_rig = 1
+/obj/structure/reagent_dispensers/fueltank/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/structure/reagent_dispensers/fueltank/Destroy()
QDEL_NULL(rig)
return ..()
@@ -209,9 +216,9 @@
if(rig)
rig.HasProximity(AM)
-/obj/structure/reagent_dispensers/fueltank/Crossed(atom/movable/AM, oldloc)
+/obj/structure/reagent_dispensers/fueltank/proc/on_atom_entered(datum/source, atom/movable/entered)
if(rig)
- rig.Crossed(AM, oldloc)
+ rig.on_atom_entered(source, entered)
/obj/structure/reagent_dispensers/fueltank/hear_talk(mob/living/M, list/message_pieces)
if(rig)
diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm
index 61f1f912f080..03755059d7c7 100644
--- a/code/modules/recycling/conveyor2.dm
+++ b/code/modules/recycling/conveyor2.dm
@@ -43,6 +43,11 @@ GLOBAL_LIST_EMPTY(conveyor_switches)
var/obj/machinery/conveyor_switch/S = I
S.link_conveyers(src)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered)
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/machinery/conveyor/Destroy()
GLOB.conveyor_belts -= src
return ..()
@@ -199,10 +204,9 @@ GLOBAL_LIST_EMPTY(conveyor_switches)
else if(still_stuff_to_move && !speed_process)
makeSpeedProcess()
-/obj/machinery/conveyor/Crossed(atom/movable/AM, oldloc)
- if(!speed_process && !AM.anchored)
+/obj/machinery/conveyor/proc/on_atom_entered(datum/source, atom/movable/entered)
+ if(!speed_process && !entered.anchored)
makeSpeedProcess()
- ..()
/obj/machinery/conveyor/proc/move_thing(atom/movable/AM)
affecting.Remove(AM)
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index 6c478825d6bc..0ea0f0e2f01e 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -613,7 +613,7 @@
H.vent_gas(loc)
qdel(H)
-/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/disposal/CanPass(atom/movable/mover, border_dir)
if(isitem(mover) && mover.throwing)
var/obj/item/I = mover
if(isprojectile(I))
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index d1fa9d14eb55..2ac19610aabc 100644
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -294,7 +294,7 @@
/obj/machinery/disposal/delivery_chute/update()
return
-/obj/machinery/disposal/delivery_chute/CanPass(atom/movable/mover, turf/target)
+/obj/machinery/disposal/delivery_chute/CanPass(atom/movable/mover, border_dir)
// If the mover is a thrownthing passing through space, remove its thrown datum,
// ingest it like normal, and mark the chute as not passible.
// This prevents the mover from Entering the chute's turf
diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm
index f41f02f2ad57..f01a8d1c1a02 100644
--- a/code/modules/research/designs/autolathe_designs.dm
+++ b/code/modules/research/designs/autolathe_designs.dm
@@ -548,7 +548,7 @@
id = "stethoscope"
build_type = AUTOLATHE
materials = list(MAT_METAL = 500)
- build_path = /obj/item/clothing/accessory/stethoscope
+ build_path = /obj/item/clothing/neck/stethoscope
category = list("initial", "Medical")
/datum/design/timer
diff --git a/code/modules/research/designs/equipment_designs.dm b/code/modules/research/designs/equipment_designs.dm
index 443d9361bf62..995af56462d2 100644
--- a/code/modules/research/designs/equipment_designs.dm
+++ b/code/modules/research/designs/equipment_designs.dm
@@ -92,14 +92,14 @@
build_path = /obj/item/clothing/glasses/meson/engine
category = list("Equipment")
-/datum/design/tray_goggles
- name = "Optical T-Ray Scanners"
- desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
- id = "tray_goggles"
+/datum/design/atmos_goggles
+ name = "Atmospherics Scanner Goggles"
+ desc = "Used by atmospherics techs to see pressure and underfloor objects such as cables and pipes."
+ id = "atmos_goggles"
req_tech = list("materials" = 3, "magnets" = 2, "engineering" = 2)
build_type = PROTOLATHE
materials = list(MAT_METAL = 500, MAT_GLASS = 500)
- build_path = /obj/item/clothing/glasses/meson/engine/tray
+ build_path = /obj/item/clothing/glasses/meson/engine/atmos
category = list("Equipment")
/datum/design/nvgmesons
diff --git a/code/modules/ruins/lavalandruin_code/sin_ruins.dm b/code/modules/ruins/lavalandruin_code/sin_ruins.dm
index b6281e66fa3b..cfa4c18f3c8b 100644
--- a/code/modules/ruins/lavalandruin_code/sin_ruins.dm
+++ b/code/modules/ruins/lavalandruin_code/sin_ruins.dm
@@ -140,7 +140,7 @@
icon = 'icons/mob/blob.dmi'
color = rgb(145, 150, 0)
-/obj/effect/gluttony/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
+/obj/effect/gluttony/CanPass(atom/movable/mover, border_dir)//So bullets will fly over and stuff.
if(ishuman(mover))
var/mob/living/carbon/human/H = mover
if(H.nutrition >= NUTRITION_LEVEL_FAT || HAS_TRAIT(H, TRAIT_FAT))
diff --git a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
index c0058b3082e8..af173186dcc2 100644
--- a/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
+++ b/code/modules/ruins/objects_and_mobs/necropolis_gate.dm
@@ -48,6 +48,12 @@
dais_overlay.layer = CLOSED_TURF_LAYER
add_overlay(dais_overlay)
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_EXIT = PROC_REF(on_atom_exit),
+ )
+
+ AddElement(/datum/element/connect_loc, loc_connections)
+
/obj/structure/necropolis_gate/Destroy()
qdel(sight_blocker, TRUE)
return ..()
@@ -55,15 +61,16 @@
/obj/structure/necropolis_gate/singularity_pull()
return
-/obj/structure/necropolis_gate/CanPass(atom/movable/mover, turf/target)
- if(get_dir(loc, target) == dir)
+/obj/structure/necropolis_gate/CanPass(atom/movable/mover, border_dir)
+ if(border_dir == dir)
return !density
return TRUE
-/obj/structure/necropolis_gate/CheckExit(atom/movable/O, target)
- if(get_dir(O.loc, target) == dir)
- return !density
- return TRUE
+/obj/structure/necropolis_gate/proc/on_atom_exit(datum/source, atom/movable/leaving, direction)
+ SIGNAL_HANDLER // COMSIG_ATOM_EXIT
+
+ if(direction == dir && density)
+ return COMPONENT_ATOM_BLOCK_EXIT
/obj/structure/opacity_blocker
icon = 'icons/effects/96x96.dmi'
diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm
index e174827f4efe..9fea2a3a4a1d 100644
--- a/code/modules/shuttle/on_move.dm
+++ b/code/modules/shuttle/on_move.dm
@@ -2,7 +2,7 @@
/atom/movable/proc/onShuttleMove(turf/oldT, turf/T1, rotation, mob/caller)
var/turf/newT = get_turf(src)
if(newT.z != oldT.z)
- onTransitZ(oldT.z, newT.z)
+ on_changed_z_level(oldT, newT)
if(light)
update_light()
if(rotation)
diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm
index bc32bedbe9fe..c77d8b9a11df 100644
--- a/code/modules/shuttle/supply.dm
+++ b/code/modules/shuttle/supply.dm
@@ -219,6 +219,10 @@
var/obj/effect/E = AM
if(E.is_cleanable())
return CARGO_OK
+ return CARGO_SKIP_ATOM
+
+ if(istype(AM, /mob/dead))
+ return CARGO_SKIP_ATOM
return CARGO_OK
diff --git a/code/modules/supply/supply_packs/pack_miscellaneous.dm b/code/modules/supply/supply_packs/pack_miscellaneous.dm
index 1908e9aa0467..73326fdf98bd 100644
--- a/code/modules/supply/supply_packs/pack_miscellaneous.dm
+++ b/code/modules/supply/supply_packs/pack_miscellaneous.dm
@@ -351,7 +351,11 @@
name = "Collectable Plushies Crate"
cost = 1000
containername = "collectable plushies crate! Brought to you by Bass.inc!"
- contains = list(/obj/random/plushie, /obj/random/plushie, /obj/random/plushie/explosive)
+ contains = list(
+ /obj/effect/spawner/random/plushies,
+ /obj/effect/spawner/random/plushies,
+ /obj/effect/spawner/random/plushies/explosive,
+ )
/datum/supply_packs/misc/foamforce
name = "Foam Force Crate"
@@ -430,9 +434,9 @@
/obj/item/clothing/under/rank/procedure/iaa,
/obj/item/clothing/suit/storage/iaa/blackjacket,
/obj/item/clothing/accessory/waistcoat,
- /obj/item/clothing/accessory/blue,
- /obj/item/clothing/accessory/red,
- /obj/item/clothing/accessory/black,
+ /obj/item/clothing/neck/tie/blue,
+ /obj/item/clothing/neck/tie/red,
+ /obj/item/clothing/neck/tie/black,
/obj/item/clothing/head/bowlerhat,
/obj/item/clothing/head/fedora,
/obj/item/clothing/head/flatcap,
diff --git a/code/modules/supply/supply_packs/pack_vendor.dm b/code/modules/supply/supply_packs/pack_vendor.dm
index ae1054479b83..969378756839 100644
--- a/code/modules/supply/supply_packs/pack_vendor.dm
+++ b/code/modules/supply/supply_packs/pack_vendor.dm
@@ -84,3 +84,8 @@
name = "Chinese Supply Crate"
contains = list(/obj/item/vending_refill/chinese)
containername = "chinese supply crate"
+
+/datum/supply_packs/vending/trainer
+ name = "TrainDrobe Supply Crate"
+ contains = list(/obj/item/vending_refill/traindrobe)
+ containername = "traindrobe supply crate"
diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm
index 90698ed3b918..a96307d18a71 100644
--- a/code/modules/surgery/organs/augments_internal.dm
+++ b/code/modules/surgery/organs/augments_internal.dm
@@ -506,6 +506,7 @@
clothes_req = FALSE
invocation = "none"
invocation_type = "none"
+ antimagic_flags = NONE
selection_activated_message = "You warm up your Binyat deck, there's an idle buzzing at the back of your mind as it awaits a target."
selection_deactivated_message = "Your hacking deck makes an almost disappointed sounding buzz at the back of your mind as it powers down."
action_icon_state = "hackerman"
@@ -678,6 +679,10 @@
COOLDOWN_DECLARE(reviver_cooldown)
/// How long till we can try to defib again
COOLDOWN_DECLARE(defib_cooldown)
+ /// This check is an aditional minute delay applied to nuggeted IPCS, so they are not endlessly instantly reviving.
+ COOLDOWN_DECLARE(nugget_contingency)
+ /// The trigger when nuggeted is detected. Resets when revived. Prevents the cooldown from being applied again.
+ var/applied_nugget_cooldown = FALSE
/obj/item/organ/internal/cyberimp/chest/reviver/hardened
name = "Hardened reviver implant"
@@ -699,12 +704,18 @@
COOLDOWN_START(src, reviver_cooldown, revive_cost)
reviving = FALSE
to_chat(owner, "Your reviver implant shuts down and starts recharging. It will be ready again in [DisplayTimeText(revive_cost)]. ")
+ applied_nugget_cooldown = FALSE
else
addtimer(CALLBACK(src, PROC_REF(heal)), 3 SECONDS)
return
- if(!COOLDOWN_FINISHED(src, reviver_cooldown) || owner.suiciding) // don't heal while you're in cooldown!
+ if(!COOLDOWN_FINISHED(src, reviver_cooldown) || owner.suiciding || !COOLDOWN_FINISHED(src, nugget_contingency)) // don't heal while you're in cooldown!
return
if(owner.health <= 0 || owner.stat == DEAD)
+ if(ismachineperson(owner))
+ if(!applied_nugget_cooldown && length(owner.bodyparts) <= 2)
+ COOLDOWN_START(src, nugget_contingency, 1 MINUTES)
+ applied_nugget_cooldown = TRUE
+ return
revive_cost = 0
reviving = TRUE
has_defibed = FALSE
diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm
index 3cbb358b23a1..4d2b13883ba6 100644
--- a/code/modules/surgery/organs/organ.dm
+++ b/code/modules/surgery/organs/organ.dm
@@ -262,7 +262,14 @@
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
if(affected) affected.internal_organs -= src
- forceMove(get_turf(owner))
+ // In-game, organs will be moved to their parent turf.
+ // During ghost-mob creation, we toss the organs
+ // after we're done generating the sprite with them,
+ // so to nullspace they go.
+ if(get_turf(owner))
+ forceMove(get_turf(owner))
+ else
+ moveToNullspace()
START_PROCESSING(SSobj, src)
if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead
diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm
index 65782477e2ea..e83adeb5efaf 100644
--- a/code/modules/telesci/bscrystal.dm
+++ b/code/modules/telesci/bscrystal.dm
@@ -29,8 +29,8 @@
. += ""
. += "Nanotrasen and many of its rivals are scrambling to be the first to develop practical mass-producible bluespace technologies so they they can become the hegemon of a new market monopoly."
-/obj/item/stack/ore/bluespace_crystal/New(loc, new_amount, merge = TRUE)
- ..()
+/obj/item/stack/ore/bluespace_crystal/Initialize(mapload, new_amount, merge)
+ . = ..()
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
diff --git a/code/modules/telesci/rcs.dm b/code/modules/telesci/rcs.dm
index 92f7a1109fef..67b938b11fb7 100644
--- a/code/modules/telesci/rcs.dm
+++ b/code/modules/telesci/rcs.dm
@@ -10,14 +10,14 @@
desc = "A device used to teleport crates and closets to cargo telepads."
icon = 'icons/obj/telescience.dmi'
icon_state = "rcs"
- item_state = "rcd"
+ item_state = "rcs"
flags = CONDUCT
force = 10.0
throwforce = 10.0
throw_speed = 2
throw_range = 5
toolspeed = 1
- usesound = 'sound/machines/click.ogg'
+ usesound = 'sound/weapons/flash.ogg'
/// Power cell (10000W)
var/obj/item/stock_parts/cell/high/rcell = null
/// Selected telepad
@@ -124,7 +124,7 @@
/obj/item/rcs/proc/teleport(mob/user, obj/structure/closet/C, target)
to_chat(user, "Teleporting [C]... ")
- playsound(src, usesound, 50, TRUE)
+ playsound(get_turf(src), usesound, 25, TRUE)
teleporting = TRUE
if(!do_after(user, 50 * toolspeed, target = C))
teleporting = FALSE
@@ -132,6 +132,6 @@
teleporting = FALSE
rcell.use(chargecost)
- do_sparks(5, TRUE, C)
+ playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, TRUE)
do_teleport(C, target)
to_chat(user, "Teleport successful. [round(rcell.charge/chargecost)] charge\s left. ")
diff --git a/code/modules/tgui/modules/ghost_hud_panel.dm b/code/modules/tgui/modules/ghost_hud_panel.dm
index 2e6a6b8d58d9..307bed5119c9 100644
--- a/code/modules/tgui/modules/ghost_hud_panel.dm
+++ b/code/modules/tgui/modules/ghost_hud_panel.dm
@@ -13,7 +13,8 @@ GLOBAL_DATUM_INIT(ghost_hud_panel, /datum/ui_module/ghost_hud_panel, new)
var/list/hud_type_lookup = list(
"medical" = DATA_HUD_MEDICAL_ADVANCED,
"security" = DATA_HUD_SECURITY_ADVANCED,
- "diagnostic" = DATA_HUD_DIAGNOSTIC_ADVANCED
+ "diagnostic" = DATA_HUD_DIAGNOSTIC_ADVANCED,
+ "pressure" = DATA_HUD_PRESSURE
)
/datum/ui_module/ghost_hud_panel/ui_state(mob/user)
diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm
deleted file mode 100644
index eea46b9e67f5..000000000000
--- a/code/modules/unit_tests/_unit_tests.dm
+++ /dev/null
@@ -1,34 +0,0 @@
-//include unit test files in this module in this ifdef
-//Keep this sorted alphabetically
-
-#ifdef UNIT_TESTS
-#include "atmos\test_ventcrawl.dm"
-#include "games\test_cards.dm"
-#include "jobs\test_job_globals.dm"
-#include "aicard_icons.dm"
-#include "announcements.dm"
-#include "areas_apcs.dm"
-#include "component_tests.dm"
-#include "config_sanity.dm"
-#include "crafting_lists.dm"
-#include "element_tests.dm"
-#include "emotes.dm"
-#include "init_sanity.dm"
-#include "log_format.dm"
-#include "map_templates.dm"
-#include "map_tests.dm"
-#include "missing_icons.dm"
-#include "origin_tech.dm"
-#include "purchase_reference_test.dm"
-#include "reagent_id_typos.dm"
-#include "rustg_version.dm"
-#include "spawn_humans.dm"
-#include "spell_targeting_test.dm"
-#include "sql.dm"
-#include "status_effect_ids.dm"
-#include "subsystem_init.dm"
-#include "subsystem_metric_sanity.dm"
-#include "test_runner.dm"
-#include "timer_sanity.dm"
-#include "unit_test.dm"
-#endif
diff --git a/code/modules/unit_tests/atmos/test_ventcrawl.dmm b/code/modules/unit_tests/atmos/test_ventcrawl.dmm
deleted file mode 100644
index 9b9a7be6af91..000000000000
--- a/code/modules/unit_tests/atmos/test_ventcrawl.dmm
+++ /dev/null
@@ -1,7 +0,0 @@
-"a" = (/obj/machinery/atmospherics/unary/vent_pump/on{dir = 4},/turf/simulated/floor,/area/space)
-"d" = (/obj/machinery/atmospherics/unary/vent_pump/on{dir = 8},/turf/simulated/floor,/area/space)
-"X" = (/obj/machinery/atmospherics/pipe/simple/visible{dir = 4},/obj/structure/table,/turf/simulated/floor,/area/space)
-
-(1,1,1) = {"
-aXd
-"}
diff --git a/code/modules/unit_tests/crafting_lists.dm b/code/modules/unit_tests/crafting_lists.dm
deleted file mode 100644
index 43ec7bc1036c..000000000000
--- a/code/modules/unit_tests/crafting_lists.dm
+++ /dev/null
@@ -1,5 +0,0 @@
-/datum/unit_test/crafting_lists/Run()
- for(var/I in subtypesof(/datum/crafting_recipe))
- var/datum/crafting_recipe/C = new I()
- if(!islist(C.result))
- Fail("Expected a list for the 'result' of [C.type].")
diff --git a/code/modules/unit_tests/rustg_version.dm b/code/modules/unit_tests/rustg_version.dm
deleted file mode 100644
index 0a259990b977..000000000000
--- a/code/modules/unit_tests/rustg_version.dm
+++ /dev/null
@@ -1,4 +0,0 @@
-/datum/unit_test/rustg_version/Run()
- var/library_version = rustg_get_version()
- if(library_version != RUST_G_VERSION)
- Fail("Invalid RUSTG Version. Library is [library_version], but in-code API is [RUST_G_VERSION]")
diff --git a/code/modules/unit_tests/sql.dm b/code/modules/unit_tests/sql.dm
deleted file mode 100644
index e9bbf7d1ebe0..000000000000
--- a/code/modules/unit_tests/sql.dm
+++ /dev/null
@@ -1,10 +0,0 @@
-// Unit test to check SQL version has been updated properly.,
-/datum/unit_test/sql_version/Run()
- // Check if the SQL version set in the code is equal to the CI DB config
- if(GLOB.configuration.database.version != SQL_VERSION)
- Fail("SQL version error: Game is running V[SQL_VERSION] but config is V[GLOB.configuration.database.version]. You may need to update the example config.")
-
- if(SSdbcore.total_errors > 0)
- Fail("SQL errors occurred on startup. Please fix them.")
-
-
diff --git a/code/modules/unit_tests/subsystem_metric_sanity.dm b/code/modules/unit_tests/subsystem_metric_sanity.dm
deleted file mode 100644
index 250e6b4cc394..000000000000
--- a/code/modules/unit_tests/subsystem_metric_sanity.dm
+++ /dev/null
@@ -1,22 +0,0 @@
-// Unit test to ensure SS metrics are valid
-/datum/unit_test/subsystem_metric_sanity/Run()
- for(var/datum/controller/subsystem/SS in Master.subsystems)
- var/list/data = SS.get_metrics()
- if(length(data) != 4)
- Fail("SS[SS.ss_id] has invalid metrics data!")
- continue
- if(isnull(data["cost"]))
- Fail("SS[SS.ss_id] has invalid metrics data! No 'cost' found in [json_encode(data)]")
- continue
- if(isnull(data["tick_usage"]))
- Fail("SS[SS.ss_id] has invalid metrics data! No 'tick_usage' found in [json_encode(data)]")
- continue
- if(isnull(data["custom"]))
- Fail("SS[SS.ss_id] has invalid metrics data! No 'custom' found in [json_encode(data)]")
- continue
- if(!islist(data["custom"]))
- Fail("SS[SS.ss_id] has invalid metrics data! 'custom' is not a list in [json_encode(data)]")
- continue
- if(isnull(data["sleep_count"]))
- Fail("SS[SS.ss_id] has invalid metrics data! No 'sleep_count' found in [json_encode(data)]")
- continue
diff --git a/code/modules/unit_tests/timer_sanity.dm b/code/modules/unit_tests/timer_sanity.dm
deleted file mode 100644
index d92323a5253f..000000000000
--- a/code/modules/unit_tests/timer_sanity.dm
+++ /dev/null
@@ -1,3 +0,0 @@
-/datum/unit_test/timer_sanity/Run()
- if(SStimer.bucket_count < 0)
- Fail("SStimer is going into negative bucket count from something")
diff --git a/code/modules/unit_tests/unit_test.dm b/code/modules/unit_tests/unit_test.dm
deleted file mode 100644
index 6ef3c82d85ca..000000000000
--- a/code/modules/unit_tests/unit_test.dm
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Usage:
-Override /Run() to run your test code
-Call Fail() to fail the test (You should specify a reason)
-You may use /New() and /Destroy() for setup/teardown respectively
-You can use the run_loc_bottom_left and run_loc_top_right to get turfs for testing
-*/
-
-/datum/unit_test
- //Bit of metadata for the future maybe
- var/list/procs_tested
-
- //usable vars
- var/turf/run_loc_bottom_left
- var/turf/run_loc_top_right
-
- //internal shit
- var/succeeded = TRUE
- var/list/fail_reasons
-
-/datum/unit_test/New()
- run_loc_bottom_left = locate(1, 1, 1)
- run_loc_top_right = locate(5, 5, 1)
-
-/datum/unit_test/Destroy()
- //clear the test area
- for(var/atom/movable/AM in block(run_loc_bottom_left, run_loc_top_right))
- qdel(AM)
- return ..()
-
-/datum/unit_test/proc/Run()
- Fail("Run() called parent or not implemented")
-
-/datum/unit_test/proc/Fail(reason = "No reason")
- succeeded = FALSE
-
- if(!istext(reason))
- reason = "FORMATTED: [reason != null ? reason : "NULL"]"
-
- LAZYADD(fail_reasons, reason)
diff --git a/code/modules/vehicle/tg_vehicles/scooter.dm b/code/modules/vehicle/tg_vehicles/scooter.dm
index 6ff3e1b4a168..b42b7044935a 100644
--- a/code/modules/vehicle/tg_vehicles/scooter.dm
+++ b/code/modules/vehicle/tg_vehicles/scooter.dm
@@ -176,7 +176,7 @@
if(location)
if(prob(33))
- location.hotspot_expose(1000, 1000)
+ location.hotspot_expose(1000, 1)
sparks.start() //the most radical way to start plasma fires
for(var/mob/living/carbon/victim in location)
if(victim.body_position == LYING_DOWN)
diff --git a/code/modules/vehicle/vehicle.dm b/code/modules/vehicle/vehicle.dm
index c1484bdaa251..4f11e43c4ffc 100644
--- a/code/modules/vehicle/vehicle.dm
+++ b/code/modules/vehicle/vehicle.dm
@@ -36,7 +36,7 @@
return ..()
// So that beepsky can't push the janicart
-/obj/vehicle/CanPass(atom/movable/mover, turf/target)
+/obj/vehicle/CanPass(atom/movable/mover, border_dir)
if(istype(mover) && mover.checkpass(PASSMOB))
return TRUE
else
diff --git a/code/tests/_game_test.dm b/code/tests/_game_test.dm
new file mode 100644
index 000000000000..3781987af15c
--- /dev/null
+++ b/code/tests/_game_test.dm
@@ -0,0 +1,127 @@
+/// For advanced cases, fail unconditionally but don't return (so a test can return multiple results)
+#define TEST_FAIL(reason) (Fail(reason || "No reason", __FILE__, __LINE__))
+
+/// Asserts that a condition is true
+/// If the condition is not true, fails the test
+#define TEST_ASSERT(assertion, reason) if(!(assertion)) { return Fail("Assertion failed: [reason || "No reason"]", __FILE__, __LINE__) }
+
+#define TEST_ASSERT_NOT(assertion, reason) if(assertion) { return Fail("Assertion failed: [reason || "No reason"]", __FILE__, __LINE__) }
+
+/// Asserts that a parameter is not null
+#define TEST_ASSERT_NOTNULL(a, reason) if(isnull(a)) { return Fail("Expected non-null value: [reason || "No reason"]", __FILE__, __LINE__) }
+
+/// Asserts that a parameter is null
+#define TEST_ASSERT_NULL(a, reason) if(!isnull(a)) { return Fail("Expected null value but received [a]: [reason || "No reason"]", __FILE__, __LINE__) }
+
+/// Asserts that the two parameters passed are equal, fails otherwise
+/// Optionally allows an additional message in the case of a failure
+#define TEST_ASSERT_EQUAL(a, b, message) do { \
+ var/lhs = ##a; \
+ var/rhs = ##b; \
+ if(lhs != rhs) { \
+ return Fail("Expected [isnull(lhs) ? "null" : lhs] to be equal to [isnull(rhs) ? "null" : rhs].[message ? " [message]" : ""]", __FILE__, __LINE__); \
+ } \
+} while(FALSE)
+
+/// Asserts that the two parameters passed are not equal, fails otherwise
+/// Optionally allows an additional message in the case of a failure
+#define TEST_ASSERT_NOTEQUAL(a, b, message) do { \
+ var/lhs = ##a; \
+ var/rhs = ##b; \
+ if(lhs == rhs) { \
+ return Fail("Expected [isnull(lhs) ? "null" : lhs] to not be equal to [isnull(rhs) ? "null" : rhs].[message ? " [message]" : ""]", __FILE__, __LINE__); \
+ } \
+} while(FALSE)
+
+/**
+ * Usage:
+ *
+ * - Override /Run() to run your test code
+ * - Call Fail() to fail the test (You should specify a reason)
+ * - You may use /New() and /Destroy() for setup/teardown respectively
+ * - You can use the run_loc_bottom_left and run_loc_top_right to get turfs for testing
+ *
+**/
+/datum/game_test
+ //Bit of metadata for the future maybe
+ var/list/procs_tested
+
+ //usable vars
+ var/static/list/available_turfs
+
+ //internal shit
+ var/succeeded = TRUE
+ var/list/allocated
+ var/list/fail_reasons
+
+/datum/game_test/New()
+ if(!length(available_turfs))
+ load_testing_area()
+ available_turfs = get_test_turfs()
+
+/datum/game_test/proc/load_testing_area()
+ var/list/testing_levels = levels_by_trait(GAME_TEST_LEVEL)
+ if(!length(testing_levels))
+ Fail("Could not find appropriate z-level for spawning test areas")
+ var/testing_z_level = pick(testing_levels)
+ var/datum/map_template/generic_test_area = GLOB.map_templates["test_generic.dmm"]
+ if(!generic_test_area.load(locate(TRANSITIONEDGE + 1, TRANSITIONEDGE + 1, testing_z_level)))
+ Fail("Could not place generic testing area on z-level [testing_z_level]")
+
+/datum/game_test/Destroy()
+ QDEL_LIST_CONTENTS(allocated)
+ // clear the whole test area, not just the bounds of the landmarks
+ for(var/turf/T in get_area_turfs(/area/game_test))
+ for(var/atom/movable/AM in T)
+ qdel(AM)
+ return ..()
+
+/datum/game_test/proc/Run()
+ Fail("Run() called parent or not implemented")
+
+/datum/game_test/proc/Fail(reason = "No reason", file = "OUTDATED_TEST", line = 1)
+ succeeded = FALSE
+
+ if(!istext(reason))
+ reason = "FORMATTED: [reason != null ? reason : "NULL"]"
+
+ LAZYADD(fail_reasons, list(list(reason, file, line)))
+
+/datum/game_test/proc/get_test_turfs()
+ var/list/result = list()
+ var/obj/effect/landmark/bottom_left
+ var/obj/effect/landmark/top_right
+ for(var/obj/effect/landmark in GLOB.landmarks_list)
+ if(istype(landmark, /obj/effect/landmark/game_test/bottom_left_corner))
+ bottom_left = landmark
+ else if(istype(landmark, /obj/effect/landmark/game_test/top_right_corner))
+ top_right = landmark
+
+ if(!(bottom_left && top_right))
+ Fail("could not find test area landmarks")
+
+ for(var/turf/T in block(bottom_left.loc, top_right.loc))
+ result |= T
+
+ if(!length(result))
+ Fail("could not find any test turfs")
+
+ return result
+
+/// Allocates an instance of the provided type, and places it somewhere in an available loc
+/// Instances allocated through this proc will be destroyed when the test is over
+/datum/game_test/proc/allocate(type, ...)
+ var/list/arguments = args.Copy(2)
+ if(ispath(type, /atom))
+ if(!arguments.len)
+ arguments = list(pick(available_turfs))
+ else if(arguments[1] == null)
+ arguments[1] = pick(available_turfs)
+ var/instance
+ // Byond will throw an index out of bounds if arguments is empty in that arglist call. Sigh
+ if(length(arguments))
+ instance = new type(arglist(arguments))
+ else
+ instance = new type()
+ LAZYADD(allocated, instance)
+ return instance
diff --git a/code/tests/_game_test_puppeteer.dm b/code/tests/_game_test_puppeteer.dm
new file mode 100644
index 000000000000..e9f560fe86aa
--- /dev/null
+++ b/code/tests/_game_test_puppeteer.dm
@@ -0,0 +1,68 @@
+/**
+ * A testing object used to control mobs in game tests.
+ *
+ * Puppeteers provide an easy way to create mobs and objects,
+ * perform interactions in the same way that a player would,
+ * and check the state of the mob during tests.
+ */
+/datum/test_puppeteer
+ var/mob/living/carbon/puppet
+ var/datum/game_test/origin_test
+
+/datum/test_puppeteer/New(datum/game_test/origin_test_, carbon_type = /mob/living/carbon/human, turf/initial_location)
+ if(!ispath(carbon_type, /mob/living/carbon/human))
+ origin_test.Fail("unexpected puppeteer carbon type [carbon_type]", __FILE__, __LINE__)
+
+ if(!initial_location)
+ initial_location = locate(179, 136, 1) // Center of admin testing area
+ origin_test = origin_test_
+ puppet = origin_test.allocate(carbon_type, initial_location)
+ var/datum/mind/new_mind = new("interaction_test_[puppet.UID()]")
+ new_mind.transfer_to(puppet)
+
+/datum/test_puppeteer/proc/spawn_puppet_nearby(carbon_type = /mob/living/carbon/human)
+ for(var/turf/T in RANGE_TURFS(1, puppet.loc))
+ if(!is_blocked_turf(T, exclude_mobs = FALSE))
+ return new/datum/test_puppeteer(origin_test, carbon_type, T)
+
+ origin_test.Fail("could not spawn puppeteer near [src]")
+
+/datum/test_puppeteer/proc/spawn_obj_in_hand(obj_type)
+ var/obj/new_obj = origin_test.allocate(obj_type, null)
+ if(puppet.put_in_hands(new_obj))
+ return new_obj
+
+ origin_test.Fail("could not spawn obj [obj_type] in hand of [puppet]")
+
+/datum/test_puppeteer/proc/spawn_obj_nearby(obj_type)
+ for(var/turf/T in RANGE_TURFS(1, puppet.loc))
+ if(!is_blocked_turf(T, exclude_mobs = FALSE))
+ return origin_test.allocate(obj_type, T)
+
+ origin_test.Fail("could not spawn obj [obj_type] near [src]")
+
+/datum/test_puppeteer/proc/click_on(target, params)
+ var/datum/test_puppeteer/puppet_target = target
+ sleep(max(puppet.next_click, puppet.next_move) - world.time + 1)
+ if(istype(puppet_target))
+ puppet.ClickOn(puppet_target.puppet, params)
+ return
+
+ puppet.ClickOn(target, params)
+
+/datum/test_puppeteer/proc/spawn_mob_nearby(mob_type)
+ for(var/turf/T in RANGE_TURFS(1, puppet))
+ if(!is_blocked_turf(T, exclude_mobs = FALSE))
+ var/mob/new_mob = origin_test.allocate(mob_type, T)
+ return new_mob
+
+/datum/test_puppeteer/proc/check_attack_log(snippet)
+ for(var/log_text in puppet.attack_log_old)
+ if(findtextEx(log_text, snippet))
+ return TRUE
+
+/datum/test_puppeteer/proc/set_intent(new_intent)
+ puppet.a_intent_change(new_intent)
+
+/datum/test_puppeteer/proc/rejuvenate()
+ puppet.rejuvenate()
diff --git a/code/modules/unit_tests/atmos/test_ventcrawl.dm b/code/tests/atmos/test_ventcrawl.dm
similarity index 50%
rename from code/modules/unit_tests/atmos/test_ventcrawl.dm
rename to code/tests/atmos/test_ventcrawl.dm
index b4b153d19535..c757bc9e11e7 100644
--- a/code/modules/unit_tests/atmos/test_ventcrawl.dm
+++ b/code/tests/atmos/test_ventcrawl.dm
@@ -1,4 +1,4 @@
-/datum/unit_test/ventcrawl
+/datum/game_test/ventcrawl
var/mob/living/simple_animal/slime = null
var/obj/machinery/vent = null
var/obj/structure/table/table = null
@@ -6,24 +6,26 @@
/datum/milla_safe/ventcrawl_test_setup
-/datum/milla_safe/ventcrawl_test_setup/on_run(datum/unit_test/ventcrawl/test)
+/datum/milla_safe/ventcrawl_test_setup/on_run(datum/game_test/ventcrawl/test)
+ // I'm sure get_area_turfs is totally deterministic and this will never go wrong
+ var/turf/run_loc_bottom_left = test.available_turfs[1]
// This setup creates turfs that initialize themselves in MILLA on creation, which is why we need to be MILLA-safe.
var/datum/map_template/template = GLOB.map_templates["test_ventcrawl.dmm"]
- if(!template.load(test.run_loc_bottom_left))
+ if(!template.load(run_loc_bottom_left))
test.Fail("Failed to load 'test_ventcrawl.dmm'")
- test.slime = new /mob/living/simple_animal/slime/unit_test_dummy(test.run_loc_bottom_left)
- test.vent = test.find_spawned_test_object(test.run_loc_bottom_left, /obj/machinery/atmospherics/unary/vent_pump)
- test.table = test.find_spawned_test_object(get_step(test.run_loc_bottom_left, EAST), /obj/structure/table)
+ test.slime = new /mob/living/simple_animal/slime/unit_test_dummy(run_loc_bottom_left)
+ test.vent = test.find_spawned_test_object(run_loc_bottom_left, /obj/machinery/atmospherics/unary/vent_pump)
+ test.table = test.find_spawned_test_object(get_step(run_loc_bottom_left, EAST), /obj/structure/table)
test.setup_complete = TRUE
-/datum/unit_test/ventcrawl/proc/find_spawned_test_object(turf/location as turf, test_object_type)
+/datum/game_test/ventcrawl/proc/find_spawned_test_object(turf/location as turf, test_object_type)
for(var/content in location.contents)
if(istype(content, test_object_type))
return content
- Fail("Couldn't find spawned test object of type: [test_object_type].")
+ TEST_FAIL("Couldn't find spawned test object of type: [test_object_type].")
-/datum/unit_test/ventcrawl/Run()
+/datum/game_test/ventcrawl/Run()
var/datum/milla_safe/ventcrawl_test_setup/milla = new()
milla.invoke_async(src)
while(!setup_complete)
@@ -31,20 +33,16 @@
// Enter vent
vent.AltClick(slime)
- if(slime.loc != vent)
- Fail("Failed to crawl into vent.")
+ TEST_ASSERT_EQUAL(slime.loc, vent, "failed to crawl into vent.")
// Movement
slime.loc.relaymove(slime, EAST)
- if(slime.loc == vent)
- Fail("Failed to step EAST while wentcrawling.")
+ TEST_ASSERT_NOTEQUAL(slime.loc, vent, "failed to step EAST while ventcrawling.")
// Try to flip table on top of pipe, while inside pipe (shouldn't work)
table.AltShiftClick(slime)
- if(table.flipped)
- Fail("Shouldn't be possible to flip structures while inside vent.")
+ TEST_ASSERT_NOT(table.flipped, "Shouldn't be possible to flip structures while inside vent.")
// Exit vent
slime.loc.relaymove(slime, EAST)
- if(!isturf(slime.loc))
- Fail("Wasn't able to ventcrawl out of vent.")
+ TEST_ASSERT(isturf(slime.loc), "wasn't able to ventcrawl out of vent.")
diff --git a/code/tests/attack_chain/test_attack_chain_cult_dagger.dm b/code/tests/attack_chain/test_attack_chain_cult_dagger.dm
new file mode 100644
index 000000000000..b150d67cb60f
--- /dev/null
+++ b/code/tests/attack_chain/test_attack_chain_cult_dagger.dm
@@ -0,0 +1,17 @@
+/datum/game_test/attack_chain_cult_dagger/Run()
+ var/datum/test_puppeteer/cultist = new(src)
+ var/datum/test_puppeteer/target = cultist.spawn_puppet_nearby()
+
+ cultist.puppet.mind.add_antag_datum(/datum/antagonist/cultist)
+ cultist.spawn_obj_in_hand(/obj/item/melee/cultblade/dagger)
+ cultist.set_intent("harm")
+ cultist.click_on(target)
+
+ TEST_ASSERT(target.check_attack_log("Attacked with ritual dagger"), "non-cultist missing dagger attack log")
+ TEST_ASSERT_NOTEQUAL(target.puppet.health, target.puppet.getMaxHealth(), "cultist attacking non-cultist with dagger caused no damage")
+
+ target.rejuvenate()
+ target.puppet.mind.add_antag_datum(/datum/antagonist/cultist)
+
+ cultist.click_on(target)
+ TEST_ASSERT_EQUAL(target.puppet.health, target.puppet.getMaxHealth(), "cultist attacking cultist with dagger caused damage")
diff --git a/code/tests/attack_chain/test_attack_chain_vehicles.dm b/code/tests/attack_chain/test_attack_chain_vehicles.dm
new file mode 100644
index 000000000000..791b45497ba7
--- /dev/null
+++ b/code/tests/attack_chain/test_attack_chain_vehicles.dm
@@ -0,0 +1,26 @@
+/datum/game_test/attack_chain_vehicles/Run()
+ var/datum/test_puppeteer/player = new(src)
+ var/obj/item/key/janitor/janicart_key = player.spawn_obj_in_hand(/obj/item/key/janitor)
+ var/obj/vehicle/janicart/janicart = player.spawn_obj_nearby(/obj/vehicle/janicart)
+
+ player.click_on(janicart)
+ TEST_ASSERT_EQUAL(janicart.inserted_key, janicart_key, "did not find janicart key in vehicle")
+
+ var/move_delay = janicart.vehicle_move_delay
+ player.spawn_obj_in_hand(/obj/item/borg/upgrade/vtec)
+ player.click_on(janicart)
+ TEST_ASSERT(janicart.vehicle_move_delay < move_delay, "VTEC upgrade not applied properly")
+
+ TEST_ASSERT_NULL(janicart.mybag, "unexpected trash bag on janicart")
+ var/obj/item/storage/bag/trash/bag = player.spawn_obj_in_hand(/obj/item/storage/bag/trash)
+ player.click_on(janicart)
+ TEST_ASSERT_EQUAL(janicart.mybag, bag, "trash bag not attached to janicart")
+
+ var/obj/item/kitchen/knife/knife = player.spawn_obj_in_hand(/obj/item/kitchen/knife)
+ player.set_intent("harm")
+ player.click_on(janicart)
+ TEST_ASSERT(janicart.obj_integrity < janicart.max_integrity, "knife attack not performed")
+
+ player.set_intent("help")
+ player.click_on(janicart)
+ TEST_ASSERT(knife in bag, "knife not placed in trash bag")
diff --git a/code/tests/game_tests.dm b/code/tests/game_tests.dm
new file mode 100644
index 000000000000..254673e8b34a
--- /dev/null
+++ b/code/tests/game_tests.dm
@@ -0,0 +1,37 @@
+//include game test files in this module in this ifdef
+//Keep this sorted alphabetically
+
+#ifdef GAME_TESTS
+#include "_game_test_puppeteer.dm"
+#include "_game_test.dm"
+#include "atmos\test_ventcrawl.dm"
+#include "attack_chain\test_attack_chain_cult_dagger.dm"
+#include "attack_chain\test_attack_chain_vehicles.dm"
+#include "games\test_cards.dm"
+#include "jobs\test_job_globals.dm"
+#include "test_aicard_icons.dm"
+#include "test_announcements.dm"
+#include "test_areas_apcs.dm"
+#include "test_components.dm"
+#include "test_config_sanity.dm"
+#include "test_crafting_lists.dm"
+#include "test_elements.dm"
+#include "test_emotes.dm"
+#include "test_init_sanity.dm"
+#include "test_log_format.dm"
+#include "test_map_templates.dm"
+#include "test_map_tests.dm"
+#include "test_missing_icons.dm"
+#include "test_origin_tech.dm"
+#include "test_purchase_reference_test.dm"
+#include "test_reagent_id_typos.dm"
+#include "test_runner.dm"
+#include "test_rustg_version.dm"
+#include "test_spawn_humans.dm"
+#include "test_spell_targeting_test.dm"
+#include "test_sql.dm"
+#include "test_status_effect_ids.dm"
+#include "test_subsystem_init.dm"
+#include "test_subsystem_metric_sanity.dm"
+#include "test_timer_sanity.dm"
+#endif
diff --git a/code/modules/unit_tests/games/test_cards.dm b/code/tests/games/test_cards.dm
similarity index 62%
rename from code/modules/unit_tests/games/test_cards.dm
rename to code/tests/games/test_cards.dm
index bde0b9f1f8bc..c74f52bc1a94 100644
--- a/code/modules/unit_tests/games/test_cards.dm
+++ b/code/tests/games/test_cards.dm
@@ -1,4 +1,4 @@
-/datum/unit_test/card_deck/proc/validate_deck(obj/item/deck/deck)
+/datum/game_test/card_deck/proc/validate_deck(obj/item/deck/deck)
var/list/card_count = list()
for(var/datum/playingcard/card in deck.cards)
if(card_count[card.name] == null)
@@ -14,17 +14,17 @@
return TRUE
-/datum/unit_test/card_deck/Run()
+/datum/game_test/card_deck/Run()
// setup
- var/loc = pick(block(run_loc_bottom_left, run_loc_top_right))
- var/obj/item/deck/cards/cards = new /obj/item/deck/cards(loc)
+ var/loc = pick(available_turfs)
+ var/obj/item/deck/cards/cards = allocate(/obj/item/deck/cards, loc)
cards.build_decks()
// is deck proper upon spawning
if(!validate_deck(cards))
- Fail("52 card deck not initialized correctly.")
+ TEST_FAIL("52 card deck not initialized correctly.")
// is deck proper after shuffling
cards.deckshuffle()
if(!validate_deck(cards))
- Fail("52 card deck broken after shuffling.")
+ TEST_FAIL("52 card deck broken after shuffling.")
diff --git a/code/modules/unit_tests/jobs/test_job_globals.dm b/code/tests/jobs/test_job_globals.dm
similarity index 77%
rename from code/modules/unit_tests/jobs/test_job_globals.dm
rename to code/tests/jobs/test_job_globals.dm
index 7ed56ff99800..eebf80becb62 100644
--- a/code/modules/unit_tests/jobs/test_job_globals.dm
+++ b/code/tests/jobs/test_job_globals.dm
@@ -1,17 +1,17 @@
-/datum/unit_test/job_globals/Run()
+/datum/game_test/job_globals/Run()
return
-/datum/unit_test/job_globals/proc/is_list_unique(list/L)
+/datum/game_test/job_globals/proc/is_list_unique(list/L)
var/list_length = length(L)
var/unique_list = uniqueList(L)
var/unique_list_length = length(unique_list)
return list_length == unique_list_length
-/datum/unit_test/job_globals/proc/validate_list(list/L, list_name)
+/datum/game_test/job_globals/proc/validate_list(list/L, list_name)
if(!is_list_unique(L))
- Fail("job_globals list '[list_name]' contains duplicate values.")
+ TEST_FAIL("job_globals list '[list_name]' contains duplicate values.")
-/datum/unit_test/job_globals/no_duplicates/Run()
+/datum/game_test/job_globals/no_duplicates/Run()
validate_list(GLOB.station_departments, "station_departments")
validate_list(GLOB.command_positions, "command_positions")
validate_list(GLOB.command_head_positions, "command_head_positions")
diff --git a/code/modules/unit_tests/aicard_icons.dm b/code/tests/test_aicard_icons.dm
similarity index 65%
rename from code/modules/unit_tests/aicard_icons.dm
rename to code/tests/test_aicard_icons.dm
index cb61ade842f4..b35e368d5b9c 100644
--- a/code/modules/unit_tests/aicard_icons.dm
+++ b/code/tests/test_aicard_icons.dm
@@ -1,6 +1,6 @@
-/datum/unit_test/aicard_icons/Run()
- var/mob/living/silicon/ai/ai_box = new /mob/living/silicon/ai/
- var/obj/item/aicard/int_card = new /obj/item/aicard/
+/datum/game_test/aicard_icons/Run()
+ var/mob/living/silicon/ai/ai_box = allocate(/mob/living/silicon/ai)
+ var/obj/item/aicard/int_card = allocate(/obj/item/aicard)
var/list/ai_icon_list = icon_states(ai_box.icon)
var/list/aicard_icon_list = icon_states(int_card.icon)
@@ -14,6 +14,6 @@
if(icn_st in aicard_icon_list)
continue
- Fail("Every AI Display must have a corresponding icon of the same name in [int_card.icon] for intelicards, [icn_st] is missing!")
+ TEST_FAIL("Every AI Display must have a corresponding icon of the same name in [int_card.icon] for intelicards, [icn_st] is missing!")
//The exclusions list will need to be updated anytime any non-display icons are added to ai.dmi
diff --git a/code/modules/unit_tests/announcements.dm b/code/tests/test_announcements.dm
similarity index 97%
rename from code/modules/unit_tests/announcements.dm
rename to code/tests/test_announcements.dm
index 152e8cadc687..c4feea561ace 100644
--- a/code/modules/unit_tests/announcements.dm
+++ b/code/tests/test_announcements.dm
@@ -1,8 +1,8 @@
/// This test exists largely to ensure that no runtimes occur when announcements
/// are made, so there are no explicit Fail calls. It either works or runtimes.
-/datum/unit_test/announcements
+/datum/game_test/announcements
-/datum/unit_test/announcements/Run()
+/datum/game_test/announcements/Run()
GLOB.major_announcement.Announce("Figments from an eldritch god are being summoned into the NSS Cyberiad from an unknown dimension. Disrupt the ritual at all costs, before the station is destroyed! Space Law and SOP are suspended. The entire crew must kill cultists on sight.", "Central Command Higher Dimensional Affairs", 'sound/AI/cult_summon.ogg')
GLOB.major_announcement.Announce(
diff --git a/code/modules/unit_tests/areas_apcs.dm b/code/tests/test_areas_apcs.dm
similarity index 71%
rename from code/modules/unit_tests/areas_apcs.dm
rename to code/tests/test_areas_apcs.dm
index 00bd31805c0f..ecf21dc19da0 100644
--- a/code/modules/unit_tests/areas_apcs.dm
+++ b/code/tests/test_areas_apcs.dm
@@ -1,17 +1,17 @@
-/datum/unit_test/area_apcs
+/datum/game_test/area_apcs
/// Sometimes, areas may have power, or not. We dont really care about these areas.
var/list/optional_areas = list(/area/station/science/toxins/test, /area/station/maintenance/electrical_shop)
-/datum/unit_test/area_apcs/Run()
+/datum/game_test/area_apcs/Run()
for(var/area/station/A in SSmapping.existing_station_areas)
if(A.there_can_be_many || A.apc_starts_off || !A.requires_power)
continue
if(is_type_in_list(A, optional_areas))
continue
if(length(A.apc) == 0)
- Fail("Area [A.type] has [length(A.apc)] apcs, instead of 1.")
+ TEST_FAIL("Area [A.type] has [length(A.apc)] apcs, instead of 1.")
else if(length(A.apc) > 1)
var/list/locations = list()
for(var/atom/probably_an_apc as anything in A.apc)
locations += "([probably_an_apc.x], [probably_an_apc.y], [probably_an_apc.z])"
- Fail("Area [A.type] has [length(A.apc)] apcs, instead of 1. APCs are located at [english_list(locations)]")
+ TEST_FAIL("Area [A.type] has [length(A.apc)] apcs, instead of 1. APCs are located at [english_list(locations)]")
diff --git a/code/modules/unit_tests/component_tests.dm b/code/tests/test_components.dm
similarity index 64%
rename from code/modules/unit_tests/component_tests.dm
rename to code/tests/test_components.dm
index 0099d7508c5d..0e0933b4e15c 100644
--- a/code/modules/unit_tests/component_tests.dm
+++ b/code/tests/test_components.dm
@@ -1,4 +1,4 @@
-/datum/unit_test/component_duping/Run()
+/datum/game_test/component_duping/Run()
var/list/bad_dms = list()
var/list/bad_dts = list()
for(var/t in typesof(/datum/component))
@@ -9,4 +9,4 @@
if(dupe_type && !ispath(dupe_type))
bad_dts += t
if(length(bad_dms) || length(bad_dts))
- Fail("Components with invalid dupe modes: ([bad_dms.Join(",")]) ||| Components with invalid dupe types: ([bad_dts.Join(",")])")
+ TEST_FAIL("Components with invalid dupe modes: ([bad_dms.Join(",")]) ||| Components with invalid dupe types: ([bad_dts.Join(",")])")
diff --git a/code/modules/unit_tests/config_sanity.dm b/code/tests/test_config_sanity.dm
similarity index 76%
rename from code/modules/unit_tests/config_sanity.dm
rename to code/tests/test_config_sanity.dm
index 55f84fa98ca1..52934e87fda2 100644
--- a/code/modules/unit_tests/config_sanity.dm
+++ b/code/tests/test_config_sanity.dm
@@ -1,5 +1,5 @@
// This one test does multiple config things
-/datum/unit_test/config_sanity/Run()
+/datum/game_test/config_sanity/Run()
// First test the ruins. Space then lava.
var/list/config_space_ruins = GLOB.configuration.ruins.active_space_ruins.Copy() // Copy so we dont remove
var/list/datum/map_template/ruin/space/game_space_ruins = list()
@@ -20,14 +20,14 @@
// Do not confuse this with the map_templates unit test. They do different things!!!!!
if(length(game_space_ruins))
- Fail("Space ruins exist in the game code that do not exist in the config file")
+ TEST_FAIL("Space ruins exist in the game code that do not exist in the config file")
for(var/datum/map_template/ruin/space/S in game_space_ruins)
- Fail("Ruin [S.type] does not have a valid map path ([S.mappath])")
+ TEST_FAIL("Ruin [S.type] does not have a valid map path ([S.mappath])")
if(length(config_space_ruins))
- Fail("Space ruins exist in the game config that do not have associated datums")
+ TEST_FAIL("Space ruins exist in the game config that do not have associated datums")
for(var/path in config_space_ruins)
- Fail("- [path]")
+ TEST_FAIL("- [path]")
// Now for lava ruins
@@ -50,11 +50,11 @@
// Do not confuse this with the map_templates unit test. They do different things!!!!!
if(length(game_lava_ruins))
- Fail("Lava ruins exist in the game code that do not exist in the config file")
+ TEST_FAIL("Lava ruins exist in the game code that do not exist in the config file")
for(var/datum/map_template/ruin/lavaland/L in game_lava_ruins)
- Fail("Ruin [L.type] does not have a valid map path ([L.mappath])")
+ TEST_FAIL("Ruin [L.type] does not have a valid map path ([L.mappath])")
if(length(config_lava_ruins))
- Fail("Lava ruins exist in the game config that do not have associated datums")
+ TEST_FAIL("Lava ruins exist in the game config that do not have associated datums")
for(var/path in config_lava_ruins)
- Fail("- [path]")
+ TEST_FAIL("- [path]")
diff --git a/code/tests/test_crafting_lists.dm b/code/tests/test_crafting_lists.dm
new file mode 100644
index 000000000000..7fa26ffdc266
--- /dev/null
+++ b/code/tests/test_crafting_lists.dm
@@ -0,0 +1,4 @@
+/datum/game_test/crafting_lists/Run()
+ for(var/I in subtypesof(/datum/crafting_recipe))
+ var/datum/crafting_recipe/C = new I()
+ TEST_ASSERT(islist(C.result), "Expected a list for the 'result' of [C.type].")
diff --git a/code/modules/unit_tests/element_tests.dm b/code/tests/test_elements.dm
similarity index 58%
rename from code/modules/unit_tests/element_tests.dm
rename to code/tests/test_elements.dm
index d497984ea496..c9b51fd7d7e3 100644
--- a/code/modules/unit_tests/element_tests.dm
+++ b/code/tests/test_elements.dm
@@ -1,4 +1,4 @@
-/datum/unit_test/bespoke_element/Run()
+/datum/game_test/bespoke_element/Run()
for(var/datum/element/element_type as anything in subtypesof(/datum/element))
if(initial(element_type.element_flags) & ELEMENT_BESPOKE && initial(element_type.argument_hash_start_idx) == INFINITY)
- Fail("Element type [element_type] has ELEMENT_BESPOKE and a default argument_hash_start_idx.")
+ TEST_FAIL("Element type [element_type] has ELEMENT_BESPOKE and a default argument_hash_start_idx.")
diff --git a/code/modules/unit_tests/emotes.dm b/code/tests/test_emotes.dm
similarity index 67%
rename from code/modules/unit_tests/emotes.dm
rename to code/tests/test_emotes.dm
index c231c031a151..88ef8ae63e40 100644
--- a/code/modules/unit_tests/emotes.dm
+++ b/code/tests/test_emotes.dm
@@ -1,6 +1,6 @@
-/datum/unit_test/emote/Run()
+/datum/game_test/emote/Run()
// Special cases that shouldn't need keybinds.
var/list/ignored_emote_types = list(
@@ -15,33 +15,30 @@
for(var/emote_type in subtypesof(/datum/emote))
var/datum/emote/cur_emote = new emote_type()
if(cur_emote.message_param && !cur_emote.param_desc)
- Fail("emote [cur_emote] was given a message parameter without a description.")
+ TEST_FAIL("emote [cur_emote] was given a message parameter without a description.")
// Sanity checks, these emotes probably won't appear to a user but we should make sure they're cleaned up.
if(!cur_emote.key)
if(cur_emote.message || cur_emote.message_param)
- Fail("emote [cur_emote] is missing a key but has a message defined.")
+ TEST_FAIL("emote [cur_emote] is missing a key but has a message defined.")
if(cur_emote.key_third_person)
- Fail("emote [cur_emote] has a third-person key defined, but no first-person key. Either first person, both, or neither should be defined.")
+ TEST_FAIL("emote [cur_emote] has a third-person key defined, but no first-person key. Either first person, both, or neither should be defined.")
// These are ones that might appear to a user, and so could use some special handling.
else
- if(isnull(cur_emote.emote_type))
- Fail("emote [cur_emote] has a null target type.")
+ TEST_ASSERT_NOTNULL(cur_emote.emote_type, "emote [cur_emote] has a null target type.")
// If we're at this point, we're definitely an emote that a user could use, and therefore ought to make sure it's bound to a keybind if possible.
if(!is_type_in_list(cur_emote, keybound_emotes) && !is_type_in_list(cur_emote, ignored_emote_types))
- Fail("Emote [cur_emote] is usable, but not assigned a keybind.")
+ TEST_FAIL("Emote [cur_emote] is usable, but not assigned a keybind.")
if(isnum(cur_emote.max_stat_allowed) && cur_emote.max_stat_allowed < cur_emote.stat_allowed)
- Fail("emote [cur_emote]'s max_stat_allowed is greater than its stat_allowed, and would be unusable.")
+ TEST_FAIL("emote [cur_emote]'s max_stat_allowed is greater than its stat_allowed, and would be unusable.")
if(isnum(cur_emote.max_unintentional_stat_allowed) && cur_emote.max_unintentional_stat_allowed < cur_emote.unintentional_stat_allowed)
- Fail("emote [cur_emote]'s max_unintentional_stat_allowed is greater than its unintentional_stat_allowed, and would be unusable.")
+ TEST_FAIL("emote [cur_emote]'s max_unintentional_stat_allowed is greater than its unintentional_stat_allowed, and would be unusable.")
-
-
-/datum/unit_test/emote/proc/get_emote_keybinds()
+/datum/game_test/emote/proc/get_emote_keybinds()
var/list/bound_emotes = list()
for(var/keybind in subtypesof(/datum/keybinding/emote))
var/datum/keybinding/emote/E = new keybind()
diff --git a/code/modules/unit_tests/init_sanity.dm b/code/tests/test_init_sanity.dm
similarity index 60%
rename from code/modules/unit_tests/init_sanity.dm
rename to code/tests/test_init_sanity.dm
index 1584179cbe71..b21263175d8b 100644
--- a/code/modules/unit_tests/init_sanity.dm
+++ b/code/tests/test_init_sanity.dm
@@ -1,6 +1,6 @@
-/datum/unit_test/initialize_sanity/Run()
+/datum/game_test/initialize_sanity/Run()
if(length(SSatoms.BadInitializeCalls))
- Fail("Bad Initialize() calls detected. Please read logs.")
+ TEST_FAIL("Bad Initialize() calls detected. Please read logs.")
var/list/init_failures_to_text = list(
"[BAD_INIT_QDEL_BEFORE]" = "Qdeleted Before Initialized",
"[BAD_INIT_DIDNT_INIT]" = "Did Not Initialize",
@@ -8,4 +8,4 @@
"[BAD_INIT_NO_HINT]" = "No Initialize() Hint Returned",
)
for(var/failure in SSatoms.BadInitializeCalls)
- Fail("[failure]: [init_failures_to_text["[SSatoms.BadInitializeCalls[failure]]"]]") // You like stacked brackets?
+ TEST_FAIL("[failure]: [init_failures_to_text["[SSatoms.BadInitializeCalls[failure]]"]]") // You like stacked brackets?
diff --git a/code/modules/unit_tests/log_format.dm b/code/tests/test_log_format.dm
similarity index 81%
rename from code/modules/unit_tests/log_format.dm
rename to code/tests/test_log_format.dm
index 11bcd9fd9fe5..d3a6f67ca496 100644
--- a/code/modules/unit_tests/log_format.dm
+++ b/code/tests/test_log_format.dm
@@ -8,7 +8,7 @@
return "\[[date_portion]T[time_portion]] [TEST_MESSAGE]"
-/datum/unit_test/log_format/Run()
+/datum/game_test/log_format/Run()
// Generate a list of valid log timestamps. It can be the current time, or up to 2 seconds later to account for spurious CI lag
var/valid_lines = list(
"[generate_test_log_message(world.timeofday)]",
@@ -19,8 +19,8 @@
rustg_log_write(TEST_LOG_FILE, TEST_MESSAGE)
var/list/lines = file2list(TEST_LOG_FILE)
- if(!(lines[1] in valid_lines))
- Fail("RUSTG log format is not valid 8601 format. Expected '[generate_test_log_message(world.timeofday)]', got '[lines[1]]'")
+ TEST_ASSERT(lines[1] in valid_lines, \
+ "RUSTG log format is not valid 8601 format. Expected '[generate_test_log_message(world.timeofday)]', got '[lines[1]]'")
#undef TEST_MESSAGE
#undef TEST_LOG_FILE
diff --git a/code/modules/unit_tests/map_templates.dm b/code/tests/test_map_templates.dm
similarity index 71%
rename from code/modules/unit_tests/map_templates.dm
rename to code/tests/test_map_templates.dm
index 55834d8d171a..6eb6da6a234d 100644
--- a/code/modules/unit_tests/map_templates.dm
+++ b/code/tests/test_map_templates.dm
@@ -1,4 +1,4 @@
-/datum/unit_test/map_templates/Run()
+/datum/game_test/map_templates/Run()
var/list/datum/map_template/templates = subtypesof(/datum/map_template)
for(var/I in templates)
var/datum/map_template/MT = new I // The new is important here to ensure stuff gets set properly
@@ -6,6 +6,6 @@
continue
// Check if it even has a path and if so, does it exist
if(MT.mappath && !fexists(MT.mappath))
- Fail("The map file for [MT.type] does not exist!")
+ TEST_FAIL("The map file for [MT.type] does not exist!")
if(MT.mappath && !findtext(MT.mappath, ".dmm"))
- Fail("The map file for [MT.type] is not a map!")
+ TEST_FAIL("The map file for [MT.type] is not a map!")
diff --git a/code/modules/unit_tests/map_tests.dm b/code/tests/test_map_tests.dm
similarity index 100%
rename from code/modules/unit_tests/map_tests.dm
rename to code/tests/test_map_tests.dm
diff --git a/code/modules/unit_tests/missing_icons.dm b/code/tests/test_missing_icons.dm
similarity index 86%
rename from code/modules/unit_tests/missing_icons.dm
rename to code/tests/test_missing_icons.dm
index 17822595c066..0b652a3c466d 100644
--- a/code/modules/unit_tests/missing_icons.dm
+++ b/code/tests/test_missing_icons.dm
@@ -1,8 +1,8 @@
/// Makes sure objects actually have icons that exist!
-/datum/unit_test/missing_icons
+/datum/game_test/missing_icons
var/static/list/possible_icon_states = list()
-/datum/unit_test/missing_icons/proc/generate_possible_icon_states_list(directory_path = "icons/obj/")
+/datum/game_test/missing_icons/proc/generate_possible_icon_states_list(directory_path = "icons/obj/")
for(var/file_path in flist(directory_path))
if(findtext(file_path, ".dmi"))
for(var/sprite_icon in icon_states("[directory_path][file_path]", 1)) //2nd arg = 1 enables 64x64+ icon support, otherwise you'll end up with "sword0_1" instead of "sword"
@@ -10,7 +10,7 @@
else
possible_icon_states += generate_possible_icon_states_list("[directory_path][file_path]")
-/datum/unit_test/missing_icons/Run()
+/datum/game_test/missing_icons/Run()
generate_possible_icon_states_list()
generate_possible_icon_states_list("icons/effects/")
@@ -41,5 +41,5 @@
for(var/file_place in possible_icon_states[icon_state])
match_message += (match_message ? " & '[file_place]'" : " - Matching sprite found in: '[file_place]'")
- Fail("Missing icon_state for [obj_path] in '[icon]'.\n\ticon_state = \"[icon_state]\"[match_message]")
+ TEST_FAIL("Missing icon_state for [obj_path] in '[icon]'.\n\ticon_state = \"[icon_state]\"[match_message]")
diff --git a/code/modules/unit_tests/origin_tech.dm b/code/tests/test_origin_tech.dm
similarity index 71%
rename from code/modules/unit_tests/origin_tech.dm
rename to code/tests/test_origin_tech.dm
index 177c89b36b9b..5dc7b475e565 100644
--- a/code/modules/unit_tests/origin_tech.dm
+++ b/code/tests/test_origin_tech.dm
@@ -1,5 +1,5 @@
// Unit test to ensure people have appropriately set up their origin_techs in items, ensuring they give the appropriate resources in RnD breakdown
-/datum/unit_test/origin_tech/Run()
+/datum/game_test/origin_tech/Run()
var/regex/nums = regex("^\[0-9]+")
for(var/tpath in subtypesof(/obj/item))
var/obj/item/I = tpath
@@ -8,5 +8,4 @@
var/list/tech_list = params2list(tech_str)
for(var/k in tech_list)
- if(length(nums.Replace(tech_list[k], "")) > 0)
- Fail("Invalid origin tech for [tpath]: [tech_str]")
+ TEST_ASSERT(length(nums.Replace(tech_list[k], "")) == 0, "Invalid origin tech for [tpath]: [tech_str]")
diff --git a/code/modules/unit_tests/purchase_reference_test.dm b/code/tests/test_purchase_reference_test.dm
similarity index 66%
rename from code/modules/unit_tests/purchase_reference_test.dm
rename to code/tests/test_purchase_reference_test.dm
index 91dca4b846a0..42dc5d22f09e 100644
--- a/code/modules/unit_tests/purchase_reference_test.dm
+++ b/code/tests/test_purchase_reference_test.dm
@@ -1,14 +1,13 @@
// tests if there are duplicate or null refs/lognames for uplink items and spellbook items respectively
-/datum/unit_test/uplink_refs/Run()
+/datum/game_test/uplink_refs/Run()
var/list/uplink_refs = list()
for(var/datum/uplink_item/I as anything in subtypesof(/datum/uplink_item))
if(isnull(initial(I.item)))
continue //don't test them if they don't have an item
var/uplink_ref = initial(I.reference)
if(isnull(uplink_ref))
- Fail("uplink item [initial(I.name)] has no reference")
+ TEST_FAIL("uplink item [initial(I.name)] has no reference")
continue
- if(uplink_ref in uplink_refs)
- Fail("uplink reference [uplink_ref] is used multiple times")
+ TEST_ASSERT_NOT(uplink_ref in uplink_refs, "uplink reference [uplink_ref] is used multiple times")
uplink_refs += uplink_ref
diff --git a/code/modules/unit_tests/reagent_id_typos.dm b/code/tests/test_reagent_id_typos.dm
similarity index 52%
rename from code/modules/unit_tests/reagent_id_typos.dm
rename to code/tests/test_reagent_id_typos.dm
index 7f45774db0b5..93d6e4fd6b9c 100644
--- a/code/modules/unit_tests/reagent_id_typos.dm
+++ b/code/tests/test_reagent_id_typos.dm
@@ -1,11 +1,10 @@
-/datum/unit_test/reagent_id_typos
+/datum/game_test/reagent_id_typos
-/datum/unit_test/reagent_id_typos/Run()
+/datum/game_test/reagent_id_typos/Run()
for(var/I in GLOB.chemical_reactions_list)
for(var/V in GLOB.chemical_reactions_list[I])
var/datum/chemical_reaction/R = V
for(var/id in (R.required_reagents + R.required_catalysts))
- if(!GLOB.chemical_reagents_list[id])
- Fail("Unknown chemical id \"[id]\" in recipe [R.type]")
+ TEST_ASSERT(GLOB.chemical_reagents_list[id], "Unknown chemical id \"[id]\" in recipe [R.type]")
diff --git a/code/modules/unit_tests/test_runner.dm b/code/tests/test_runner.dm
similarity index 88%
rename from code/modules/unit_tests/test_runner.dm
rename to code/tests/test_runner.dm
index 8ac625e5c123..206d31a2205d 100644
--- a/code/modules/unit_tests/test_runner.dm
+++ b/code/tests/test_runner.dm
@@ -3,14 +3,14 @@
// intentionally (if there's a lot of legitimate map errors), or accidentally if
// a test condition is written incorrectly and starts e.g. logging failures for
// every single tile.
-#ifdef LOCAL_UNIT_TESTS
+#ifdef LOCAL_GAME_TESTS
#define MAX_MAP_TEST_FAILURE_COUNT 100
#else
#define MAX_MAP_TEST_FAILURE_COUNT 20
#endif
/datum/test_runner
- var/datum/unit_test/current_test
+ var/datum/game_test/current_test
var/failed_any_test = FALSE
var/list/test_logs = list()
var/list/durations = list()
@@ -56,8 +56,8 @@
/datum/test_runner/proc/Run()
CHECK_TICK
- for(var/I in subtypesof(/datum/unit_test))
- var/datum/unit_test/test = new I
+ for(var/I in subtypesof(/datum/game_test))
+ var/datum/game_test/test = new I
test_logs[I] = list()
current_test = test
@@ -70,7 +70,15 @@
if(!test.succeeded)
failed_any_test = TRUE
- test_logs[I] += test.fail_reasons
+ for(var/fail_reason in test.fail_reasons)
+ if(islist(fail_reason))
+ var/text = fail_reason[1]
+ var/file = fail_reason[2]
+ var/line = fail_reason[3]
+
+ test_logs[I] += "[file]:[line]: [text]"
+ else
+ test_logs[I] += fail_reason
qdel(test)
@@ -83,7 +91,7 @@
var/time = world.timeofday
set waitfor = FALSE
- #ifdef LOCAL_UNIT_TESTS
+ #ifdef LOCAL_GAME_TESTS
emit_failures = TRUE
#endif
diff --git a/code/tests/test_rustg_version.dm b/code/tests/test_rustg_version.dm
new file mode 100644
index 000000000000..de39b377bdc6
--- /dev/null
+++ b/code/tests/test_rustg_version.dm
@@ -0,0 +1,3 @@
+/datum/game_test/rustg_version/Run()
+ var/library_version = rustg_get_version()
+ TEST_ASSERT_EQUAL(library_version, RUST_G_VERSION, "invalid RUSTG Version")
diff --git a/code/modules/unit_tests/spawn_humans.dm b/code/tests/test_spawn_humans.dm
similarity index 50%
rename from code/modules/unit_tests/spawn_humans.dm
rename to code/tests/test_spawn_humans.dm
index dd6dac928403..f7bb6c6cd22a 100644
--- a/code/modules/unit_tests/spawn_humans.dm
+++ b/code/tests/test_spawn_humans.dm
@@ -1,8 +1,6 @@
-/datum/unit_test/spawn_humans/Run()
- var/locs = block(run_loc_bottom_left, run_loc_top_right)
-
+/datum/game_test/spawn_humans/Run()
for(var/I in 1 to 5)
- new /mob/living/carbon/human(pick(locs))
+ allocate(/mob/living/carbon/human, pick(available_turfs))
// There is a 5 second delay here so that all the items on the humans have time to initialize and spawn
sleep(50)
diff --git a/code/modules/unit_tests/spell_targeting_test.dm b/code/tests/test_spell_targeting_test.dm
similarity index 68%
rename from code/modules/unit_tests/spell_targeting_test.dm
rename to code/tests/test_spell_targeting_test.dm
index e1a189774390..7c66c40549bd 100644
--- a/code/modules/unit_tests/spell_targeting_test.dm
+++ b/code/tests/test_spell_targeting_test.dm
@@ -1,4 +1,4 @@
-/datum/unit_test/spell_targeting/Run()
+/datum/game_test/spell_targeting/Run()
var/list/bad_spells = list()
for(var/datum/spell/S as anything in typesof(/datum/spell))
if(initial(S.name) == "Spell")
@@ -7,4 +7,4 @@
if(!S.targeting)
bad_spells += S
if(length(bad_spells))
- Fail("Spells without targeting found: [bad_spells.Join(", ")]")
+ TEST_FAIL("Spells without targeting found: [bad_spells.Join(", ")]")
diff --git a/code/tests/test_sql.dm b/code/tests/test_sql.dm
new file mode 100644
index 000000000000..01acc0ac2873
--- /dev/null
+++ b/code/tests/test_sql.dm
@@ -0,0 +1,5 @@
+// Unit test to check SQL version has been updated properly.,
+/datum/game_test/sql_version/Run()
+ // Check if the SQL version set in the code is equal to the CI DB config
+ TEST_ASSERT_EQUAL(GLOB.configuration.database.version, SQL_VERSION, "SQL version error. You may need to update the example config.")
+ TEST_ASSERT_EQUAL(SSdbcore.total_errors, 0, "SQL errors occurred on startup.")
diff --git a/code/modules/unit_tests/status_effect_ids.dm b/code/tests/test_status_effect_ids.dm
similarity index 61%
rename from code/modules/unit_tests/status_effect_ids.dm
rename to code/tests/test_status_effect_ids.dm
index febe085e1c7b..a5354b2432ce 100644
--- a/code/modules/unit_tests/status_effect_ids.dm
+++ b/code/tests/test_status_effect_ids.dm
@@ -1,8 +1,8 @@
-/datum/unit_test/status_effect_ids/Run()
+/datum/game_test/status_effect_ids/Run()
var/list/bad_statuses = list()
for(var/datum/status_effect/effect as anything in subtypesof(/datum/status_effect))
if(initial(effect.id) == null)
bad_statuses += effect
if(length(bad_statuses))
- Fail("STatus effects found without an unique ID: [bad_statuses.Join(", ")]")
+ TEST_FAIL("Status effects found without an unique ID: [bad_statuses.Join(", ")]")
diff --git a/code/modules/unit_tests/subsystem_init.dm b/code/tests/test_subsystem_init.dm
similarity index 56%
rename from code/modules/unit_tests/subsystem_init.dm
rename to code/tests/test_subsystem_init.dm
index 1515f12c591f..0ea650c0d411 100644
--- a/code/modules/unit_tests/subsystem_init.dm
+++ b/code/tests/test_subsystem_init.dm
@@ -1,9 +1,9 @@
-/datum/unit_test/subsystem_init/Run()
+/datum/game_test/subsystem_init/Run()
var/datum/controller/subsystem/base_ss
var/default_offline_implications = initial(base_ss.offline_implications)
for(var/datum/controller/subsystem/SS as anything in Master.subsystems)
if((SS.flags & SS_NO_INIT) && (SS.flags & SS_NO_FIRE))
- Fail("[SS]([SS.type]) is a subsystem which is set to not initialize or fire. Use a global datum instead an SS.")
+ TEST_FAIL("[SS]([SS.type]) is a subsystem which is set to not initialize or fire. Use a global datum instead an SS.")
if(!(SS.flags & SS_NO_FIRE) && SS.offline_implications == default_offline_implications)
- Fail("[SS]([SS.type]) is a subsystem which fires but has no offline implications set.")
+ TEST_FAIL("[SS]([SS.type]) is a subsystem which fires but has no offline implications set.")
diff --git a/code/tests/test_subsystem_metric_sanity.dm b/code/tests/test_subsystem_metric_sanity.dm
new file mode 100644
index 000000000000..932abf0835d8
--- /dev/null
+++ b/code/tests/test_subsystem_metric_sanity.dm
@@ -0,0 +1,22 @@
+// Unit test to ensure SS metrics are valid
+/datum/game_test/subsystem_metric_sanity/Run()
+ for(var/datum/controller/subsystem/SS in Master.subsystems)
+ var/list/data = SS.get_metrics()
+ if(length(data) != 4)
+ TEST_FAIL("SS[SS.ss_id] has invalid metrics data!")
+ continue
+ if(isnull(data["cost"]))
+ TEST_FAIL("SS[SS.ss_id] has invalid metrics data! No 'cost' found in [json_encode(data)]")
+ continue
+ if(isnull(data["tick_usage"]))
+ TEST_FAIL("SS[SS.ss_id] has invalid metrics data! No 'tick_usage' found in [json_encode(data)]")
+ continue
+ if(isnull(data["custom"]))
+ TEST_FAIL("SS[SS.ss_id] has invalid metrics data! No 'custom' found in [json_encode(data)]")
+ continue
+ if(!islist(data["custom"]))
+ TEST_FAIL("SS[SS.ss_id] has invalid metrics data! 'custom' is not a list in [json_encode(data)]")
+ continue
+ if(isnull(data["sleep_count"]))
+ TEST_FAIL("SS[SS.ss_id] has invalid metrics data! No 'sleep_count' found in [json_encode(data)]")
+ continue
diff --git a/code/tests/test_timer_sanity.dm b/code/tests/test_timer_sanity.dm
new file mode 100644
index 000000000000..b5784b5ce033
--- /dev/null
+++ b/code/tests/test_timer_sanity.dm
@@ -0,0 +1,2 @@
+/datum/game_test/timer_sanity/Run()
+ TEST_ASSERT(SStimer.bucket_count >= 0, "SStimer is going into negative bucket count")
diff --git a/docs/mapping/design.md b/docs/mapping/design.md
index 0eb78cf21fc8..61aa9e7d6c99 100644
--- a/docs/mapping/design.md
+++ b/docs/mapping/design.md
@@ -195,3 +195,20 @@ deviation is impossible.
be given for hijackers and accessibility to the emergency shuttle console, as
well as the ability of crew to storm the bridge if necessary to prevent a
hijack.
+
+# Submap-Specific Guidance
+
+1. Submaps should be used to increase variety and add an element of chance to
+ player mechanics. They should not be used with an intention to confuse
+ players, or to cut off the primary path through the maintenance tunnels.
+ Primary paths through maints can make detours but must return to their
+ original ingress and egress points. Paths which lead to department maints
+ airlocks must remain obvious and easily accessible.
+
+2. All pre-existing balance guidelines regarding mapping apply to submaps. Loot
+ counts must remain consistent. Walls should only be reinforced in appropriate
+ places. There should be no "treasure troves" or hoards only accessible with
+ detailed map knowledge. AI cameras cannot be placed in maints submaps.
+ Antag/sec balance, tactical flexibility, and navigability must be considered.
+ Dead ends are to be avoided. Department maintenance airlocks may not be moved
+ or removed.
\ No newline at end of file
diff --git a/docs/mapping/requirements.md b/docs/mapping/requirements.md
index c0a01c5f406f..f0fdc7133dd1 100644
--- a/docs/mapping/requirements.md
+++ b/docs/mapping/requirements.md
@@ -174,6 +174,60 @@ relevant directional mapper, as it has predefined pixel offsets and directions
that are standardised: APC, Air alarm, Fire alarm, station intercom, newscaster,
extinguisher cabinet, light switches.
+## Submap Requirements
+
+1. Currently, while they do not have to be exactly rectangular, submaps cannot
+ be larger than 24x24 tiles. This is in order to prevent them from being too
+ difficult to review or navigate and get used to in-game.
+
+2. Submaps are **not** to be used as a proxy to change something you do not like
+ about a map. If you have issues with the balance or design of a map, those
+ issues should be addressed with ordinary remap PRs.
+
+### Stations
+
+1. Submaps on stations may only be used in maintenance tunnels, and only one
+ submap per area (i.e. fore, aft) is permitted. This restriction may be
+ relaxed in the future, but is in place to prevent player confusion and
+ frustration with too many map areas changing.
+
+2. Submaps in maintenance tunnels should continue to comply with existing rules
+ about signposting. Areas in maints should remain recognizable regardless of
+ submap configuration. This means that pre-existing signposts should be
+ respected, such as the abandoned medical area in Box medmaints, the mining
+ equipment in Cere cargo maints, etc.
+
+3. To prevent overuse of submaps, there is currently a restriction of three per
+ station. This limit may be raised depending on how submaps are received by
+ players. The areas chosen are first-come, first serve. Whoever gets their
+ changes mapped in first sets the available submaps.
+
+4. There is no hard limit on the number of variants per submap, though we ask
+ you keep it to a reasonable number.
+
+5. Submaps may not replace tiles which have atmos pipes, power cables, or other
+ engineering/atmospherics equipment. This is to prevent this equipment from
+ being hidden with walls or no longer accessible via their pre-existing
+ primary paths through maintenance. The exception is for equipment that is
+ only used in the submap; for example, the cables to a rage cage.
+
+6. One submap variant must be an exact duplicate of the original area's
+ contents. A variant will always be chosen, and so it's necessary that an
+ "original" variant is available. The original contents of the submap should
+ remain as is, in case mapmanip fails to load altogether.
+
+### Ruins
+
+1. Submaps on ruins are allowed to be more flexible. There's currently no limit
+ on how many submaps may be used on a given ruin, however the 24x24 tile limit
+ remains.
+
+2. Submaps should be used to increase the number of unique ways a ruin can be
+ approached and run, including randomizing specific challenges, rewards, and
+ paths through the ruin. They should not be used purely for decorative
+ purposes, or for changes that could be accomplished using existing random
+ spawners.
+
## Mapper Contribution Guidelines
These guidelines apply to **all** mapping contributors.
@@ -184,12 +238,12 @@ your PR if we disagree with your reasoning. Large remaps, such as those to a
department, must be justified with clear, specific reasons.
Before committing a map change, you **MUST** run Mapmerge to normalise your
-changes. You can do this manually before every commit with
-`tools\mapmerge2\Run Before Committing.bat` or by letting the
-[git hooks](./quickstart.md#mapmerge) do it for you. Failure to run Mapmerge on
-a map after editing greatly increases the risk of the map's key dictionary
-becoming corrupted by future edits after running map merge. Resolving the
-corruption issue involves rebuilding the map's key dictionary.
+changes. You can do this manually before every commit with `tools\mapmerge2\Run
+Before Committing.bat` or by letting the [git hooks](./quickstart.md#mapmerge)
+do it for you. Failure to run Mapmerge on a map after editing greatly increases
+the risk of the map's key dictionary becoming corrupted by future edits after
+running map merge. Resolving the corruption issue involves rebuilding the map's
+key dictionary.
If you are making non-minor edits to an area or room, (non-minor being anything
more than moving a few objects or fixing small bugs) then you should ensure the
diff --git a/docs/references/movement_signals.md b/docs/references/movement_signals.md
new file mode 100644
index 000000000000..664cba9d5314
--- /dev/null
+++ b/docs/references/movement_signals.md
@@ -0,0 +1,140 @@
+# Movement Signals
+
+## Background
+
+Traditionally, BYOND games rely on several native procs to respond to certain
+kinds of in-game movement:
+
+- If one atom attempts to overlap another one, [`/atom/proc/Cross`][cross] is called,
+ allowing the overlapped atom to either return `TRUE` to allow the cross, or
+ `FALSE` to prevent it. When `Move()` is called and an atom overlaps another
+ one, [`/atom/proc/Crossed`][crossed] is called, allowing the overlapped atom to react
+ to the cross.
+- Similarly, when an atom attempts to stop overlapping another,
+ [`/atom/proc/Uncross`][uncross] is called to permit or deny it, then
+ [`/atom/proc/Uncrossed`][uncrossed] is called to allow the atom to react to it.
+- When a movable attempts to enter a turf, [`/turf/proc/Enter`][enter] is called,
+ allowing the turf to return `TRUE` to permit the entry, or `FALSE` to deny it.
+ When a movable succeeds in entering a turf, [`/turf/proc/Entered`][entered] is
+ called, allowing the turf to react to the entry.
+- Similarly, when an atom attempts to exit a turf, [`/turf/proc/Exit`][exit] is
+ called to permit or deny it, then [`/turf/proc/Exited`][exited] is called to allow
+ the turf to react to the exit.
+- When an atom attempts to enter the contents of another one,
+ [`/atom/proc/Enter`][atom_enter] is called, allowing the containing atom to
+ either return `TRUE` to allow the entry, or `FALSE` to prevent it. When an
+ atom successfully enters the contents of another one,
+ [`/atom/proc/Entered`][atom_entered] is called.
+- Similarly, when an atom attempts to exit another atom's contents,
+ [`/atom/proc/Exit`][atom_exit] is called to permit or deny it, then
+ [`/atom/proc/Exited`][atom_exited] is called to allow the turf to react to the
+ exit.
+
+As one can imagine, with a lot of objects moving around in the game world,
+calling all of these procs can be expensive, especially if we don't care about
+what happens most of the time.
+
+In order to avoid making all of these calls, and provide more fine-grained
+control over what happens on atom/turf interactions, we implement our own
+version of the native `/atom/movable/Move`, and use signal handlers and
+components to process the interactions we care about.
+
+[cross]: https://secure.byond.com/docs/ref/#/atom/proc/Cross
+[crossed]: https://secure.byond.com/docs/ref/#/atom/proc/Crossed
+[uncross]: https://secure.byond.com/docs/ref/#/atom/proc/Uncross
+[uncrossed]: https://secure.byond.com/docs/ref/#/atom/proc/Uncrossed
+[enter]: https://secure.byond.com/docs/ref/#/turf/proc/Enter
+[entered]: https://secure.byond.com/docs/ref/#/turf/proc/Entered
+[exit]: https://secure.byond.com/docs/ref/#/turf/proc/Exit
+[exited]: https://secure.byond.com/docs/ref/#/turf/proc/Exited
+[atom_enter]: https://secure.byond.com/docs/ref/#/atom/proc/Enter
+[atom_entered]: https://secure.byond.com/docs/ref/#/atom/proc/Entered
+[atom_exit]: https://secure.byond.com/docs/ref/#/atom/proc/Exit
+[atom_exited]: https://secure.byond.com/docs/ref/#/atom/proc/Exited
+
+## Signal Handlers
+
+There are several signal handlers used to replicate the native BYOND atom
+crossover/entry behavior:
+
+- [`COMSIG_MOVABLE_PRE_MOVE`][pre_move] is sent when trying to determine if an
+ atom can enter a new turf. Any subscribed handler can return
+ `COMPONENT_MOVABLE_BLOCK_PRE_MOVE` to prevent the move.
+- [`COMSIG_MOVABLE_MOVED`][moved] is sent after a successful move.
+- [`COMSIG_MOVABLE_CHECK_CROSS`][cross] is sent when trying to determine if an
+ atom can cross over another one. Any subscribed handler can return
+ `COMPONENT_BLOCK_CROSS` to prevent the cross.
+- Similarly, [`COMSIG_MOVABLE_CHECK_CROSS_OVER`][crossover] is sent if an atom
+ will allow another one to cross over it--the reverse of
+ `COMSIG_MOVABLE_CHECK_CROSS`. Again, any subscribed handler can return
+ `COMPONENT_BLOCK_CROSS` to prevent it.
+- [`COMSIG_ATOM_ENTERED`][entered] is sent if an atom enters this atom's
+ contents. Similarly, [`COMSIG_ATOM_EXITED`][exited] is sent if an atom exits
+ this atom's contents.
+
+[pre_move]: https://codedocs.paradisestation.org/code/__DEFINES/dcs/movable_signals.html#define/COMSIG_MOVABLE_PRE_MOVE
+[moved]: https://codedocs.paradisestation.org/code/__DEFINES/dcs/movable_signals.html#define/COMSIG_MOVABLE_MOVED
+[cross]: https://codedocs.paradisestation.org/code/__DEFINES/dcs/movable_signals.html#define/COMSIG_MOVABLE_CHECK_CROSS
+[crossover]: https://codedocs.paradisestation.org/code/__DEFINES/dcs/movable_signals.html#define/COMSIG_MOVABLE_CHECK_CROSS_OVER
+[entered]: https://codedocs.paradisestation.org/code/__DEFINES/dcs/movable_signals.html#define/COMSIG_ATOM_ENTERED
+[exited]: https://codedocs.paradisestation.org/code/__DEFINES/dcs/movable_signals.html#define/COMSIG_ATOM_EXITED
+
+## The `connect_loc` Element
+
+The above signals are not appropriate for all cases. For example, it may seem
+like beartraps should listen to `COMSIG_MOVABLE_MOVED` to see if they should
+activate. However, this will fire every time a movement crossing occurs, even if
+it wouldn't normally trigger the trap, such as if the trap is being thrown and
+intersects abstract lighting objects. Instead, we use `COMSIG_ATOM_ENTERED` with
+the `connect_loc` element. As a refresher, `COMSIG_ATOM_ENTERED` fires when an
+atom enters the contents of another. By using the `connect_loc` element, we can
+have the beartrap listen for signals on the turf it's located on. Then, if the
+turf has a `COMSIG_ATOM_ENTERED` signal fire, we can have the beartrap respond.
+
+Before:
+
+```dm
+/obj/item/restraints/legcuffs/beartrap/proc/Crossed(mob/living/crossed)
+ if(istype(crossed))
+ spring_trap()
+```
+
+After:
+
+```dm
+/obj/item/restraints/legcuffs/beartrap/Initialize(mapload)
+ . = ..()
+ var/static/list/loc_connections = list(
+ COMSIG_ATOM_ENTERED = PROC_REF(on_atom_entered),
+ )
+ AddElement(/datum/element/connect_loc, loc_connections)
+
+/obj/item/restraints/legcuffs/beartrap/proc/on_atom_entered(datum/source, mob/living/entered)
+ if(istype(entered))
+ spring_trap()
+```
+
+Note that the list of connections is `static` so that a new element instance isn't
+created for every new beartrap.
+
+## Summary
+
+The procs `/atom/movable/Cross`, `/atom/movable/Crossed`,
+`/atom/movable/Uncross`, and `/atom/movable/Uncrossed`, should not be used for
+new code.
+
+If you care about every time a movable attempts to overlap you, listen to
+`COMSIG_MOVABLE_PRE_MOVE`, and return `COMPONENT_MOVABLE_BLOCK_PRE_MOVE` to
+prevent it from happening.
+
+If you want to prevent a movable from crossing you, listen to
+`COMSIG_MOVABLE_CHECK_CROSS` and return `COMPONENT_BLOCK_CROSS` to prevent it. If you
+want to prevent a movable from being crossed by you, listen to
+`COMSIG_MOVABLE_CHECK_CROSS_OVER` and return `COMPONENT_BLOCK_CROSS` to prevent it.
+
+If you care about an atom entering or exiting your contents, listen to
+`COMSIG_ATOM_ENTERED` or `COMSIG_ATOM_EXITED`.
+
+If you care about an atom entering or exiting your location, or any other signal
+firing on your location, create a `static` list of signals mapped to procs and
+add a `/datum/element/connect_loc` to yourself.
diff --git a/icons/_nanomaps/BoxStation_nanomap_z1.png b/icons/_nanomaps/BoxStation_nanomap_z1.png
index e9a136ce907f..54ad9eefdaf5 100644
Binary files a/icons/_nanomaps/BoxStation_nanomap_z1.png and b/icons/_nanomaps/BoxStation_nanomap_z1.png differ
diff --git a/icons/_nanomaps/CereStation_nanomap_z1.png b/icons/_nanomaps/CereStation_nanomap_z1.png
index fa5a964348ce..b60e9a8c63ca 100644
Binary files a/icons/_nanomaps/CereStation_nanomap_z1.png and b/icons/_nanomaps/CereStation_nanomap_z1.png differ
diff --git a/icons/_nanomaps/DeltaStation_nanomap_z1.png b/icons/_nanomaps/DeltaStation_nanomap_z1.png
index e5208546cbb2..f8f770860793 100644
Binary files a/icons/_nanomaps/DeltaStation_nanomap_z1.png and b/icons/_nanomaps/DeltaStation_nanomap_z1.png differ
diff --git a/icons/_nanomaps/EmeraldStation_nanomap_z1.png b/icons/_nanomaps/EmeraldStation_nanomap_z1.png
index bc69d82ecdba..23390fd0f2f7 100644
Binary files a/icons/_nanomaps/EmeraldStation_nanomap_z1.png and b/icons/_nanomaps/EmeraldStation_nanomap_z1.png differ
diff --git a/icons/_nanomaps/MetaStation_nanomap_z1.png b/icons/_nanomaps/MetaStation_nanomap_z1.png
index bace9e87d755..7c19ef34fab6 100644
Binary files a/icons/_nanomaps/MetaStation_nanomap_z1.png and b/icons/_nanomaps/MetaStation_nanomap_z1.png differ
diff --git a/icons/effects/mapping_helpers.dmi b/icons/effects/mapping_helpers.dmi
index eb702d225df5..ca99e6fc18ce 100644
Binary files a/icons/effects/mapping_helpers.dmi and b/icons/effects/mapping_helpers.dmi differ
diff --git a/icons/effects/random_spawners.dmi b/icons/effects/random_spawners.dmi
index ad6f8e96837f..4cccc5ddfadf 100644
Binary files a/icons/effects/random_spawners.dmi and b/icons/effects/random_spawners.dmi differ
diff --git a/icons/effects/spawner_icons.dmi b/icons/effects/spawner_icons.dmi
index 3f8518c5e123..9ba31a537ca5 100644
Binary files a/icons/effects/spawner_icons.dmi and b/icons/effects/spawner_icons.dmi differ
diff --git a/icons/effects/tile_effects.dmi b/icons/effects/tile_effects.dmi
index 9b5e2d877dc2..4a1a04f3438d 100644
Binary files a/icons/effects/tile_effects.dmi and b/icons/effects/tile_effects.dmi differ
diff --git a/icons/mecha/mecha_mouse.dmi b/icons/mecha/mecha_mouse.dmi
index 765199388565..3518094b8439 100644
Binary files a/icons/mecha/mecha_mouse.dmi and b/icons/mecha/mecha_mouse.dmi differ
diff --git a/icons/mob/accessories.dmi b/icons/mob/accessories.dmi
new file mode 100644
index 000000000000..f769c25b7fc0
Binary files /dev/null and b/icons/mob/accessories.dmi differ
diff --git a/icons/mob/actions/actions.dmi b/icons/mob/actions/actions.dmi
index e33b6ed74bf1..7119185eb41d 100644
Binary files a/icons/mob/actions/actions.dmi and b/icons/mob/actions/actions.dmi differ
diff --git a/icons/mob/clothing/back.dmi b/icons/mob/clothing/back.dmi
index 8c855c614265..cc1bae10c47f 100644
Binary files a/icons/mob/clothing/back.dmi and b/icons/mob/clothing/back.dmi differ
diff --git a/icons/mob/clothing/ears.dmi b/icons/mob/clothing/ears.dmi
index ca9351f857b4..e039f0663f6d 100644
Binary files a/icons/mob/clothing/ears.dmi and b/icons/mob/clothing/ears.dmi differ
diff --git a/icons/mob/clothing/eyes.dmi b/icons/mob/clothing/eyes.dmi
index 15765964a0d2..728ea3f4a8bb 100644
Binary files a/icons/mob/clothing/eyes.dmi and b/icons/mob/clothing/eyes.dmi differ
diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi
index 866d32557e33..5fbb0f01023c 100644
Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ
diff --git a/icons/mob/clothing/head/beret.dmi b/icons/mob/clothing/head/beret.dmi
index bc5b8facb798..5b1df173b2a7 100644
Binary files a/icons/mob/clothing/head/beret.dmi and b/icons/mob/clothing/head/beret.dmi differ
diff --git a/icons/mob/clothing/masking_helpers.dmi b/icons/mob/clothing/masking_helpers.dmi
index 1407653d4f7b..ff8216e116f0 100644
Binary files a/icons/mob/clothing/masking_helpers.dmi and b/icons/mob/clothing/masking_helpers.dmi differ
diff --git a/icons/mob/clothing/neck.dmi b/icons/mob/clothing/neck.dmi
index 0cfe1952e5a3..c1527a6e638e 100644
Binary files a/icons/mob/clothing/neck.dmi and b/icons/mob/clothing/neck.dmi differ
diff --git a/icons/mob/clothing/species/drask/head/beret.dmi b/icons/mob/clothing/species/drask/head/beret.dmi
index 7254e00ca5b6..30e60a411f83 100644
Binary files a/icons/mob/clothing/species/drask/head/beret.dmi and b/icons/mob/clothing/species/drask/head/beret.dmi differ
diff --git a/icons/mob/clothing/species/drask/suit.dmi b/icons/mob/clothing/species/drask/suit.dmi
index 764bb78c135f..1ec8cc17a93f 100644
Binary files a/icons/mob/clothing/species/drask/suit.dmi and b/icons/mob/clothing/species/drask/suit.dmi differ
diff --git a/icons/mob/clothing/species/drask/under/procedure.dmi b/icons/mob/clothing/species/drask/under/procedure.dmi
index 916ecd9f68c2..dd7a0080a454 100644
Binary files a/icons/mob/clothing/species/drask/under/procedure.dmi and b/icons/mob/clothing/species/drask/under/procedure.dmi differ
diff --git a/icons/mob/clothing/species/grey/back.dmi b/icons/mob/clothing/species/grey/back.dmi
index e8a8ea198353..8e074d22774e 100644
Binary files a/icons/mob/clothing/species/grey/back.dmi and b/icons/mob/clothing/species/grey/back.dmi differ
diff --git a/icons/mob/clothing/species/grey/suit.dmi b/icons/mob/clothing/species/grey/suit.dmi
index 416f42df899b..eedd850ff7d5 100644
Binary files a/icons/mob/clothing/species/grey/suit.dmi and b/icons/mob/clothing/species/grey/suit.dmi differ
diff --git a/icons/mob/clothing/species/grey/under/procedure.dmi b/icons/mob/clothing/species/grey/under/procedure.dmi
index 94850a5ae561..1fab9081bad3 100644
Binary files a/icons/mob/clothing/species/grey/under/procedure.dmi and b/icons/mob/clothing/species/grey/under/procedure.dmi differ
diff --git a/icons/mob/clothing/species/grey/underwear.dmi b/icons/mob/clothing/species/grey/underwear.dmi
index 372137a3c69c..ecc988ec8f8f 100644
Binary files a/icons/mob/clothing/species/grey/underwear.dmi and b/icons/mob/clothing/species/grey/underwear.dmi differ
diff --git a/icons/mob/clothing/species/kidan/head/beret.dmi b/icons/mob/clothing/species/kidan/head/beret.dmi
new file mode 100644
index 000000000000..9cb03bfe1608
Binary files /dev/null and b/icons/mob/clothing/species/kidan/head/beret.dmi differ
diff --git a/icons/mob/clothing/species/kidan/head/softcap.dmi b/icons/mob/clothing/species/kidan/head/softcap.dmi
new file mode 100644
index 000000000000..5a2c29f66b96
Binary files /dev/null and b/icons/mob/clothing/species/kidan/head/softcap.dmi differ
diff --git a/icons/mob/clothing/species/kidan/suit.dmi b/icons/mob/clothing/species/kidan/suit.dmi
index da7fb0c82a7d..883012947395 100644
Binary files a/icons/mob/clothing/species/kidan/suit.dmi and b/icons/mob/clothing/species/kidan/suit.dmi differ
diff --git a/icons/mob/clothing/species/kidan/suits/utility.dmi b/icons/mob/clothing/species/kidan/suits/utility.dmi
index a3b278bae094..5f0993d1c7f8 100644
Binary files a/icons/mob/clothing/species/kidan/suits/utility.dmi and b/icons/mob/clothing/species/kidan/suits/utility.dmi differ
diff --git a/icons/mob/clothing/species/kidan/under/centcom.dmi b/icons/mob/clothing/species/kidan/under/centcom.dmi
index 405f30624061..08dd0d2b33a7 100644
Binary files a/icons/mob/clothing/species/kidan/under/centcom.dmi and b/icons/mob/clothing/species/kidan/under/centcom.dmi differ
diff --git a/icons/mob/clothing/species/kidan/under/procedure.dmi b/icons/mob/clothing/species/kidan/under/procedure.dmi
index 1007af530f0b..49e9f892e52d 100644
Binary files a/icons/mob/clothing/species/kidan/under/procedure.dmi and b/icons/mob/clothing/species/kidan/under/procedure.dmi differ
diff --git a/icons/mob/clothing/species/kidan/under/suit.dmi b/icons/mob/clothing/species/kidan/under/suit.dmi
index 8dc146c45489..c648a85e9177 100644
Binary files a/icons/mob/clothing/species/kidan/under/suit.dmi and b/icons/mob/clothing/species/kidan/under/suit.dmi differ
diff --git a/icons/mob/clothing/species/kidan/underwear.dmi b/icons/mob/clothing/species/kidan/underwear.dmi
index 89b9c68c3749..5e63fa646c09 100644
Binary files a/icons/mob/clothing/species/kidan/underwear.dmi and b/icons/mob/clothing/species/kidan/underwear.dmi differ
diff --git a/icons/mob/clothing/species/plasmaman/helmet.dmi b/icons/mob/clothing/species/plasmaman/helmet.dmi
index 04feebb6aa9b..64b5361aa4ca 100644
Binary files a/icons/mob/clothing/species/plasmaman/helmet.dmi and b/icons/mob/clothing/species/plasmaman/helmet.dmi differ
diff --git a/icons/mob/clothing/species/plasmaman/uniform.dmi b/icons/mob/clothing/species/plasmaman/uniform.dmi
index bf1e7080881c..23eb37b89d2f 100644
Binary files a/icons/mob/clothing/species/plasmaman/uniform.dmi and b/icons/mob/clothing/species/plasmaman/uniform.dmi differ
diff --git a/icons/mob/clothing/species/vox/back.dmi b/icons/mob/clothing/species/vox/back.dmi
index 60cf1f0989e9..e1e1b6cd985b 100644
Binary files a/icons/mob/clothing/species/vox/back.dmi and b/icons/mob/clothing/species/vox/back.dmi differ
diff --git a/icons/mob/clothing/species/vox/head.dmi b/icons/mob/clothing/species/vox/head.dmi
index f98d218d01a0..d375080b891f 100644
Binary files a/icons/mob/clothing/species/vox/head.dmi and b/icons/mob/clothing/species/vox/head.dmi differ
diff --git a/icons/mob/clothing/species/vox/head/beret.dmi b/icons/mob/clothing/species/vox/head/beret.dmi
index 827f085bf540..1a3d4308f5d2 100644
Binary files a/icons/mob/clothing/species/vox/head/beret.dmi and b/icons/mob/clothing/species/vox/head/beret.dmi differ
diff --git a/icons/mob/clothing/species/vox/neck.dmi b/icons/mob/clothing/species/vox/neck.dmi
new file mode 100644
index 000000000000..e49ab4e91f66
Binary files /dev/null and b/icons/mob/clothing/species/vox/neck.dmi differ
diff --git a/icons/mob/clothing/species/vox/suit.dmi b/icons/mob/clothing/species/vox/suit.dmi
index 9d1758b908e0..7276a815d9cb 100644
Binary files a/icons/mob/clothing/species/vox/suit.dmi and b/icons/mob/clothing/species/vox/suit.dmi differ
diff --git a/icons/mob/clothing/species/vox/under/procedure.dmi b/icons/mob/clothing/species/vox/under/procedure.dmi
index e06e6c2b2bcb..a83061dcf9cc 100644
Binary files a/icons/mob/clothing/species/vox/under/procedure.dmi and b/icons/mob/clothing/species/vox/under/procedure.dmi differ
diff --git a/icons/mob/clothing/species/vox/under/suit.dmi b/icons/mob/clothing/species/vox/under/suit.dmi
index 7021585a4aec..44ed7d6794e3 100644
Binary files a/icons/mob/clothing/species/vox/under/suit.dmi and b/icons/mob/clothing/species/vox/under/suit.dmi differ
diff --git a/icons/mob/clothing/species/vox/underwear.dmi b/icons/mob/clothing/species/vox/underwear.dmi
index 72da557c997c..7691af9db0f1 100644
Binary files a/icons/mob/clothing/species/vox/underwear.dmi and b/icons/mob/clothing/species/vox/underwear.dmi differ
diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi
index dbaa6740db3a..6fcc795c6b3a 100644
Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ
diff --git a/icons/mob/clothing/under/procedure.dmi b/icons/mob/clothing/under/procedure.dmi
index 9b781e24ba38..329b28a15375 100644
Binary files a/icons/mob/clothing/under/procedure.dmi and b/icons/mob/clothing/under/procedure.dmi differ
diff --git a/icons/mob/clothing/underwear.dmi b/icons/mob/clothing/underwear.dmi
index e16e5bb4d5f7..d6d1ba380d2b 100644
Binary files a/icons/mob/clothing/underwear.dmi and b/icons/mob/clothing/underwear.dmi differ
diff --git a/icons/mob/genetics.dmi b/icons/mob/genetics.dmi
new file mode 100644
index 000000000000..cb5a3df029c9
Binary files /dev/null and b/icons/mob/genetics.dmi differ
diff --git a/icons/mob/hud/sechud.dmi b/icons/mob/hud/sechud.dmi
index 20f7cdf6495e..18e336332ef7 100644
Binary files a/icons/mob/hud/sechud.dmi and b/icons/mob/hud/sechud.dmi differ
diff --git a/icons/mob/inhands/clothing_lefthand.dmi b/icons/mob/inhands/clothing_lefthand.dmi
index 4b1908d93761..6c753baefcfd 100644
Binary files a/icons/mob/inhands/clothing_lefthand.dmi and b/icons/mob/inhands/clothing_lefthand.dmi differ
diff --git a/icons/mob/inhands/clothing_righthand.dmi b/icons/mob/inhands/clothing_righthand.dmi
index 1d228c3e05bd..6ddf8bf55d85 100644
Binary files a/icons/mob/inhands/clothing_righthand.dmi and b/icons/mob/inhands/clothing_righthand.dmi differ
diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi
index b69382632e6c..81322117b123 100644
Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ
diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi
index 39878c80842a..5d19aed57507 100644
Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ
diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi
index 5591755e0190..a18666708200 100644
Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ
diff --git a/icons/mob/ties.dmi b/icons/mob/ties.dmi
deleted file mode 100644
index 6b10d61b77e9..000000000000
Binary files a/icons/mob/ties.dmi and /dev/null differ
diff --git a/icons/obj/card.dmi b/icons/obj/card.dmi
index afadfaa14da0..f89f5d783bfd 100644
Binary files a/icons/obj/card.dmi and b/icons/obj/card.dmi differ
diff --git a/icons/obj/clothing/accessories.dmi b/icons/obj/clothing/accessories.dmi
new file mode 100644
index 000000000000..ac7094fea86e
Binary files /dev/null and b/icons/obj/clothing/accessories.dmi differ
diff --git a/icons/obj/clothing/accessories_overlay.dmi b/icons/obj/clothing/accessories_overlay.dmi
new file mode 100644
index 000000000000..f667b8dc04e9
Binary files /dev/null and b/icons/obj/clothing/accessories_overlay.dmi differ
diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi
index b4775ad0f4d0..ca7685c79d43 100644
Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ
diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi
index 255c1d7f9340..020c2e847166 100644
Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ
diff --git a/icons/obj/clothing/head/beret.dmi b/icons/obj/clothing/head/beret.dmi
index fae5d85c0e95..075c5f6f2fa0 100644
Binary files a/icons/obj/clothing/head/beret.dmi and b/icons/obj/clothing/head/beret.dmi differ
diff --git a/icons/obj/clothing/neck.dmi b/icons/obj/clothing/neck.dmi
index c06d4875bcfd..dc6419550b82 100644
Binary files a/icons/obj/clothing/neck.dmi and b/icons/obj/clothing/neck.dmi differ
diff --git a/icons/obj/clothing/species/plasmaman/hats.dmi b/icons/obj/clothing/species/plasmaman/hats.dmi
index f216a84f05a6..27aba871aa9d 100644
Binary files a/icons/obj/clothing/species/plasmaman/hats.dmi and b/icons/obj/clothing/species/plasmaman/hats.dmi differ
diff --git a/icons/obj/clothing/species/plasmaman/uniform.dmi b/icons/obj/clothing/species/plasmaman/uniform.dmi
index 3486bd07b43d..bddb3b810563 100644
Binary files a/icons/obj/clothing/species/plasmaman/uniform.dmi and b/icons/obj/clothing/species/plasmaman/uniform.dmi differ
diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi
index b866b44ad753..d61e20a90f10 100644
Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ
diff --git a/icons/obj/clothing/ties.dmi b/icons/obj/clothing/ties.dmi
deleted file mode 100644
index b840b321a59d..000000000000
Binary files a/icons/obj/clothing/ties.dmi and /dev/null differ
diff --git a/icons/obj/clothing/ties_overlay.dmi b/icons/obj/clothing/ties_overlay.dmi
deleted file mode 100644
index fe3433bdbb06..000000000000
Binary files a/icons/obj/clothing/ties_overlay.dmi and /dev/null differ
diff --git a/icons/obj/clothing/under/procedure.dmi b/icons/obj/clothing/under/procedure.dmi
index 5a04123668d4..cc5e677c64ac 100644
Binary files a/icons/obj/clothing/under/procedure.dmi and b/icons/obj/clothing/under/procedure.dmi differ
diff --git a/icons/obj/contraband.dmi b/icons/obj/contraband.dmi
index b88a147b4674..d31f87e96ebd 100644
Binary files a/icons/obj/contraband.dmi and b/icons/obj/contraband.dmi differ
diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi
index 9d78a9877d0b..c72150b5abc7 100644
Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ
diff --git a/icons/obj/flag.dmi b/icons/obj/flag.dmi
index fc10ab104d00..ac37ee5bd377 100644
Binary files a/icons/obj/flag.dmi and b/icons/obj/flag.dmi differ
diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi
index bb0271c71353..6621c3da0e9f 100644
Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ
diff --git a/icons/obj/telescience.dmi b/icons/obj/telescience.dmi
index 36daadc9f18c..54f9a03812dd 100644
Binary files a/icons/obj/telescience.dmi and b/icons/obj/telescience.dmi differ
diff --git a/icons/obj/toy.dmi b/icons/obj/toy.dmi
index 61edc4f91069..19d97b69b54e 100644
Binary files a/icons/obj/toy.dmi and b/icons/obj/toy.dmi differ
diff --git a/icons/obj/vending.dmi b/icons/obj/vending.dmi
index 0f9f31c90031..174a89c25e18 100755
Binary files a/icons/obj/vending.dmi and b/icons/obj/vending.dmi differ
diff --git a/icons/obj/weapons/magical_weapons.dmi b/icons/obj/weapons/magical_weapons.dmi
index f8be67a8c08c..154cd8790155 100644
Binary files a/icons/obj/weapons/magical_weapons.dmi and b/icons/obj/weapons/magical_weapons.dmi differ
diff --git a/icons/turf/areas.dmi b/icons/turf/areas.dmi
index 371e919052e4..d27c76b49de6 100755
Binary files a/icons/turf/areas.dmi and b/icons/turf/areas.dmi differ
diff --git a/mkdocs.yml b/mkdocs.yml
index 8d2160d6a3d9..aefc3c8ada41 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -98,4 +98,5 @@ nav:
- 'Advanced Bitflags': './references/adv_bitflags.md'
- 'Using Feedback Data': './references/feedback_data.md'
- 'Tick Order': './references/tick_order.md'
+ - 'Movement Signals': './references/movement_signals.md'
- 'Attack Chain': './references/attack_chain.md'
diff --git a/paradise.dme b/paradise.dme
index 339673e3c33b..111f44183ed9 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -83,6 +83,7 @@
#include "code\__DEFINES\lighting_defines.dm"
#include "code\__DEFINES\logs.dm"
#include "code\__DEFINES\machines.dm"
+#include "code\__DEFINES\magic_defines.dm"
#include "code\__DEFINES\mappers.dm"
#include "code\__DEFINES\martial_arts.dm"
#include "code\__DEFINES\MC.dm"
@@ -94,6 +95,7 @@
#include "code\__DEFINES\mob_defines.dm"
#include "code\__DEFINES\mod.dm"
#include "code\__DEFINES\move_force.dm"
+#include "code\__DEFINES\movement_info.dm"
#include "code\__DEFINES\muzzle_flash.dm"
#include "code\__DEFINES\newscaster_defines.dm"
#include "code\__DEFINES\particle_defines.dm"
@@ -108,8 +110,8 @@
#include "code\__DEFINES\radio_defines.dm"
#include "code\__DEFINES\reagents_defines.dm"
#include "code\__DEFINES\regex.dm"
-#include "code\__DEFINES\revolution_defines.dm"
#include "code\__DEFINES\resonator_defines.dm"
+#include "code\__DEFINES\revolution_defines.dm"
#include "code\__DEFINES\role_preferences.dm"
#include "code\__DEFINES\rolebans.dm"
#include "code\__DEFINES\rust.dm"
@@ -163,6 +165,7 @@
#include "code\__HELPERS\_string_lists.dm"
#include "code\__HELPERS\AnimationLibrary.dm"
#include "code\__HELPERS\api.dm"
+#include "code\__HELPERS\atom_helpers.dm"
#include "code\__HELPERS\bitflag_lists.dm"
#include "code\__HELPERS\cmp.dm"
#include "code\__HELPERS\colour_helpers.dm"
@@ -379,6 +382,7 @@
#include "code\datums\beam.dm"
#include "code\datums\browser.dm"
#include "code\datums\callback.dm"
+#include "code\datums\card_deck_table_tracker.dm"
#include "code\datums\chat_payload.dm"
#include "code\datums\chatmessage.dm"
#include "code\datums\click_intercept.dm"
@@ -425,11 +429,15 @@
#include "code\datums\cache\crew.dm"
#include "code\datums\cache\powermonitor.dm"
#include "code\datums\components\_component.dm"
+#include "code\datums\components\anti_magic.dm"
#include "code\datums\components\boomerang.dm"
#include "code\datums\components\boss_music.dm"
#include "code\datums\components\caltrop.dm"
#include "code\datums\components\codeword_hearing.dm"
+#include "code\datums\components\connect_containers.dm"
+#include "code\datums\components\connect_loc_behalf.dm"
#include "code\datums\components\connect_mob_behalf.dm"
+#include "code\datums\components\connect_range.dm"
#include "code\datums\components\corpse_description.dm"
#include "code\datums\components\cult_held_body.dm"
#include "code\datums\components\deadchat_control.dm"
@@ -448,7 +456,6 @@
#include "code\datums\components\paintable.dm"
#include "code\datums\components\parry.dm"
#include "code\datums\components\persistent_overlay.dm"
-#include "code\datums\components\proximity_monitor.dm"
#include "code\datums\components\radioactive.dm"
#include "code\datums\components\scope.dm"
#include "code\datums\components\shelved.dm"
@@ -529,6 +536,7 @@
#include "code\datums\elements\atmos_requirements.dm"
#include "code\datums\elements\body_temperature.dm"
#include "code\datums\elements\bombable_turf.dm"
+#include "code\datums\elements\connect_loc.dm"
#include "code\datums\elements\decal_element.dm"
#include "code\datums\elements\earhealing.dm"
#include "code\datums\elements\high_value_item.dm"
@@ -566,6 +574,9 @@
#include "code\datums\outfits\outfit_debug.dm"
#include "code\datums\outfits\plasmamen_outfits.dm"
#include "code\datums\outfits\vv_outfit.dm"
+#include "code\datums\proximity\advanced_proximity_monitor.dm"
+#include "code\datums\proximity\proximity_monitor.dm"
+#include "code\datums\proximity\singulo_proximity_monitor.dm"
#include "code\datums\ruins\lavaland.dm"
#include "code\datums\ruins\ruin_placer.dm"
#include "code\datums\ruins\space_ruins.dm"
@@ -711,6 +722,7 @@
#include "code\game\area\ss13_areas\legal_areas.dm"
#include "code\game\area\ss13_areas\maintenance_areas.dm"
#include "code\game\area\ss13_areas\medical_areas.dm"
+#include "code\game\area\ss13_areas\procedure_areas.dm"
#include "code\game\area\ss13_areas\public_areas.dm"
#include "code\game\area\ss13_areas\science_areas.dm"
#include "code\game\area\ss13_areas\security_areas.dm"
@@ -920,8 +932,8 @@
#include "code\game\machinery\computer\prisoner.dm"
#include "code\game\machinery\computer\robot_control.dm"
#include "code\game\machinery\computer\security_records.dm"
-#include "code\game\machinery\computer\sm_monitor.dm"
#include "code\game\machinery\computer\singulo_monitor.dm"
+#include "code\game\machinery\computer\sm_monitor.dm"
#include "code\game\machinery\computer\station_alert.dm"
#include "code\game\machinery\computer\arcade_games\recruiter.dm"
#include "code\game\machinery\doors\airlock.dm"
@@ -933,7 +945,6 @@
#include "code\game\machinery\doors\firedoor.dm"
#include "code\game\machinery\doors\poddoor.dm"
#include "code\game\machinery\doors\shutters.dm"
-#include "code\game\machinery\doors\unpowered.dm"
#include "code\game\machinery\doors\windowdoor.dm"
#include "code\game\machinery\pipe\pipe_construction.dm"
#include "code\game\machinery\tcomms\nttc.dm"
@@ -1049,6 +1060,7 @@
#include "code\game\objects\effects\spawners\random\misc_spawners.dm"
#include "code\game\objects\effects\spawners\random\plushie_spawners.dm"
#include "code\game\objects\effects\spawners\random\random_spawner.dm"
+#include "code\game\objects\effects\spawners\random\toy_spawners.dm"
#include "code\game\objects\effects\spawners\random\trash_spawners.dm"
#include "code\game\objects\effects\spawners\random\pool\pool_spawner.dm"
#include "code\game\objects\effects\spawners\random\pool\spawn_pool.dm"
@@ -1299,7 +1311,6 @@
#include "code\game\objects\items\weapons\tanks\tank_types.dm"
#include "code\game\objects\items\weapons\tanks\tanks.dm"
#include "code\game\objects\items\weapons\tanks\watertank.dm"
-#include "code\game\objects\random\random.dm"
#include "code\game\objects\structures\aliens.dm"
#include "code\game\objects\structures\barsign.dm"
#include "code\game\objects\structures\bedsheet_bin.dm"
@@ -1337,6 +1348,7 @@
#include "code\game\objects\structures\nest.dm"
#include "code\game\objects\structures\noticeboard.dm"
#include "code\game\objects\structures\plasma_geyser.dm"
+#include "code\game\objects\structures\plasmafire_generator.dm"
#include "code\game\objects\structures\plasticflaps.dm"
#include "code\game\objects\structures\pondering_orb.dm"
#include "code\game\objects\structures\railings.dm"
@@ -1539,6 +1551,7 @@
#include "code\modules\antagonists\changeling\powers\transform.dm"
#include "code\modules\antagonists\cult\datum_cultist.dm"
#include "code\modules\antagonists\cult\team_cult.dm"
+#include "code\modules\antagonists\event\datum_eventmisc.dm"
#include "code\modules\antagonists\mind_flayer\flayer_datum.dm"
#include "code\modules\antagonists\mind_flayer\flayer_power.dm"
#include "code\modules\antagonists\mind_flayer\mindflayer_gamemode.dm"
@@ -1740,6 +1753,7 @@
#include "code\modules\client\preference\loadout\loadout_glasses.dm"
#include "code\modules\client\preference\loadout\loadout_gloves.dm"
#include "code\modules\client\preference\loadout\loadout_hat.dm"
+#include "code\modules\client\preference\loadout\loadout_neck.dm"
#include "code\modules\client\preference\loadout\loadout_racial.dm"
#include "code\modules\client\preference\loadout\loadout_shoes.dm"
#include "code\modules\client\preference\loadout\loadout_suit.dm"
@@ -1772,6 +1786,9 @@
#include "code\modules\clothing\masks\misc_masks.dm"
#include "code\modules\clothing\masks\voicemodulator.dm"
#include "code\modules\clothing\neck\cloaks.dm"
+#include "code\modules\clothing\neck\neck.dm"
+#include "code\modules\clothing\neck\necklace.dm"
+#include "code\modules\clothing\neck\scarfs.dm"
#include "code\modules\clothing\patreon\hats.dm"
#include "code\modules\clothing\patreon\patreon_glasses.dm"
#include "code\modules\clothing\shoes\colour.dm"
@@ -2991,7 +3008,6 @@
#include "code\modules\tgui_input\say_modal\tgui_say_speech.dm"
#include "code\modules\tgui_input\say_modal\tgui_say_typing.dm"
#include "code\modules\tooltip\tooltip.dm"
-#include "code\modules\unit_tests\_unit_tests.dm"
#include "code\modules\vehicle\ambulance.dm"
#include "code\modules\vehicle\atv.dm"
#include "code\modules\vehicle\bicycle.dm"
@@ -3019,6 +3035,7 @@
#include "code\modules\world_topic\pr_announce_topic.dm"
#include "code\modules\world_topic\queue_status.dm"
#include "code\modules\world_topic\status.dm"
+#include "code\tests\game_tests.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
// END_INCLUDE
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index a3c486a8d949..ffbbc755efac 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -36,6 +36,21 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "android-tzdata"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
+
+[[package]]
+name = "android_system_properties"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
+dependencies = [
+ "libc",
+]
+
[[package]]
name = "atomic_float"
version = "1.0.0"
@@ -78,16 +93,14 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
[[package]]
name = "bindgen"
-version = "0.69.4"
+version = "0.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
+checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f"
dependencies = [
"bitflags 2.5.0",
"cexpr",
"clang-sys",
- "itertools 0.12.1",
- "lazy_static",
- "lazycell",
+ "itertools",
"log",
"prettyplease",
"proc-macro2",
@@ -96,7 +109,6 @@ dependencies = [
"rustc-hash",
"shlex",
"syn 2.0.60",
- "which",
]
[[package]]
@@ -129,22 +141,20 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byondapi"
-version = "0.4.7"
-source = "git+https://github.com/spacestation13/byondapi-rs.git#aa4addd95c33b66652b3e35e7401a0ad82aa028e"
+version = "0.4.11"
+source = "git+https://github.com/spacestation13/byondapi-rs.git#c3b15e8574eca87865c640616029e6ea72da4cd1"
dependencies = [
"byondapi-macros",
"byondapi-sys",
"inventory",
- "lazy_static",
"libloading",
"num_enum",
- "walkdir",
]
[[package]]
name = "byondapi-macros"
-version = "0.1.2"
-source = "git+https://github.com/spacestation13/byondapi-rs.git#aa4addd95c33b66652b3e35e7401a0ad82aa028e"
+version = "0.1.3"
+source = "git+https://github.com/spacestation13/byondapi-rs.git#c3b15e8574eca87865c640616029e6ea72da4cd1"
dependencies = [
"proc-macro2",
"quote",
@@ -153,14 +163,12 @@ dependencies = [
[[package]]
name = "byondapi-sys"
-version = "0.11.1"
-source = "git+https://github.com/spacestation13/byondapi-rs.git#aa4addd95c33b66652b3e35e7401a0ad82aa028e"
+version = "0.11.2"
+source = "git+https://github.com/spacestation13/byondapi-rs.git#c3b15e8574eca87865c640616029e6ea72da4cd1"
dependencies = [
"bindgen",
"doxygen-rs",
"libloading",
- "rustc_version",
- "walkdir",
]
[[package]]
@@ -189,6 +197,15 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
+[[package]]
+name = "cc"
+version = "1.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333"
+dependencies = [
+ "shlex",
+]
+
[[package]]
name = "cexpr"
version = "0.6.0"
@@ -204,6 +221,20 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "chrono"
+version = "0.4.39"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
+dependencies = [
+ "android-tzdata",
+ "iana-time-zone",
+ "js-sys",
+ "num-traits",
+ "wasm-bindgen",
+ "windows-targets",
+]
+
[[package]]
name = "clang-sys"
version = "1.7.0"
@@ -227,6 +258,12 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52fdfaf2bee6357023bf7f95b15a8ef0b82759d2bce705cc45efcae9ae10f0ff"
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
[[package]]
name = "crc32fast"
version = "1.4.2"
@@ -325,16 +362,6 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
-[[package]]
-name = "errno"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245"
-dependencies = [
- "libc",
- "windows-sys",
-]
-
[[package]]
name = "eyre"
version = "0.6.12"
@@ -345,6 +372,15 @@ dependencies = [
"once_cell",
]
+[[package]]
+name = "fdeflate"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"
+dependencies = [
+ "simd-adler32",
+]
+
[[package]]
name = "flate2"
version = "1.0.33"
@@ -411,12 +447,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
[[package]]
-name = "home"
-version = "0.5.9"
+name = "iana-time-zone"
+version = "0.1.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
+checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
dependencies = [
- "windows-sys",
+ "android_system_properties",
+ "core-foundation-sys",
+ "iana-time-zone-haiku",
+ "js-sys",
+ "wasm-bindgen",
+ "windows-core",
+]
+
+[[package]]
+name = "iana-time-zone-haiku"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
+dependencies = [
+ "cc",
]
[[package]]
@@ -480,15 +530,6 @@ dependencies = [
"either",
]
-[[package]]
-name = "itertools"
-version = "0.12.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
-dependencies = [
- "either",
-]
-
[[package]]
name = "itoa"
version = "1.0.11"
@@ -496,16 +537,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
-name = "lazy_static"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
-
-[[package]]
-name = "lazycell"
-version = "1.3.0"
+name = "js-sys"
+version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
+checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
+dependencies = [
+ "once_cell",
+ "wasm-bindgen",
+]
[[package]]
name = "libc"
@@ -515,20 +554,14 @@ checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346"
[[package]]
name = "libloading"
-version = "0.8.3"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19"
+checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
dependencies = [
"cfg-if",
"windows-targets",
]
-[[package]]
-name = "linux-raw-sys"
-version = "0.4.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
-
[[package]]
name = "lodepng"
version = "3.10.7"
@@ -576,6 +609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
dependencies = [
"adler2",
+ "simd-adler32",
]
[[package]]
@@ -630,18 +664,18 @@ dependencies = [
[[package]]
name = "num_enum"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845"
+checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
dependencies = [
"num_enum_derive",
]
[[package]]
name = "num_enum_derive"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b"
+checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -706,6 +740,19 @@ dependencies = [
"siphasher",
]
+[[package]]
+name = "png"
+version = "0.17.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"
+dependencies = [
+ "bitflags 1.3.2",
+ "crc32fast",
+ "fdeflate",
+ "flate2",
+ "miniz_oxide",
+]
+
[[package]]
name = "ppv-lite86"
version = "0.2.17"
@@ -887,40 +934,20 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
-[[package]]
-name = "rustc_version"
-version = "0.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
-dependencies = [
- "semver",
-]
-
-[[package]]
-name = "rustix"
-version = "0.38.34"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
-dependencies = [
- "bitflags 2.5.0",
- "errno",
- "libc",
- "linux-raw-sys",
- "windows-sys",
-]
-
[[package]]
name = "rustlibs"
-version = "1.0.0"
+version = "2.0.0"
dependencies = [
"atomic_float",
"bitflags 2.5.0",
"byondapi",
+ "chrono",
"diff",
"dmm-tools",
"eyre",
"fxhash",
- "itertools 0.10.5",
+ "itertools",
+ "png",
"rand",
"regex",
"scc",
@@ -966,12 +993,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b84345e4c9bd703274a082fb80caaa99b7612be48dfaa1dd9266577ec412309d"
-[[package]]
-name = "semver"
-version = "1.0.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
-
[[package]]
name = "serde"
version = "1.0.210"
@@ -1010,6 +1031,12 @@ version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "simd-adler32"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
+
[[package]]
name = "siphasher"
version = "0.3.11"
@@ -1122,17 +1149,59 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
-name = "which"
-version = "4.4.2"
+name = "wasm-bindgen"
+version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
+checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
dependencies = [
- "either",
- "home",
+ "cfg-if",
"once_cell",
- "rustix",
+ "wasm-bindgen-macro",
]
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
+dependencies = [
+ "bumpalo",
+ "log",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.60",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.60",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
+
[[package]]
name = "winapi"
version = "0.3.9"
@@ -1164,6 +1233,15 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+[[package]]
+name = "windows-core"
+version = "0.52.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
+dependencies = [
+ "windows-targets",
+]
+
[[package]]
name = "windows-sys"
version = "0.52.0"
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 06e948f3bec0..77be2902dbb9 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "rustlibs"
-version = "1.0.0"
+version = "2.0.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -33,3 +33,5 @@ serde_json = { version = "1.0" }
walkdir = "2.5.0"
# regex
regex = "1.10.5"
+png = "0.17.16"
+chrono = "0.4.39"
diff --git a/rust/src/logging/mod.rs b/rust/src/logging/mod.rs
index fc5312ae5941..97d524f8773c 100644
--- a/rust/src/logging/mod.rs
+++ b/rust/src/logging/mod.rs
@@ -1,16 +1,14 @@
+use byondapi::global_call::call_global;
+use byondapi::prelude::ByondValue;
+use byondapi::threadsync::thread_sync;
+use chrono::prelude::Utc;
+use eyre;
+
/// Call stack trace dm method with message.
-pub(crate) fn dm_call_stack_trace(msg: String) {
- let msg = byondapi::value::ByondValue::try_from(msg).unwrap();
- // this is really ugly, cause we want to get id/ref to a proc name string
- // that is already allocated, and don't want to allocate a new string entirely
- byondapi::global_call::call_global_id(
- {
- static STRING_ID: std::sync::OnceLock = std::sync::OnceLock::new();
- *STRING_ID.get_or_init(|| byondapi::byond_string::str_id_of("_stack_trace").unwrap())
- },
- &[msg],
- )
- .unwrap();
+pub(crate) fn dm_call_stack_trace(msg: String) -> eyre::Result<()> {
+ call_global("stack_trace", &[ByondValue::new_str(msg)?])?;
+
+ Ok(())
}
/// Panic handler, called on unhandled errors.
@@ -18,7 +16,17 @@ pub(crate) fn dm_call_stack_trace(msg: String) {
pub(crate) fn setup_panic_handler() {
std::panic::set_hook(Box::new(|info| {
let msg = format!("Panic \n {:#?}", info);
- let _ = std::fs::write("./rustlibs_panic.txt", msg.clone());
- dm_call_stack_trace(msg);
+ let msg_copy = msg.clone();
+ let _ = thread_sync(
+ || -> ByondValue {
+ if let Err(error) = dm_call_stack_trace(msg_copy) {
+ let second_msg = format!("BYOND error \n {:#?}", error);
+ let _ = std::fs::write(Utc::now().format("data/rustlibs_dm_trace_failed_%Y%m%d_%H%M%S.txt").to_string(), second_msg.clone());
+ }
+ Default::default()
+ },
+ true,
+ );
+ let _ = std::fs::write(Utc::now().format("data/rustlibs_panic_%Y%m%d_%H%M%S.txt").to_string(), msg.clone());
}))
}
diff --git a/rust/src/mapmanip/mod.rs b/rust/src/mapmanip/mod.rs
index 70bc79b8cf34..f9c7f25b0df7 100644
--- a/rust/src/mapmanip/mod.rs
+++ b/rust/src/mapmanip/mod.rs
@@ -170,7 +170,7 @@ fn mapmanip_submap_extract_insert(
///
#[byondapi::bind]
-fn mapmanip_read_dmm_file(path: ByondValue) {
+fn mapmanip_read_dmm_file(path: ByondValue) -> eyre::Result {
internal_mapmanip_read_dmm_file(path)
}
@@ -235,7 +235,7 @@ pub unsafe extern "C" fn read_dmm_file_ffi(
) {
Ok(val) => val,
Err(info) => {
- dm_call_stack_trace(format!("Rustlibs ERROR read_dmm_file_ffi() \n {info:#?}"));
+ let _ = dm_call_stack_trace(format!("Rustlibs ERROR read_dmm_file_ffi() \n {info:#?}"));
ByondValue::null()
}
}
diff --git a/rust/src/milla/api.rs b/rust/src/milla/api.rs
index b5393a58859a..d6fb9845d30d 100644
--- a/rust/src/milla/api.rs
+++ b/rust/src/milla/api.rs
@@ -2,6 +2,7 @@ use crate::logging;
use crate::milla::constants::*;
use crate::milla::conversion;
use crate::milla::model::*;
+use crate::milla::simulate;
use crate::milla::statics::*;
use crate::milla::tick;
use byondapi::global_call::call_global;
@@ -9,20 +10,22 @@ use byondapi::map::byond_xyz;
use byondapi::prelude::*;
use eyre::eyre;
use eyre::Result;
+use std::env;
use std::thread;
use std::time::Instant;
/// BYOND API for ensuring the buffers are usable.
#[byondapi::bind]
-fn milla_initialize(byond_z: ByondValue) {
+fn milla_initialize(byond_z: ByondValue) -> eyre::Result {
logging::setup_panic_handler();
+ env::set_var("RUST_BACKTRACE", "1");
let z = f32::try_from(byond_z)? as i32 - 1;
internal_initialize(z)?;
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// Ensure that buffers are available.
-pub(crate) fn internal_initialize(z: i32) -> Result<(), eyre::Error> {
+pub(crate) fn internal_initialize(z: i32) -> eyre::Result {
if z >= MAX_Z_LEVELS {
return Err(eyre!(
"Suspiciously high Z level {} initialized, update MAX_Z_LEVELS if this is intentional.",
@@ -31,7 +34,7 @@ pub(crate) fn internal_initialize(z: i32) -> Result<(), eyre::Error> {
}
let buffers = BUFFERS.get_or_init(Buffers::new);
buffers.init_to(z);
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// BYOND API for defining an environment that a tile can be exposed to.
@@ -44,7 +47,7 @@ fn milla_create_environment(
sleeping_agent: ByondValue,
agent_b: ByondValue,
temperature: ByondValue,
-) {
+) -> eyre::Result {
logging::setup_panic_handler();
Ok(ByondValue::from(internal_create_environment(
conversion::byond_to_option_f32(oxygen)?,
@@ -112,7 +115,9 @@ fn milla_set_tile(
agent_b: ByondValue,
temperature: ByondValue,
_innate_heat_capacity: ByondValue,
-) {
+ hotspot_temperature: ByondValue,
+ hotspot_volume: ByondValue,
+) -> eyre::Result {
logging::setup_panic_handler();
let (x, y, z) = byond_xyz(&turf)?.coordinates();
internal_set_tile(
@@ -136,8 +141,10 @@ fn milla_set_tile(
// Temporarily disabled to better match the existing system.
//bounded_byond_to_option_f32(innate_heat_capacity, 0.0, f32::INFINITY)?,
Some(0.0),
+ conversion::bounded_byond_to_option_f32(hotspot_temperature, 0.0, f32::INFINITY)?,
+ conversion::bounded_byond_to_option_f32(hotspot_volume, 0.0, 1.0)?,
)?;
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// BYOND API for setting the directions a tile is airtight in.
@@ -149,7 +156,7 @@ fn milla_set_tile_airtight(
airtight_east: ByondValue,
airtight_south: ByondValue,
airtight_west: ByondValue,
-) {
+) -> eyre::Result {
logging::setup_panic_handler();
let (x, y, z) = byond_xyz(&turf)?.coordinates();
internal_set_tile(
@@ -171,8 +178,10 @@ fn milla_set_tile_airtight(
None,
None,
None,
+ None,
+ None,
)?;
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// Rust version of setting the atmos details of a tile.
@@ -196,6 +205,8 @@ pub(crate) fn internal_set_tile(
temperature: Option,
thermal_energy: Option,
innate_heat_capacity: Option,
+ hotspot_temperature: Option,
+ hotspot_volume: Option,
) -> Result<()> {
let buffers = BUFFERS.get().ok_or(eyre!("BUFFERS not initialized."))?;
let active = buffers.get_active().read().unwrap();
@@ -272,25 +283,45 @@ pub(crate) fn internal_set_tile(
if let Some(value) = thermal_energy {
tile.thermal_energy = value;
}
+ if let Some(value) = hotspot_temperature {
+ tile.hotspot_temperature = value;
+ }
+ if let Some(value) = hotspot_volume {
+ tile.hotspot_volume = value;
+ }
Ok(())
}
/// BYOND API for fetching the atmos details of a tile.
#[byondapi::bind]
-fn milla_get_tile(turf: ByondValue, list: ByondValue) {
+fn milla_get_tile(turf: ByondValue, list: ByondValue) -> eyre::Result {
logging::setup_panic_handler();
let (x, y, z) = byond_xyz(&turf)?.coordinates();
- let tile = internal_get_tile(x as i32 - 1, y as i32 - 1, z as i32 - 1)?;
- let vec: Vec = (&tile).into();
+ let vec: Vec;
+ if let Ok(tile) = internal_get_tile(x as i32 - 1, y as i32 - 1, z as i32 - 1) {
+ vec = (&tile).into();
+ } else {
+ // MILLA has died and is unrecoverable.
+ // Uh... uh... report everything as breathable air, I guess?
+ let mut air = Tile::new();
+ air.gases.set_oxygen(20.0);
+ air.gases.set_nitrogen(80.0);
+ air.thermal_energy = air.heat_capacity() * T20C;
+ vec = (&air).into();
+ }
list.write_list(vec.as_slice())?;
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// Rust version of fetching the atmos details of a tile.
pub(crate) fn internal_get_tile(x: i32, y: i32, z: i32) -> Result {
let buffers = BUFFERS.get().ok_or(eyre!("BUFFERS not initialized."))?;
- let active = buffers.get_active().read().unwrap();
+ let maybe_active = buffers.get_active().read();
+ if maybe_active.is_err() {
+ return Err(eyre!("MILLA buffers have been poisoned."));
+ }
+ let active = maybe_active.unwrap();
let z_level = active.0[z as usize].read().unwrap();
Ok(z_level
.get_tile(ZLevel::maybe_get_index(x, y).ok_or(eyre!(
@@ -308,7 +339,7 @@ pub(crate) fn internal_get_tile(x: i32, y: i32, z: i32) -> Result {
/// * Turfs that just passed the threshold for showing plasma or sleeping gas.
/// * Turfs with strong airflow out.
#[byondapi::bind]
-fn milla_get_interesting_tiles() {
+fn milla_get_interesting_tiles() -> eyre::Result {
logging::setup_panic_handler();
let interesting_tiles = INTERESTING_TILES.lock().unwrap();
let byond_interesting_tiles = interesting_tiles
@@ -320,7 +351,7 @@ fn milla_get_interesting_tiles() {
/// BYOND API for getting a single random interesting tile.
#[byondapi::bind]
-fn milla_get_random_interesting_tile() {
+fn milla_get_random_interesting_tile() -> eyre::Result {
logging::setup_panic_handler();
let interesting_tiles = INTERESTING_TILES.lock().unwrap();
let length = interesting_tiles.len() as f32;
@@ -342,7 +373,8 @@ fn milla_reduce_superconductivity(
east: ByondValue,
south: ByondValue,
west: ByondValue,
-) {
+) -> eyre::Result {
+ logging::setup_panic_handler();
let (x, y, z) = byond_xyz(&turf)?.coordinates();
let rust_north = conversion::bounded_byond_to_option_f32(north, 0.0, 1.0)?;
let rust_east = conversion::bounded_byond_to_option_f32(east, 0.0, 1.0)?;
@@ -357,7 +389,7 @@ fn milla_reduce_superconductivity(
rust_south,
rust_west,
)?;
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// Rust version of capping the superconductivity of a tile.
@@ -371,7 +403,7 @@ pub(crate) fn internal_reduce_superconductivity(
east: Option,
south: Option,
west: Option,
-) -> Result<(), eyre::Error> {
+) -> eyre::Result<()> {
let buffers = BUFFERS.get().ok_or(eyre!("BUFFERS not initialized."))?;
let active = buffers.get_active().read().unwrap();
let maybe_z_level = active.0[z as usize].try_write();
@@ -404,10 +436,11 @@ pub(crate) fn internal_reduce_superconductivity(
/// BYOND API for resetting the superconductivity of a tile.
#[byondapi::bind]
-fn milla_reset_superconductivity(turf: ByondValue) {
+fn milla_reset_superconductivity(turf: ByondValue) -> eyre::Result {
+ logging::setup_panic_handler();
let (x, y, z) = byond_xyz(&turf)?.coordinates();
internal_reset_superconductivity(x as i32 - 1, y as i32 - 1, z as i32 - 1)?;
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// Rust version of resetting the superconductivity of a tile.
@@ -434,27 +467,185 @@ pub(crate) fn internal_reset_superconductivity(x: i32, y: i32, z: i32) -> Result
Ok(())
}
-/// BYOND API for starting an atmos tick.
+/// BYOND API for a heat source creating a hotspot on a tile.
#[byondapi::bind]
-fn milla_spawn_tick_thread() {
+fn milla_create_hotspot(
+ turf: ByondValue,
+ temperature: ByondValue,
+ volume: ByondValue,
+) -> eyre::Result {
logging::setup_panic_handler();
+ let (x, y, z) = byond_xyz(&turf)?.coordinates();
+ let rust_temperature =
+ conversion::bounded_byond_to_option_f32(temperature, 0.0, f32::INFINITY)?
+ .ok_or(eyre!("Hotspot temperature is required.."))?;
+ let rust_volume = conversion::bounded_byond_to_option_f32(volume, 0.0, TILE_VOLUME)?
+ .ok_or(eyre!("Hotspot volume is required.."))?;
+
+ internal_create_hotspot(
+ x as i32 - 1,
+ y as i32 - 1,
+ z as i32 - 1,
+ rust_temperature,
+ rust_volume / TILE_VOLUME,
+ )?;
+ Ok(ByondValue::null())
+}
+
+/// Rust version of a heat source creating a hotspot.
+pub(crate) fn internal_create_hotspot(
+ x: i32,
+ y: i32,
+ z: i32,
+ temperature: f32,
+ volume: f32,
+) -> Result<()> {
+ let buffers = BUFFERS.get().ok_or(eyre!("BUFFERS not initialized."))?;
+ let active = buffers.get_active().read().unwrap();
+ let maybe_z_level = active.0[z as usize].try_write();
+ if maybe_z_level.is_err() {
+ return Err(eyre!(
+ "Tried to write during asynchronous, read-only atmos. Use a /datum/milla_safe/..."
+ ));
+ }
+ let mut z_level = maybe_z_level.unwrap();
+ let tile = z_level.get_tile_mut(ZLevel::maybe_get_index(x, y).ok_or(eyre!(
+ "Bad coordinates ({}, {}, {})",
+ x + 1,
+ y + 1,
+ z + 1
+ ))?);
+
+ if temperature <= tile.temperature() || volume == 0.0 {
+ return Ok(());
+ }
+
+ if tile.hotspot_volume == 0.0 {
+ tile.hotspot_temperature = temperature;
+ tile.hotspot_volume = volume;
+ return Ok(());
+ }
+
+ let excess_thermal_energy = (temperature - tile.temperature()) * tile.heat_capacity() * volume;
+ if excess_thermal_energy > 0.0 {
+ simulate::adjust_hotspot(tile, excess_thermal_energy);
+ }
+
+ Ok(())
+}
+
+/// BYOND API for tracking the pressure of all nearby tiles next tick.
+#[byondapi::bind]
+fn milla_track_pressure_tiles(
+ turf: ByondValue,
+ byond_radius: ByondValue,
+) -> eyre::Result {
+ logging::setup_panic_handler();
+ let (x, y, z) = byond_xyz(&turf)?.coordinates();
+ let radius = conversion::bounded_byond_to_option_f32(byond_radius, 0.0, MAP_SIZE as f32)?
+ .ok_or(eyre!("Invalid radius: {:#?}", byond_radius))? as i32;
+
+ internal_track_pressure_tiles(x as i32 - 1, y as i32 - 1, z as i32 - 1, radius)?;
+ Ok(ByondValue::null())
+}
+
+/// Rust version of tracking the pressure of all nearby tiles next tick.
+fn internal_track_pressure_tiles(x: i32, y: i32, z: i32, radius: i32) -> eyre::Result<()> {
+ let mut tracked_pressure_tiles = TRACKED_PRESSURE_TILES.lock().unwrap();
+ for dx in -radius..=radius {
+ if x + dx < 0 {
+ continue;
+ }
+ if x + dx >= MAP_SIZE as i32 {
+ break;
+ }
+ for dy in -radius..=radius {
+ if y + dy < 0 {
+ continue;
+ }
+ if y + dy >= MAP_SIZE as i32 {
+ break;
+ }
+ tracked_pressure_tiles.push((x + dx, y + dy, z as usize));
+ }
+ }
+
+ Ok(())
+}
+
+/// BYOND API for getting the tracked pressure tiles.
+#[byondapi::bind]
+fn milla_get_tracked_pressure_tiles() -> eyre::Result {
+ logging::setup_panic_handler();
+ let tracked_pressures = internal_get_tracked_pressure_tiles()?
+ .iter()
+ .map(|v: &f32| ByondValue::from(*v))
+ .collect::>();
+ Ok(tracked_pressures.as_slice().try_into()?)
+}
+
+/// Rust version of getting the tracked pressure tiles.
+fn internal_get_tracked_pressure_tiles() -> eyre::Result> {
+ let buffers = BUFFERS.get().ok_or(eyre!("BUFFERS not initialized."))?;
+ let inactive = buffers.get_inactive().read().unwrap();
+ let mut tracked_pressure_tiles = TRACKED_PRESSURE_TILES.lock().unwrap();
+
+ let mut tiles_by_zlevel: Vec> = Vec::new();
+ for _z in 0..inactive.0.len() {
+ tiles_by_zlevel.push(Vec::new());
+ }
+
+ for (x, y, z) in tracked_pressure_tiles.drain(..) {
+ if z < tiles_by_zlevel.len() {
+ tiles_by_zlevel[z].push((x, y));
+ }
+ }
+
+ // This is a bit gross, but the easiest way to return the coordinates and data is to cast the
+ // coordinates to f32. It feels bad in Rust, but everything is an f32 in BYOND, so it's more or
+ // less a no-op.
+ let mut tracked_pressures: Vec = Vec::new();
+ for z in 0..tiles_by_zlevel.len() {
+ let z_level = inactive.0[z as usize].read().unwrap();
+ for (x, y) in &tiles_by_zlevel[z] {
+ if let Some(index) = ZLevel::maybe_get_index(*x, *y) {
+ tracked_pressures.push(*x as f32 + 1.0);
+ tracked_pressures.push(*y as f32 + 1.0);
+ tracked_pressures.push(z as f32 + 1.0);
+ tracked_pressures.push(z_level.get_tile(index).pressure());
+ }
+ }
+ }
+
+ Ok(tracked_pressures)
+}
+
+/// BYOND API for starting an atmos tick.
+#[byondapi::bind]
+fn milla_spawn_tick_thread() -> eyre::Result {
thread::spawn(|| -> Result<(), eyre::Error> {
let now = Instant::now();
let buffers = BUFFERS.get_or_init(Buffers::new);
- tick::tick(buffers)?;
+ let result = tick::tick(buffers);
TICK_TIME.store(
now.elapsed().as_millis() as usize,
std::sync::atomic::Ordering::Relaxed,
);
- call_global("milla_tick_finished", &[])?;
+ if result.is_ok() {
+ call_global("milla_tick_finished", &[])?;
+ } else {
+ let err = format!("MILLA tick error:\n----\n{:#?}\n----", result);
+ call_global("milla_tick_error", &[ByondValue::new_str(err)?])?;
+ }
+
Ok(())
});
- Ok(Default::default())
+ Ok(ByondValue::null())
}
/// BYOND API for asking how long the prior tick took.
#[byondapi::bind]
-fn milla_get_tick_time() {
+fn milla_get_tick_time() -> eyre::Result {
logging::setup_panic_handler();
Ok(ByondValue::from(
TICK_TIME.load(std::sync::atomic::Ordering::Relaxed) as f32,
@@ -492,6 +683,8 @@ mod tests {
None,
None,
Some(1.0),
+ None,
+ Some(1.0),
)
.unwrap();
@@ -507,6 +700,8 @@ mod tests {
}
assert_eq!(tile.thermal_energy, 0.0);
assert_eq!(tile.innate_heat_capacity, 1.0);
+ assert_eq!(tile.hotspot_temperature, 0.0);
+ assert_eq!(tile.hotspot_volume, 1.0);
}
// Set a different set of arbitrary data.
@@ -529,6 +724,8 @@ mod tests {
None,
Some(1.0),
None,
+ Some(1.0),
+ None,
)
.unwrap();
@@ -544,6 +741,8 @@ mod tests {
}
assert_eq!(tile.thermal_energy, 1.0);
assert_eq!(tile.innate_heat_capacity, 0.0);
+ assert_eq!(tile.hotspot_temperature, 1.0);
+ assert_eq!(tile.hotspot_volume, 0.0);
}
}
}
diff --git a/rust/src/milla/constants.rs b/rust/src/milla/constants.rs
index df6dc8138cb8..b75aa9051662 100644
--- a/rust/src/milla/constants.rs
+++ b/rust/src/milla/constants.rs
@@ -4,6 +4,12 @@ pub(crate) const MAX_Z_LEVELS: i32 = 10;
/// How big is the map? Assumed square.
pub(crate) const MAP_SIZE: usize = 255;
+/// One atmosphere, in kPa.
+pub(crate) const ONE_ATMOSPHERE: f32 = 101.325;
+
+/// The temperature of space, in Kelvin
+pub(crate) const TCMB: f32 = 2.725;
+
/// 0 degrees Celsius, in Kelvin
pub(crate) const T0C: f32 = 273.15;
@@ -19,17 +25,15 @@ pub(crate) const R_IDEAL_GAS_EQUATION: f32 = 8.31;
/// How big a tile is, in liters.
pub(crate) const TILE_VOLUME: f32 = 2500.0;
-/// How many moles are needed to make toxins visible.
-pub(crate) const TOXINS_VISIBILITY_MOLES: f32 = 0.5;
+/// How many moles of toxins are needed for a fire to exist. For reasons, this is also how hany
+/// moles are needed to be visible.
+pub(crate) const TOXINS_MIN_VISIBILITY_MOLES: f32 = 0.5;
/// How many moles are needed to make sleeping gas visible.
pub(crate) const SLEEPING_GAS_VISIBILITY_MOLES: f32 = 1.0;
-/// How many moles of each gas are needed before a reaction should happen.
-pub(crate) const REACTION_SIGNIFICANCE_MOLES: f32 = 0.5;
-
-/// How much of the tile a reaction's gas needs to occupy to happen.
-pub(crate) const REACTION_SIGNIFICANCE_RATIO: f32 = 0.01;
+/// How much stuff needs to react before we think hotspots and BYOND care.
+pub(crate) const REACTION_SIGNIFICANCE_MOLES: f32 = 0.1;
/// How hot does it need to be for Agent B to work?
pub(crate) const AGENT_B_CONVERSION_TEMP: f32 = 900.0;
@@ -58,12 +62,25 @@ pub(crate) const GAS_AGENT_B: usize = 5;
/// How many gases are there?
pub(crate) const GAS_COUNT: usize = GAS_AGENT_B + 1;
-/// The two axes, Y and X. The order is arbitrary, but will break the copy from active to inactive
-/// if changed.
-pub(crate) const AXES: [(i32, i32); 2] = [(0, 1), (1, 0)];
+/// The two axes, Y and X. The order is arbitrary, but may break things if changed.
+pub(crate) const AXES: [(i32, i32); 2] = [(1, 0), (0, 1)];
+
+/// The index of the X axis in AXES.
+pub(crate) const AXIS_X: usize = 0;
+/// The index of the Y axis in AXES.
+pub(crate) const AXIS_Y: usize = 1;
+
+/// The four directions: up, down, right, and left. The order is arbitrary, but may break things if changed.
+pub(crate) const DIRECTIONS: [(i32, i32); 4] = [(1, 0), (-1, 0), (0, -1), (0, 1)];
+
+/// Gives the axis for each direction.
+pub(crate) const DIRECTION_AXIS: [usize; 4] = [0, 0, 1, 1];
-/// The four cardinal directions. The order is arbitrary, and doesn't matter.
-pub(crate) const DIRECTIONS: [(i32, i32); 4] = [(0, 1), (1, 0), (0, -1), (-1, 0)];
+/// Index for incoming gas.
+pub(crate) const GAS_FLOW_IN: usize = 0;
+
+/// Index for outgoing gas.
+pub(crate) const GAS_FLOW_OUT: usize = 1;
// The numbers here are completely wrong for actual gases, but they're what LINDA used, so we'll
// keep them for now.
@@ -102,17 +119,17 @@ pub(crate) const PLASMA_BURN_MIN_TEMP: f32 = 100.0 + T0C;
/// How hot does it need to be for a plasma fire to work as well as possible?
pub(crate) const PLASMA_BURN_OPTIMAL_TEMP: f32 = 1370.0 + T0C;
-/// How much oxygen needs to be available per unit of plasma.
-pub(crate) const PLASMA_BURN_REQUIRED_OXYGEN_AVAILABILITY: f32 = 10.0;
-
/// How much of the plasma are we willing to burn each tick?
-pub(crate) const PLASMA_BURN_MAX_RATIO: f32 = 0.25;
+pub(crate) const PLASMA_BURN_MAX_RATIO: f32 = 0.05;
+
+/// How much of the plasma do we burn anyway if the ratio would make it really small?
+pub(crate) const PLASMA_BURN_MIN_MOLES: f32 = 0.001;
-/// How much oxygen do we use per plasma at min temp?
-pub(crate) const PLASMA_BURN_WORST_OXYGEN_PER_PLASMA: f32 = 1.4;
+/// How much of a boost to burn ratio do we give to hotspots?
+pub(crate) const PLASMA_BURN_HOTSPOT_RATIO_BOOST: f32 = 10.0;
-/// How much oxygen do we use per plasma at optimal temp?
-pub(crate) const PLASMA_BURN_BEST_OXYGEN_PER_PLASMA: f32 = 0.4;
+/// How much oxygen do we use per plasma?
+pub(crate) const PLASMA_BURN_OXYGEN_PER_PLASMA: f32 = 0.4;
/// How much thermal energy is produced, in joules per mole of agent b.
pub(crate) const AGENT_B_CONVERSION_ENERGY: f32 = 20_000.0;
@@ -123,12 +140,67 @@ pub(crate) const NITROUS_BREAKDOWN_ENERGY: f32 = 200_000.0;
/// How much thermal energy is produced, in joules per mole of sleeping toxins.
pub(crate) const PLASMA_BURN_ENERGY: f32 = 3_000_000.0;
-/// We allow small deviations in tests, so that floating point precision doesn't cause problems.
+/// We allow small deviations in tests as our spring chain solution is not exact.
#[cfg(test)]
-pub(crate) const TEST_TOLERANCE: f32 = 0.00001;
+pub(crate) const TEST_TOLERANCE: f32 = 0.1;
-/// Lose this multiple of heat energy per tick if above T20C.
-pub(crate) const SPACE_COOLING_FACTOR: f32 = 0.005;
+/// When space cooling starts, in Kelvin.
+pub(crate) const SPACE_COOLING_THRESHOLD: f32 = T20C;
+
+/// Lose this amount of heat energy per tick if above SPACE_COOLING_THRESHOLD.
+pub(crate) const SPACE_COOLING_FLAT: f32 = 2000.0;
+
+/// Lose this ratio of heat energy per tick if above SPACE_COOLING_THRESHOLD.
+pub(crate) const SPACE_COOLING_RATIO: f32 = 0.002;
/// Tiles with less than this much gas will become empty.
pub(crate) const MINIMUM_NONZERO_MOLES: f32 = 0.1;
+
+/// How many iterations of gas flow are we willing to run per tick?
+pub(crate) const MAX_ITERATIONS: usize = 100;
+
+/// When we stop caring about gas changes and end iteration, in moles on a single tile.
+pub(crate) const GAS_CHANGE_SIGNIFICANCE: f32 = 0.01;
+
+/// When we stop caring about gas changes and end iteration, roughly as a fraction of the gas.
+pub(crate) const GAS_CHANGE_SIGNIFICANCE_FRACTION: f32 = 0.001;
+
+/// When we stop caring about thermal energy changes and end iteration, in thermal energy on a
+/// single tile.
+pub(crate) const THERMAL_CHANGE_SIGNIFICANCE: f32 = 0.1;
+
+/// When we stop caring about thermal energy changes and end iteration, roughly as a fraction of
+/// the thermal energy.
+pub(crate) const THERMAL_CHANGE_SIGNIFICANCE_FRACTION: f32 = 0.001;
+
+/// Controls how strongly each type of gas moves towards an even spread, ignoring wind.
+/// [0.0, f32::INFINITY]
+pub(crate) const DIFFUSION_SPEED: f32 = 0.2;
+
+/// Controls how quickly the wind moves air.
+/// (0.0, f32::INFINITY]
+pub(crate) const WIND_STRENGTH: f32 = 8.0;
+
+/// Controls how fast the wind changes towards what the current pressur gradient wants.
+/// (0.0, 1.0], a value of 0.25 means getting 25% closer every tick.
+pub(crate) const WIND_ACCELERATION: f32 = 0.05;
+
+/// Controls how quickly the wind spreads from tile to tile.
+/// [0.0, f32::INFINITY]
+pub(crate) const WIND_SPEED: f32 = 0.5;
+
+/// A hard cap on how strong wind can become.
+/// [0.0, f32::INFINITY]
+pub(crate) const MAX_WIND: f32 = f32::INFINITY;
+
+/// How fast should temperature flow?
+/// [0.0, f32::INFINITY]
+pub(crate) const TEMPERATURE_FLOW_RATE: f32 = 0.2;
+
+/// Direct multiplier on strength of wind reported to BYOND.
+/// [0.0, f32::INFINITY]
+pub(crate) const BYOND_WIND_MULTIPLIER: f32 = 0.5;
+
+/// The smallest temperature allowed for the purpose of caluclating pressure.
+/// Prevents weirdness from absolute-zero gas having no pressure at all.
+pub(crate) const MINIMUM_TEMPERATURE_FOR_PRESSURE: f32 = 1.0;
diff --git a/rust/src/milla/model.rs b/rust/src/milla/model.rs
index 13044a6d879c..4b7ac10036eb 100644
--- a/rust/src/milla/model.rs
+++ b/rust/src/milla/model.rs
@@ -3,6 +3,8 @@ use atomic_float::AtomicF32;
use bitflags::bitflags;
use byondapi::map::{byond_locatexyz, ByondXYZ};
use byondapi::prelude::*;
+use std::collections::HashSet;
+use std::ops::Add;
use std::sync::{atomic::AtomicBool, atomic::Ordering::Relaxed, RwLock};
/// Represents a collection of gases, with amounts in moles.
@@ -69,7 +71,7 @@ impl GasSet {
pub(crate) fn set_dirty(&mut self) {
self.dirty.store(true, Relaxed);
}
- fn recalculate(&self) {
+ pub(crate) fn recalculate(&self) {
let mut moles = 0.0;
let mut heat_capacity = 0.0;
for i in 0..GAS_COUNT {
@@ -99,7 +101,7 @@ impl GasSet {
pub(crate) fn copy_from(&mut self, other: &GasSet) {
for i in 0..GAS_COUNT {
self.values[i] = other.values[i];
- let dirty = self.dirty.load(Relaxed);
+ let dirty = other.dirty.load(Relaxed);
if dirty {
self.dirty.store(true, Relaxed);
} else {
@@ -111,6 +113,17 @@ impl GasSet {
}
}
}
+ pub(crate) fn add_gases(&mut self, other: &Self) {
+ for i in 0..GAS_COUNT {
+ self.values[i] += other.values[i];
+ }
+ }
+ #[allow(dead_code)]
+ pub(crate) fn clear(&mut self) {
+ for i in 0..GAS_COUNT {
+ self.values[i] = 0.0;
+ }
+ }
}
impl Clone for GasSet {
@@ -121,6 +134,16 @@ impl Clone for GasSet {
}
}
+impl Add for GasSet {
+ type Output = Self;
+
+ fn add(self, other: Self) -> Self {
+ let mut result = self.clone();
+ result.add_gases(&other);
+ result
+ }
+}
+
/// Determines the general behavior of a tile.
#[derive(Debug, Copy, Clone, PartialEq)]
pub(crate) enum AtmosMode {
@@ -130,8 +153,8 @@ pub(crate) enum AtmosMode {
Sealed,
/// Tile is exposed to the given environment.
ExposedTo { environment_id: u8 },
- /// Prevents hot tiles from automatically decaying towards T20C
- NoDecay,
+ /// Prevents hot tiles from automatically decaying towards T20C
+ NoDecay,
}
impl From for ByondValue {
@@ -140,7 +163,7 @@ impl From for ByondValue {
AtmosMode::Space => ByondValue::from(0.0),
AtmosMode::Sealed => ByondValue::from(1.0),
AtmosMode::ExposedTo { .. } => ByondValue::from(2.0),
- AtmosMode::NoDecay => ByondValue::from(3.0),
+ AtmosMode::NoDecay => ByondValue::from(3.0),
}
}
}
@@ -198,6 +221,17 @@ pub(crate) struct Tile {
pub(crate) superconductivity: Superconductivity,
/// How much heat capacity the tile itself has, in joules per kelvin.
pub(crate) innate_heat_capacity: f32,
+ /// How hot the tile's hotspot is. A hotspot is a sub-tile reagion that's caught fire.
+ pub(crate) hotspot_temperature: f32,
+ /// How much of the tile the hotspot covers. 1.0 would be the entire tile.
+ pub(crate) hotspot_volume: f32,
+ /// How strongly the air in this tile is flowing towards +axis.
+ pub(crate) wind: [f32; AXES.len()],
+ /// Is there a wall in this direction?
+ pub(crate) wall: [bool; AXES.len()],
+ pub(crate) gas_flow: [[[f32; 2]; GAS_COUNT]; AXES.len()],
+ /// How much fuel was burnt this tick?
+ pub(crate) fuel_burnt: f32,
}
impl Tile {
@@ -209,6 +243,12 @@ impl Tile {
mode: AtmosMode::Space,
superconductivity: Superconductivity::new(),
innate_heat_capacity: 0.0,
+ hotspot_temperature: 0.0,
+ hotspot_volume: 0.0,
+ wind: [0.0, 0.0],
+ wall: [false, false],
+ gas_flow: [[[0.0; 2]; GAS_COUNT]; AXES.len()],
+ fuel_burnt: 0.0,
}
}
/// The total heat capacity of this tile and its gases, in joules per kelvin.
@@ -224,8 +264,7 @@ impl Tile {
self.thermal_energy / heat_capacity
}
}
- // Calculates the pressure of a tile.
- #[allow(clippy::needless_range_loop)]
+ /// Calculates the pressure of a tile.
pub(crate) fn pressure(&self) -> f32 {
if let AtmosMode::Space = self.mode {
return 0.0;
@@ -233,12 +272,27 @@ impl Tile {
let mut heat_capacity = self.gases.heat_capacity();
heat_capacity += self.innate_heat_capacity;
if heat_capacity <= 0.0 {
- 0.0
- } else {
- let temperature = self.thermal_energy / heat_capacity;
- self.gases.moles() * temperature * R_IDEAL_GAS_EQUATION / TILE_VOLUME
+ return 0.0;
+ }
+ let temperature = self.thermal_energy / heat_capacity;
+ self.gases.moles()
+ * temperature.max(MINIMUM_TEMPERATURE_FOR_PRESSURE)
+ * R_IDEAL_GAS_EQUATION
+ / TILE_VOLUME
+ }
+ /// Calculates the partial pressure of a gas in a tile.
+ pub(crate) fn partial_pressure(&self, gas: usize) -> f32 {
+ if self.gases.values[gas] <= 0.0 {
+ return 0.0;
}
+
+ self.gases.values[gas]
+ * self.temperature().max(MINIMUM_TEMPERATURE_FOR_PRESSURE)
+ * R_IDEAL_GAS_EQUATION
+ / TILE_VOLUME
}
+
+ #[allow(clippy::needless_range_loop)]
pub(crate) fn copy_from(&mut self, other: &Tile) {
self.airtight_directions = other.airtight_directions;
self.gases.copy_from(&other.gases);
@@ -246,6 +300,17 @@ impl Tile {
self.mode = other.mode;
self.superconductivity.copy_from(&other.superconductivity);
self.innate_heat_capacity = other.innate_heat_capacity;
+ self.hotspot_temperature = other.hotspot_temperature;
+ self.hotspot_volume = other.hotspot_volume;
+ for axis in 0..AXES.len() {
+ self.wind[axis] = other.wind[axis];
+ self.wall[axis] = other.wall[axis];
+ for gas in 0..GAS_COUNT {
+ self.gas_flow[axis][gas][GAS_FLOW_IN] = other.gas_flow[axis][gas][GAS_FLOW_IN];
+ self.gas_flow[axis][gas][GAS_FLOW_OUT] = other.gas_flow[axis][gas][GAS_FLOW_OUT];
+ }
+ }
+ self.fuel_burnt = other.fuel_burnt;
}
}
@@ -276,6 +341,11 @@ impl From<&Tile> for Vec {
ByondValue::from(value.superconductivity.west),
ByondValue::from(value.innate_heat_capacity),
ByondValue::from(value.temperature()),
+ ByondValue::from(value.hotspot_temperature),
+ ByondValue::from(value.hotspot_volume),
+ ByondValue::from(value.wind[AXIS_X]),
+ ByondValue::from(value.wind[AXIS_Y]),
+ ByondValue::from(value.fuel_burnt),
]
}
}
@@ -298,12 +368,12 @@ pub(crate) struct InterestingTile {
pub(crate) coords: ByondXYZ,
/// A bitmask of reasons this tile is interesting, values are REASON_*.
pub(crate) reasons: ReasonFlags,
- /// These represent the net force generated by air flowing out of the tile along each axis.
+ /// These represent the net force generated by air winding out of the tile along each axis.
/// For a tile losing air equally in all directions, they will be zero.
- /// For a tile losing air towards positive X only, flow_x will be the air pressure moved.
- pub(crate) flow_x: f32,
- /// See flow_x.
- pub(crate) flow_y: f32,
+ /// For a tile losing air towards positive X only, wind_x will be the air pressure moved.
+ pub(crate) wind_x: f32,
+ /// See wind_x.
+ pub(crate) wind_y: f32,
}
/// Convert an InterestingTile into a flat vector of ByondValues.
@@ -319,8 +389,8 @@ impl From<&InterestingTile> for Vec {
ret.extend(vec![
byond_locatexyz(value.coords).unwrap(),
ByondValue::from(value.reasons.bits() as f32),
- ByondValue::from(value.flow_x),
- ByondValue::from(value.flow_y),
+ ByondValue::from(value.wind_x),
+ ByondValue::from(value.wind_y),
]);
ret
@@ -328,7 +398,10 @@ impl From<&InterestingTile> for Vec {
}
/// A single Z level in the atmos model.
-pub(crate) struct ZLevel(Box<[Tile; MAP_SIZE * MAP_SIZE]>);
+pub(crate) struct ZLevel {
+ tiles: Box<[Tile; MAP_SIZE * MAP_SIZE]>,
+ pub(crate) active_pressure_chunks: HashSet<(u8, u8)>,
+}
impl ZLevel {
pub(crate) fn new() -> Self {
@@ -336,7 +409,10 @@ impl ZLevel {
for _ in 0..MAP_SIZE * MAP_SIZE {
unbuilt.push(Tile::new());
}
- ZLevel(unbuilt.into_boxed_slice().try_into().unwrap())
+ ZLevel {
+ tiles: unbuilt.into_boxed_slice().try_into().unwrap(),
+ active_pressure_chunks: HashSet::new(),
+ }
}
pub(crate) fn maybe_get_index(x: i32, y: i32) -> Option {
@@ -348,21 +424,22 @@ impl ZLevel {
}
pub(crate) fn get_tile(&self, index: usize) -> &Tile {
- &self.0[index]
+ &self.tiles[index]
}
+ #[allow(dead_code)]
pub(crate) fn maybe_get_tile(&self, x: i32, y: i32) -> Option<&Tile> {
- Some(&self.0[ZLevel::maybe_get_index(x, y)?])
+ Some(&self.tiles[ZLevel::maybe_get_index(x, y)?])
}
pub(crate) fn get_tile_mut(&mut self, index: usize) -> &mut Tile {
- &mut self.0[index]
+ &mut self.tiles[index]
}
pub(crate) fn get_pair_mut(&mut self, index1: usize, index2: usize) -> (&mut Tile, &mut Tile) {
// Split borrow to get two mutable tiles at the same time.
// Ref: https://doc.rust-lang.org/nomicon/borrow-splitting.html
- let ptr = self.0.as_mut_ptr();
+ let ptr = self.tiles.as_mut_ptr();
unsafe {
assert!(index1 != index2);
@@ -374,9 +451,10 @@ impl ZLevel {
}
pub(crate) fn copy_from(&mut self, other: &ZLevel) {
- for i in 0..self.0.len() {
- self.0[i].copy_from(&other.0[i]);
+ for i in 0..self.tiles.len() {
+ self.tiles[i].copy_from(&other.tiles[i]);
}
+ self.active_pressure_chunks = other.active_pressure_chunks.clone();
}
}
@@ -455,9 +533,11 @@ impl Buffers {
}
/// Create an environment for ExposedTo.
- pub(crate) fn create_environment(&self, tile: Tile) -> u8 {
+ pub(crate) fn create_environment(&self, mut tile: Tile) -> u8 {
let mut environments = self.environments.write().unwrap();
let id = environments.len() as u8;
+ tile.mode = AtmosMode::ExposedTo { environment_id: id };
+ tile.gases.recalculate();
environments.push(tile);
id
}
diff --git a/rust/src/milla/simulate.rs b/rust/src/milla/simulate.rs
index b663b77f7081..befff52558eb 100644
--- a/rust/src/milla/simulate.rs
+++ b/rust/src/milla/simulate.rs
@@ -3,158 +3,424 @@ use crate::milla::model::*;
use byondapi::map::ByondXYZ;
use eyre::eyre;
use scc::Bag;
+use std::collections::HashSet;
+
+pub(crate) fn find_walls(next: &mut ZLevel) {
+ for my_index in 0..MAP_SIZE * MAP_SIZE {
+ let x = (my_index / MAP_SIZE) as i32;
+ let y = (my_index % MAP_SIZE) as i32;
+
+ for (axis, (dx, dy)) in AXES.iter().enumerate() {
+ let their_index = match ZLevel::maybe_get_index(x + dx, y + dy) {
+ Some(index) => index,
+ None => {
+ // Edge of the map, acts like a wall.
+ let my_tile = next.get_tile_mut(my_index);
+ my_tile.wall[axis] = true;
+ continue;
+ }
+ };
-/// Calculates the pressure flow out from this tile to the two neighboring tiles on this axis.
-/// For a tile losing air equally in all directions, flow will be zero.
-/// For a tile losing air towards positive only, flow will be the air pressure moved.
-pub(crate) fn calculate_flow(
- maybe_negative_tile: Option<&Tile>,
- tile: &Tile,
- maybe_positive_tile: Option<&Tile>,
- is_x: bool,
-) -> f32 {
- let mut flow = 0.0;
- let my_pressure = tile.pressure();
- if let Some(negative_tile) = maybe_negative_tile {
- // Make sure air can pass this way.
- let mut permeable = true;
- if is_x {
- permeable = permeable
- && !negative_tile
+ let (my_tile, their_tile) = next.get_pair_mut(my_index, their_index);
+ if *dx > 0
+ && (my_tile
.airtight_directions
- .contains(AirtightDirections::EAST);
- permeable = permeable && !tile.airtight_directions.contains(AirtightDirections::WEST);
- } else {
- permeable = permeable
- && !negative_tile
+ .contains(AirtightDirections::EAST)
+ || their_tile
+ .airtight_directions
+ .contains(AirtightDirections::WEST))
+ {
+ // Something's blocking airflow.
+ my_tile.wall[axis] = true;
+ continue;
+ } else if *dy > 0
+ && (my_tile
.airtight_directions
- .contains(AirtightDirections::NORTH);
- permeable = permeable && !tile.airtight_directions.contains(AirtightDirections::SOUTH);
+ .contains(AirtightDirections::NORTH)
+ || their_tile
+ .airtight_directions
+ .contains(AirtightDirections::SOUTH))
+ {
+ // Something's blocking airflow.
+ my_tile.wall[axis] = true;
+ continue;
+ }
+ my_tile.wall[axis] = false;
}
- if permeable {
- let negative_pressure = negative_tile.pressure();
- if negative_pressure < my_pressure {
- // Causes flow in the negative direction.
- flow += negative_pressure - my_pressure;
+ }
+}
+
+/// Calculate the new wind at each boundary.
+pub(crate) fn update_wind(prev: &ZLevel, next: &mut ZLevel) {
+ for my_index in 0..MAP_SIZE * MAP_SIZE {
+ let x = (my_index / MAP_SIZE) as i32;
+ let y = (my_index % MAP_SIZE) as i32;
+ let my_tile = prev.get_tile(my_index);
+
+ for (axis, (dx, dy)) in AXES.iter().enumerate() {
+ let neighbor_index = match ZLevel::maybe_get_index(x + dx, y + dy) {
+ Some(index) => index,
+ None => continue,
+ };
+ let neighbor = prev.get_tile(neighbor_index);
+ let my_new_tile = next.get_tile_mut(my_index);
+
+ // No wind across walls.
+ if my_new_tile.wall[axis] {
+ my_new_tile.wind[axis] = 0.0;
+ for i in 0..GAS_COUNT {
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_IN] = 0.0;
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_OUT] = 0.0;
+ }
+ continue;
+ }
+
+ // If there's no air, there's no wind.
+ if my_tile.pressure() + neighbor.pressure() <= 0.0 {
+ my_new_tile.wind[axis] = 0.0;
+ for i in 0..GAS_COUNT {
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_IN] = 0.0;
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_OUT] = 0.0;
+ }
+ continue;
+ }
+
+ // How much pressure do these tiles have together?
+ let combined_pressure = my_tile.pressure() + neighbor.pressure();
+
+ // A bias from [-1.0, 1.0] representing how much air is flowing from the negative tile
+ // to the positive one, based purely on pressure.
+ let pressure_bias = 2.0 * (my_tile.pressure() / combined_pressure) - 1.0;
+
+ // New wind mixes the pressure bias with the old wind, and clamps it to reasonable
+ // bounds.
+ my_new_tile.wind[axis] = (my_tile.wind[axis]
+ + WIND_ACCELERATION * (pressure_bias * WIND_STRENGTH - my_tile.wind[axis]))
+ .clamp(-MAX_WIND, MAX_WIND);
+
+ for i in 0..GAS_COUNT {
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_IN] = 0.0;
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_OUT] = 0.0;
+
+ // Calculate how much gas should flow based on pressure.
+ let combined_partial_pressure =
+ my_tile.partial_pressure(i) + neighbor.partial_pressure(i);
+ if combined_partial_pressure <= 0.0 {
+ // Gas? What gas?
+ continue;
+ }
+ let wind_gas_flow = (1.0 + WIND_SPEED).powf(my_new_tile.wind[axis].abs()) - 1.0;
+ if my_new_tile.wind[axis] > 0.0 {
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_OUT] += wind_gas_flow;
+ } else {
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_IN] += wind_gas_flow;
+ }
+
+ // And how much gas should flow based on diffusion.
+ let diffusion_gas_flow = DIFFUSION_SPEED;
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_IN] += diffusion_gas_flow;
+ my_new_tile.gas_flow[axis][i][GAS_FLOW_OUT] += diffusion_gas_flow;
}
}
}
- if let Some(positive_tile) = maybe_positive_tile {
- // Make sure air can pass this way.
- let mut permeable = true;
- if is_x {
- permeable = permeable
- && !positive_tile
- .airtight_directions
- .contains(AirtightDirections::WEST);
- permeable = permeable && !tile.airtight_directions.contains(AirtightDirections::EAST);
- } else {
- permeable = permeable
- && !positive_tile
- .airtight_directions
- .contains(AirtightDirections::SOUTH);
- permeable = permeable && !tile.airtight_directions.contains(AirtightDirections::NORTH);
+}
+
+pub(crate) struct AirflowOutcome {
+ active_tiles: HashSet,
+ max_gas_delta: f32,
+ max_thermal_energy_delta: f32,
+}
+
+/// Let the air flow until it stabilizes for this tick or we run out of patience.
+pub(crate) fn flow_air(prev: &ZLevel, next: &mut ZLevel) -> Result {
+ let mut outcome = flow_air_once(prev, next, None)?;
+ for _iter in 1..MAX_ITERATIONS {
+ outcome = flow_air_once(prev, next, Some(outcome))?;
+
+ // Check for significant changes.
+ if outcome.max_gas_delta < GAS_CHANGE_SIGNIFICANCE
+ && outcome.max_thermal_energy_delta < THERMAL_CHANGE_SIGNIFICANCE
+ {
+ // We've stabilized.
+ return Ok(outcome);
}
- if permeable {
- let positive_pressure = positive_tile.pressure();
- if positive_pressure < my_pressure {
- // Causes flow in the positive direction.
- flow += my_pressure - positive_pressure;
- }
+ }
+
+ Ok(outcome)
+}
+
+/// Let the air flow at every active tile by one step.
+pub(crate) fn flow_air_once(
+ prev: &ZLevel,
+ next: &mut ZLevel,
+ maybe_old_outcome: Option,
+) -> Result {
+ let mut new_outcome = AirflowOutcome {
+ active_tiles: HashSet::new(),
+ max_gas_delta: 0.0,
+ max_thermal_energy_delta: 0.0,
+ };
+
+ if let Some(old_outcome) = maybe_old_outcome {
+ for my_index in &old_outcome.active_tiles {
+ flow_air_once_at_index(prev, next, *my_index, &mut new_outcome)?;
+ }
+ } else {
+ for my_index in 0..MAP_SIZE * MAP_SIZE {
+ flow_air_once_at_index(prev, next, my_index, &mut new_outcome)?;
}
}
- flow
+
+ Ok(new_outcome)
}
-/// Counts the number of adjacent tiles that can share atmos with this tile, i.e. have no blockers
-/// on either tile.
-#[allow(clippy::if_same_then_else)]
-pub(crate) fn count_connected_dirs(
- z_level: &ZLevel,
- index: usize,
- x: i32,
- y: i32,
-) -> Result {
- let mut connected_dirs = 0;
+pub(crate) fn flow_air_once_at_index(
+ prev: &ZLevel,
+ next: &mut ZLevel,
+ my_index: usize,
+ outcome: &mut AirflowOutcome,
+) -> Result<(), eyre::Error> {
+ let x = (my_index / MAP_SIZE) as i32;
+ let y = (my_index % MAP_SIZE) as i32;
+ let my_tile = prev.get_tile(my_index);
- let tile = z_level.get_tile(index);
- if let AtmosMode::Space = tile.mode {
- // Space can always accept as much air as you throw at it.
- return Ok(1);
+ // Skip tiles that can't change.
+ match my_tile.mode {
+ // Space is always empty.
+ AtmosMode::Space => return Ok(()),
+ // Tiles exposed to an environment always contain that environment.
+ AtmosMode::ExposedTo { .. } => return Ok(()),
+ _ => (),
}
- for (dx, dy) in DIRECTIONS {
- let maybe_other_index = ZLevel::maybe_get_index(x + dx, y + dy);
- let other_index;
- match maybe_other_index {
- Some(index) => other_index = index,
+
+ // Save the values from the prior iteration so we can check how much they changed.
+ let prev_iter = next.get_tile(my_index).clone();
+ {
+ // We're doing a modified Gauss-Seidel method, and while it's counter-intuitive, one of
+ // the necessary steps is to reset the current tile to its original values before
+ // processing this iteration.
+ // See https://en.wikipedia.org/wiki/Gauss%E2%80%93Seidel_method#Element-based_formula
+ let my_new_tile = next.get_tile_mut(my_index);
+ my_new_tile.gases.copy_from(&my_tile.gases);
+ my_new_tile.thermal_energy = my_tile.thermal_energy;
+ }
+ let mut outgoing_gas_mult: [f32; GAS_COUNT] = [0.0; GAS_COUNT];
+ let mut total_weighted_temperature = my_tile.temperature() * my_tile.heat_capacity();
+ let mut total_temperature_weights: f32 = my_tile.heat_capacity();
+ for (dir, (dx, dy)) in DIRECTIONS.iter().enumerate() {
+ let neighbor_index = match ZLevel::maybe_get_index(x + dx, y + dy) {
+ Some(value) => value,
None => continue,
+ };
+ let (my_new_tile, new_neighbor) = next.get_pair_mut(my_index, neighbor_index);
+
+ let axis = DIRECTION_AXIS[dir];
+
+ // Don't do anything across walls.
+ if dx + dy > 0 {
+ if my_new_tile.wall[axis] {
+ continue;
+ }
+ } else {
+ if new_neighbor.wall[axis] {
+ continue;
+ }
}
- let other_tile = z_level.get_tile(other_index);
- if dx > 0
- && !tile.airtight_directions.contains(AirtightDirections::EAST)
- && !other_tile
- .airtight_directions
- .contains(AirtightDirections::WEST)
- {
- connected_dirs += 1;
- } else if dy > 0
- && !tile.airtight_directions.contains(AirtightDirections::NORTH)
- && !other_tile
- .airtight_directions
- .contains(AirtightDirections::SOUTH)
+ // If there's no air, don't do anything.
+ let total_pressure = my_tile.pressure() + new_neighbor.pressure();
+ if total_pressure <= 0.0 {
+ continue;
+ }
+
+ for i in 0..GAS_COUNT {
+ // Normalise the gas flow direction.
+ let gas_flow_in;
+ let gas_flow_out;
+ if dx + dy > 0 {
+ gas_flow_in = my_new_tile.gas_flow[axis][i][GAS_FLOW_IN];
+ gas_flow_out = my_new_tile.gas_flow[axis][i][GAS_FLOW_OUT];
+ } else {
+ gas_flow_in = new_neighbor.gas_flow[axis][i][GAS_FLOW_OUT];
+ gas_flow_out = new_neighbor.gas_flow[axis][i][GAS_FLOW_IN];
+ }
+
+ // Once again, this may looks a bit odd, but it's the second step of Gauss-Seidel,
+ // summing together this tile's value from the last iteration with the incoming values
+ // from other tiles this tick.
+ my_new_tile.gases.values[i] += gas_flow_in * new_neighbor.gases.values[i];
+ let temperature_weight = gas_flow_in * new_neighbor.gases.values[i] * SPECIFIC_HEATS[i];
+
+ // Track the outgoing values as well.
+ outgoing_gas_mult[i] += gas_flow_out;
+
+ // Temperature is not Gauss-Seidel, though it looks similar. It's just a weighted
+ // average.
+ total_weighted_temperature +=
+ new_neighbor.temperature() * temperature_weight * TEMPERATURE_FLOW_RATE;
+ total_temperature_weights += temperature_weight * TEMPERATURE_FLOW_RATE;
+ }
+
+ my_new_tile.gases.set_dirty();
+ }
+
+ // And now we finish off Gauss-Seidel by dividing by the total outgoing weights, plus one
+ // to represent this tile.
+ let mut max_gas_delta: f32 = 0.0;
+ let my_new_tile = next.get_tile_mut(my_index);
+ for i in 0..GAS_COUNT {
+ my_new_tile.gases.values[i] /= 1.0 + outgoing_gas_mult[i];
+
+ if (prev_iter.gases.values[i] - my_new_tile.gases.values[i]).abs()
+ >= GAS_CHANGE_SIGNIFICANCE
{
- connected_dirs += 1;
- } else if dx < 0
- && !tile.airtight_directions.contains(AirtightDirections::WEST)
- && !other_tile
- .airtight_directions
- .contains(AirtightDirections::EAST)
+ let new_gas_delta = (2.0 * prev_iter.gases.values[i]
+ / (prev_iter.gases.values[i] + my_new_tile.gases.values[i])
+ - 1.0)
+ .abs();
+ max_gas_delta = max_gas_delta.max(new_gas_delta);
+ }
+ }
+ my_new_tile.gases.set_dirty();
+
+ my_new_tile.thermal_energy =
+ my_new_tile.heat_capacity() * total_weighted_temperature / total_temperature_weights;
+
+ let new_thermal_energy_delta;
+ if (prev_iter.thermal_energy - my_new_tile.thermal_energy).abs() >= THERMAL_CHANGE_SIGNIFICANCE
+ {
+ new_thermal_energy_delta = (2.0 * prev_iter.thermal_energy
+ / (prev_iter.thermal_energy + my_new_tile.thermal_energy)
+ - 1.0)
+ .abs();
+ } else {
+ new_thermal_energy_delta = 0.0
+ }
+
+ // outcome is the global version across all tiles.
+ outcome.max_gas_delta = outcome.max_gas_delta.max(max_gas_delta);
+ outcome.max_thermal_energy_delta = outcome
+ .max_thermal_energy_delta
+ .max(new_thermal_energy_delta);
+
+ // Check for significant changes.
+ if max_gas_delta < GAS_CHANGE_SIGNIFICANCE_FRACTION {
+ if new_thermal_energy_delta < THERMAL_CHANGE_SIGNIFICANCE_FRACTION {
+ return Ok(());
+ }
+ }
+
+ // If any change was significant, mark this tile and all neighbors as active.
+ outcome.active_tiles.insert(my_index);
+ for (dx, dy) in DIRECTIONS {
+ if let Some(neighbor_index) = ZLevel::maybe_get_index(x + dx, y + dy) {
+ outcome.active_tiles.insert(neighbor_index);
+ }
+ }
+
+ Ok(())
+}
+
+/// Applies effects that happen after the main airflow routine:
+/// * Tile modes
+/// * Superconductivity
+/// * Reactions
+/// * Hotspot cleanup
+/// * Sanitization
+/// * Looking for interesting tiles.
+pub(crate) fn post_process(
+ prev: &ZLevel,
+ next: &mut ZLevel,
+ environments: &Box<[Tile]>,
+ new_interesting_tiles: &Bag,
+ z: i32,
+) -> Result<(), eyre::Error> {
+ for my_index in 0..MAP_SIZE * MAP_SIZE {
+ let x = (my_index / MAP_SIZE) as i32;
+ let y = (my_index % MAP_SIZE) as i32;
+ let my_tile = prev.get_tile(my_index);
+
{
- connected_dirs += 1;
- } else if dy < 0
- && !tile.airtight_directions.contains(AirtightDirections::SOUTH)
- && !other_tile
- .airtight_directions
- .contains(AirtightDirections::NORTH)
+ let my_next_tile = next.get_tile_mut(my_index);
+ apply_tile_mode(my_next_tile, environments)?;
+ }
+
+ if let AtmosMode::Space = my_tile.mode {
+ // Space doesn't superconduct, has no reactions, doesn't need to be sanitized, and is never interesting. (Take that, astrophysicists and astronomers!)
+ continue;
+ }
+
+ for (dx, dy) in AXES {
+ let their_index = match ZLevel::maybe_get_index(x + dx, y + dy) {
+ Some(index) => index,
+ None => continue,
+ };
+
+ let (my_next_tile, their_next_tile) = next.get_pair_mut(my_index, their_index);
+
+ if their_next_tile.mode != AtmosMode::Space {
+ superconduct(my_next_tile, their_next_tile, dx > 0, false);
+ }
+ }
+
{
- connected_dirs += 1;
+ let my_next_tile = next.get_tile_mut(my_index);
+ // New tick, reset the fuel tracker.
+ my_next_tile.fuel_burnt = 0.0;
+
+ react(my_next_tile, false);
+ if my_next_tile.hotspot_volume > 0.0 {
+ react(my_next_tile, true);
+ }
+
+ // Sanitize the tile, to avoid negative/NaN/infinity spread.
+ sanitize(my_next_tile, my_tile);
}
- }
- Ok(connected_dirs)
+ check_interesting(x, y, z, next, my_tile, my_index, new_interesting_tiles)?;
+ }
+ Ok(())
}
-/// Sanitizes a tile to make sure it's not problematic.
-pub(crate) fn sanitize(my_inactive_tile: &mut Tile, my_tile: &Tile) -> bool {
+pub(crate) fn sanitize(my_next_tile: &mut Tile, my_tile: &Tile) -> bool {
let mut sanitized = false;
for i in 0..GAS_COUNT {
- if !my_inactive_tile.gases.values[i].is_finite() {
+ if !my_next_tile.gases.values[i].is_finite() {
// Reset back to the last value, in the hopes that it's safe.
- my_inactive_tile.gases.values[i] = my_tile.gases.values[i];
- my_inactive_tile.gases.set_dirty();
+ my_next_tile.gases.values[i] = my_tile.gases.values[i];
+ my_next_tile.gases.set_dirty();
sanitized = true;
- } else if my_inactive_tile.gases.values[i] < 0.0 {
+ } else if my_next_tile.gases.values[i] < 0.0 {
// Zero out anything that becomes negative.
- my_inactive_tile.gases.values[i] = 0.0;
- my_inactive_tile.gases.set_dirty();
+ my_next_tile.gases.values[i] = 0.0;
+ my_next_tile.gases.set_dirty();
sanitized = true;
}
}
- if !my_inactive_tile.thermal_energy.is_finite() {
+ if !my_next_tile.thermal_energy.is_finite() {
// Reset back to the last value, in the hopes that it's safe.
- my_inactive_tile.thermal_energy = my_tile.thermal_energy;
+ my_next_tile.thermal_energy = my_tile.thermal_energy;
sanitized = true;
- } else if my_inactive_tile.thermal_energy < 0.0 {
+ } else if my_next_tile.thermal_energy < 0.0 {
// Zero out anything that becomes negative.
- my_inactive_tile.thermal_energy = 0.0;
+ my_next_tile.thermal_energy = 0.0;
sanitized = true;
}
- if my_inactive_tile.gases.moles() < MINIMUM_NONZERO_MOLES {
+ if !my_next_tile.wind[0].is_finite() {
+ // Reset back to the last value, in the hopes that it's safe.
+ my_next_tile.wind[0] = my_tile.wind[0];
+ sanitized = true;
+ }
+ if !my_next_tile.wind[1].is_finite() {
+ // Reset back to the last value, in the hopes that it's safe.
+ my_next_tile.wind[1] = my_tile.wind[1];
+ sanitized = true;
+ }
+ if my_next_tile.gases.moles() < MINIMUM_NONZERO_MOLES {
for i in 0..GAS_COUNT {
- my_inactive_tile.gases.values[i] = 0.0;
+ my_next_tile.gases.values[i] = 0.0;
}
- my_inactive_tile.thermal_energy = 0.0;
+ my_next_tile.thermal_energy = 0.0;
// We don't count this as sanitized because it's expected.
}
@@ -167,274 +433,257 @@ pub(crate) fn check_interesting(
x: i32,
y: i32,
z: i32,
- active: &std::sync::RwLockReadGuard,
- environments: &Box<[Tile]>,
+ next: &mut ZLevel,
my_tile: &Tile,
- my_inactive_tile: &Tile,
- fuel_burnt: f32,
+ my_index: usize,
new_interesting_tiles: &Bag,
) -> Result<(), eyre::Error> {
let mut reasons: ReasonFlags = ReasonFlags::empty();
- if (my_inactive_tile.gases.toxins() >= TOXINS_VISIBILITY_MOLES)
- != (my_tile.gases.toxins() >= TOXINS_VISIBILITY_MOLES)
- {
- // Crossed the toxins visibility threshold.
- reasons |= ReasonFlags::DISPLAY;
- } else if (my_inactive_tile.gases.sleeping_agent() >= SLEEPING_GAS_VISIBILITY_MOLES)
- != (my_tile.gases.sleeping_agent() >= SLEEPING_GAS_VISIBILITY_MOLES)
{
- // Crossed the sleeping agent visibility threshold.
- reasons |= ReasonFlags::DISPLAY;
- }
- let temperature = my_inactive_tile.temperature();
- if temperature > PLASMA_BURN_MIN_TEMP {
- match my_inactive_tile.mode {
- // In environments we expect to be hot, we don't normally flag that as interesting.
- AtmosMode::ExposedTo { environment_id } => {
- if fuel_burnt > 0.0 {
- // Active fires are interesting, even if it's hot here normally.
+ let my_next_tile = next.get_tile_mut(my_index);
+ if (my_next_tile.fuel_burnt > REACTION_SIGNIFICANCE_MOLES)
+ != (my_tile.fuel_burnt > REACTION_SIGNIFICANCE_MOLES)
+ {
+ // Fire started or stopped.
+ reasons |= ReasonFlags::DISPLAY;
+ } else if (my_next_tile.gases.toxins() >= TOXINS_MIN_VISIBILITY_MOLES)
+ != (my_tile.gases.toxins() >= TOXINS_MIN_VISIBILITY_MOLES)
+ {
+ // Crossed the toxins visibility threshold.
+ reasons |= ReasonFlags::DISPLAY;
+ } else if (my_next_tile.gases.sleeping_agent() >= SLEEPING_GAS_VISIBILITY_MOLES)
+ != (my_tile.gases.sleeping_agent() >= SLEEPING_GAS_VISIBILITY_MOLES)
+ {
+ // Crossed the sleeping agent visibility threshold.
+ reasons |= ReasonFlags::DISPLAY;
+ }
+
+ if my_next_tile.temperature() > PLASMA_BURN_MIN_TEMP {
+ if let AtmosMode::ExposedTo { .. } = my_next_tile.mode {
+ // Since environments have fixed gases and temperatures, we only count them as
+ // interesting (for heat) if there's an active fire.
+ if my_next_tile.fuel_burnt > REACTION_SIGNIFICANCE_MOLES {
reasons |= ReasonFlags::HOT;
- } else {
- if environment_id as usize > environments.len() {
- return Err(eyre!("Invalid environment ID {}", environment_id));
- }
-
- let environment_temp = environments[environment_id as usize].temperature();
- if environment_temp + 1.0 >= temperature {
- // No active fire, not hotter than normal. Not interesting.
- } else {
- // Oh, hey, we're hotter than normal, and can start fires.
- // That's interesting.
- reasons |= ReasonFlags::HOT;
- }
}
+ } else {
+ // Anywhere else is interesting if it's hot enough to start a fire.
+ reasons |= ReasonFlags::HOT;
}
- // Anywhere else is interesting if it can start fires.
- _ => reasons |= ReasonFlags::HOT,
}
}
- let flow_x = calculate_flow(
- active.maybe_get_tile(x - 1, y),
- my_tile,
- active.maybe_get_tile(x + 1, y),
- true,
- );
- if flow_x.abs() > 1.0 {
- // Pressure flowing out of this tile along the X axis.
- reasons |= ReasonFlags::WIND;
+ let my_next_tile = next.get_tile(my_index);
+ let mut wind_x: f32 = 0.0;
+ if my_next_tile.wind[AXIS_X] > 0.0 {
+ wind_x += my_next_tile.wind[AXIS_X] * WIND_SPEED * BYOND_WIND_MULTIPLIER;
+ }
+ if let Some(index) = ZLevel::maybe_get_index(x - 1, y) {
+ let their_next_tile = next.get_tile(index);
+ if their_next_tile.wind[AXIS_X] < 0.0 {
+ // This is negative, but that's good, because we want it to fight against the wind
+ // towards +X.
+ wind_x += their_next_tile.wind[AXIS_X] * BYOND_WIND_MULTIPLIER;
+ }
+ }
+ wind_x *= my_next_tile.pressure();
+ let mut wind_y: f32 = 0.0;
+ if my_next_tile.wind[AXIS_Y] > 0.0 {
+ wind_y += my_next_tile.wind[AXIS_Y] * BYOND_WIND_MULTIPLIER;
+ }
+ if let Some(index) = ZLevel::maybe_get_index(x, y - 1) {
+ let their_next_tile = next.get_tile(index);
+ if their_next_tile.wind[AXIS_Y] < 0.0 {
+ // This is negative, but that's good, because we want it to fight against the wind
+ // towards +Y.
+ wind_y += their_next_tile.wind[AXIS_Y] * BYOND_WIND_MULTIPLIER;
+ }
}
- let flow_y = calculate_flow(
- active.maybe_get_tile(x, y - 1),
- my_tile,
- active.maybe_get_tile(x, y + 1),
- false,
- );
- if flow_x.powi(2) + flow_y.powi(2) > 1.0 {
- // Pressure flowing out of this tile along the Y axis.
+ wind_y *= my_next_tile.pressure();
+ if wind_x.powi(2) + wind_y.powi(2) > 1.0 {
+ // Pressure flowing out of this tile might move stuff.
reasons |= ReasonFlags::WIND;
}
if !reasons.is_empty() {
- // Boooooring.
-
// :eyes:
new_interesting_tiles.push(InterestingTile {
- tile: my_inactive_tile.clone(),
+ tile: my_next_tile.clone(),
// +1 here to convert from our 0-indexing to BYOND's 1-indexing.
coords: ByondXYZ::with_coords((x as i16 + 1, y as i16 + 1, z as i16 + 1)),
reasons,
- flow_x,
- flow_y,
+ wind_x,
+ wind_y,
});
}
Ok(())
}
-/// Is the amount of gas present significant?
-pub(crate) fn is_significant(tile: &Tile, gas: usize) -> bool {
- if tile.gases.values[gas] < REACTION_SIGNIFICANCE_MOLES {
- return false;
- }
- if gas != GAS_AGENT_B
- && tile.gases.values[gas] / tile.gases.moles() < REACTION_SIGNIFICANCE_RATIO
- {
- return false;
+/// Perform chemical reactions on the tile.
+pub(crate) fn react(my_next_tile: &mut Tile, hotspot_step: bool) {
+ let fraction: f32;
+ let hotspot_boost: f32;
+ let mut cached_heat_capacity: f32;
+ let mut cached_temperature: f32;
+ let mut thermal_energy: f32;
+ if hotspot_step {
+ fraction = my_next_tile.hotspot_volume;
+ hotspot_boost = PLASMA_BURN_HOTSPOT_RATIO_BOOST;
+ cached_heat_capacity = fraction * my_next_tile.heat_capacity();
+ cached_temperature = my_next_tile.hotspot_temperature;
+ thermal_energy = cached_temperature * cached_heat_capacity;
+ } else {
+ fraction = 1.0 - my_next_tile.hotspot_volume;
+ hotspot_boost = 1.0;
+ cached_heat_capacity = fraction * my_next_tile.heat_capacity();
+ thermal_energy = fraction * my_next_tile.thermal_energy;
+ cached_temperature = thermal_energy / cached_heat_capacity;
}
- return true;
-}
+ let initial_thermal_energy = thermal_energy;
-/// Perform chemical reactions on the tile.
-pub(crate) fn react(my_inactive_tile: &mut Tile) -> f32 {
- let mut fuel_burnt: f32 = 0.0;
- // Handle reactions
- let mut my_inactive_temperature = my_inactive_tile.temperature();
// Agent B converting CO2 to O2
- if my_inactive_temperature > AGENT_B_CONVERSION_TEMP
- && is_significant(my_inactive_tile, GAS_AGENT_B)
- && is_significant(my_inactive_tile, GAS_CARBON_DIOXIDE)
- && is_significant(my_inactive_tile, GAS_TOXINS)
+ if cached_temperature > AGENT_B_CONVERSION_TEMP
+ && my_next_tile.gases.agent_b() > 0.0
+ && my_next_tile.gases.carbon_dioxide() > 0.0
+ && my_next_tile.gases.toxins() > 0.0
{
- let co2_converted = (my_inactive_tile.gases.carbon_dioxide() * 0.75)
- .min(my_inactive_tile.gases.toxins() * 0.25)
- .min(my_inactive_tile.gases.agent_b() * 0.05);
+ let co2_converted = fraction
+ * (my_next_tile.gases.carbon_dioxide() * 0.75)
+ .min(my_next_tile.gases.toxins() * 0.25)
+ .min(my_next_tile.gases.agent_b() * 0.05);
- my_inactive_tile
+ my_next_tile
.gases
- .set_carbon_dioxide(my_inactive_tile.gases.carbon_dioxide() - co2_converted);
- my_inactive_tile
+ .set_carbon_dioxide(my_next_tile.gases.carbon_dioxide() - co2_converted);
+ my_next_tile
.gases
- .set_oxygen(my_inactive_tile.gases.oxygen() + co2_converted);
- my_inactive_tile
+ .set_oxygen(my_next_tile.gases.oxygen() + co2_converted);
+ my_next_tile
.gases
- .set_agent_b(my_inactive_tile.gases.agent_b() - co2_converted * 0.05);
- // Recalculate existing thermal energy to account for the decrease in heat capacity
- // caused by turning very high capacity toxins into much lower capacity carbon
- // dioxide.
- my_inactive_tile.thermal_energy =
- my_inactive_temperature * my_inactive_tile.heat_capacity();
+ .set_agent_b(my_next_tile.gases.agent_b() - co2_converted * 0.05);
+ // Recalculate existing thermal energy to account for the change in heat capacity.
+ cached_heat_capacity = fraction * my_next_tile.heat_capacity();
+ thermal_energy = cached_temperature * cached_heat_capacity;
// THEN we can add in the new thermal energy.
- my_inactive_tile.thermal_energy += co2_converted * AGENT_B_CONVERSION_ENERGY;
+ thermal_energy += AGENT_B_CONVERSION_ENERGY * co2_converted;
// Recalculate temperature for any subsequent reactions.
- my_inactive_temperature = my_inactive_tile.temperature();
- fuel_burnt += co2_converted;
+ cached_temperature = thermal_energy / cached_heat_capacity;
+ my_next_tile.fuel_burnt += co2_converted;
}
// Nitrous Oxide breaking down into nitrogen and oxygen.
- if my_inactive_temperature > SLEEPING_GAS_BREAKDOWN_TEMP
- && is_significant(my_inactive_tile, GAS_SLEEPING_AGENT)
+ if cached_temperature > SLEEPING_GAS_BREAKDOWN_TEMP && my_next_tile.gases.sleeping_agent() > 0.0
{
let reaction_percent = (0.00002
- * (my_inactive_temperature - (0.00001 * (my_inactive_temperature.powi(2)))))
+ * (cached_temperature - (0.00001 * (cached_temperature.powi(2)))))
.max(0.0)
.min(1.0);
- let nitrous_decomposed = reaction_percent * my_inactive_tile.gases.sleeping_agent();
+ let nitrous_decomposed = reaction_percent * fraction * my_next_tile.gases.sleeping_agent();
- my_inactive_tile
+ my_next_tile
.gases
- .set_sleeping_agent(my_inactive_tile.gases.sleeping_agent() - nitrous_decomposed);
- my_inactive_tile
+ .set_sleeping_agent(my_next_tile.gases.sleeping_agent() - nitrous_decomposed);
+ my_next_tile
.gases
- .set_nitrogen(my_inactive_tile.gases.nitrogen() + nitrous_decomposed);
- my_inactive_tile
+ .set_nitrogen(my_next_tile.gases.nitrogen() + nitrous_decomposed);
+ my_next_tile
.gases
- .set_oxygen(my_inactive_tile.gases.oxygen() + nitrous_decomposed / 2.0);
- // Recalculate existing thermal energy to account for the decrease in heat capacity
- // caused by turning very high capacity toxins into much lower capacity carbon
- // dioxide.
- my_inactive_tile.thermal_energy =
- my_inactive_temperature * my_inactive_tile.heat_capacity();
+ .set_oxygen(my_next_tile.gases.oxygen() + nitrous_decomposed / 2.0);
+
+ // Recalculate existing thermal energy to account for the change in heat capacity.
+ cached_heat_capacity = fraction * my_next_tile.heat_capacity();
+ thermal_energy = cached_temperature * cached_heat_capacity;
// THEN we can add in the new thermal energy.
- my_inactive_tile.thermal_energy += NITROUS_BREAKDOWN_ENERGY * nitrous_decomposed;
+ thermal_energy += NITROUS_BREAKDOWN_ENERGY * nitrous_decomposed;
// Recalculate temperature for any subsequent reactions.
- my_inactive_temperature = my_inactive_tile.temperature();
- fuel_burnt += nitrous_decomposed;
+ cached_temperature = thermal_energy / cached_heat_capacity;
+
+ my_next_tile.fuel_burnt += nitrous_decomposed;
}
// Plasmafire!
- if my_inactive_temperature > PLASMA_BURN_MIN_TEMP
- && is_significant(my_inactive_tile, GAS_TOXINS)
- && is_significant(my_inactive_tile, GAS_OXYGEN)
+ if cached_temperature > PLASMA_BURN_MIN_TEMP
+ && my_next_tile.gases.toxins() > 0.0
+ && my_next_tile.gases.oxygen() > 0.0
{
// How efficient is the burn?
// Linear scaling fom 0 to 1 as temperatue goes from minimum to optimal.
- let efficiency = ((my_inactive_temperature - PLASMA_BURN_MIN_TEMP)
+ let efficiency = ((cached_temperature - PLASMA_BURN_MIN_TEMP)
/ (PLASMA_BURN_OPTIMAL_TEMP - PLASMA_BURN_MIN_TEMP))
.max(0.0)
.min(1.0);
- // How much oxygen do we consume per plasma burnt?
- // Linear scaling from worst to best as efficiency goes from 0 to 1.
- let oxygen_per_plasma = PLASMA_BURN_WORST_OXYGEN_PER_PLASMA
- + (PLASMA_BURN_BEST_OXYGEN_PER_PLASMA - PLASMA_BURN_WORST_OXYGEN_PER_PLASMA)
- * efficiency;
-
// How much plasma is available to burn?
- // Capped by oxygen availability. Significantly more oxygen is required than is
- // consumed. This means that if there is enough oxygen to burn all the plasma, the
- // oxygen-to-plasm ratio will increase while burning.
- let burnable_plasma = my_inactive_tile
- .gases
- .toxins()
- .min(my_inactive_tile.gases.oxygen() / PLASMA_BURN_REQUIRED_OXYGEN_AVAILABILITY);
+ let burnable_plasma = fraction * my_next_tile.gases.toxins();
// Actual burn amount.
- let plasma_burnt = efficiency * PLASMA_BURN_MAX_RATIO * burnable_plasma;
+ let mut plasma_burnt = efficiency * PLASMA_BURN_MAX_RATIO * hotspot_boost * burnable_plasma;
+ if plasma_burnt < PLASMA_BURN_MIN_MOLES {
+ // Boost up to the minimum.
+ plasma_burnt = PLASMA_BURN_MIN_MOLES.min(burnable_plasma);
+ }
+ if plasma_burnt * PLASMA_BURN_OXYGEN_PER_PLASMA > fraction * my_next_tile.gases.oxygen() {
+ // Restrict based on available oxygen.
+ plasma_burnt = fraction * my_next_tile.gases.oxygen() / PLASMA_BURN_OXYGEN_PER_PLASMA;
+ }
- my_inactive_tile
+ my_next_tile
.gases
- .set_toxins(my_inactive_tile.gases.toxins() - plasma_burnt);
- my_inactive_tile
+ .set_toxins(my_next_tile.gases.toxins() - plasma_burnt);
+ my_next_tile
.gases
- .set_carbon_dioxide(my_inactive_tile.gases.carbon_dioxide() + plasma_burnt);
- my_inactive_tile
+ .set_carbon_dioxide(my_next_tile.gases.carbon_dioxide() + plasma_burnt);
+ my_next_tile
.gases
- .set_oxygen(my_inactive_tile.gases.oxygen() - plasma_burnt * oxygen_per_plasma);
- // Recalculate existing thermal energy to account for the decrease in heat capacity
- // caused by turning very high capacity toxins into much lower capacity carbon
- // dioxide.
- my_inactive_tile.thermal_energy =
- my_inactive_temperature * my_inactive_tile.heat_capacity();
+ .set_oxygen(my_next_tile.gases.oxygen() - plasma_burnt * PLASMA_BURN_OXYGEN_PER_PLASMA);
+
+ // Recalculate existing thermal energy to account for the change in heat capacity.
+ cached_heat_capacity = fraction * my_next_tile.heat_capacity();
+ thermal_energy = cached_temperature * cached_heat_capacity;
// THEN we can add in the new thermal energy.
- my_inactive_tile.thermal_energy += PLASMA_BURN_ENERGY * plasma_burnt;
- fuel_burnt += plasma_burnt;
+ thermal_energy += PLASMA_BURN_ENERGY * plasma_burnt;
+ // Recalculate temperature for any subsequent reactions.
+ // (or we would, but this is the last reaction)
+ //cached_temperature = thermal_energy / cached_heat_capacity;
+
+ my_next_tile.fuel_burnt += plasma_burnt;
}
- fuel_burnt
+ if hotspot_step {
+ adjust_hotspot(my_next_tile, thermal_energy - initial_thermal_energy);
+ } else {
+ my_next_tile.thermal_energy += thermal_energy - initial_thermal_energy;
+ }
}
/// Apply effects caused by the tile's atmos mode.
pub(crate) fn apply_tile_mode(
- my_tile: &Tile,
- my_inactive_tile: &mut Tile,
+ my_next_tile: &mut Tile,
environments: &Box<[Tile]>,
) -> Result<(), eyre::Error> {
- match my_tile.mode {
+ match my_next_tile.mode {
AtmosMode::Space => {
// Space tiles lose all gas and thermal energy every tick.
for gas in 0..GAS_COUNT {
- my_inactive_tile.gases.values[gas] = 0.0;
+ my_next_tile.gases.values[gas] = 0.0;
}
- my_inactive_tile.gases.set_dirty();
- my_inactive_tile.thermal_energy = 0.0;
+ my_next_tile.gases.set_dirty();
+ my_next_tile.thermal_energy = 0.0;
}
AtmosMode::ExposedTo { environment_id } => {
+ // Exposed tiles reset back to the same state every tick.
if environment_id as usize > environments.len() {
return Err(eyre!("Invalid environment ID {}", environment_id));
}
- let mut environment = environments[environment_id as usize].clone();
-
- // Calculate the amount of air and thermal energy transferred.
- let (gas_change, thermal_energy_change) = share_air(
- // Planetary atmos is aggressive and does a 1-connected-direction share
- // with the otherwise-final air.
- my_inactive_tile,
- &environment,
- 1,
- 1,
- );
-
- // Transfer it.
- for i in 0..GAS_COUNT {
- if gas_change.values[i] != 0.0 {
- my_inactive_tile.gases.values[i] += gas_change.values[i];
- my_inactive_tile.gases.set_dirty();
- }
- }
- my_inactive_tile.thermal_energy += thermal_energy_change;
-
- // Temporarily override the tile's superconductivity, since there's no UP.
- let real_superconductivity = my_inactive_tile.superconductivity;
- my_inactive_tile.superconductivity = Superconductivity::new();
-
- // Superconduct with planetary atmos.
- superconduct(my_inactive_tile, &mut environment, true);
-
- // Restore original superconductivity
- my_inactive_tile.superconductivity = real_superconductivity;
+ let environment = &environments[environment_id as usize];
+ my_next_tile.gases.copy_from(&environment.gases);
+ my_next_tile.thermal_energy = environment.thermal_energy;
}
AtmosMode::Sealed => {
- if my_inactive_tile.temperature() > T20C {
- my_inactive_tile.thermal_energy *= 1.0 - SPACE_COOLING_FACTOR;
+ if my_next_tile.temperature() > SPACE_COOLING_THRESHOLD {
+ let excess_thermal_energy = my_next_tile.thermal_energy
+ - SPACE_COOLING_THRESHOLD * my_next_tile.heat_capacity();
+ let cooling = (SPACE_COOLING_FLAT + SPACE_COOLING_RATIO * excess_thermal_energy)
+ .min(excess_thermal_energy);
+ my_next_tile.thermal_energy -= cooling;
}
}
AtmosMode::NoDecay => {} // No special interactions
@@ -442,54 +691,27 @@ pub(crate) fn apply_tile_mode(
Ok(())
}
-/// Shares air between two connected tiles.
-#[allow(clippy::needless_range_loop)]
-pub(crate) fn share_air(
- mine: &Tile,
- theirs: &Tile,
- my_connected_dirs: i32,
- their_connected_dirs: i32,
-) -> (GasSet, f32) {
- let mut delta_gases = GasSet::new();
- let mut delta_thermal_energy: f32 = 0.0;
-
- // Since we're moving bits of gas independantly, we need to know the temperature of the gas
- // mix.
- let my_old_temperature = mine.temperature();
- let their_old_temperature = theirs.temperature();
-
- // Each gas is handled separately. This is dumb, but it's how LINDA did it, so it's used in V1.
- for gas in 0..GAS_COUNT {
- delta_gases.values[gas] = theirs.gases.values[gas] - mine.gases.values[gas];
- if delta_gases.values[gas] > 0.0 {
- // Gas flowing in from the other tile, limit by its connected_dirs.
- delta_gases.values[gas] /= (their_connected_dirs + 1) as f32;
- // Heat flowing in.
- delta_thermal_energy +=
- SPECIFIC_HEATS[gas] * delta_gases.values[gas] * their_old_temperature;
- } else {
- // Gas flowing out from this tile, limit by our connected_dirs.
- delta_gases.values[gas] /= (my_connected_dirs + 1) as f32;
- // Heat flowing out.
- delta_thermal_energy +=
- SPECIFIC_HEATS[gas] * delta_gases.values[gas] * my_old_temperature;
- }
- }
-
- (delta_gases, delta_thermal_energy)
-}
-
-/// Performs superconduction between two superconductivity-connected tiles.
-pub(crate) fn superconduct(my_tile: &mut Tile, their_tile: &mut Tile, is_east: bool) {
+// Performs superconduction between two superconductivity-connected tiles.
+pub(crate) fn superconduct(my_tile: &mut Tile, their_tile: &mut Tile, is_east: bool, force: bool) {
// Superconduction is scaled to the smaller directional superconductivity setting of the two
// tiles.
let mut transfer_coefficient: f32;
- if is_east {
+ if force {
+ transfer_coefficient = OPEN_HEAT_TRANSFER_COEFFICIENT;
+ } else if is_east {
+ if !my_tile.wall[AXIS_X] {
+ // Atmos flows freely here, no need to superconduct.
+ return;
+ }
transfer_coefficient = my_tile
.superconductivity
.east
.min(their_tile.superconductivity.west);
} else {
+ if !my_tile.wall[AXIS_Y] {
+ // Atmos flows freely here, no need to superconduct.
+ return;
+ }
transfer_coefficient = my_tile
.superconductivity
.north
@@ -509,107 +731,128 @@ pub(crate) fn superconduct(my_tile: &mut Tile, their_tile: &mut Tile, is_east: b
}
// This is the formula from LINDA. I have no idea if it's a good one, I just copied it.
+ // Positive means heat flow from us to them.
+ // Negative means heat flow from them to us.
let conduction = transfer_coefficient
* (my_tile.temperature() - their_tile.temperature())
* my_heat_capacity
* their_heat_capacity
/ (my_heat_capacity + their_heat_capacity);
- my_tile.thermal_energy -= conduction;
- their_tile.thermal_energy += conduction;
+
+ // Half of the conduction always goes to the overall heat of the tile
+ my_tile.thermal_energy -= conduction / 2.0;
+ their_tile.thermal_energy += conduction / 2.0;
+
+ // The other half can spawn or expand hotspots.
+ if conduction > 0.0
+ && my_tile.temperature() > PLASMA_BURN_OPTIMAL_TEMP
+ && their_tile.temperature() < PLASMA_BURN_OPTIMAL_TEMP
+ {
+ // Positive: Spawn or expand their hotspot.
+ adjust_hotspot(their_tile, conduction / 2.0);
+ my_tile.thermal_energy -= conduction / 2.0;
+ } else if conduction < 0.0
+ && my_tile.temperature() < PLASMA_BURN_OPTIMAL_TEMP
+ && their_tile.temperature() > PLASMA_BURN_OPTIMAL_TEMP
+ {
+ // Negative: Spawn or expand my hotspot.
+ adjust_hotspot(my_tile, -conduction / 2.0);
+ their_tile.thermal_energy += conduction / 2.0;
+ } else {
+ // No need for hotspot adjustment.
+ my_tile.thermal_energy -= conduction / 2.0;
+ their_tile.thermal_energy += conduction / 2.0;
+ }
}
-// Yay, tests!
-#[cfg(test)]
-mod tests {
- use super::*;
- // share_air() should do nothing to two space tiles.
- #[test]
- fn share_nothing() {
- let tile_a = Tile::new();
- let tile_b = Tile::new();
+pub(crate) fn normalise_hotspot(tile: &mut Tile) {
+ if tile.hotspot_volume <= 0.0 || tile.hotspot_temperature <= tile.temperature() {
+ // Unnecesary hotspot.
+ tile.hotspot_temperature = 0.0;
+ tile.hotspot_volume = 0.0;
+ return;
+ }
- let (gas_change, thermal_energy_change) = share_air(&tile_a, &tile_b, 1, 1);
- for i in 0..GAS_COUNT {
- assert_eq!(gas_change.values[i], 0.0, "{}", i);
- }
- assert_eq!(thermal_energy_change, 0.0);
- }
-
- // share_air() should do nothing to two matching tiles.
- #[test]
- fn share_equilibrium() {
- let mut tile_a = Tile::new();
- tile_a.gases.set_oxygen(80.0);
- tile_a.gases.set_nitrogen(20.0);
- tile_a.thermal_energy = 100.0;
- let mut tile_b = Tile::new();
- tile_b.gases.set_oxygen(80.0);
- tile_b.gases.set_nitrogen(20.0);
- tile_b.thermal_energy = 100.0;
-
- let (gas_change, thermal_energy_change) = share_air(&tile_a, &tile_b, 1, 1);
- for i in 0..GAS_COUNT {
- assert_eq!(gas_change.values[i], 0.0, "{}", i);
- }
- assert_eq!(thermal_energy_change, 0.0);
+ if tile.hotspot_volume >= 1.0 {
+ // Hotspot has expanded to fill the tile.
+ tile.thermal_energy = tile.hotspot_temperature * tile.heat_capacity();
+ tile.hotspot_temperature = 0.0;
+ tile.hotspot_volume = 0.0;
+ return;
}
- // share_air() should split air into 2 equal parts with connected_dirs of 1.
- #[test]
- fn share_splits_air_cd1() {
- let mut tile_a = Tile::new();
- tile_a.gases.set_oxygen(100.0);
- tile_a.thermal_energy = 100.0;
- let tile_b = Tile::new();
+ let optimal_thermal_energy = PLASMA_BURN_OPTIMAL_TEMP * tile.heat_capacity();
+ let hotspot_extra_thermal_energy = tile.hotspot_volume
+ * (tile.hotspot_temperature - tile.temperature())
+ * tile.heat_capacity();
+ if tile.thermal_energy + hotspot_extra_thermal_energy >= optimal_thermal_energy {
+ // Hotspot has done its job, dump the remaining heat into the tile.
+ tile.thermal_energy += hotspot_extra_thermal_energy;
+ tile.hotspot_temperature = 0.0;
+ tile.hotspot_volume = 0.0;
+ return;
+ }
- let (gas_change, thermal_energy_change) = share_air(&tile_a, &tile_b, 1, 1);
- for i in 0..GAS_COUNT {
- if i == GAS_OXYGEN {
- assert_eq!(gas_change.values[i], -50.0);
- } else {
- assert_eq!(gas_change.values[i], 0.0, "{}", i);
- }
- }
- assert_eq!(thermal_energy_change, -50.0);
+ let hotspot_thermal_energy =
+ tile.hotspot_volume * tile.hotspot_temperature * tile.heat_capacity();
+ if tile.hotspot_temperature > PLASMA_BURN_OPTIMAL_TEMP {
+ // Use excess heat to expand the hotspot.
+ tile.hotspot_volume = hotspot_thermal_energy / optimal_thermal_energy;
+ tile.hotspot_temperature = PLASMA_BURN_OPTIMAL_TEMP;
+ return;
}
- // share_air() should split air into 5 equal parts with connected_dirs of 4.
- #[test]
- fn share_splits_air_cd4() {
- let mut tile_a = Tile::new();
- tile_a.gases.set_oxygen(100.0);
- tile_a.thermal_energy = 100.0;
- let tile_b = Tile::new();
+ if tile.hotspot_temperature < PLASMA_BURN_MIN_TEMP
+ || tile.gases.toxins() <= REACTION_SIGNIFICANCE_MOLES
+ || tile.gases.oxygen() <= REACTION_SIGNIFICANCE_MOLES
+ {
+ // Hotspot can't sustain combustion.
+ tile.thermal_energy += hotspot_extra_thermal_energy;
+ tile.hotspot_temperature = 0.0;
+ tile.hotspot_volume = 0.0;
+ return;
+ }
+}
- let (gas_change, thermal_energy_change) = share_air(&tile_a, &tile_b, 4, 4);
- for i in 0..GAS_COUNT {
- if i == GAS_OXYGEN {
- assert_eq!(gas_change.values[i], -20.0);
- } else {
- assert_eq!(gas_change.values[i], 0.0, "{}", i);
- }
+// Adjusts the hotspot based on the given thermal energy delta.
+// For positive values, the energy will first be used to reach PLASMA_BURN_OPTIMAL_TEMP, then
+// to expand volume up to 1 (filled), and finally dumped into the tile's thermal energy.
+// For negative values, only the hotspot's volume is affected.
+pub(crate) fn adjust_hotspot(tile: &mut Tile, thermal_energy_delta: f32) {
+ if thermal_energy_delta < 0.0 {
+ if tile.hotspot_volume <= 0.0 {
+ // No hotspot to sap heat from.
+ return;
}
- assert_eq!(thermal_energy_change, -20.0);
+ // Shrink volume accordingly.
+ // How much heat do we need to fill the whole tile?
+ let total_heat_needed = tile.heat_capacity() * tile.hotspot_temperature;
+ // How much heat do we have now?
+ let heat_available = tile.heat_capacity() * tile.hotspot_temperature * tile.hotspot_volume
+ + thermal_energy_delta;
+ // We fill that portion of the tile.
+ tile.hotspot_volume = (heat_available / total_heat_needed).max(0.0);
+ } else if tile.hotspot_volume > 0.0 {
+ // Heat up the hotspot; it'll expand when normalised.
+ tile.hotspot_temperature +=
+ thermal_energy_delta / (tile.heat_capacity() * tile.hotspot_volume);
+ } else if tile.temperature() > PLASMA_BURN_OPTIMAL_TEMP {
+ // No need to make a hotspot, just heat the tile.
+ tile.thermal_energy += thermal_energy_delta;
+ } else {
+ // Create an optimal hotspot with the available energy.
+ let optimal_thermal_energy = PLASMA_BURN_OPTIMAL_TEMP * tile.heat_capacity();
+ tile.hotspot_temperature = PLASMA_BURN_OPTIMAL_TEMP;
+ tile.hotspot_volume = thermal_energy_delta / (optimal_thermal_energy - tile.thermal_energy);
}
- // superconduct() should transfer part of the thermal energy between two tiles that differ
- // only in thermal energy.
- #[test]
- fn superconduct_temperature() {
- let mut tile_a = Tile::new();
- tile_a.gases.set_oxygen(80.0);
- tile_a.gases.set_nitrogen(20.0);
- tile_a.thermal_energy = 100.0;
- let mut tile_b = Tile::new();
- tile_b.gases.set_oxygen(80.0);
- tile_b.gases.set_nitrogen(20.0);
- tile_b.thermal_energy = 200.0;
+ normalise_hotspot(tile);
+}
- superconduct(&mut tile_a, &mut tile_b, true);
+// Yay, tests!
+#[cfg(test)]
+mod tests {
+ use super::*;
- // These values are arbitrary, they're just what we get right now.
- // Update them if the calculations changed intentionally.
- assert_eq!(tile_a.thermal_energy, 120.0);
- assert_eq!(tile_b.thermal_energy, 180.0);
- }
+ // TODO
}
diff --git a/rust/src/milla/statics.rs b/rust/src/milla/statics.rs
index 4ecdd702c1b8..d179b5ad74aa 100644
--- a/rust/src/milla/statics.rs
+++ b/rust/src/milla/statics.rs
@@ -10,5 +10,10 @@ pub(crate) static BUFFERS: OnceLock = OnceLock::new();
/// We only write this once per tick, and only read it on user input.
pub(crate) static INTERESTING_TILES: Mutex> = Mutex::new(Vec::new());
+/// The current set of tiles BYOND wants the pressure of.
+/// Written to via BYOND call.
+/// Read from and cleared via BYOND call.
+pub(crate) static TRACKED_PRESSURE_TILES: Mutex> = Mutex::new(Vec::new());
+
/// How long the last tick took, in milliseconds.
pub(crate) static TICK_TIME: AtomicUsize = AtomicUsize::new(0);
diff --git a/rust/src/milla/tick.rs b/rust/src/milla/tick.rs
index bc9afafff1f8..ee197e5788fb 100644
--- a/rust/src/milla/tick.rs
+++ b/rust/src/milla/tick.rs
@@ -1,7 +1,7 @@
-use crate::milla::constants::*;
use crate::milla::model::*;
use crate::milla::simulate;
use crate::milla::statics::*;
+use eyre;
use scc::Bag;
use std::sync::RwLock;
use std::thread;
@@ -13,11 +13,12 @@ pub(crate) fn tick(buffers: &Buffers) -> Result<(), eyre::Error> {
assert!(thread_priority::ThreadPriority::Min
.set_for_current()
.is_ok());
- let active = buffers.get_active().read().unwrap();
- let inactive = buffers.get_inactive().read().unwrap();
+ let prev = buffers.get_active().read().unwrap();
+ let next = buffers.get_inactive().read().unwrap();
let new_interesting_tiles: Bag = Bag::default();
- let mut result: Result<(), eyre::Error> = Ok(());
+ let mut result: eyre::Result<()> = Ok(());
+ let handle_results: RwLock>> = RwLock::new(Vec::new());
// The scope tells Rust that all the threads we create here will end by the time the scope
// closes. This allows us to pass things into them that are only borrowed for the lifetime of
@@ -25,30 +26,39 @@ pub(crate) fn tick(buffers: &Buffers) -> Result<(), eyre::Error> {
thread::scope(|s| {
// Force most things to be captured by reference, despite the `move`
// in the thread spawn, which is really just for `z`.
- let active = &active;
- let inactive = &inactive;
+ let prev = &prev;
+ let next = &next;
let new_interesting_tiles = &new_interesting_tiles;
// Handle each Z level in its own thread.
let mut handles = Vec::>::new();
- for z in 0..active.0.len() {
+ let handle_results = &handle_results;
+ for z in 0..prev.0.len() {
handles.push(s.spawn(move || {
assert!(thread_priority::ThreadPriority::Min
.set_for_current()
.is_ok());
- tick_z_level(
+ let result = tick_z_level(
buffers,
- &active.0[z],
- &inactive.0[z],
+ &prev.0[z],
+ &next.0[z],
z as i32,
&new_interesting_tiles,
- )
- .unwrap();
+ );
+ let mut results = handle_results.write().unwrap();
+ results.push(result);
}));
}
for handle in handles {
- if let Err(e) = handle.join() {
- result = Err(eyre::eyre!("Worker thread failed: {:#?}", e));
+ let _ = handle.join();
+ }
+ let readable_results = handle_results.read().unwrap();
+ for index in 0..readable_results.len() {
+ if readable_results[index].is_err() {
+ result = Err(eyre::eyre!(
+ "MILLA worker thread failed: {:#?}",
+ readable_results[index].as_ref().err()
+ ));
}
}
});
@@ -69,118 +79,28 @@ pub(crate) fn tick(buffers: &Buffers) -> Result<(), eyre::Error> {
/// Runs a single tick of one Z level's atmospherics model.
pub(crate) fn tick_z_level(
buffers: &Buffers,
- active_atmos_lock: &RwLock,
- inactive_atmos_lock: &RwLock,
+ prev_atmos_lock: &RwLock,
+ next_atmos_lock: &RwLock,
z: i32,
new_interesting_tiles: &Bag,
-) -> Result<(), eyre::Error> {
+) -> eyre::Result<()> {
let environments;
{
let global_environments = buffers.environments.read().unwrap();
environments = global_environments.clone().into_boxed_slice();
}
- let active = active_atmos_lock.read().unwrap();
- let mut inactive = inactive_atmos_lock.write().unwrap();
- // Initialize the new frame as a copy of the old one.
- inactive.copy_from(&active);
- for my_index in 0..MAP_SIZE * MAP_SIZE {
- let x = (my_index / MAP_SIZE) as i32;
- let y = (my_index % MAP_SIZE) as i32;
- let my_tile = active.get_tile(my_index);
- let my_connected_dirs = simulate::count_connected_dirs(&active, my_index, x, y)?;
-
- // Handle gas and heat exchange with neighbors.
- for (dx, dy) in AXES {
- let maybe_their_index = ZLevel::maybe_get_index(x + dx, y + dy);
- let their_index;
- match maybe_their_index {
- Some(index) => their_index = index,
- None => continue,
- }
-
- let their_tile = active.get_tile(their_index);
- if let AtmosMode::Space = my_tile.mode {
- if let AtmosMode::Space = their_tile.mode {
- // Exchange what, exactly?
- continue;
- }
- }
- let their_connected_dirs =
- simulate::count_connected_dirs(&active, their_index, x + dx, y + dy)?;
-
- let (my_inactive_tile, their_inactive_tile) =
- inactive.get_pair_mut(my_index, their_index);
+ let prev = prev_atmos_lock.read().unwrap();
+ let mut next = next_atmos_lock.write().unwrap();
- // Bail if we shouldn't share air this way, but still run superconductivity.
- if dx > 0
- && (my_tile
- .airtight_directions
- .contains(AirtightDirections::EAST)
- || their_tile
- .airtight_directions
- .contains(AirtightDirections::WEST))
- {
- simulate::superconduct(my_inactive_tile, their_inactive_tile, true);
- continue;
- }
- if dy > 0
- && (my_tile
- .airtight_directions
- .contains(AirtightDirections::NORTH)
- || their_tile
- .airtight_directions
- .contains(AirtightDirections::SOUTH))
- {
- simulate::superconduct(my_inactive_tile, their_inactive_tile, false);
- continue;
- }
-
- // Calculate the amount of air and thermal energy transferred.
- let (gas_change, thermal_energy_change) =
- simulate::share_air(my_tile, their_tile, my_connected_dirs, their_connected_dirs);
-
- // Transfer it.
- for i in 0..GAS_COUNT {
- if gas_change.values[i] != 0.0 {
- my_inactive_tile.gases.values[i] += gas_change.values[i];
- my_inactive_tile.gases.set_dirty();
- their_inactive_tile.gases.values[i] -= gas_change.values[i];
- their_inactive_tile.gases.set_dirty();
- }
- }
- my_inactive_tile.thermal_energy += thermal_energy_change;
- their_inactive_tile.thermal_energy -= thermal_energy_change;
-
- // Run superconductivity.
- simulate::superconduct(my_inactive_tile, their_inactive_tile, dx > 0);
- }
-
- let my_inactive_tile = inactive.get_tile_mut(my_index);
- simulate::apply_tile_mode(my_tile, my_inactive_tile, &environments)?;
-
- if let AtmosMode::Space = my_tile.mode {
- // Space has no reactions, doesn't need to be sanitized, and is never interesting.
- continue;
- }
-
- // Track how much "fuel" was burnt across all reactions.
- let fuel_burnt = simulate::react(my_inactive_tile);
+ // Initialize the new frame as a copy of the old one.
+ next.copy_from(&prev);
- // Sanitize the tile, to avoid negative/NaN/infinity spread.
- simulate::sanitize(my_inactive_tile, my_tile);
+ simulate::find_walls(&mut next);
+ simulate::update_wind(&prev, &mut next);
+ simulate::flow_air(&prev, &mut next)?;
+ simulate::post_process(&prev, &mut next, &environments, new_interesting_tiles, z)?;
- simulate::check_interesting(
- x,
- y,
- z,
- &active,
- &environments,
- my_tile,
- my_inactive_tile,
- fuel_burnt,
- new_interesting_tiles,
- )?;
- }
+ next.active_pressure_chunks.clear();
Ok(())
}
@@ -189,6 +109,7 @@ pub(crate) fn tick_z_level(
#[cfg(test)]
mod tests {
use super::*;
+ use crate::constants::*;
fn set_with_defaults(legend: F) -> impl Fn(char) -> Tile
where
@@ -226,8 +147,8 @@ mod tests {
where
F: Fn(char) -> Tile,
{
- let active = buffers.get_active().read().unwrap();
- let mut z_level = active.0[z as usize].write().unwrap();
+ let current = buffers.get_active().read().unwrap();
+ let mut z_level = current.0[z as usize].write().unwrap();
for inv_y in 0..pattern.len() {
// Reverse the Y direction, so +Y is up, like in the game.
let y = pattern.len() - inv_y - 1;
@@ -277,8 +198,8 @@ mod tests {
where
F: Fn(char) -> TileChecker,
{
- let active = buffers.get_active().read().unwrap();
- let z_level = active.0[z as usize].read().unwrap();
+ let current = buffers.get_active().read().unwrap();
+ let z_level = current.0[z as usize].read().unwrap();
for inv_y in 0..pattern.len() {
// Reverse the Y direction, so +Y is up, like in the game.
let y = pattern.len() - inv_y - 1;
@@ -525,386 +446,5 @@ mod tests {
// unfortunately, the compiler won't let it be applied in the middle of
// the code right now. It formats right, it just won't compile.
- // Air should split evenly to surrounding vacuum tiles.
- #[test]
- fn tick_splits_air() {
- let buffers = Buffers::new();
- buffers.init_to(0);
-
- set_pattern(
- &buffers,
- &[
- "#######", //
- "# #", //
- "# 0 #", //
- "# 0X0 #", //
- "# 0 #", //
- "# #", //
- "#######", //
- ],
- set_with_defaults(|_c: char| None),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "#######", //
- "# #", //
- "# x #", //
- "# xxx #", //
- "# x #", //
- "# #", //
- "#######", //
- ],
- expect_with_defaults(|c: char| match c {
- 'x' => Some(
- TileChecker::new() //
- .oxygen(20.0)
- .thermal_energy(20.0),
- ),
- _ => None,
- }),
- 0,
- );
- }
-
- // Air should not flow into walls.
- #[test]
- fn tick_respects_walls() {
- let buffers = Buffers::new();
- buffers.init_to(0);
-
- set_pattern(
- &buffers,
- &[
- "###", //
- "#X#", //
- "###", //
- ],
- set_with_defaults(|_c: char| None),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "#0#", //
- "0X0", //
- "#0#", //
- ],
- expect_with_defaults(|_c: char| None),
- 0,
- );
- }
-
- // Air should flow properly into dead-end tiles.
- #[test]
- fn tick_handles_different_connections() {
- let buffers = Buffers::new();
- buffers.init_to(0);
-
- set_pattern(
- &buffers,
- &[
- "#####", //
- "##0##", //
- "#0X0#", //
- "##0##", //
- "#####", //
- ],
- set_with_defaults(|_c: char| None),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "#####", //
- "##x##", //
- "#xxx#", //
- "##x##", //
- "#####", //
- ],
- expect_with_defaults(|c: char| match c {
- 'x' => Some(
- TileChecker::new() //
- .oxygen(20.0)
- .thermal_energy(20.0),
- ),
- _ => None,
- }),
- 0,
- );
- }
-
- // Four equal dead-end tiles around a vacuum should distribute air evenly between all 5 tiles.
- // Temp: Or not, because we're matching MILLA behavior.
- #[test]
- fn tick_merges_properly() {
- let buffers = Buffers::new();
- buffers.init_to(0);
-
- set_pattern(
- &buffers,
- &[
- "#####", //
- "##X##", //
- "#X0X#", //
- "##X##", //
- "#####", //
- ],
- set_with_defaults(|_c: char| None),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "#####", //
- "##x##", //
- "#x!x#", //
- "##x##", //
- "#####", //
- ],
- expect_with_defaults(|c: char| match c {
- '!' => Some(
- TileChecker::new() //
- .oxygen(200.0)
- .thermal_energy(200.0),
- ),
- 'x' => Some(
- TileChecker::new() //
- .oxygen(50.0)
- .thermal_energy(50.0),
- ),
- _ => None,
- }),
- 0,
- );
- }
-
- // Energy should be transferred into superconducting walls.
- #[test]
- fn tick_superconducts_into_walls() {
- let buffers = Buffers::new();
- buffers.init_to(0);
-
- set_pattern(
- &buffers,
- &[
- "######", //
- "##XS##", //
- "#S##X#", //
- "#X##S#", //
- "##SX##", //
- "######", //
- ],
- set_with_defaults(|c: char| match c {
- 'S' => Some(
- TileBuilder::wall() //
- .superconducts(OPEN_HEAT_TRANSFER_COEFFICIENT)
- .innate_heat_capacity(2000.0)
- .build(),
- ),
- _ => None,
- }),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "######", //
- "##xS##", //
- "#S##x#", //
- "#x##S#", //
- "##Sx##", //
- "######", //
- ],
- expect_with_defaults(|c: char| match c {
- 'x' => Some(
- TileChecker::new() //
- .oxygen(100.0)
- // This value is arbitrary, it's just what we get right now.
- // Update it if the calculations changed intentionally.
- .thermal_energy(80.0),
- ),
- 'S' => Some(
- TileChecker::new() //
- // This value is arbitrary, it's just what we get right now.
- // Update it if the calculations changed intentionally.
- .thermal_energy(20.0),
- ),
- _ => None,
- }),
- 0,
- );
- }
-
- // Air should flow into a space tile, and be deleted.
- #[test]
- fn tick_empties_space() {
- let buffers = Buffers::new();
- buffers.init_to(0);
-
- set_pattern(
- &buffers,
- &[
- "#####", //
- "##X##", //
- "#X X#", //
- "##X##", //
- "#####", //
- ],
- set_with_defaults(|c: char| match c {
- 'x' => Some(
- TileBuilder::sealed() //
- .oxygen(100.0)
- .thermal_energy(100.0)
- .build(),
- ),
- _ => None,
- }),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "#####", //
- "##x##", //
- "#x0x#", //
- "##x##", //
- "#####", //
- ],
- expect_with_defaults(|c: char| match c {
- 'x' => Some(
- TileChecker::new() //
- .oxygen(50.0)
- .thermal_energy(50.0),
- ),
- _ => None,
- }),
- 0,
- );
- }
-
- // Air should tend towards the environment's temperature, if any.
- #[test]
- fn tick_affected_by_environment_temperature() {
- let buffers = Buffers::new();
- buffers.init_to(0);
- let lavaland = buffers.create_environment(
- TileBuilder::sealed() //
- .oxygen(8.0)
- .nitrogen(14.0)
- .temperature(500.0)
- .build(),
- );
-
- set_pattern(
- &buffers,
- &[
- "###", //
- "#X#", //
- "###", //
- ],
- set_with_defaults(|c: char| match c {
- 'X' => Some(
- TileBuilder::exposed_to(lavaland)
- .oxygen(8.0)
- .nitrogen(14.0)
- .thermal_energy(0.0)
- .build(),
- ),
- _ => None,
- }),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "###", //
- "#Y#", //
- "###", //
- ],
- expect_with_defaults(|c: char| match c {
- 'Y' => Some(
- TileChecker::new() //
- .oxygen(8.0)
- .nitrogen(14.0)
- // This value is arbitrary, it's just what we get right now.
- // Update it if the calculations changed intentionally.
- .thermal_energy(44_000.0),
- ),
- _ => None,
- }),
- 0,
- );
- }
-
- // Air should exchange with the tile's environment, if any.
- #[test]
- fn tick_affected_by_environment() {
- let buffers = Buffers::new();
- buffers.init_to(0);
- let lavaland = buffers.create_environment(
- TileBuilder::sealed() //
- .oxygen(8.0)
- .nitrogen(14.0)
- .temperature(500.0)
- .build(),
- );
-
- set_pattern(
- &buffers,
- &[
- "###", //
- "#X#", //
- "###", //
- ],
- set_with_defaults(|c: char| match c {
- 'X' => Some(TileBuilder::exposed_to(lavaland).build()),
- _ => None,
- }),
- 0,
- );
-
- tick(&buffers).unwrap();
-
- expect_pattern(
- &buffers,
- &[
- "###", //
- "#Y#", //
- "###", //
- ],
- expect_with_defaults(|c: char| match c {
- 'Y' => Some(
- TileChecker::new() //
- .oxygen(4.0)
- .nitrogen(7.0)
- .temperature(500.0),
- ),
- _ => None,
- }),
- 0,
- );
- }
+ // TODO
}
diff --git a/rustlibs.dll b/rustlibs.dll
index b1b620b7506a..df62886eee9c 100644
Binary files a/rustlibs.dll and b/rustlibs.dll differ
diff --git a/rustlibs_prod.dll b/rustlibs_prod.dll
index 355c4be35408..ac691c7b0862 100644
Binary files a/rustlibs_prod.dll and b/rustlibs_prod.dll differ
diff --git a/sound/magic/magic_block.ogg b/sound/magic/magic_block.ogg
new file mode 100644
index 000000000000..e9c4ffdca948
Binary files /dev/null and b/sound/magic/magic_block.ogg differ
diff --git a/sound/magic/magic_block_holy.ogg b/sound/magic/magic_block_holy.ogg
new file mode 100644
index 000000000000..eb34f01a8960
Binary files /dev/null and b/sound/magic/magic_block_holy.ogg differ
diff --git a/sound/magic/magic_block_mind.ogg b/sound/magic/magic_block_mind.ogg
new file mode 100644
index 000000000000..3b824da3e4c4
Binary files /dev/null and b/sound/magic/magic_block_mind.ogg differ
diff --git a/tgui/packages/tgui/interfaces/AirAlarm.js b/tgui/packages/tgui/interfaces/AirAlarm.js
index 0aa5845671d3..b56a410d14e8 100644
--- a/tgui/packages/tgui/interfaces/AirAlarm.js
+++ b/tgui/packages/tgui/interfaces/AirAlarm.js
@@ -364,24 +364,24 @@ const AirAlarmModesView = (props, context) => {
return (
<>
-
- {modes.map(
- (m) =>
- (!m.emagonly || (m.emagonly && !!emagged)) && (
-
-
- act('mode', { mode: m.id })}
- />
-
- {m.desc}
-
- )
- )}
-
+ {Object.keys(modes).map((key) => {
+ let m = modes[key];
+ if (!m.emagonly || !!emagged) {
+ return (
+
+
+ act('mode', { mode: m.id })}
+ />
+
+ {m.desc}
+
+ );
+ }
+ })}
After making a selection, the system will automatically cycle in order to remove contaminants.
diff --git a/tgui/packages/tgui/interfaces/AtmosAlertConsole.js b/tgui/packages/tgui/interfaces/AtmosAlertConsole.js
index 15f9c2fb978a..30a1fc31bc03 100644
--- a/tgui/packages/tgui/interfaces/AtmosAlertConsole.js
+++ b/tgui/packages/tgui/interfaces/AtmosAlertConsole.js
@@ -6,6 +6,7 @@ export const AtmosAlertConsole = (props, context) => {
const { act, data } = useBackend(context);
const priorityAlerts = data.priority || [];
const minorAlerts = data.minor || [];
+ const areaModes = data.mode || {};
return (
@@ -23,6 +24,12 @@ export const AtmosAlertConsole = (props, context) => {
{alert}
))}
+ {Object.keys(areaModes).length === 0 && All Areas Filtering }
+ {Object.keys(areaModes).map((label) => (
+
+ {label} mode is {areaModes[label]}
+
+ ))}
diff --git a/tgui/packages/tgui/interfaces/GhostHudPanel.js b/tgui/packages/tgui/interfaces/GhostHudPanel.js
index 742db732f0f9..ba0362a47d03 100644
--- a/tgui/packages/tgui/interfaces/GhostHudPanel.js
+++ b/tgui/packages/tgui/interfaces/GhostHudPanel.js
@@ -4,14 +4,15 @@ import { Window } from '../layouts';
export const GhostHudPanel = (props, context) => {
const { data } = useBackend(context);
- const { security, medical, diagnostic, radioactivity, ahud } = data;
+ const { security, medical, diagnostic, pressure, radioactivity, ahud } = data;
return (
-
+
+
{
const [tweakedGear, setTweakedGear] = useLocalState(context, 'tweakedGear', '');
return (
-
+
{tweakedGear && }
diff --git a/tgui/public/tgui.bundle.js b/tgui/public/tgui.bundle.js
index 252bda29da90..2de0d900402b 100644
--- a/tgui/public/tgui.bundle.js
+++ b/tgui/public/tgui.bundle.js
@@ -242,11 +242,11 @@
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
- */var b=(0,t.createLogger)("hotkeys"),y={},B=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],k={},g=function(d){if(d===16)return"Shift";if(d===17)return"Ctrl";if(d===18)return"Alt";if(d===33)return"Northeast";if(d===34)return"Southeast";if(d===35)return"Southwest";if(d===36)return"Northwest";if(d===37)return"West";if(d===38)return"North";if(d===39)return"East";if(d===40)return"South";if(d===45)return"Insert";if(d===46)return"Delete";if(d>=48&&d<=57||d>=65&&d<=90)return String.fromCharCode(d);if(d>=96&&d<=105)return"Numpad"+(d-96);if(d>=112&&d<=123)return"F"+(d-111);if(d===188)return",";if(d===189)return"-";if(d===190)return"."},i=function(d){var C=String(d);if(C==="Ctrl+F5"||C==="Ctrl+R"){location.reload();return}if(C!=="Ctrl+F"&&!(d.event.defaultPrevented||d.isModifierKey()||B.includes(d.code))){C==="F5"&&(d.event.preventDefault(),d.event.returnValue=!1);var h=g(d.code);if(h){var v=y[h];if(v)return b.debug("macro",v),Byond.command(v);if(d.isDown()&&!k[h]){k[h]=!0;var p='Key_Down "'+h+'"';return b.debug(p),Byond.command(p)}if(d.isUp()&&k[h]){k[h]=!1;var N='Key_Up "'+h+'"';return b.debug(N),Byond.command(N)}}}},c=r.acquireHotKey=function(){function s(d){B.push(d)}return s}(),m=r.releaseHotKey=function(){function s(d){var C=B.indexOf(d);C>=0&&B.splice(C,1)}return s}(),l=r.releaseHeldKeys=function(){function s(){for(var d=0,C=Object.keys(k);d0||(0,a.fetchRetry)((0,e.resolveAsset)("icon_ref_map.json")).then(function(b){return b.json()}).then(function(b){return Byond.iconRefMap=b}).catch(function(b){return t.logger.log(b)})}return f}()},1090:function(T,r,n){"use strict";r.__esModule=!0,r.AICard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AICard=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;if(i.has_ai===0)return(0,e.createComponentVNode)(2,o.Window,{width:250,height:120,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var c=null;return i.integrity>=75?c="green":i.integrity>=25?c="yellow":c="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:c,value:i.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,i.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(m,l){return(0,e.createComponentVNode)(2,t.Box,{children:m},l)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.wireless?"check":"times",content:i.wireless?"Enabled":"Disabled",color:i.wireless?"green":"red",onClick:function(){function m(){return g("wireless")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.radio?"check":"times",content:i.radio?"Enabled":"Disabled",color:i.radio?"green":"red",onClick:function(){function m(){return g("radio")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:i.flushing||i.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function m(){return g("wipe")}return m}()})})]})})})]})})})}return b}()},39454:function(T,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AIFixer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;if(i.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var c=!0;(i.stat===2||i.stat===null)&&(c=!1);var m=null;i.integrity>=75?m="green":i.integrity>=25?m="yellow":m="red";var l=!0;return i.integrity>=100&&i.stat!==2&&(l=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:m,value:i.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(u,s){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:u},s)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.wireless?"times":"check",content:i.wireless?"Disabled":"Enabled",color:i.wireless?"red":"green",onClick:function(){function u(){return g("wireless")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.radio?"times":"check",content:i.radio?"Disabled":"Enabled",color:i.radio?"red":"green",onClick:function(){function u(){return g("radio")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!l||i.active,content:!l||i.active?"Already Repaired":"Repair",onClick:function(){function u(){return g("fix")}return u}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:i.active?"Reconstruction in progress.":""})]})})]})})})}return b}()},88422:function(T,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(195),b=r.APC=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return g}(),y={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},B={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.locked&&!u.siliconUser,d=u.normallyLocked,C=y[u.externalPower]||y[0],h=y[u.chargingStatus]||y[0],v=u.powerChannels||[],p=B[u.malfStatus]||B[0],N=u.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:C.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){function V(){return l("breaker")}return V}()}),children:["[ ",C.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:N})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:h.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){function V(){return l("charge")}return V}()}),children:["[ ",h.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.map(function(V){var S=V.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:V.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:V.status>=2?"good":"bad",children:V.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!s&&(V.status===1||V.status===3),disabled:s,onClick:function(){function I(){return l("channel",S.auto)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!s&&V.status===2,disabled:s,onClick:function(){function I(){return l("channel",S.on)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!s&&V.status===0,disabled:s,onClick:function(){function I(){return l("channel",S.off)}return I}()})],4),children:[V.powerLoad," W"]},V.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[u.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,e.createFragment)([!!u.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:p.icon,content:p.content,color:"bad",onClick:function(){function V(){return l(p.action)}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function V(){return l("overload")}return V}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){function V(){return l("cover")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:u.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){function V(){return l("emergency_lighting")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",onClick:function(){function V(){return l("toggle_nightshift")}return V}()})})]})})],4)}},99660:function(T,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ATM=function(){function m(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.view_screen,v=C.authenticated_account,p=C.ticks_left_locked_down,N=C.linked_db,V;if(p>0)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!N)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(v)switch(h){case 1:V=(0,e.createComponentVNode)(2,y);break;case 2:V=(0,e.createComponentVNode)(2,B);break;case 3:V=(0,e.createComponentVNode)(2,i);break;default:V=(0,e.createComponentVNode)(2,k)}else V=(0,e.createComponentVNode)(2,g);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Section,{children:V})]})})}return m}(),b=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.machine_id,v=C.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"eject",onClick:function(){function p(){return d("insert_card")}return p}()})})})]})},y=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:h===0,onClick:function(){function v(){return d("change_security_level",{new_security_level:1})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:h===2,onClick:function(){function v(){return d("change_security_level",{new_security_level:2})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},B=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=(0,a.useLocalState)(u,"targetAccNumber",0),v=h[0],p=h[1],N=(0,a.useLocalState)(u,"fundsAmount",0),V=N[0],S=N[1],I=(0,a.useLocalState)(u,"purpose",0),L=I[0],w=I[1],A=C.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function x(E,P){return p(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function x(E,P){return S(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function x(E,P){return w(P)}return x}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function x(){return d("transfer",{target_acc_number:v,funds_amount:V,purpose:L})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},k=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=(0,a.useLocalState)(u,"fundsAmount",0),v=h[0],p=h[1],N=C.owner_name,V=C.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+N,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function S(){return d("logout")}return S}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",V]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function S(I,L){return p(L)}return S}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function S(){return d("withdrawal",{funds_amount:v})}return S}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function S(){return d("view_screen",{view_screen:1})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function S(){return d("view_screen",{view_screen:2})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function S(){return d("view_screen",{view_screen:3})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function S(){return d("balance_statement")}return S}()})})]})],4)},g=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=(0,a.useLocalState)(u,"accountID",null),v=h[0],p=h[1],N=(0,a.useLocalState)(u,"accountPin",null),V=N[0],S=N[1],I=C.machine_id,L=C.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return p(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return S(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function w(){return d("attempt_auth",{account_num:v,account_pin:V})}return w}()})})]})})},i=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),h.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:v.is_deposit?"green":"red",children:["$",v.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.target_name})]},v)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function h(){return d("view_screen",{view_screen:0})}return h}()})}},86423:function(T,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(36352),b=n(98595),y=n(321),B=n(5485),k=r.AccountsUplinkTerminal=function(){function C(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.loginState,I=V.currentPage,L;if(S.logged_in)I===1?L=(0,e.createComponentVNode)(2,i):I===2?L=(0,e.createComponentVNode)(2,s):I===3&&(L=(0,e.createComponentVNode)(2,d));else return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B.LoginScreen)})})});return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:L})]})})})}return C}(),g=function(h,v){var p=(0,t.useBackend)(v),N=p.data,V=(0,t.useLocalState)(v,"tabIndex",0),S=V[0],I=V[1],L=N.login_state;return(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,mb:1,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===0,onClick:function(){function w(){return I(0)}return w}(),children:"User Accounts"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===1,onClick:function(){function w(){return I(1)}return w}(),children:"Department Accounts"})]})})})},i=function(h,v){var p=(0,t.useLocalState)(v,"tabIndex",0),N=p[0];switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.accounts,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1],A=(0,t.useLocalState)(v,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(v,"sortOrder",!0),D=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,l,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,l,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,l,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,l,{id:"money",children:"Account Balance"})]}),S.filter((0,a.createSearch)(L,function(R){return R.owner_name+"|"+R.account_number+"|"+R.suspended+"|"+R.money})).sort(function(R,O){var F=D?1:-1;return R[x].localeCompare(O[x])*F}).map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+R.suspended,onClick:function(){function O(){return N("view_account_detail",{account_num:R.account_number})}return O}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",R.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",R.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.money})]},R.account_number)})]})})})]})},m=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.department_accounts;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,f.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Balance"})]}),S.map(function(I){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+I.suspended,onClick:function(){function L(){return N("view_account_detail",{account_num:I.account_number})}return L}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"wallet"})," ",I.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",I.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.money})]},I.account_number)})]})})})})},l=function(h,v){var p=(0,t.useLocalState)(v,"sortId","name"),N=p[0],V=p[1],S=(0,t.useLocalState)(v,"sortOrder",!0),I=S[0],L=S[1],w=h.id,A=h.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:N!==w&&"transparent",width:"100%",onClick:function(){function x(){N===w?L(!I):(V(w),L(!0))}return x}(),children:[A,N===w&&(0,e.createComponentVNode)(2,o.Icon,{name:I?"sort-up":"sort-down",ml:"0.25rem;"})]})})},u=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.is_printing,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function A(){return N("create_new_account")}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function A(x,E){return w(E)}return A}()})})]})},s=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.account_number,I=V.owner_name,L=V.money,w=V.suspended,A=V.transactions,x=V.account_pin,E=V.is_department_account;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+S+" / "+I,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function P(){return N("back")}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",S]}),!!E&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin",children:x}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin Actions",children:(0,e.createComponentVNode)(2,o.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:!!E,onClick:function(){function P(){return N("set_account_pin",{account_number:S})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:I}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:L}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:w?"red":"green",children:[w?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:w?"Unsuspend":"Suspend",icon:w?"unlock":"lock",onClick:function(){function P(){return N("toggle_suspension")}return P}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),A.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:P.is_deposit?"green":"red",children:["$",P.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.target_name})]},P)})]})})})]})},d=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=(0,t.useLocalState)(v,"accName",""),I=S[0],L=S[1],w=(0,t.useLocalState)(v,"accDeposit",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function E(){return N("back")}return E}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function E(P,D){return L(D)}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function E(P,D){return x(D)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return N("finalise_create_account",{holder_name:I,starting_funds:A})}return E}()})]})}},23001:function(T,r,n){"use strict";r.__esModule=!0,r.AdminAntagMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(36352),b=n(98595),y=n(321),B=n(5485),k=function(C){switch(C){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";default:return"Something went wrong with this menu, make an issue report please!"}},g=function(C){switch(C){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);case 2:return(0,e.createComponentVNode)(2,l);case 3:return(0,e.createComponentVNode)(2,u);default:return"Something went wrong with this menu, make an issue report please!"}},i=r.AdminAntagMenu=function(){function d(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.loginState,S=N.currentPage,I=(0,t.useLocalState)(h,"tabIndex",0),L=I[0],w=I[1],A=(0,t.useLocalState)(h,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0)}return P}(),icon:"user",children:"Antagonists"},"Antagonists"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1)}return P}(),icon:"people-robbery",children:"Objectives"},"Objectives"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2)}return P}(),icon:"handcuffs",children:"Security"},"Security"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===3,onClick:function(){function P(){w(3)}return P}(),icon:"lock",children:"High Value Items"},"HighValueItems")]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:k(L),fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search...",width:"300px",onInput:function(){function P(D,M){return E(M)}return P}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",onClick:function(){function P(){return p("refresh")}return P}(),children:"Refresh"})]}),children:g(L)})})]})})})}return d}(),c=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.antagonists,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId","antag_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{id:"name",children:"Mob Name"}),(0,e.createComponentVNode)(2,s,{id:"",children:"Buttons"}),(0,e.createComponentVNode)(2,s,{id:"antag_name",children:"Antagonist Type"}),(0,e.createComponentVNode)(2,s,{id:"status",children:"Status"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.status+"|"+M.antag_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:M.body_destroyed?M.name:(0,e.createComponentVNode)(2,o.Button,{color:M.is_hijacker||!M.name?"red":"",tooltip:M.is_hijacker?"Hijacker":"",onClick:function(){function O(){return p("show_player_panel",{mind_uid:M.antag_mind_uid})}return O}(),children:M.name?M.name:"??? (NO NAME)"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("pm",{ckey:M.ckey})}return O}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.antag_mind_uid})}return O}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obs",{mind_uid:M.antag_mind_uid})}return O}(),children:"OBS"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("tp",{mind_uid:M.antag_mind_uid})}return O}(),children:"TP"})]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.antag_name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"red":"grey",children:M.status?M.status:"Alive"})})]},R)})]}):"No Antagonists!"},m=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.objectives,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId2","target_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),V.filter((0,a.createSearch)(I,function(M){return M.obj_name+"|"+M.target_name+"|"+(M.status?"success":"incompleted")+"|"+M.owner_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null||A==="target_name"&&M.no_target?O:R[A]===void 0||R[A]===null||A==="target_name"&&R.no_target?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,onClick:function(){function O(){return p("vv",{uid:M.obj_uid})}return O}(),children:M.obj_name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.no_target?"":M.track.length?M.track.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("follow",{datum_uid:O})}return _}(),children:[M.target_name," ",M.track.length>1?"("+(parseInt(F,10)+1)+")":""]},F)}):"No "+M.target_name+" Found"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"green":"grey",children:M.status?"Success":"Incomplete"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obj_owner",{owner_uid:M.owner_uid})}return O}(),children:M.owner_name})})]},R)})]}):"No Objectives!"},l=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.security,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId3","health"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1],M=function(F){return F.status===2?"red":F.status===1?"orange":F.broken_bone||F.internal_bleeding?"yellow":"grey"},R=function(F){return F.status===2?"Dead":F.status===1?"Unconscious":F.broken_bone&&F.internal_bleeding?"Broken Bone, IB":F.broken_bone?"Broken Bone":F.internal_bleeding?"IB":"Alive"};return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"role",children:"Role"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"health",children:"Health"})]}),V.filter((0,a.createSearch)(I,function(O){return O.name+"|"+O.role+"|"+R(O)+"|"+O.antag})).sort(function(O,F){var _=P?1:-1;return O[A]===void 0||O[A]===null?_:F[A]===void 0||F[A]===null?-1*_:typeof O[A]=="number"?(O[A]-F[A])*_:O[A].localeCompare(F[A])*_}).map(function(O,F){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("show_player_panel",{mind_uid:O.mind_uid})}return _}(),children:O.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.role}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:M(O),children:R(O)})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.antag?(0,e.createComponentVNode)(2,o.Button,{textColor:"red",translucent:!0,onClick:function(){function _(){p("tp",{mind_uid:O.mind_uid})}return _}(),children:O.antag}):""}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,value:O.health/O.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:O.health})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("pm",{ckey:O.ckey})}return _}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("follow",{datum_uid:O.mind_uid})}return _}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("obs",{mind_uid:O.mind_uid})}return _}(),children:"OBS"})]})]},F)})]}):"No Security!"},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.high_value_items,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId4","person"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.loc})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,translucent:M.admin_z,onClick:function(){function O(){return p("vv",{uid:M.uid})}return O}(),children:M.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.person})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.loc})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:"grey",children:M.admin_z?"On Admin Z-level":""})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.uid})}return O}(),children:"FLW"})})]},R)})]}):"No High Value Items!"},s=function(C,h){var v=C.id,p=C.sort_group,N=p===void 0?"sortId":p,V=C.default_sort,S=V===void 0?"antag_name":V,I=C.children,L=(0,t.useLocalState)(h,N,S),w=L[0],A=L[1],x=(0,t.useLocalState)(h,"sortOrder",!0),E=x[0],P=x[1];return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:w!==v&&"transparent",width:"100%",onClick:function(){function D(){w===v?P(!E):(A(v),P(!0))}return D}(),children:[I,w===v&&(0,e.createComponentVNode)(2,o.Icon,{name:E?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},39683:function(T,r,n){"use strict";r.__esModule=!0,r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=[{name:"Male",icon:"mars"},{name:"Female",icon:"venus"},{name:"Genderless",icon:"genderless"}],b=["A+","A-","B+","B-","AB+","AB-","O+","O-"],y="Empty",B=function(m){var l=m.label,u=m.value,s=m.onCommit,d=m.onClick,C=m.onRClick,h=m.tooltip;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Input,{fluid:!0,textAlign:"center",content:u||y,onCommit:s})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"file-signature",tooltip:h,tooltipPosition:"bottom-end",onClick:d,onContextMenu:C})})]})})},k=r.AgentCard=function(){function c(m,l){var u=(0,a.useLocalState)(l,"tabIndex",0),s=u[0],d=u[1],C=function(){function h(v){switch(v){case 0:return(0,e.createComponentVNode)(2,g);case 1:return(0,e.createComponentVNode)(2,i);default:return(0,e.createComponentVNode)(2,g)}}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:435,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:s===0,onClick:function(){function h(){return d(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:s===1,onClick:function(){function h(){return d(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card"})," Appearance"]},"Appearance")]})}),C(s)]})})})}return c}(),g=r.AgentCardInfo=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.registered_name,h=d.sex,v=d.age,p=d.assignment,N=d.job_icon,V=d.associated_account_number,S=d.blood_type,I=d.dna_hash,L=d.fingerprint_hash,w=d.photo,A=d.ai_tracking,x=d.photo_cooldown,E=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill someone else data.")],4),P=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill with random data.")],4);return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,B,{label:"Name",value:C,tooltip:E,onCommit:function(){function D(M,R){return s("change_name",{name:R})}return D}(),onClick:function(){function D(){return s("change_name",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_name",{option:"Secondary"})}return D}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:f.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:D.icon,content:D.name,selected:h===D.name,onClick:function(){function M(){return s("change_sex",{sex:D.name})}return M}()})},D.name)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,t.Slider,{fluid:!0,minValue:17,value:v||0,maxValue:300,onChange:function(){function D(M,R){return s("change_age",{age:R})}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rank",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function D(){return s("change_occupation")}return D}(),textAlign:"middle",children:p||"[UNSET]"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{tooltip:"Change HUD icon",tooltipPosition:"bottom-end",onClick:function(){function D(){return s("change_occupation",{option:"Primary"})}return D}(),children:[(0,e.createComponentVNode)(2,t.DmIcon,{fill:!0,icon:"icons/mob/hud/job_assets.dmi",icon_state:N,verticalAlign:"bottom",my:"2px",width:"16px"})," "]})})]})}),(0,e.createComponentVNode)(2,B,{label:"Fingerprint",value:L,onCommit:function(){function D(M,R){return s("change_fingerprints",{new_fingerprints:R})}return D}(),onClick:function(){function D(){return s("change_fingerprints",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_fingerprints",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[b.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:D,selected:S===D,onClick:function(){function M(){return s("change_blood_type",{new_type:D})}return M}()})},D)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-signature",onClick:function(){function D(){return s("change_blood_type",{option:"Primary"})}return D}()})})]})}),(0,e.createComponentVNode)(2,B,{label:"DNA",value:I,onCommit:function(){function D(M,R){return s("change_dna_hash",{new_dna:R})}return D}(),onClick:function(){function D(){return s("change_dna_hash",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_dna_hash",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,B,{label:"Account",value:V||0,onCommit:function(){function D(M,R){return s("change_money_account",{new_account:R})}return D}(),onClick:function(){function D(){return s("change_money_account",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_money_account",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!x,tooltip:x?"":"You can't generate a new photo yet.",onClick:function(){function D(){return s("change_photo")}return D}(),children:w?"Update":y})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Card Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Delete Card Info",confirmContent:"Are you sure?",onClick:function(){function D(){return s("delete_info")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Reset Access",confirmContent:"Are you sure?",onClick:function(){function D(){return s("clear_access")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",onClick:function(){function D(){return s("change_ai_tracking")}return D}(),children:A?"Untrackable":"Trackable"})})]})})})],4)}return c}(),i=r.AgentCardAppearances=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=(0,a.useSharedState)(l,"selectedAppearance",null),h=C[0],v=C[1],p=d.appearances,N=d.id_icon;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Card Appearance",children:p.map(function(V){return(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:N,dmIconState:V,imageSize:64,compact:!0,selected:V===h,tooltip:V,style:{opacity:V===h&&"1"||"0.5"},onClick:function(){function S(){v(V),s("change_appearance",{new_appearance:V})}return S}()},V)})})})}return c}()},56793:function(T,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},b=r.AiAirlock=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=f[c.power.main]||f[0],l=f[c.power.backup]||f[0],u=f[c.shock]||f[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:m.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function s(){return i("disrupt-main")}return s}()}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"["+c.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:l.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function s(){return i("disrupt-backup")}return s}()}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"["+c.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:u.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&c.shock!==2),content:"Restore",onClick:function(){function s(){return i("shock-restore")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){function s(){return i("shock-temp")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!c.wires.shock||c.shock===0,content:"Permanent",onClick:function(){function s(){return i("shock-perm")}return s}()})],4),children:[c.shock===2?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"["+c.shock_timeleft+"s]"||c.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){function s(){return i("idscan-toggle")}return s}()}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){function s(){return i("emergency-toggle")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){function s(){return i("bolt-toggle")}return s}()}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){function s(){return i("light-toggle")}return s}()}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){function s(){return i("safe-toggle")}return s}()}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){function s(){return i("speed-toggle")}return s}()}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){function s(){return i("open-close")}return s}()}),children:!!(c.locked||c.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return y}()},72475:function(T,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(195),b=r.AirAlarm=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:p?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,B),!p&&(0,e.createFragment)([(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)],4)]})})}return u}(),y=function(s){return s===0?"green":s===1?"orange":"red"},B=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.air,N=v.mode,V=v.atmos_alarm,S=v.locked,I=v.alarmActivated,L=v.rcon,w=v.target_temp,A;return p.danger.overall===0?V===0?A="Optimal":A="Caution: Atmos alert in area":p.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:p?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.pressure})," kPa",!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:N===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:N===3,icon:"exclamation-triangle",onClick:function(){function x(){return h("mode",{mode:N===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.oxygen/100,fractionDigits:"1",color:y(p.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.nitrogen/100,fractionDigits:"1",color:y(p.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.co2/100,fractionDigits:"1",color:y(p.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.plasma/100,fractionDigits:"1",color:y(p.danger.plasma)})}),p.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.n2o/100,fractionDigits:"1",color:y(p.danger.n2o)})}),p.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.other/100,fractionDigits:"1",color:y(p.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature})," K / ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function x(){return h("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:p.thermostat_state?"On":"Off",selected:p.thermostat_state,icon:"power-off",onClick:function(){function x(){return h("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.danger.overall),children:[A,!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:I?"Reset Alarm":"Activate Alarm",selected:I,onClick:function(){function x(){return h(I?"atmos_reset":"atmos_alarm")}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:L===1,onClick:function(){function x(){return h("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function x(){return h("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function x(){return h("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},k=function(s,d){var C=(0,a.useLocalState)(d,"tabIndex",0),h=C[0],v=C[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===0,onClick:function(){function p(){return v(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===1,onClick:function(){function p(){return v(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===2,onClick:function(){function p(){return v(2)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===3,onClick:function(){function p(){return v(3)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},g=function(s,d){var C=(0,a.useLocalState)(d,"tabIndex",0),h=C[0],v=C[1];switch(h){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,m);case 3:return(0,e.createComponentVNode)(2,l);default:return"WE SHOULDN'T BE HERE!"}},i=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.vents;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return h("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.direction?"Blowing":"Siphoning",icon:N.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function V(){return h("command",{cmd:"direction",val:!N.direction,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:N.checks===1,onClick:function(){function V(){return h("command",{cmd:"checks",val:1,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:N.checks===2,onClick:function(){function V(){return h("command",{cmd:"checks",val:2,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:N.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function V(){return h("command",{cmd:"set_external_pressure",id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function V(){return h("command",{cmd:"set_external_pressure",val:101.325,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.scrubbers;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return h("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.scrubbing?"Scrubbing":"Siphoning",icon:N.scrubbing?"filter":"sign-in-alt",onClick:function(){function V(){return h("command",{cmd:"scrubbing",val:!N.scrubbing,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:N.widenet?"Extended":"Normal",selected:N.widenet,icon:"expand-arrows-alt",onClick:function(){function V(){return h("command",{cmd:"widenet",val:!N.widenet,id_tag:N.id_tag})}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:N.filter_co2,onClick:function(){function V(){return h("command",{cmd:"co2_scrub",val:!N.filter_co2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:N.filter_toxins,onClick:function(){function V(){return h("command",{cmd:"tox_scrub",val:!N.filter_toxins,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:N.filter_n2o,onClick:function(){function V(){return h("command",{cmd:"n2o_scrub",val:!N.filter_n2o,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:N.filter_o2,onClick:function(){function V(){return h("command",{cmd:"o2_scrub",val:!N.filter_o2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:N.filter_n2,onClick:function(){function V(){return h("command",{cmd:"n2_scrub",val:!N.filter_n2,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},m=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.modes,N=v.presets,V=v.emagged,S=v.mode,I=v.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:(0,e.createComponentVNode)(2,t.Table,{children:p.map(function(L){return(!L.emagonly||L.emagonly&&!!V)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===S,onClick:function(){function w(){return h("mode",{mode:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:N.map(function(L){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===I,onClick:function(){function w(){return h("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},l=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),p.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.name}),N.settings.map(function(V){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:V.selected===-1?"Off":V.selected,onClick:function(){function S(){return h("command",{cmd:"set_threshold",env:V.env,var:V.val})}return S}()})},V.val)})]},N.name)})]})})}},12333:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AirlockAccessController=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.exterior_status,m=i.interior_status,l=i.processing,u,s;return c==="open"?u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:l,onClick:function(){function d(){return g("force_ext")}return d}()}):u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:l,onClick:function(){function d(){return g("cycle_ext_door")}return d}()}),m==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:l,color:m==="open"?"red":l?"yellow":null,onClick:function(){function d(){return g("force_int")}return d}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:l,onClick:function(){function d(){return g("cycle_int_door")}return d}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:c==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:m==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[u,s]})})]})})}return b}()},28736:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(49148),b=1,y=2,B=4,k=8,g=r.AirlockElectronics=function(){function m(l,u){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})})}return m}(),i=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:h&B,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:B})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:h&y,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:y})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:h&k,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:k})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:h&b,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:b})}return v}()})})]})]})})},c=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.selected_accesses,v=C.one_access,p=C.regions;return(0,e.createComponentVNode)(2,f.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:v,content:"One",onClick:function(){function N(){return d("set_one_access",{access:"one"})}return N}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!v,content:"All",onClick:function(){function N(){return d("set_one_access",{access:"all"})}return N}()})],4),accesses:p,selectedList:h,accessMod:function(){function N(V){return d("set",{access:V})}return N}(),grantAll:function(){function N(){return d("grant_all")}return N}(),denyAll:function(){function N(){return d("clear_all")}return N}(),grantDep:function(){function N(V){return d("grant_region",{region:V})}return N}(),denyDep:function(){function N(V){return d("deny_region",{region:V})}return N}()})}},47365:function(T,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(92986),f=n(36036),b=n(98595),y=-1,B=1,k=r.AlertModal=function(){function c(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.autofocus,h=d.buttons,v=h===void 0?[]:h,p=d.large_buttons,N=d.message,V=N===void 0?"":N,S=d.timeout,I=d.title,L=(0,t.useLocalState)(l,"selected",0),w=L[0],A=L[1],x=110+(V.length>30?Math.ceil(V.length/4):0)+(V.length&&p?5:0),E=325+(v.length>2?100:0),P=function(){function D(M){w===0&&M===y?A(v.length-1):w===v.length-1&&M===B?A(0):A(w+M)}return D}();return(0,e.createComponentVNode)(2,b.Window,{title:I,height:x,width:E,children:[!!S&&(0,e.createComponentVNode)(2,a.Loader,{value:S}),(0,e.createComponentVNode)(2,b.Window.Content,{onKeyDown:function(){function D(M){var R=window.event?M.which:M.keyCode;R===o.KEY_SPACE||R===o.KEY_ENTER?s("choose",{choice:v[w]}):R===o.KEY_ESCAPE?s("cancel"):R===o.KEY_LEFT?(M.preventDefault(),P(y)):(R===o.KEY_TAB||R===o.KEY_RIGHT)&&(M.preventDefault(),P(B))}return D}(),children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,f.Box,{color:"label",overflow:"hidden",children:V})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:[!!C&&(0,e.createComponentVNode)(2,f.Autofocus),(0,e.createComponentVNode)(2,g,{selected:w})]})]})})})]})}return c}(),g=function(m,l){var u=(0,t.useBackend)(l),s=u.data,d=s.buttons,C=d===void 0?[]:d,h=s.large_buttons,v=s.swapped_buttons,p=m.selected;return(0,e.createComponentVNode)(2,f.Flex,{fill:!0,align:"center",direction:v?"row":"row-reverse",justify:"space-around",wrap:!0,children:C==null?void 0:C.map(function(N,V){return h&&C.length<3?(0,e.createComponentVNode)(2,f.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{button:N,id:V.toString(),selected:p===V})},V):(0,e.createComponentVNode)(2,f.Flex.Item,{grow:h?1:0,children:(0,e.createComponentVNode)(2,i,{button:N,id:V.toString(),selected:p===V})},V)})})},i=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.large_buttons,h=m.button,v=m.selected,p=h.length>7?"100%":7;return(0,e.createComponentVNode)(2,f.Button,{mx:C?1:0,pt:C?.33:0,content:h,fluid:!!C,onClick:function(){function N(){return s("choose",{choice:h})}return N}(),selected:v,textAlign:"center",height:!!C&&2,width:!C&&p})}},71824:function(T,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AppearanceChanger=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.change_race,l=c.species,u=c.specimen,s=c.change_gender,d=c.gender,C=c.change_eye_color,h=c.change_skin_tone,v=c.change_skin_color,p=c.change_runechat_color,N=c.change_head_accessory_color,V=c.change_hair_color,S=c.change_secondary_hair_color,I=c.change_facial_hair_color,L=c.change_secondary_facial_hair_color,w=c.change_head_marking_color,A=c.change_body_marking_color,x=c.change_tail_marking_color,E=c.change_head_accessory,P=c.head_accessory_styles,D=c.head_accessory_style,M=c.change_hair,R=c.hair_styles,O=c.hair_style,F=c.change_hair_gradient,_=c.change_facial_hair,U=c.facial_hair_styles,z=c.facial_hair_style,$=c.change_head_markings,G=c.head_marking_styles,X=c.head_marking_style,J=c.change_body_markings,se=c.body_marking_styles,ie=c.body_marking_style,me=c.change_tail_markings,q=c.tail_marking_styles,re=c.tail_marking_style,ae=c.change_body_accessory,le=c.body_accessory_styles,Z=c.body_accessory_style,ne=c.change_alt_head,te=c.alt_head_styles,fe=c.alt_head_style,pe=!1;return(C||h||v||N||p||V||S||I||L||w||A||x)&&(pe=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:l.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.specimen,selected:ce.specimen===u,onClick:function(){function Ve(){return i("race",{race:ce.specimen})}return Ve}()},ce.specimen)})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:d==="male",onClick:function(){function ce(){return i("gender",{gender:"male"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:d==="female",onClick:function(){function ce(){return i("gender",{gender:"female"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:d==="plural",onClick:function(){function ce(){return i("gender",{gender:"plural"})}return ce}()})]}),!!pe&&(0,e.createComponentVNode)(2,b),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headaccessorystyle,selected:ce.headaccessorystyle===D,onClick:function(){function Ve(){return i("head_accessory",{head_accessory:ce.headaccessorystyle})}return Ve}()},ce.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:R.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.hairstyle,selected:ce.hairstyle===O,onClick:function(){function Ve(){return i("hair",{hair:ce.hairstyle})}return Ve}()},ce.hairstyle)})}),!!F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function ce(){return i("hair_gradient")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function ce(){return i("hair_gradient_offset")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function ce(){return i("hair_gradient_colour")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function ce(){return i("hair_gradient_alpha")}return ce}()})]}),!!_&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:U.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.facialhairstyle,selected:ce.facialhairstyle===z,onClick:function(){function Ve(){return i("facial_hair",{facial_hair:ce.facialhairstyle})}return Ve}()},ce.facialhairstyle)})}),!!$&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:G.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headmarkingstyle,selected:ce.headmarkingstyle===X,onClick:function(){function Ve(){return i("head_marking",{head_marking:ce.headmarkingstyle})}return Ve}()},ce.headmarkingstyle)})}),!!J&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:se.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodymarkingstyle,selected:ce.bodymarkingstyle===ie,onClick:function(){function Ve(){return i("body_marking",{body_marking:ce.bodymarkingstyle})}return Ve}()},ce.bodymarkingstyle)})}),!!me&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:q.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.tailmarkingstyle,selected:ce.tailmarkingstyle===re,onClick:function(){function Ve(){return i("tail_marking",{tail_marking:ce.tailmarkingstyle})}return Ve}()},ce.tailmarkingstyle)})}),!!ae&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:le.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodyaccessorystyle,selected:ce.bodyaccessorystyle===Z,onClick:function(){function Ve(){return i("body_accessory",{body_accessory:ce.bodyaccessorystyle})}return Ve}()},ce.bodyaccessorystyle)})}),!!ne&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:te.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.altheadstyle,selected:ce.altheadstyle===fe,onClick:function(){function Ve(){return i("alt_head",{alt_head:ce.altheadstyle})}return Ve}()},ce.altheadstyle)})})]})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_runechat_color",text:"Change runechat color",action:"runechat_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:m.map(function(l){return!!c[l.key]&&(0,e.createComponentVNode)(2,t.Button,{content:l.text,onClick:function(){function u(){return i(l.action)}return u}()},l.key)})})}},72285:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosAlertConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.priority||[],m=i.minor||[];return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[c.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),c.map(function(l){return(0,e.createVNode)(1,"li","color-bad",l,0,null,l)}),m.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),m.map(function(l){return(0,e.createVNode)(1,"li","color-average",l,0,null,l)})],0)})})})}return b}()},65805:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(36352),f=n(98595),b=function(c){if(c===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(c===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(c===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},y=function(c){if(c===0)return"green";if(c===1)return"orange";if(c===2)return"red"},B=r.AtmosControl=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=(0,a.useLocalState)(m,"tabIndex",0),C=d[0],h=d[1],v=function(){function p(N){switch(N){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,g);default:return"WE SHOULDN'T BE HERE!"}}return p}();return(0,e.createComponentVNode)(2,f.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:C===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===0,onClick:function(){function p(){return h(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===1,onClick:function(){function p(){return h(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),v(C)]})})})}return i}(),k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),d.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:C.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:b(C.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function h(){return u("open_alarm",{aref:C.ref})}return h}()})})]},C.name)})]})})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{children:d.filter(function(C){return C.z===2}).map(function(C){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:C.x,y:C.y,icon:"circle",tooltip:C.name,color:y(C.danger),onClick:function(){function h(){return u("open_alarm",{aref:C.ref})}return h}()},C.ref)})})})}},87816:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosFilter=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.on,m=i.pressure,l=i.max_pressure,u=i.filter_type,s=i.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_pressure")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:l,value:m,onDrag:function(){function d(C,h){return g("custom_pressure",{pressure:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===l,width:2.2,onClick:function(){function d(){return g("max_pressure")}return d}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:s.map(function(d){return(0,e.createComponentVNode)(2,t.Button,{selected:d.gas_type===u,content:d.label,onClick:function(){function C(){return g("set_filter",{filter:d.gas_type})}return C}()},d.label)})})]})})})})}return b}()},52977:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosMixer=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.on,l=c.pressure,u=c.max_pressure,s=c.node1_concentration,d=c.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:m?"On":"Off",color:m?null:"red",selected:m,onClick:function(){function C(){return i("power")}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:l===0,width:2.2,onClick:function(){function C(){return i("min_pressure")}return C}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:l,onDrag:function(){function C(h,v){return i("custom_pressure",{pressure:v})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:l===u,width:2.2,onClick:function(){function C(){return i("max_pressure")}return C}()})]}),(0,e.createComponentVNode)(2,b,{node_name:"Node 1",node_ref:s}),(0,e.createComponentVNode)(2,b,{node_name:"Node 2",node_ref:d})]})})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=B.node_name,l=B.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:l===0,onClick:function(){function u(){return i("set_node",{node_name:m,concentration:(l-10)/100})}return u}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(){function u(s,d){return i("set_node",{node_name:m,concentration:d/100})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:l===100,onClick:function(){function u(){return i("set_node",{node_name:m,concentration:(l+10)/100})}return u}()})]})}},11748:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosPump=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.on,m=i.rate,l=i.max_rate,u=i.gas_unit,s=i.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_rate")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:u,width:6.1,lineHeight:1.5,step:s,minValue:0,maxValue:l,value:m,onDrag:function(){function d(C,h){return g("custom_rate",{rate:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===l,width:2.2,onClick:function(){function d(){return g("max_rate")}return d}()})]})]})})})})}return b}()},69321:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosTankControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(44879),f=n(76910),b=n(98595),y=r.AtmosTankControl=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.sensors||{};return(0,e.createComponentVNode)(2,b.Window,{width:400,height:400,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:[Object.keys(l).map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(l[u]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[l[u].pressure," kpa"]}):"",Object.keys(l[u]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[l[u].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(s){return Object.keys(l[u]).indexOf(s)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,f.getGasLabel)(s),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,f.getGasColor)(s),value:l[u][s],minValue:0,maxValue:100,children:(0,o.toFixed)(l[u][s],2)+"%"})},(0,f.getGasLabel)(s)):""})]})},u)}),m.inlet&&Object.keys(m.inlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Inlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.inlet.on,"power-off"),content:m.inlet.on?"On":"Off",color:m.inlet.on?null:"red",selected:m.inlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"inlet"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:m.inlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"inlet",val:d})}return u}()})})]})}):"",m.outlet&&Object.keys(m.outlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Outlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.outlet.on,"power-off"),content:m.outlet.on?"On":"Off",color:m.outlet.on?null:"red",selected:m.outlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"outlet"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:m.outlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"outlet",val:d})}return u}()})})]})}):""]})})}return B}()},92444:function(T,r,n){"use strict";r.__esModule=!0,r.AugmentMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=r.AugmentMenu=function(){function k(g,i){return(0,e.createComponentVNode)(2,o.Window,{width:700,height:660,theme:"malfunction",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,y,{context:i})})})})}return k}(),y=function(g){var i=g.context,c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.usable_swarms,s=l.ability_tabs,d=l.known_abilities,C=(0,a.useLocalState)(i,"selectedTab",s[0]),h=C[0],v=C[1],p=(0,a.useLocalState)(i,"searchText",""),N=p[0],V=p[1],S=function(){var E=s.find(function(D){return D.category_name===h.category_name});if(!E)return[];var P=Math.min(E.category_stage,4);return E.abilities.filter(function(D){return D.stage<=P&&(!N||D.name.toLowerCase().includes(N.toLowerCase()))}).sort(function(D,M){return["intruder","destroyer"].includes(h.category_name.toLowerCase())?D.stage-M.stage:0})},I=S(),L=s.find(function(x){return x.category_name===h.category_name}),w=["intruder","destroyer"].includes(h.category_name.toLowerCase()),A=function(E){var P=d.find(function(R){return R.ability_path===E.ability_path}),D=P?P.cost:E.cost,M=P&&P.current_level>0?P.current_level+" / "+P.max_level:"0 / "+E.max_level;return(0,e.createComponentVNode)(2,t.Stack.Item,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{height:"20px",width:"35px",mb:1,textAlign:"center",content:D,disabled:D>u||P&&P.current_level===P.max_level,tooltip:"Purchase this ability?",onClick:function(){function R(){m("purchase",{ability_path:E.ability_path}),v(h)}return R}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:E.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:E.desc||"Description not available"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level: ",(0,e.createVNode)(1,"span",null,M,0,{style:{color:"green"}}),w&&E.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),E.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},E.name)};return(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,style:{marginRight:"10px"},children:[(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Swarms: "),(0,e.createVNode)(1,"span",null,u,0,{style:{color:"green"}})],4),w&&L&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Category Stage: "),(0,e.createVNode)(1,"span",null,Math.min(L.category_stage,4),0,{style:{color:"green"}})],4)]}),(0,e.createVNode)(1,"div","Section__buttons",(0,e.createComponentVNode)(2,t.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function x(E,P){return V(P)}return x}(),value:N}),2)],4,{style:{display:"flex",alignItems:"center"}}),children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[s.map(function(x){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h.category_name===x.category_name,onClick:function(){function E(){v(x),V("")}return E}(),children:(0,f.capitalize)(x.category_name)},x.category_name)}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h.category_name==="upgrades",onClick:function(){function x(){return v({category_name:"upgrades"})}return x}(),children:"Upgrades"},"upgrades")]}),h.category_name==="upgrades"?(0,e.createComponentVNode)(2,B,{act:m,abilityTabs:s,knownAbilities:d,usableSwarms:u}):(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:I.map(A)})]})},B=function(g){var i=g.act,c=g.abilityTabs,m=g.knownAbilities,l=g.usableSwarms,u=m.filter(function(d){return d.current_levell,tooltip:"Upgrade this ability?",onClick:function(){function v(){return i("purchase",{ability_path:C.ability_path})}return v}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:C.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:C.upgrade_text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level:"," ",(0,e.createVNode)(1,"span",null,C.current_level+" / "+C.max_level,0,{style:{color:"green"}}),h&&h.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),h.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},C.name)};return(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:u.map(s)})}},59179:function(T,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),f=n(36036),b=n(98595),y=n(25328),B=function(i,c,m,l){return i.requirements===null?!0:!(i.requirements.metal*l>c||i.requirements.glass*l>m)},k=r.Autolathe=function(){function g(i,c){var m=(0,o.useBackend)(c),l=m.act,u=m.data,s=u.total_amount,d=u.max_amount,C=u.metal_amount,h=u.glass_amount,v=u.busyname,p=u.busyamt,N=u.showhacked,V=u.buildQueue,S=u.buildQueueLen,I=u.recipes,L=u.categories,w=(0,o.useSharedState)(c,"category",0),A=w[0],x=w[1];A===0&&(A="Tools");var E=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),D=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),R=M[0],O=M[1],F=(0,y.createSearch)(R,function($){return $.name}),_="";S>0&&(_=V.map(function($,G){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"times",color:"transparent",content:V[G][0],onClick:function(){function X(){return l("remove_from_queue",{remove_from_queue:V.indexOf($)+1})}return X}()},$)},G)}));var U=(0,a.flow)([(0,t.filter)(function($){return($.category.indexOf(A)>-1||R)&&(u.showhacked||!$.hacked)}),R&&(0,t.filter)(F),(0,t.sortBy)(function($){return $.name.toLowerCase()})])(I),z="Build";return R?z="Results for: '"+R+"':":A&&(z="Build ("+A+")"),(0,e.createComponentVNode)(2,b.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:z,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function $(G){return x(G)}return $}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function $(G,X){return O(X)}return $}(),mb:1}),U.map(function($){return(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+$.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===1,disabled:!B($,u.metal_amount,u.glass_amount,1),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:1})}return G}(),children:(0,y.toTitleCase)($.name)}),$.max_multiplier>=10&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===10,disabled:!B($,u.metal_amount,u.glass_amount,10),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:10})}return G}(),children:"10x"}),$.max_multiplier>=25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===25,disabled:!B($,u.metal_amount,u.glass_amount,25),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:25})}return G}(),children:"25x"}),$.max_multiplier>25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===$.max_multiplier,disabled:!B($,u.metal_amount,u.glass_amount,$.max_multiplier),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:$.max_multiplier})}return G}(),children:[$.max_multiplier,"x"]}),$.requirements&&Object.keys($.requirements).map(function(G){return(0,y.toTitleCase)(G)+": "+$.requirements[G]}).join(", ")||(0,e.createComponentVNode)(2,f.Box,{children:"No resources required."})]},$.ref)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,f.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Total",children:D}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Storage",children:[u.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,f.Section,{title:"Building",children:(0,e.createComponentVNode)(2,f.Box,{color:v?"green":"",children:v||"Nothing"})}),(0,e.createComponentVNode)(2,f.Section,{title:"Build Queue",height:23.7,children:[_,(0,e.createComponentVNode)(2,f.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!u.buildQueueLen,onClick:function(){function $(){return l("clear_queue")}return $}()})]})]})]})})})}return g}()},5147:function(T,r,n){"use strict";r.__esModule=!0,r.BioChipPad=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.BioChipPad=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.implant,m=i.contains_case,l=i.gps,u=i.tag,s=(0,a.useLocalState)(B,"newTag",u),d=s[0],C=s[1];return(0,e.createComponentVNode)(2,o.Window,{width:410,height:325,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Bio-chip Mini-Computer",buttons:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject Case",icon:"eject",disabled:!m,onClick:function(){function h(){return g("eject_case")}return h}()})}),children:c&&m?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+c.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),c.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:c.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:c.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:c.function}),!!l&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:u,onEnter:function(){function h(){return g("tag",{newtag:d})}return h}(),onInput:function(){function h(v,p){return C(p)}return h}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===d,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function h(){return g("tag",{newtag:d})}return h}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):m?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"})})})})}return b}()},64273:function(T,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(62411),b=r.Biogenerator=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.config,d=u.container,C=u.processing,h=s.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:C,name:h}),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),d?(0,e.createComponentVNode)(2,g):(0,e.createComponentVNode)(2,y)]})})})}return i}(),y=function(c,m){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},B=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.biomass,C=s.container,h=s.container_curr_reagents,v=s.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:d}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),C?(0,e.createComponentVNode)(2,t.ProgressBar,{value:h,maxValue:v,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:h+" / "+v+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.has_plants,C=s.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!d,tooltip:d?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function h(){return u("activate")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!C,tooltip:C?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function h(){return u("detach_container")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!d,tooltip:d?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function h(){return u("eject_plants")}return h}()})})]})})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.biomass,C=s.product_list,h=(0,a.useSharedState)(m,"vendAmount",1),v=h[0],p=h[1],N=Object.entries(C).map(function(V,S){var I=Object.entries(V[1]).map(function(L){return L[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:V[0],open:!0,children:I.map(function(L){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:L.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[L.cost*v,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:d.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,e.createComponentVNode)(2,t.Stack,{mb:"30px",fontsize:"256px",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"skull",size:14,mb:"64px"}),(0,e.createVNode)(1,"br"),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})}return k}(),y=r.BluespaceTap=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.product||[],s=l.desiredMiningPower,d=l.miningPower,C=l.points,h=l.totalPoints,v=l.powerUse,p=l.availablePower,N=l.emagged,V=l.autoShutown,S=l.stabilizers,I=l.stabilizerPower,L=l.stabilizerPriority,w=s>d&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:[(0,e.createComponentVNode)(2,t.Button,{icon:V&&!N?"toggle-on":"toggle-off",content:"Auto shutdown",color:V&&!N?"green":"red",disabled:!!N,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){function A(){return m("auto_shutdown")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:S&&!N?"toggle-on":"toggle-off",content:"Stabilizers",color:S&&!N?"green":"red",disabled:!!N,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizers")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:L&&!N?"toggle-on":"toggle-off",content:"Stabilizer priority",color:L&&!N?"green":"red",disabled:!!N,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizer_priority")}return A}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Mining Power",children:(0,f.formatPower)(s)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{labelStyle:{"vertical-align":"top"},label:"Set Desired Mining Power",children:(0,e.createComponentVNode)(2,t.Stack,{width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",disabled:s===0||N,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:0})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:s===0||N,onClick:function(){function A(){return m("set",{set_power:s-1e7})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:s===0||N,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s-1e6})}return A}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mx:1,children:(0,e.createComponentVNode)(2,t.NumberInput,{disabled:N,minvalue:0,value:s,maxvalue:1/0,step:1,onChange:function(){function A(x,E){return m("set",{set_power:E})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:N,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e6})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:N,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e7})}return A}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Power Use",children:(0,f.formatPower)(v)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power Use",children:(0,f.formatPower)(d)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stabilizer Power Use",children:(0,f.formatPower)(I)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,f.formatPower)(p)})]})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:C}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:A.price>=C,onClick:function(){function x(){return m("vend",{target:A.key})}return x}(),content:A.price})},A.key)})})})})]})})]})})})}return k}(),B=r.Alerts=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.product||[],s=l.miningPower,d=l.stabilizerPower,C=l.emagged,h=l.safeLevels,v=l.autoShutown,p=l.stabilizers,N=l.overhead;return(0,e.createFragment)([!v&&!C&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Auto shutdown disabled"}),C?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"All safeties disabled"}):s<=15e6?"":p?s>d+15e6?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"High Power, engaging stabilizers"}):(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers disabled, Instability likely"})],0)}return k}()},33758:function(T,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(89005),a=n(44879),t=n(25328),o=n(72253),f=n(36036),b=n(98595),y=[["good","Alive"],["average","Critical"],["bad","DEAD"]],B=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],k=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],g={average:[.25,.5],bad:[.5,1/0]},i=function(S,I){for(var L=[],w=0;w0?S.filter(function(I){return!!I}).reduce(function(I,L){return(0,e.createFragment)([I,(0,e.createComponentVNode)(2,f.Box,{children:L},L)],0)},null):null},m=function(S){if(S>100){if(S<300)return"mild infection";if(S<400)return"mild infection+";if(S<500)return"mild infection++";if(S<700)return"acute infection";if(S<800)return"acute infection+";if(S<900)return"acute infection++";if(S>=900)return"septic"}return""},l=r.BodyScanner=function(){function V(S,I){var L=(0,o.useBackend)(I),w=L.data,A=w.occupied,x=w.occupant,E=x===void 0?{}:x,P=A?(0,e.createComponentVNode)(2,u,{occupant:E}):(0,e.createComponentVNode)(2,N);return(0,e.createComponentVNode)(2,b.Window,{width:700,height:600,title:"Body Scanner",children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:P})})}return V}(),u=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,s,{occupant:I}),(0,e.createComponentVNode)(2,d,{occupant:I}),(0,e.createComponentVNode)(2,C,{occupant:I}),(0,e.createComponentVNode)(2,v,{organs:I.extOrgan}),(0,e.createComponentVNode)(2,p,{organs:I.intOrgan})]})},s=function(S,I){var L=(0,o.useBackend)(I),w=L.act,A=L.data,x=A.occupant;return(0,e.createComponentVNode)(2,f.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"Print Report"}),(0,e.createComponentVNode)(2,f.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:y[x.stat][0],children:y[x.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Implants",children:x.implant_len?(0,e.createComponentVNode)(2,f.Box,{children:x.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"None"})})]})})},d=function(S){var I=S.occupant;return I.hasBorer||I.blind||I.colourblind||I.nearsighted||I.hasVirus?(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:B.map(function(L,w){if(I[L[0]])return(0,e.createComponentVNode)(2,f.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No abnormalities found."})})},C=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,f.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,f.Table,{children:i(k,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,h,{value:I[L[1]],marginBottom:A100)&&"average"||!!I.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{m:-.5,min:"0",max:I.maxHealth,mt:L>0&&"0.5rem",value:I.totalLoss/I.maxHealth,ranges:g,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(I.totalLoss)]})}),!!I.bruteLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,f.Icon,{name:"bone",mr:.5}),(0,a.round)(I.bruteLoss)]})}),!!I.fireLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"fire",mr:.5}),(0,a.round)(I.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.Box,{color:"average",inline:!0,children:c([!!I.internalBleeding&&"Internal bleeding",!!I.burnWound&&"Critical tissue burns",!!I.lungRuptured&&"Ruptured lung",!!I.status.broken&&I.status.broken,m(I.germ_level),!!I.open&&"Open incision"])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:[c([!!I.status.splinted&&(0,e.createComponentVNode)(2,f.Box,{color:"good",children:"Splinted"}),!!I.status.robotic&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),!!I.status.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})]),c(I.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},p=function(S){return S.organs.length===0?(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Table,{children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",children:"Injuries"})]}),S.organs.map(function(I,L){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{color:!!I.dead&&"bad"||I.germ_level>100&&"average"||I.robotic>0&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:I.maxHealth,value:I.damage/I.maxHealth,mt:L>0&&"0.5rem",ranges:g,children:(0,a.round)(I.damage)})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.Box,{color:"average",inline:!0,children:c([m(I.germ_level)])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:c([I.robotic===1&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),I.robotic===2&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Assisted"}),!!I.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},N=function(){return(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},67963:function(T,r,n){"use strict";r.__esModule=!0,r.BookBinder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=n(39473),y=r.BookBinder=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.selectedbook,u=m.book_categories,s=[];return u.map(function(d){return s[d.description]=d.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Book Binder",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){function d(){return c("print_book")}return d}()}),children:[(0,e.createComponentVNode)(2,t.Box,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:l.title,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_title")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:l.author,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_author")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"190px",options:u.map(function(d){return d.description}),onSelected:function(){function d(C){return c("toggle_binder_category",{category_id:s[C]})}return d}()})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_summary")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:l.summary})]}),(0,e.createVNode)(1,"br"),u.filter(function(d){return l.categories.includes(d.category_id)}).map(function(d){return(0,e.createComponentVNode)(2,t.Button,{content:d.description,selected:!0,icon:"unlink",onClick:function(){function C(){return c("toggle_binder_category",{category_id:d.category_id})}return C}()},d.category_id)})]})})]})})})]})}return B}()},61925:function(T,r,n){"use strict";r.__esModule=!0,r.BotCall=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(i){var c=[{modes:[0],label:"Idle",color:"green"},{modes:[1,2,3],label:"Arresting",color:"yellow"},{modes:[4,5],label:"Patrolling",color:"average"},{modes:[9],label:"Moving",color:"average"},{modes:[6,11],label:"Responding",color:"green"},{modes:[12],label:"Delivering Cargo",color:"blue"},{modes:[13],label:"Returning Home",color:"blue"},{modes:[7,8,10,14,15,16,17,18,19],label:"Working",color:"blue"}],m=c.find(function(l){return l.modes.includes(i)});return(0,e.createComponentVNode)(2,t.Box,{color:m.color,children:[" ",m.label," "]})},b=r.BotCall=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=(0,a.useLocalState)(c,"tabIndex",0),d=s[0],C=s[1],h={0:"Security",1:"Medibot",2:"Cleanbot",3:"Floorbot",4:"Mule",5:"Honkbot"},v=function(){function p(N){return h[N]?(0,e.createComponentVNode)(2,y,{model:h[N]}):"This should not happen. Report on Paradise Github"}return p}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:d===0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:Array.from({length:6}).map(function(p,N){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:d===N,onClick:function(){function V(){return C(N)}return V}(),children:h[N]},N)})})}),v(d)]})})})}return g}(),y=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.bots;return s[i.model]!==void 0?(0,e.createComponentVNode)(2,k,{model:[i.model]}):(0,e.createComponentVNode)(2,B,{model:[i.model]})},B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data;return(0,e.createComponentVNode)(2,t.Stack,{justify:"center",align:"center",fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Box,{bold:1,color:"bad",children:["No ",[i.model]," detected"]})})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.bots;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Model"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Location"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Interface"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Call"})]}),s[i.model].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.model}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.on?f(d.status):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Off"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.location}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Interface",onClick:function(){function C(){return l("interface",{botref:d.UID})}return C}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Call",onClick:function(){function C(){return l("call",{botref:d.UID})}return C}()})})]},d.UID)})]})})})}},20464:function(T,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotClean=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.locked,l=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,C=c.canhack,h=c.emagged,v=c.remote_disabled,p=c.painame,N=c.cleanblood,V=c.area;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:l,onClick:function(){function S(){return i("blood")}return S}()})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc Settings",children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:V?"Reset Area Selection":"Restrict to Current Area",onClick:function(){function S(){return i("area")}return S}()}),V!==null&&(0,e.createComponentVNode)(2,t.LabeledList,{mb:1,children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Locked Area",children:V})})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:l,onClick:function(){function S(){return i("ejectpai")}return S}()})})]})})}return y}()},69479:function(T,r,n){"use strict";r.__esModule=!0,r.BotFloor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotFloor=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.noaccess,l=c.painame,u=c.hullplating,s=c.replace,d=c.eat,C=c.make,h=c.fixfloor,v=c.nag_empty,p=c.magnet,N=c.tiles_amount;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Floor Settings",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"5px",children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tiles Left",children:N})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:m,onClick:function(){function V(){return i("autotile")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:m,onClick:function(){function V(){return i("replacetiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Repair damaged tiles and platings",disabled:m,onClick:function(){function V(){return i("fixfloors")}return V}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Finds tiles",disabled:m,onClick:function(){function V(){return i("eattiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Make pieces of metal into tiles when empty",disabled:m,onClick:function(){function V(){return i("maketiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Transmit notice when empty",disabled:m,onClick:function(){function V(){return i("nagonempty")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:p,content:"Traction Magnets",disabled:m,onClick:function(){function V(){return i("anchored")}return V}()})]}),l&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:l,disabled:m,onClick:function(){function V(){return i("ejectpai")}return V}()})})]})})}return y}()},59887:function(T,r,n){"use strict";r.__esModule=!0,r.BotHonk=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotHonk=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:220,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.BotStatus)})})}return y}()},80063:function(T,r,n){"use strict";r.__esModule=!0,r.BotMed=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotMed=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.locked,l=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,C=c.canhack,h=c.emagged,v=c.remote_disabled,p=c.painame,N=c.shut_up,V=c.declare_crit,S=c.stationary_mode,I=c.heal_threshold,L=c.injection_amount,w=c.use_beaker,A=c.treat_virus,x=c.reagent_glass;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!N,disabled:l,onClick:function(){function E(){return i("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:V,disabled:l,onClick:function(){function E(){return i("toggle_critical_alerts")}return E}()})]}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Treatment Settings",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Healing Threshold",children:(0,e.createComponentVNode)(2,t.Slider,{value:I.value,minValue:I.min,maxValue:I.max,step:5,disabled:l,onChange:function(){function E(P,D){return i("set_heal_threshold",{target:D})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Injection Level",children:(0,e.createComponentVNode)(2,t.Slider,{value:L.value,minValue:L.min,maxValue:L.max,step:5,format:function(){function E(P){return P+"u"}return E}(),disabled:l,onChange:function(){function E(P,D){return i("set_injection_amount",{target:D})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reagent Source",children:(0,e.createComponentVNode)(2,t.Button,{content:w?"Beaker":"Internal Synthesizer",icon:w?"flask":"cogs",disabled:l,onClick:function(){function E(){return i("toggle_use_beaker")}return E}()})}),x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x.amount,minValue:0,maxValue:x.max_amount,children:[x.amount," / ",x.max_amount]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{ml:1,children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",disabled:l,onClick:function(){function E(){return i("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:l,onClick:function(){function E(){return i("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:S,disabled:l,onClick:function(){function E(){return i("toggle_stationary_mode")}return E}()})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:l,onClick:function(){function E(){return i("ejectpai")}return E}()})})]})})})}return y}()},74439:function(T,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotSecurity=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.noaccess,l=c.painame,u=c.check_id,s=c.check_weapons,d=c.check_warrant,C=c.arrest_mode,h=c.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:445,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Unidentifiable Persons",disabled:m,onClick:function(){function v(){return i("authid")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Unauthorized Weapons",disabled:m,onClick:function(){function v(){return i("authweapon")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Wanted Criminals",disabled:m,onClick:function(){function v(){return i("authwarrant")}return v}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Detain Targets Indefinitely",disabled:m,onClick:function(){function v(){return i("arrtype")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Announce Arrests On Radio",disabled:m,onClick:function(){function v(){return i("arrdeclare")}return v}()})]}),l&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:l,disabled:m,onClick:function(){function v(){return i("ejectpai")}return v}()})})]})})}return y}()},10833:function(T,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(89005),a=n(98595),t=n(36036),o=n(72253),f=function(k,g){var i=k.cell,c=(0,o.useBackend)(g),m=c.act,l=i.cell_id,u=i.occupant,s=i.crimes,d=i.brigged_by,C=i.time_left_seconds,h=i.time_set_seconds,v=i.ref,p="";C>0&&(p+=" BrigCells__listRow--active");var N=function(){m("release",{ref:v})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:p,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:h})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:C})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:N,children:"Release"})})]})},b=function(k){var g=k.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),g.map(function(i){return(0,e.createComponentVNode)(2,f,{cell:i},i.ref)})]})},y=r.BrigCells=function(){function B(k,g){var i=(0,o.useBackend)(g),c=i.act,m=i.data,l=m.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b,{cells:l})})})})})}return B}()},45761:function(T,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.BrigTimer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;i.nameText=i.occupant,i.timing&&(i.prisoner_hasrec?i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:i.occupant}):i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:i.occupant}));var c="pencil-alt";i.prisoner_name&&(i.prisoner_hasrec||(c="exclamation-triangle"));var m=[],l=0;for(l=0;lm?this.substring(0,m)+"...":this};var k=function(l,u){var s,d;if(!u)return[];var C=l.findIndex(function(h){return h.name===u.name});return[(s=l[C-1])==null?void 0:s.name,(d=l[C+1])==null?void 0:d.name]},g=function(l,u){u===void 0&&(u="");var s=(0,f.createSearch)(u,function(d){return d.name});return(0,t.flow)([(0,a.filter)(function(d){return d==null?void 0:d.name}),u&&(0,a.filter)(s),(0,a.sortBy)(function(d){return d.name})])(l)},i=r.CameraConsole=function(){function m(l,u){var s=(0,b.useBackend)(u),d=s.act,C=s.data,h=s.config,v=C.mapRef,p=C.activeCamera,N=g(C.cameras),V=k(N,p),S=V[0],I=V[1];return(0,e.createComponentVNode)(2,B.Window,{width:870,height:708,children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,c)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),p&&p.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!S,onClick:function(){function L(){return d("switch_camera",{name:S})}return L}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!I,onClick:function(){function L(){return d("switch_camera",{name:I})}return L}()})],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",params:{id:v,type:"map"}})],4)]})}return m}(),c=r.CameraConsoleContent=function(){function m(l,u){var s=(0,b.useBackend)(u),d=s.act,C=s.data,h=(0,b.useLocalState)(u,"searchText",""),v=h[0],p=h[1],N=C.activeCamera,V=g(C.cameras,v);return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function S(I,L){return p(L)}return S}()})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,children:V.map(function(S){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",N&&S.name===N.name&&"Button--selected"]),S.name.trimLongStr(23),0,{title:S.name,onClick:function(){function I(){return d("switch_camera",{name:S.name})}return I}()},S.name)})})})]})}return m}()},52927:function(T,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(49968),b=n(98595),y=r.Canister=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.act,m=i.data,l=m.portConnected,u=m.tankPressure,s=m.releasePressure,d=m.defaultReleasePressure,C=m.minReleasePressure,h=m.maxReleasePressure,v=m.valveOpen,p=m.name,N=m.canLabel,V=m.colorContainer,S=m.color_index,I=m.hasHoldingTank,L=m.holdingTank,w="";S.prim&&(w=V.prim.options[S.prim].name);var A="";S.sec&&(A=V.sec.options[S.sec].name);var x="";S.ter&&(x=V.ter.options[S.ter].name);var E="";S.quart&&(E=V.quart.options[S.quart].name);var P=[],D=[],M=[],R=[],O=0;for(O=0;Op.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:p.total_positions-p.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:d.cooldown_time||!p.can_close,onClick:function(){function N(){return s("make_job_unavailable",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:d.cooldown_time||!p.can_open,onClick:function(){function N(){return s("make_job_available",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:d.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:d.priority_jobs.indexOf(p.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:p.is_priority?"Yes":"No",selected:p.is_priority,disabled:d.cooldown_time||!p.can_prioritize,onClick:function(){function N(){return s("prioritize_job",{job:p.title})}return N}()})})]},p.title)})]})})]}):v=(0,e.createComponentVNode)(2,B);break;case 2:!d.authenticated||!d.scan_name?v=(0,e.createComponentVNode)(2,B):d.modify_name?v=(0,e.createComponentVNode)(2,f.AccessList,{accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(){function p(N){return s("set",{access:N})}return p}(),grantAll:function(){function p(){return s("grant_all")}return p}(),denyAll:function(){function p(){return s("clear_all")}return p}(),grantDep:function(){function p(N){return s("grant_region",{region:N})}return p}(),denyDep:function(){function p(N){return s("deny_region",{region:N})}return p}()}):v=(0,e.createComponentVNode)(2,k);break;case 3:d.authenticated?d.records.length?v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!d.authenticated||d.records.length===0||d.target_dept,onClick:function(){function p(){return s("wipe_all_logs")}return p}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),d.records.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.reason}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.deletedby})]},p.timestamp)})]}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!d.authenticated||d.records.length===0,onClick:function(){function p(){return s("wipe_my_logs")}return p}()})})]}):v=(0,e.createComponentVNode)(2,g):v=(0,e.createComponentVNode)(2,B);break;case 4:!d.authenticated||!d.scan_name?v=(0,e.createComponentVNode)(2,B):v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),d.people_dept.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:p.buttontext,disabled:!p.demotable,onClick:function(){function N(){return s("remote_demote",{remote_demote:p.name})}return N}()})})]},p.title)})]})});break;default:v=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:h}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:C}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v})]})})})}return c}()},64083:function(T,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),f=n(36036),b=n(98595),y=n(25328),B=r.CargoConsole=function(){function u(s,d){return(0,e.createComponentVNode)(2,b.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,l)]})})})}return u}(),k=function(s,d){var C=(0,o.useLocalState)(d,"contentsModal",null),h=C[0],v=C[1],p=(0,o.useLocalState)(d,"contentsModalTitle",null),N=p[0],V=p[1];if(h!==null&&N!==null)return(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,f.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[N,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,f.Box,{children:h.map(function(S){return(0,e.createComponentVNode)(2,f.Box,{children:["- ",S]},S)})}),(0,e.createComponentVNode)(2,f.Box,{m:2,children:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function S(){v(null),V(null)}return S}()})})]})},g=function(s,d){var C=(0,o.useBackend)(d),h=C.act,v=C.data,p=v.is_public,N=v.timeleft,V=v.moving,S=v.at_station,I,L;return!V&&!S?(I="Docked off-station",L="Call Shuttle"):!V&&S?(I="Docked at the station",L="Return Shuttle"):V&&(L="In Transit...",N!==1?I="Shuttle is en route (ETA: "+N+" minutes)":I="Shuttle is en route (ETA: "+N+" minute)"),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Status",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Shuttle Status",children:I}),p===0&&(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,f.Button,{content:L,disabled:V,onClick:function(){function w(){return h("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Central Command Messages",onClick:function(){function w(){return h("showMessages")}return w}()})]})]})})})},i=function(s,d){var C,h=(0,o.useBackend)(d),v=h.act,p=h.data,N=p.accounts,V=(0,o.useLocalState)(d,"selectedAccount"),S=V[0],I=V[1],L=[];return N.map(function(w){return L[w.name]=w.account_UID}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(w){return w.name}),selected:(C=N.filter(function(w){return w.account_UID===S})[0])==null?void 0:C.name,onSelected:function(){function w(A){return I(L[A])}return w}()}),N.filter(function(w){return w.account_UID===S}).map(function(w){return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,f.Stack.Item,{mt:1,children:w.name})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:w.balance})})]},w.account_UID)})]})})},c=function(s,d){var C=(0,o.useBackend)(d),h=C.act,v=C.data,p=v.requests,N=v.categories,V=v.supply_packs,S=(0,o.useSharedState)(d,"category","Emergency"),I=S[0],L=S[1],w=(0,o.useSharedState)(d,"search_text",""),A=w[0],x=w[1],E=(0,o.useLocalState)(d,"contentsModal",null),P=E[0],D=E[1],M=(0,o.useLocalState)(d,"contentsModalTitle",null),R=M[0],O=M[1],F=(0,y.createSearch)(A,function(X){return X.name}),_=(0,o.useLocalState)(d,"selectedAccount"),U=_[0],z=_[1],$=(0,a.flow)([(0,t.filter)(function(X){return X.cat===N.filter(function(J){return J.name===I})[0].category||A}),A&&(0,t.filter)(F),(0,t.sortBy)(function(X){return X.name.toLowerCase()})])(V),G="Crate Catalogue";return A?G="Results for '"+A+"':":I&&(G="Browsing "+I),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:G,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(X){return X.name}),selected:I,onSelected:function(){function X(J){return L(J)}return X}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function X(J,se){return x(se)}return X}(),mb:1}),(0,e.createComponentVNode)(2,f.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:$.map(function(X){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{bold:!0,children:[X.name," (",X.cost," Credits)"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,f.Button,{content:"Order 1",icon:"shopping-cart",disabled:!U,onClick:function(){function J(){return h("order",{crate:X.ref,multiple:!1,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!U||X.singleton,onClick:function(){function J(){return h("order",{crate:X.ref,multiple:!0,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Contents",icon:"search",onClick:function(){function J(){D(X.contents),O(X.name)}return J}()})]})]},X.name)})})})]})})},m=function(s,d){var C=s.request,h,v;switch(C.department){case"Engineering":v="CE",h="orange";break;case"Medical":v="CMO",h="teal";break;case"Science":v="RD",h="purple";break;case"Supply":v="CT",h="brown";break;case"Service":v="HOP",h="olive";break;case"Security":v="HOS",h="red";break;case"Command":v="CAP",h="blue";break;case"Assistant":v="Any Head",h="grey";break}return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{mt:.5,children:"Approval Required:"}),!!C.req_cargo_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!C.req_head_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:h,content:v,disabled:C.req_cargo_approval,icon:"user-tie",tooltip:C.req_cargo_approval?"This Order first requires approval from the QM before the "+v+" can approve it":"This Order requires approval from the "+v+" still"})})]})},l=function(s,d){var C=(0,o.useBackend)(d),h=C.act,v=C.data,p=v.requests,N=v.orders,V=v.shipments;return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,f.Table,{children:p.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,f.Box,{children:["Order #",S.ordernum,": ",S.supply_type," (",S.cost," credits) for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)," with"," ",S.department?"The "+S.department+" Department":"Their Personal"," Account"]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]}),(0,e.createComponentVNode)(2,m,{request:S})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,f.Button,{content:"Approve",color:"green",disabled:!S.can_approve,onClick:function(){function I(){return h("approve",{ordernum:S.ordernum})}return I}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Deny",color:"red",disabled:!S.can_deny,onClick:function(){function I(){return h("deny",{ordernum:S.ordernum})}return I}()})]})]},S.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:N.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:V.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})})]})}},36232:function(T,r,n){"use strict";r.__esModule=!0,r.ChameleonAppearances=r.Chameleon=void 0;var e=n(89005),a=n(25328),t=n(64795),o=n(88510),f=n(72253),b=n(36036),y=n(98595),B=r.Chameleon=function(){function i(c,m){return(0,e.createComponentVNode)(2,y.Window,{width:431,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,g)})})}return i}(),k=function(c,m){m===void 0&&(m="");var l=(0,a.createSearch)(m,function(u){return u.name});return(0,t.flow)([(0,o.filter)(function(u){return u==null?void 0:u.name}),m&&(0,o.filter)(l)])(c)},g=r.ChameleonAppearances=function(){function i(c,m){var l=(0,f.useBackend)(m),u=l.act,s=l.data,d=(0,f.useLocalState)(m,"searchText",""),C=d[0],h=d[1],v=k(s.chameleon_skins,C),p=s.selected_appearance;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search for an appearance",onInput:function(){function N(V,S){return h(S)}return N}()})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Item Appearance",children:v.map(function(N){var V=N.name+"_"+N.icon_state;return(0,e.createComponentVNode)(2,b.ImageButton,{dmIcon:N.icon,dmIconState:N.icon_state,imageSize:64,m:.5,compact:!0,selected:V===p,tooltip:N.name,style:{opacity:V===p&&"1"||"0.5"},onClick:function(){function S(){u("change_appearance",{new_appearance:V})}return S}()},V)})})})]})}return i}()},87331:function(T,r,n){"use strict";r.__esModule=!0,r.ChangelogView=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ChangelogView=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=(0,a.useLocalState)(B,"onlyRecent",0),m=c[0],l=c[1],u=i.cl_data,s=i.last_cl,d={FIX:(0,e.createComponentVNode)(2,t.Icon,{name:"tools",title:"Fix"}),WIP:(0,e.createComponentVNode)(2,t.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,e.createComponentVNode)(2,t.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,e.createComponentVNode)(2,t.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})},C=function(){function h(v){return v in d?d[v]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:750,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,e.createComponentVNode)(2,t.Button,{content:m?"Showing all changes":"Showing changes since last connection",onClick:function(){function h(){return l(!m)}return h}()}),children:u.map(function(h){return!m&&h.merge_ts<=s||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:h.author+" - Merged on "+h.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+h.num,onClick:function(){function v(){return g("open_pr",{pr_number:h.num})}return v}()}),children:h.entries.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[C(v.etype)," ",v.etext]},v)})},h)})})})})}return b}()},91360:function(T,r,n){"use strict";r.__esModule=!0,r.CheckboxListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),f=n(72253),b=n(98595),y=r.CheckboxListInputModal=function(){function k(g,i){var c=(0,f.useBackend)(i),m=c.act,l=c.data,u=l.items,s=u===void 0?[]:u,d=l.message,C=d===void 0?"":d,h=l.init_value,v=l.timeout,p=l.title,N=(0,f.useLocalState)(i,"edittedItems",s),V=N[0],S=N[1],I=330+Math.ceil(C.length/3),L=function(){function w(A){A===void 0&&(A=null);var x=[].concat(V);x=x.map(function(E){return E.key===A.key?Object.assign({},E,{checked:!A.checked}):E}),S(x)}return w}();return(0,e.createComponentVNode)(2,b.Window,{title:p,width:325,height:I,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{className:"ListInput__Section",fill:!0,title:C,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,B,{filteredItems:V,onClick:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return k}(),B=function(g,i){var c=g.filteredItems,m=g.onClick;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:c.map(function(l,u){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,id:u,onClick:function(){function s(){return m(l)}return s}(),checked:l.checked,style:{animation:"none",transition:"none"},children:l.key.replace(/^\w/,function(s){return s.toUpperCase()})},u)})})}},36108:function(T,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(85870),f=n(98595),b=[1,5,10,20,30,50],y=[1,5,10],B=r.ChemDispenser=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.chemicals;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:400+C.length*8,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,i)]})})})}return c}(),k=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.amount,h=d.energy,v=d.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[h," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:b.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:C===p,content:p,onClick:function(){function V(){return s("amount",{amount:p})}return V}()})},N)})})})]})})})},g=function(m,l){for(var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.chemicals,h=C===void 0?[]:C,v=[],p=0;p<(h.length+1)%3;p++)v.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:d.glass?"Drink Dispenser":"Chemical Dispenser",children:[h.map(function(N,V){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:N.title,style:{"margin-left":"2px"},onClick:function(){function S(){return s("dispense",{reagent:N.id})}return S}()},V)}),v.map(function(N,V){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},V)})]})})},i=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.isBeakerLoaded,h=d.beakerCurrentVolume,v=d.beakerMaxVolume,p=d.beakerContents,N=p===void 0?[]:p;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:d.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!C&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[h," / ",v," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!C,onClick:function(){function V(){return s("ejectBeaker")}return V}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:C,beakerContents:N,buttons:function(){function V(S){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:-1})}return I}()}),y.map(function(I,L){return(0,e.createComponentVNode)(2,t.Button,{content:I,onClick:function(){function w(){return s("remove",{reagent:S.id,amount:I})}return w}()},L)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:S.volume})}return I}()})],0)}return V}()})})})}},13146:function(T,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(85870),b=n(98595),y=r.ChemHeater=function(){function g(i,c){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return g}(),B=function(i,c){var m=(0,t.useBackend)(c),l=m.act,u=m.data,s=u.targetTemp,d=u.targetTempReached,C=u.autoEject,h=u.isActive,v=u.currentTemp,p=u.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){function N(){return l("toggle_autoeject")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{content:h?"On":"Off",icon:"power-off",selected:h,disabled:!p,onClick:function(){function N(){return l("toggle_on")}return N}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(s,0),minValue:0,maxValue:1e3,onDrag:function(){function N(V,S){return l("adjust_temperature",{target:S})}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:d?"good":"average",children:p&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:v,format:function(){function N(V){return(0,a.toFixed)(V)+" K"}return N}()})||"\u2014"})]})})})},k=function(i,c){var m=(0,t.useBackend)(c),l=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerCurrentVolume,C=u.beakerMaxVolume,h=u.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!s&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[d," / ",C," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function v(){return l("eject_beaker")}return v}()})]}),children:(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:s,beakerContents:h})})})}},56541:function(T,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(85870),b=n(3939),y=n(35840),B=["icon"];function k(I,L){if(I==null)return{};var w={};for(var A in I)if({}.hasOwnProperty.call(I,A)){if(L.includes(A))continue;w[A]=I[A]}return w}function g(I,L){I.prototype=Object.create(L.prototype),I.prototype.constructor=I,i(I,L)}function i(I,L){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},i(I,L)}var c=[1,5,10],m=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=L.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:E.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:P.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(P.desc||"").length>0?P.desc:"N/A"}),P.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:P.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:P.blood_dna})],4),!E.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:E.printing?"spinner":"print",disabled:E.printing,iconSpin:!!E.printing,ml:"0.5rem",content:"Print",onClick:function(){function D(){return x("print",{idx:P.idx,beaker:L.args.beaker})}return D}()})]})})})})},l=function(I){return I[I.ToDisposals=0]="ToDisposals",I[I.ToBeaker=1]="ToBeaker",I}(l||{}),u=r.ChemMaster=function(){function I(L,w){return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,s),(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,S)]})})]})}return I}(),s=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.beaker,D=E.beaker_reagents,M=E.buffer_reagents,R=M.length>0;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:R?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}),children:P?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function O(F,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_0?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function M(R,O){return(0,e.createComponentVNode)(2,t.Box,{mb:O0&&(R=M.map(function(O){var F=O.id,_=O.sprite;return(0,e.createComponentVNode)(2,N,{icon:_,translucent:!0,onClick:function(){function U(){return x("set_sprite_style",{production_mode:P,style:F})}return U}(),selected:D===F},F)})),(0,e.createComponentVNode)(2,p,{productionData:L.productionData,children:R&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:R})})},S=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.loaded_pill_bottle_style,D=E.containerstyles,M=E.loaded_pill_bottle,R={width:"20px",height:"20px"},O=D.map(function(F){var _=F.color,U=F.name,z=P===_;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:R.width,height:R.height},onClick:function(){function $(){return x("set_container_style",{style:_})}return $}(),icon:z&&"check",iconStyle:{position:"relative","z-index":1},tooltip:U,tooltipPosition:"top",children:[!z&&(0,e.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,e.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:R.width,height:R.height,"background-color":_,opacity:.6,filter:"alpha(opacity=60)"}})]},_)});return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Container Customization",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!M,content:"Eject Container",onClick:function(){function F(){return x("ejectp")}return F}()}),children:M?(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:[(0,e.createComponentVNode)(2,t.Button,{style:{width:R.width,height:R.height},icon:"tint-slash",onClick:function(){function F(){return x("clear_container_style")}return F}(),selected:!P,tooltip:"Default",tooltipPosition:"top"}),O]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,b.modalRegisterBodyOverride)("analyze",m)},37173:function(T,r,n){"use strict";r.__esModule=!0,r.CloningConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(79140),b=1,y=32,B=128,k=r.CloningConsole=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.tab,N=v.has_scanner,V=v.pod_amount;return(0,e.createComponentVNode)(2,o.Window,{width:640,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cloning Console",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected scanner",children:N?"Online":"Missing"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected pods",children:V})]})}),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===1,icon:"home",onClick:function(){function S(){return h("menu",{tab:1})}return S}(),children:"Main Menu"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===2,icon:"user",onClick:function(){function S(){return h("menu",{tab:2})}return S}(),children:"Damage Configuration"})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,g)})]})})}return u}(),g=function(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.tab,p;return v===1?p=(0,e.createComponentVNode)(2,i):v===2&&(p=(0,e.createComponentVNode)(2,c)),p},i=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.pods,N=v.pod_amount,V=v.selected_pod_UID;return(0,e.createComponentVNode)(2,t.Box,{children:[!N&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No pods connected."}),!!N&&p.map(function(S,I){return(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Pod "+(I+1),children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"96px",shrink:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,f.resolveAsset)("pod_"+(S.cloning?"cloning":"idle")+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{selected:V===S.uid,onClick:function(){function L(){return h("select_pod",{uid:S.uid})}return L}(),children:"Select"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Progress",children:[!S.cloning&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Pod is inactive."}),!!S.cloning&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.clone_progress,maxValue:100,color:"good"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.biomass,ranges:{good:[2*S.biomass_storage_capacity/3,S.biomass_storage_capacity],average:[S.biomass_storage_capacity/3,2*S.biomass_storage_capacity/3],bad:[0,S.biomass_storage_capacity/3]},minValue:0,maxValue:S.biomass_storage_capacity,children:[S.biomass,"/",S.biomass_storage_capacity+" ("+100*S.biomass/S.biomass_storage_capacity+"%)"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sanguine Reagent",children:S.sanguine_reagent}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Osseous Reagent",children:S.osseous_reagent})]})})]})},S)})]})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.selected_pod_data,N=v.has_scanned,V=v.scanner_has_patient,S=v.feedback,I=v.scan_successful,L=v.cloning_cost,w=v.has_scanner,A=v.currently_scanning;return(0,e.createComponentVNode)(2,t.Box,{children:[!w&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No scanner connected."}),!!w&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Scanner Info",buttons:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hourglass-half",onClick:function(){function x(){return h("scan")}return x}(),disabled:!V||A,children:"Scan"}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function x(){return h("eject")}return x}(),disabled:!V||A,children:"Eject Patient"})]}),children:[!N&&!A&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:V?"No scan detected for current patient.":"No patient is in the scanner."}),(!!N||!!A)&&(0,e.createComponentVNode)(2,t.Box,{color:S.color,children:S.text})]}),(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Damages Breakdown",children:(0,e.createComponentVNode)(2,t.Box,{children:[(!I||!N)&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No valid scan detected."}),!!I&&!!N&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return h("fix_all")}return x}(),children:"Repair All Damages"}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return h("fix_none")}return x}(),children:"Repair No Damages"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return h("clone")}return x}(),children:"Clone"})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[0],maxValue:p.biomass_storage_capacity,ranges:{bad:[2*p.biomass_storage_capacity/3,p.biomass_storage_capacity],average:[p.biomass_storage_capacity/3,2*p.biomass_storage_capacity/3],good:[0,p.biomass_storage_capacity/3]},color:L[0]>p.biomass?"bad":null,children:["Biomass: ",L[0],"/",p.biomass,"/",p.biomass_storage_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[1],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[1]>p.sanguine_reagent?"bad":"good",children:["Sanguine: ",L[1],"/",p.sanguine_reagent,"/",p.max_reagent_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[2],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[2]>p.osseous_reagent?"bad":"good",children:["Osseous: ",L[2],"/",p.osseous_reagent,"/",p.max_reagent_capacity]})})]}),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,l)]})]})})]})]})},m=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.patient_limb_data,N=v.limb_list,V=v.desired_limb_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Limbs",children:N.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"15%",height:"20px",children:[p[S][4],":"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),p[S][3]===0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0]+V[S][1],maxValue:p[S][5],ranges:{good:[0,p[S][5]/3],average:[p[S][5]/3,2*p[S][5]/3],bad:[2*p[S][5]/3,p[S][5]]},children:["Post-Cloning Damage: ",(0,e.createComponentVNode)(2,t.Icon,{name:"bone"})," "+V[S][0]+" / ",(0,e.createComponentVNode)(2,t.Icon,{name:"fire"})," "+V[S][1]]})}),p[S][3]!==0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",p[S][4]," is missing!"]})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[!!p[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][3],onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"replace"})}return L}(),children:"Replace Limb"})}),!p[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][0]||p[S][1]),checked:!(V[S][0]||V[S][1]),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"damage"})}return L}(),children:"Repair Damages"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&b),checked:!(V[S][2]&b),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"bone"})}return L}(),children:"Mend Bone"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&y),checked:!(V[S][2]&y),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"ib"})}return L}(),children:"Mend IB"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&B),checked:!(V[S][2]&B),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"critburn"})}return L}(),children:"Mend Critical Burn"})]})]})]},S)})})},l=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.patient_organ_data,N=v.organ_list,V=v.desired_organ_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Organs",children:N.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"20%",height:"20px",children:[p[S][3],":"," "]}),p[S][5]!=="heart"&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!!p[S][2]&&(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][2]&&!V[S][1],onClick:function(){function L(){return h("toggle_organ_repair",{organ:S,type:"replace"})}return L}(),children:"Replace Organ"}),!p[S][2]&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!p[S][0],checked:!V[S][0],onClick:function(){function L(){return h("toggle_organ_repair",{organ:S,type:"damage"})}return L}(),children:"Repair Damages"})})]})}),p[S][5]==="heart"&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Heart replacement is required for cloning."}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[!!p[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",p[S][3]," is missing!"]}),!p[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0],maxValue:p[S][4],ranges:{good:[0,p[S][4]/3],average:[p[S][4]/3,2*p[S][4]/3],bad:[2*p[S][4]/3,p[S][4]]},children:"Post-Cloning Damage: "+V[S][0]})]})]})},S)})})}},98723:function(T,r,n){"use strict";r.__esModule=!0,r.CloningPod=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.CloningPod=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.biomass,m=i.biomass_storage_capacity,l=i.sanguine_reagent,u=i.osseous_reagent,s=i.organs,d=i.currently_cloning;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Liquid Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:c,ranges:{good:[2*m/3,m],average:[m/3,2*m/3],bad:[0,m/3]},minValue:0,maxValue:m})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:l+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:l,step:1,unit:"units",onChange:function(){function C(h,v){return g("remove_reagent",{reagent:"sanguine_reagent",amount:v})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function C(){return g("purge_reagent",{reagent:"sanguine_reagent"})}return C}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:u+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(){function C(h,v){return g("remove_reagent",{reagent:"osseous_reagent",amount:v})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function C(){return g("purge_reagent",{reagent:"osseous_reagent"})}return C}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Organ Storage",children:[!d&&(0,e.createComponentVNode)(2,t.Box,{children:[!s&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No organs loaded."}),!!s&&s.map(function(C){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:C.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",onClick:function(){function h(){return g("eject_organ",{organ_ref:C.ref})}return h}()})})]},C)})]}),!!d&&(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Unable to access organ storage while cloning."]})})]})]})})}return b}()},18259:function(T,r,n){"use strict";r.__esModule=!0,r.CoinMint=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=r.CoinMint=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data,m=c.materials,l=c.moneyBag,u=c.moneyBagContent,s=c.moneyBagMaxContent,d=(l?210:138)+Math.ceil(m.length/4)*64;return(0,e.createComponentVNode)(2,f.Window,{width:210,height:d,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Coin Type",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",color:c.active&&"bad",tooltip:!l&&"Need a money bag",disabled:!l,onClick:function(){function C(){return i("activate")}return C}()}),children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",tooltip:"Eject selected material",onClick:function(){function C(){return i("ejectMat")}return C}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:m.map(function(C){return(0,e.createComponentVNode)(2,o.Button,{bold:!0,inline:!0,translucent:!0,m:.2,textAlign:"center",selected:C.id===c.chosenMaterial,tooltip:C.name,content:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",C.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:C.amount})]}),onClick:function(){function h(){return i("selectMaterial",{material:C.id})}return h}()},C.id)})})]})})}),!!l&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Money Bag",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){function C(){return i("ejectBag")}return C}()}),children:(0,e.createComponentVNode)(2,o.ProgressBar,{width:"100%",minValue:0,maxValue:s,value:u,children:[u," / ",s]})})})]})})})}return y}()},93858:function(T,r,n){"use strict";r.__esModule=!0,r.HexColorInput=r.ColorSelector=r.ColorPickerModal=r.ColorInput=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(36036),f=n(98595),b=n(44879),y=n(14448),B=n(4454),k=n(35840),g=n(9394),i=n(19203),c=["prefixed","alpha","color","fluid","onChange"];/**
+ */var b=(0,t.createLogger)("hotkeys"),y={},B=[e.KEY_ESCAPE,e.KEY_ENTER,e.KEY_SPACE,e.KEY_TAB,e.KEY_CTRL,e.KEY_SHIFT,e.KEY_UP,e.KEY_DOWN,e.KEY_LEFT,e.KEY_RIGHT],k={},g=function(d){if(d===16)return"Shift";if(d===17)return"Ctrl";if(d===18)return"Alt";if(d===33)return"Northeast";if(d===34)return"Southeast";if(d===35)return"Southwest";if(d===36)return"Northwest";if(d===37)return"West";if(d===38)return"North";if(d===39)return"East";if(d===40)return"South";if(d===45)return"Insert";if(d===46)return"Delete";if(d>=48&&d<=57||d>=65&&d<=90)return String.fromCharCode(d);if(d>=96&&d<=105)return"Numpad"+(d-96);if(d>=112&&d<=123)return"F"+(d-111);if(d===188)return",";if(d===189)return"-";if(d===190)return"."},i=function(d){var C=String(d);if(C==="Ctrl+F5"||C==="Ctrl+R"){location.reload();return}if(C!=="Ctrl+F"&&!(d.event.defaultPrevented||d.isModifierKey()||B.includes(d.code))){C==="F5"&&(d.event.preventDefault(),d.event.returnValue=!1);var h=g(d.code);if(h){var v=y[h];if(v)return b.debug("macro",v),Byond.command(v);if(d.isDown()&&!k[h]){k[h]=!0;var p='Key_Down "'+h+'"';return b.debug(p),Byond.command(p)}if(d.isUp()&&k[h]){k[h]=!1;var N='Key_Up "'+h+'"';return b.debug(N),Byond.command(N)}}}},c=r.acquireHotKey=function(){function s(d){B.push(d)}return s}(),m=r.releaseHotKey=function(){function s(d){var C=B.indexOf(d);C>=0&&B.splice(C,1)}return s}(),l=r.releaseHeldKeys=function(){function s(){for(var d=0,C=Object.keys(k);d0||(0,a.fetchRetry)((0,e.resolveAsset)("icon_ref_map.json")).then(function(b){return b.json()}).then(function(b){return Byond.iconRefMap=b}).catch(function(b){return t.logger.log(b)})}return f}()},1090:function(T,r,n){"use strict";r.__esModule=!0,r.AICard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AICard=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;if(i.has_ai===0)return(0,e.createComponentVNode)(2,o.Window,{width:250,height:120,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var c=null;return i.integrity>=75?c="green":i.integrity>=25?c="yellow":c="red",(0,e.createComponentVNode)(2,o.Window,{width:600,height:420,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.name,children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:c,value:i.integrity/100})})}),(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h2",null,i.flushing===1?"Wipe of AI in progress...":"",0)})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(m,l){return(0,e.createComponentVNode)(2,t.Box,{children:m},l)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.wireless?"check":"times",content:i.wireless?"Enabled":"Disabled",color:i.wireless?"green":"red",onClick:function(){function m(){return g("wireless")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{width:10,icon:i.radio?"check":"times",content:i.radio?"Enabled":"Disabled",color:i.radio?"green":"red",onClick:function(){function m(){return g("radio")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wipe",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{width:10,icon:"trash-alt",confirmIcon:"trash-alt",disabled:i.flushing||i.integrity===0,confirmColor:"red",content:"Wipe AI",onClick:function(){function m(){return g("wipe")}return m}()})})]})})})]})})})}return b}()},39454:function(T,r,n){"use strict";r.__esModule=!0,r.AIFixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AIFixer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;if(i.occupant===null)return(0,e.createComponentVNode)(2,o.Window,{width:550,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Stored AI",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"robot",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No Artificial Intelligence detected.",16)]})})})})});var c=!0;(i.stat===2||i.stat===null)&&(c=!1);var m=null;i.integrity>=75?m="green":i.integrity>=25?m="yellow":m="red";var l=!0;return i.integrity>=100&&i.stat!==2&&(l=!1),(0,e.createComponentVNode)(2,o.Window,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:i.occupant,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:m,value:i.integrity/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:c?"green":"red",children:c?"Functional":"Non-Functional"})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Laws",children:!!i.has_laws&&(0,e.createComponentVNode)(2,t.Box,{children:i.laws.map(function(u,s){return(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:u},s)})})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:(0,e.createVNode)(1,"h3",null,"No laws detected.",16)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Wireless Activity",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.wireless?"times":"check",content:i.wireless?"Disabled":"Enabled",color:i.wireless?"red":"green",onClick:function(){function u(){return g("wireless")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subspace Transceiver",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.radio?"times":"check",content:i.radio?"Disabled":"Enabled",color:i.radio?"red":"green",onClick:function(){function u(){return g("radio")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Start Repairs",children:(0,e.createComponentVNode)(2,t.Button,{icon:"wrench",disabled:!l||i.active,content:!l||i.active?"Already Repaired":"Repair",onClick:function(){function u(){return g("fix")}return u}()})})]}),(0,e.createComponentVNode)(2,t.Box,{color:"green",lineHeight:2,children:i.active?"Reconstruction in progress.":""})]})})]})})})}return b}()},88422:function(T,r,n){"use strict";r.__esModule=!0,r.APC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(195),b=r.APC=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:510,height:435,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return g}(),y={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},B={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.locked&&!u.siliconUser,d=u.normallyLocked,C=y[u.externalPower]||y[0],h=y[u.chargingStatus]||y[0],v=u.powerChannels||[],p=B[u.malfStatus]||B[0],N=u.powerCellStatus/100;return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main Breaker",color:C.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.isOperating?"power-off":"times",content:u.isOperating?"On":"Off",selected:u.isOperating&&!s,color:u.isOperating?"":"bad",disabled:s,onClick:function(){function V(){return l("breaker")}return V}()}),children:["[ ",C.externalPowerText," ]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Cell",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"good",value:N})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",color:h.color,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:u.chargeMode?"sync":"times",content:u.chargeMode?"Auto":"Off",selected:u.chargeMode,disabled:s,onClick:function(){function V(){return l("charge")}return V}()}),children:["[ ",h.chargingText," ]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Channels",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[v.map(function(V){var S=V.topicParams;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:V.title,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mx:2,color:V.status>=2?"good":"bad",children:V.status>=2?"On":"Off"}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:!s&&(V.status===1||V.status===3),disabled:s,onClick:function(){function I(){return l("channel",S.auto)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:"On",selected:!s&&V.status===2,disabled:s,onClick:function(){function I(){return l("channel",S.on)}return I}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:!s&&V.status===0,disabled:s,onClick:function(){function I(){return l("channel",S.off)}return I}()})],4),children:[V.powerLoad," W"]},V.title)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Load",children:(0,e.createVNode)(1,"b",null,[u.totalLoad,(0,e.createTextVNode)(" W")],0)})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc",buttons:!!u.siliconUser&&(0,e.createFragment)([!!u.malfStatus&&(0,e.createComponentVNode)(2,t.Button,{icon:p.icon,content:p.content,color:"bad",onClick:function(){function V(){return l(p.action)}return V}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){function V(){return l("overload")}return V}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.4,icon:u.coverLocked?"lock":"unlock",content:u.coverLocked?"Engaged":"Disengaged",disabled:s,onClick:function(){function V(){return l("cover")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lightbulb-o",content:u.emergencyLights?"Enabled":"Disabled",disabled:s,onClick:function(){function V(){return l("emergency_lighting")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,e.createComponentVNode)(2,t.Button,{mt:.4,icon:"lightbulb-o",content:u.nightshiftLights?"Enabled":"Disabled",onClick:function(){function V(){return l("toggle_nightshift")}return V}()})})]})})],4)}},99660:function(T,r,n){"use strict";r.__esModule=!0,r.ATM=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ATM=function(){function m(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.view_screen,v=C.authenticated_account,p=C.ticks_left_locked_down,N=C.linked_db,V;if(p>0)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(!N)V=(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});else if(v)switch(h){case 1:V=(0,e.createComponentVNode)(2,y);break;case 2:V=(0,e.createComponentVNode)(2,B);break;case 3:V=(0,e.createComponentVNode)(2,i);break;default:V=(0,e.createComponentVNode)(2,k)}else V=(0,e.createComponentVNode)(2,g);return(0,e.createComponentVNode)(2,o.Window,{width:550,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Section,{children:V})]})})}return m}(),b=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.machine_id,v=C.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,e.createComponentVNode)(2,t.Box,{children:"For all your monetary needs!"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card",children:(0,e.createComponentVNode)(2,t.Button,{content:v,icon:"eject",onClick:function(){function p(){return d("insert_card")}return p}()})})})]})},y=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.security_level;return(0,e.createComponentVNode)(2,t.Section,{title:"Select a new security level for this account",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Number",icon:"unlock",selected:h===0,onClick:function(){function v(){return d("change_security_level",{new_security_level:1})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card."}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:(0,e.createComponentVNode)(2,t.Button,{content:"Account Pin",icon:"unlock",selected:h===2,onClick:function(){function v(){return d("change_security_level",{new_security_level:2})}return v}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},B=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=(0,a.useLocalState)(u,"targetAccNumber",0),v=h[0],p=h[1],N=(0,a.useLocalState)(u,"fundsAmount",0),V=N[0],S=N[1],I=(0,a.useLocalState)(u,"purpose",0),L=I[0],w=I[1],A=C.money;return(0,e.createComponentVNode)(2,t.Section,{title:"Transfer Fund",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",A]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Account Number",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"7 Digit Number",onInput:function(){function x(E,P){return p(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Funds to Transfer",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function x(E,P){return S(P)}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transaction Purpose",children:(0,e.createComponentVNode)(2,t.Input,{fluid:!0,onInput:function(){function x(E,P){return w(P)}return x}()})})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){function x(){return d("transfer",{target_acc_number:v,funds_amount:V,purpose:L})}return x}()}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},k=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=(0,a.useLocalState)(u,"fundsAmount",0),v=h[0],p=h[1],N=C.owner_name,V=C.money;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Welcome, "+N,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){function S(){return d("logout")}return S}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account Balance",children:["$",V]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Withdrawal Amount",children:(0,e.createComponentVNode)(2,t.Input,{onInput:function(){function S(I,L){return p(L)}return S}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Withdraw Funds",icon:"sign-out-alt",onClick:function(){function S(){return d("withdrawal",{funds_amount:v})}return S}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Menu",children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Change account security level",icon:"lock",onClick:function(){function S(){return d("view_screen",{view_screen:1})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){function S(){return d("view_screen",{view_screen:2})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"View transaction log",icon:"list",onClick:function(){function S(){return d("view_screen",{view_screen:3})}return S}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Print balance statement",icon:"print",onClick:function(){function S(){return d("balance_statement")}return S}()})})]})],4)},g=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=(0,a.useLocalState)(u,"accountID",null),v=h[0],p=h[1],N=(0,a.useLocalState)(u,"accountPin",null),V=N[0],S=N[1],I=C.machine_id,L=C.held_card_name;return(0,e.createComponentVNode)(2,t.Section,{title:"Insert card or enter ID and pin to login",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Account ID",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return p(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pin",children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"6 Digit Number",onInput:function(){function w(A,x){return S(x)}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){function w(){return d("attempt_auth",{account_num:v,account_pin:V})}return w}()})})]})})},i=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.transaction_log;return(0,e.createComponentVNode)(2,t.Section,{title:"Transactions",children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Terminal"})]}),h.map(function(v){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.purpose}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:v.is_deposit?"green":"red",children:["$",v.amount]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v.target_name})]},v)})]}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,c)]})},c=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data;return(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){function h(){return d("view_screen",{view_screen:0})}return h}()})}},86423:function(T,r,n){"use strict";r.__esModule=!0,r.AccountsUplinkTerminal=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(36352),b=n(98595),y=n(321),B=n(5485),k=r.AccountsUplinkTerminal=function(){function C(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.loginState,I=V.currentPage,L;if(S.logged_in)I===1?L=(0,e.createComponentVNode)(2,i):I===2?L=(0,e.createComponentVNode)(2,s):I===3&&(L=(0,e.createComponentVNode)(2,d));else return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B.LoginScreen)})})});return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:L})]})})})}return C}(),g=function(h,v){var p=(0,t.useBackend)(v),N=p.data,V=(0,t.useLocalState)(v,"tabIndex",0),S=V[0],I=V[1],L=N.login_state;return(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,mb:1,children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===0,onClick:function(){function w(){return I(0)}return w}(),children:"User Accounts"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:S===1,onClick:function(){function w(){return I(1)}return w}(),children:"Department Accounts"})]})})})},i=function(h,v){var p=(0,t.useLocalState)(v,"tabIndex",0),N=p[0];switch(N){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},c=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.accounts,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1],A=(0,t.useLocalState)(v,"sortId","owner_name"),x=A[0],E=A[1],P=(0,t.useLocalState)(v,"sortOrder",!0),D=P[0],M=P[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,u),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,l,{id:"owner_name",children:"Account Holder"}),(0,e.createComponentVNode)(2,l,{id:"account_number",children:"Account Number"}),(0,e.createComponentVNode)(2,l,{id:"suspended",children:"Account Status"}),(0,e.createComponentVNode)(2,l,{id:"money",children:"Account Balance"})]}),S.filter((0,a.createSearch)(L,function(R){return R.owner_name+"|"+R.account_number+"|"+R.suspended+"|"+R.money})).sort(function(R,O){var F=D?1:-1;return R[x].localeCompare(O[x])*F}).map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+R.suspended,onClick:function(){function O(){return N("view_account_detail",{account_num:R.account_number})}return O}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",R.owner_name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",R.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.money})]},R.account_number)})]})})})]})},m=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.department_accounts;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{className:"AccountsUplinkTerminal__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,f.TableCell,{children:"Department Name"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Number"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Status"}),(0,e.createComponentVNode)(2,f.TableCell,{children:"Account Balance"})]}),S.map(function(I){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"AccountsUplinkTerminal__listRow--"+I.suspended,onClick:function(){function L(){return N("view_account_detail",{account_num:I.account_number})}return L}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"wallet"})," ",I.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:["#",I.account_number]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.suspended}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:I.money})]},I.account_number)})]})})})})},l=function(h,v){var p=(0,t.useLocalState)(v,"sortId","name"),N=p[0],V=p[1],S=(0,t.useLocalState)(v,"sortOrder",!0),I=S[0],L=S[1],w=h.id,A=h.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:N!==w&&"transparent",width:"100%",onClick:function(){function x(){N===w?L(!I):(V(w),L(!0))}return x}(),children:[A,N===w&&(0,e.createComponentVNode)(2,o.Icon,{name:I?"sort-up":"sort-down",ml:"0.25rem;"})]})})},u=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.is_printing,I=(0,t.useLocalState)(v,"searchText",""),L=I[0],w=I[1];return(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"New Account",icon:"plus",onClick:function(){function A(){return N("create_new_account")}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(){function A(x,E){return w(E)}return A}()})})]})},s=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=V.account_number,I=V.owner_name,L=V.money,w=V.suspended,A=V.transactions,x=V.account_pin,E=V.is_department_account;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"#"+S+" / "+I,buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function P(){return N("back")}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Number",children:["#",S]}),!!E&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin",children:x}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Pin Actions",children:(0,e.createComponentVNode)(2,o.Button,{ml:1,icon:"user-cog",content:"Set New Pin",disabled:!!E,onClick:function(){function P(){return N("set_account_pin",{account_number:S})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:I}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Balance",children:L}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Status",color:w?"red":"green",children:[w?"Suspended":"Active",(0,e.createComponentVNode)(2,o.Button,{ml:1,content:w?"Unsuspend":"Suspend",icon:w?"unlock":"lock",onClick:function(){function P(){return N("toggle_suspension")}return P}()})]})]})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Transactions",children:(0,e.createComponentVNode)(2,o.Table,{children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Timestamp"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Reason"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Value"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Terminal"})]}),A.map(function(P){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.time}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.purpose}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:P.is_deposit?"green":"red",children:["$",P.amount]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P.target_name})]},P)})]})})})]})},d=function(h,v){var p=(0,t.useBackend)(v),N=p.act,V=p.data,S=(0,t.useLocalState)(v,"accName",""),I=S[0],L=S[1],w=(0,t.useLocalState)(v,"accDeposit",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Create Account",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"arrow-left",content:"Back",onClick:function(){function E(){return N("back")}return E}()}),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Account Holder",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Name Here",onChange:function(){function E(P,D){return L(D)}return E}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Initial Deposit",children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"0",onChange:function(){function E(P,D){return x(D)}return E}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){function E(){return N("finalise_create_account",{holder_name:I,starting_funds:A})}return E}()})]})}},23001:function(T,r,n){"use strict";r.__esModule=!0,r.AdminAntagMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(36352),b=n(98595),y=n(321),B=n(5485),k=function(C){switch(C){case 0:return"Antagonists";case 1:return"Objectives";case 2:return"Security";case 3:return"All High Value Items";default:return"Something went wrong with this menu, make an issue report please!"}},g=function(C){switch(C){case 0:return(0,e.createComponentVNode)(2,c);case 1:return(0,e.createComponentVNode)(2,m);case 2:return(0,e.createComponentVNode)(2,l);case 3:return(0,e.createComponentVNode)(2,u);default:return"Something went wrong with this menu, make an issue report please!"}},i=r.AdminAntagMenu=function(){function d(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.loginState,S=N.currentPage,I=(0,t.useLocalState)(h,"tabIndex",0),L=I[0],w=I[1],A=(0,t.useLocalState)(h,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,b.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{children:"This menu is a Work in Progress. Some antagonists like Nuclear Operatives and Biohazards will not show up."})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0)}return P}(),icon:"user",children:"Antagonists"},"Antagonists"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1)}return P}(),icon:"people-robbery",children:"Objectives"},"Objectives"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2)}return P}(),icon:"handcuffs",children:"Security"},"Security"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:L===3,onClick:function(){function P(){w(3)}return P}(),icon:"lock",children:"High Value Items"},"HighValueItems")]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:k(L),fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search...",width:"300px",onInput:function(){function P(D,M){return E(M)}return P}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",onClick:function(){function P(){return p("refresh")}return P}(),children:"Refresh"})]}),children:g(L)})})]})})})}return d}(),c=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.antagonists,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId","antag_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{id:"name",children:"Mob Name"}),(0,e.createComponentVNode)(2,s,{id:"",children:"Buttons"}),(0,e.createComponentVNode)(2,s,{id:"antag_name",children:"Antagonist Type"}),(0,e.createComponentVNode)(2,s,{id:"status",children:"Status"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.status+"|"+M.antag_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:M.body_destroyed?M.name:(0,e.createComponentVNode)(2,o.Button,{color:M.is_hijacker||!M.name?"red":"",tooltip:M.is_hijacker?"Hijacker":"",onClick:function(){function O(){return p("show_player_panel",{mind_uid:M.antag_mind_uid})}return O}(),children:M.name?M.name:"??? (NO NAME)"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("pm",{ckey:M.ckey})}return O}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.antag_mind_uid})}return O}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obs",{mind_uid:M.antag_mind_uid})}return O}(),children:"OBS"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("tp",{mind_uid:M.antag_mind_uid})}return O}(),children:"TP"})]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.antag_name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"red":"grey",children:M.status?M.status:"Alive"})})]},R)})]}):"No Antagonists!"},m=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.objectives,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId2","target_name"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"obj_name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"target_name",children:"Target"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId2",id:"owner_name",children:"Owner"})]}),V.filter((0,a.createSearch)(I,function(M){return M.obj_name+"|"+M.target_name+"|"+(M.status?"success":"incompleted")+"|"+M.owner_name})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null||A==="target_name"&&M.no_target?O:R[A]===void 0||R[A]===null||A==="target_name"&&R.no_target?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,onClick:function(){function O(){return p("vv",{uid:M.obj_uid})}return O}(),children:M.obj_name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:M.no_target?"":M.track.length?M.track.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("follow",{datum_uid:O})}return _}(),children:[M.target_name," ",M.track.length>1?"("+(parseInt(F,10)+1)+")":""]},F)}):"No "+M.target_name+" Found"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.status?"green":"grey",children:M.status?"Success":"Incomplete"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("obj_owner",{owner_uid:M.owner_uid})}return O}(),children:M.owner_name})})]},R)})]}):"No Objectives!"},l=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.security,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId3","health"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1],M=function(F){return F.status===2?"red":F.status===1?"orange":F.broken_bone||F.internal_bleeding?"yellow":"grey"},R=function(F){return F.status===2?"Dead":F.status===1?"Unconscious":F.broken_bone&&F.internal_bleeding?"Broken Bone, IB":F.broken_bone?"Broken Bone":F.internal_bleeding?"IB":"Alive"};return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"role",children:"Role"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"status",children:"Status"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"antag",children:"Antag"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId3",id:"health",children:"Health"})]}),V.filter((0,a.createSearch)(I,function(O){return O.name+"|"+O.role+"|"+R(O)+"|"+O.antag})).sort(function(O,F){var _=P?1:-1;return O[A]===void 0||O[A]===null?_:F[A]===void 0||F[A]===null?-1*_:typeof O[A]=="number"?(O[A]-F[A])*_:O[A].localeCompare(F[A])*_}).map(function(O,F){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){return p("show_player_panel",{mind_uid:O.mind_uid})}return _}(),children:O.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.role}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:M(O),children:R(O)})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:O.antag?(0,e.createComponentVNode)(2,o.Button,{textColor:"red",translucent:!0,onClick:function(){function _(){p("tp",{mind_uid:O.mind_uid})}return _}(),children:O.antag}):""}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,value:O.health/O.max_health,maxValue:1,ranges:{good:[.6,1/0],average:[0,.6],bad:[-1/0,0]},children:O.health})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:[(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("pm",{ckey:O.ckey})}return _}(),children:"PM"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("follow",{datum_uid:O.mind_uid})}return _}(),children:"FLW"}),(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function _(){p("obs",{mind_uid:O.mind_uid})}return _}(),children:"OBS"})]})]},F)})]}):"No Security!"},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.high_value_items,S=(0,t.useLocalState)(h,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(h,"sortId4","person"),A=w[0],x=w[1],E=(0,t.useLocalState)(h,"sortOrder",!0),P=E[0],D=E[1];return V.length?(0,e.createComponentVNode)(2,o.Table,{className:"AdminAntagMenu__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"name",children:"Name"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"person",children:"Carrier"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"loc",children:"Location"}),(0,e.createComponentVNode)(2,s,{sort_group:"sortId4",id:"admin_z",children:"On Admin Z-level"})]}),V.filter((0,a.createSearch)(I,function(M){return M.name+"|"+M.loc})).sort(function(M,R){var O=P?1:-1;return M[A]===void 0||M[A]===null?O:R[A]===void 0||R[A]===null?-1*O:typeof M[A]=="number"?(M[A]-R[A])*O:M[A].localeCompare(R[A])*O}).map(function(M,R){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{tooltip:M.obj_desc,translucent:M.admin_z,onClick:function(){function O(){return p("vv",{uid:M.uid})}return O}(),children:M.name})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.person})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:M.admin_z?"grey":"",children:M.loc})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Box,{color:"grey",children:M.admin_z?"On Admin Z-level":""})}),(0,e.createComponentVNode)(2,o.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,o.Button,{onClick:function(){function O(){p("follow",{datum_uid:M.uid})}return O}(),children:"FLW"})})]},R)})]}):"No High Value Items!"},s=function(C,h){var v=C.id,p=C.sort_group,N=p===void 0?"sortId":p,V=C.default_sort,S=V===void 0?"antag_name":V,I=C.children,L=(0,t.useLocalState)(h,N,S),w=L[0],A=L[1],x=(0,t.useLocalState)(h,"sortOrder",!0),E=x[0],P=x[1];return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:w!==v&&"transparent",width:"100%",onClick:function(){function D(){w===v?P(!E):(A(v),P(!0))}return D}(),children:[I,w===v&&(0,e.createComponentVNode)(2,o.Icon,{name:E?"sort-up":"sort-down",ml:"0.25rem;"})]})})}},39683:function(T,r,n){"use strict";r.__esModule=!0,r.AgentCardInfo=r.AgentCardAppearances=r.AgentCard=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=[{name:"Male",icon:"mars"},{name:"Female",icon:"venus"},{name:"Genderless",icon:"genderless"}],b=["A+","A-","B+","B-","AB+","AB-","O+","O-"],y="Empty",B=function(m){var l=m.label,u=m.value,s=m.onCommit,d=m.onClick,C=m.onRClick,h=m.tooltip;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:l,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button.Input,{fluid:!0,textAlign:"center",content:u||y,onCommit:s})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"file-signature",tooltip:h,tooltipPosition:"bottom-end",onClick:d,onContextMenu:C})})]})})},k=r.AgentCard=function(){function c(m,l){var u=(0,a.useLocalState)(l,"tabIndex",0),s=u[0],d=u[1],C=function(){function h(v){switch(v){case 0:return(0,e.createComponentVNode)(2,g);case 1:return(0,e.createComponentVNode)(2,i);default:return(0,e.createComponentVNode)(2,g)}}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:435,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:s===0,onClick:function(){function h(){return d(0)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:s===1,onClick:function(){function h(){return d(1)}return h}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card"})," Appearance"]},"Appearance")]})}),C(s)]})})})}return c}(),g=r.AgentCardInfo=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.registered_name,h=d.sex,v=d.age,p=d.assignment,N=d.job_icon,V=d.associated_account_number,S=d.blood_type,I=d.dna_hash,L=d.fingerprint_hash,w=d.photo,A=d.ai_tracking,x=d.photo_cooldown,E=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill someone else data.")],4),P=(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Autofill options."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("LMB - Autofill your own data."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("RMB - Autofill with random data.")],4);return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Card Info",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,B,{label:"Name",value:C,tooltip:E,onCommit:function(){function D(M,R){return s("change_name",{name:R})}return D}(),onClick:function(){function D(){return s("change_name",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_name",{option:"Secondary"})}return D}()}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sex",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:f.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:D.icon,content:D.name,selected:h===D.name,onClick:function(){function M(){return s("change_sex",{sex:D.name})}return M}()})},D.name)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Age",children:(0,e.createComponentVNode)(2,t.Slider,{fluid:!0,minValue:17,value:v||0,maxValue:300,onChange:function(){function D(M,R){return s("change_age",{age:R})}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rank",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:function(){function D(){return s("change_occupation")}return D}(),textAlign:"middle",children:p||"[UNSET]"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{tooltip:"Change HUD icon",tooltipPosition:"bottom-end",onClick:function(){function D(){return s("change_occupation",{option:"Primary"})}return D}(),children:[(0,e.createComponentVNode)(2,t.DmIcon,{fill:!0,icon:"icons/mob/hud/job_assets.dmi",icon_state:N,verticalAlign:"bottom",my:"2px",width:"16px"})," "]})})]})}),(0,e.createComponentVNode)(2,B,{label:"Fingerprint",value:L,onCommit:function(){function D(M,R){return s("change_fingerprints",{new_fingerprints:R})}return D}(),onClick:function(){function D(){return s("change_fingerprints",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_fingerprints",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,mb:-.5,children:[b.map(function(D){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:D,selected:S===D,onClick:function(){function M(){return s("change_blood_type",{new_type:D})}return M}()})},D)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-signature",onClick:function(){function D(){return s("change_blood_type",{option:"Primary"})}return D}()})})]})}),(0,e.createComponentVNode)(2,B,{label:"DNA",value:I,onCommit:function(){function D(M,R){return s("change_dna_hash",{new_dna:R})}return D}(),onClick:function(){function D(){return s("change_dna_hash",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_dna_hash",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,B,{label:"Account",value:V||0,onCommit:function(){function D(M,R){return s("change_money_account",{new_account:R})}return D}(),onClick:function(){function D(){return s("change_money_account",{option:"Primary"})}return D}(),onRClick:function(){function D(M){M.preventDefault(),s("change_money_account",{option:"Secondary"})}return D}(),tooltip:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Photo",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!x,tooltip:x?"":"You can't generate a new photo yet.",onClick:function(){function D(){return s("change_photo")}return D}(),children:w?"Update":y})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Card Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Card Info",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Delete Card Info",confirmContent:"Are you sure?",onClick:function(){function D(){return s("delete_info")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{fluid:!0,textAlign:"center",content:"Reset Access",confirmContent:"Are you sure?",onClick:function(){function D(){return s("clear_access")}return D}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"AI Tracking",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",onClick:function(){function D(){return s("change_ai_tracking")}return D}(),children:A?"Untrackable":"Trackable"})})]})})})],4)}return c}(),i=r.AgentCardAppearances=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=(0,a.useSharedState)(l,"selectedAppearance",null),h=C[0],v=C[1],p=d.appearances,N=d.id_icon;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Card Appearance",children:p.map(function(V){return(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:N,dmIconState:V,imageSize:64,compact:!0,selected:V===h,tooltip:V,style:{opacity:V===h&&"1"||"0.5"},onClick:function(){function S(){v(V),s("change_appearance",{new_appearance:V})}return S}()},V)})})})}return c}()},56793:function(T,r,n){"use strict";r.__esModule=!0,r.AiAirlock=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}},b=r.AiAirlock=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=f[c.power.main]||f[0],l=f[c.power.backup]||f[0],u=f[c.shock]||f[0];return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Power Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Main",color:m.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.main,content:"Disrupt",onClick:function(){function s(){return i("disrupt-main")}return s}()}),children:[c.power.main?"Online":"Offline"," ",!c.wires.main_power&&"[Wires have been cut!]"||c.power.main_timeleft>0&&"["+c.power.main_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Backup",color:l.color,buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:"lightbulb-o",disabled:!c.power.backup,content:"Disrupt",onClick:function(){function s(){return i("disrupt-backup")}return s}()}),children:[c.power.backup?"Online":"Offline"," ",!c.wires.backup_power&&"[Wires have been cut!]"||c.power.backup_timeleft>0&&"["+c.power.backup_timeleft+"s]"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Electrify",color:u.color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"wrench",disabled:!(c.wires.shock&&c.shock!==2),content:"Restore",onClick:function(){function s(){return i("shock-restore")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{mr:.5,icon:"bolt",disabled:!c.wires.shock,content:"Temporary",onClick:function(){function s(){return i("shock-temp")}return s}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"bolt",disabled:!c.wires.shock||c.shock===0,content:"Permanent",onClick:function(){function s(){return i("shock-perm")}return s}()})],4),children:[c.shock===2?"Safe":"Electrified"," ",!c.wires.shock&&"[Wires have been cut!]"||c.shock_timeleft>0&&"["+c.shock_timeleft+"s]"||c.shock_timeleft===-1&&"[Permanent]"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Access and Door Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.id_scanner?"power-off":"times",content:c.id_scanner?"Enabled":"Disabled",selected:c.id_scanner,disabled:!c.wires.id_scanner,onClick:function(){function s(){return i("idscan-toggle")}return s}()}),children:!c.wires.id_scanner&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Access",buttons:(0,e.createComponentVNode)(2,t.Button,{width:6.5,icon:c.emergency?"power-off":"times",content:c.emergency?"Enabled":"Disabled",selected:c.emergency,onClick:function(){function s(){return i("emergency-toggle")}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,icon:c.locked?"lock":"unlock",content:c.locked?"Lowered":"Raised",selected:c.locked,disabled:!c.wires.bolts,onClick:function(){function s(){return i("bolt-toggle")}return s}()}),children:!c.wires.bolts&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.lights?"power-off":"times",content:c.lights?"Enabled":"Disabled",selected:c.lights,disabled:!c.wires.lights,onClick:function(){function s(){return i("light-toggle")}return s}()}),children:!c.wires.lights&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.safe?"power-off":"times",content:c.safe?"Enabled":"Disabled",selected:c.safe,disabled:!c.wires.safe,onClick:function(){function s(){return i("safe-toggle")}return s}()}),children:!c.wires.safe&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{mb:.5,width:6.5,icon:c.speed?"power-off":"times",content:c.speed?"Enabled":"Disabled",selected:c.speed,disabled:!c.wires.timing,onClick:function(){function s(){return i("speed-toggle")}return s}()}),children:!c.wires.timing&&"[Wires have been cut!]"}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:c.opened?"sign-out-alt":"sign-in-alt",content:c.opened?"Open":"Closed",selected:c.opened,disabled:c.locked||c.welded,onClick:function(){function s(){return i("open-close")}return s}()}),children:!!(c.locked||c.welded)&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("[Door is "),c.locked?"bolted":"",c.locked&&c.welded?" and ":"",c.welded?"welded":"",(0,e.createTextVNode)("!]")],0)})]})})]})})}return y}()},72475:function(T,r,n){"use strict";r.__esModule=!0,r.AirAlarm=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(195),b=r.AirAlarm=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.locked;return(0,e.createComponentVNode)(2,o.Window,{width:570,height:p?310:755,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.InterfaceLockNoticeBox),(0,e.createComponentVNode)(2,B),!p&&(0,e.createFragment)([(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)],4)]})})}return u}(),y=function(s){return s===0?"green":s===1?"orange":"red"},B=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.air,N=v.mode,V=v.atmos_alarm,S=v.locked,I=v.alarmActivated,L=v.rcon,w=v.target_temp,A;return p.danger.overall===0?V===0?A="Optimal":A="Caution: Atmos alert in area":p.danger.overall===1?A="Caution":A="DANGER: Internals Required",(0,e.createComponentVNode)(2,t.Section,{title:"Air Status",children:p?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.danger.pressure),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.pressure})," kPa",!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:N===3?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:N===3,icon:"exclamation-triangle",onClick:function(){function x(){return h("mode",{mode:N===3?1:3})}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Oxygen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.oxygen/100,fractionDigits:"1",color:y(p.danger.oxygen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrogen",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.nitrogen/100,fractionDigits:"1",color:y(p.danger.nitrogen)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Carbon Dioxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.co2/100,fractionDigits:"1",color:y(p.danger.co2)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Toxins",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.plasma/100,fractionDigits:"1",color:y(p.danger.plasma)})}),p.contents.n2o>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nitrous Oxide",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.n2o/100,fractionDigits:"1",color:y(p.danger.n2o)})}),p.contents.other>.1&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:p.contents.other/100,fractionDigits:"1",color:y(p.danger.other)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.danger.temperature),children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature})," K / ",(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:p.temperature_c})," C\xA0",(0,e.createComponentVNode)(2,t.Button,{icon:"thermometer-full",content:w+" C",onClick:function(){function x(){return h("temperature")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:p.thermostat_state?"On":"Off",selected:p.thermostat_state,icon:"power-off",onClick:function(){function x(){return h("thermostat_state")}return x}()})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Local Status",children:(0,e.createComponentVNode)(2,t.Box,{color:y(p.danger.overall),children:[A,!S&&(0,e.createFragment)([(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,t.Button,{content:I?"Reset Alarm":"Activate Alarm",selected:I,onClick:function(){function x(){return h(I?"atmos_reset":"atmos_alarm")}return x}()})],4)]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Control Settings",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Off",selected:L===1,onClick:function(){function x(){return h("set_rcon",{rcon:1})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Auto",selected:L===2,onClick:function(){function x(){return h("set_rcon",{rcon:2})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"On",selected:L===3,onClick:function(){function x(){return h("set_rcon",{rcon:3})}return x}()})]})]}):(0,e.createComponentVNode)(2,t.Box,{children:"Unable to acquire air sample!"})})},k=function(s,d){var C=(0,a.useLocalState)(d,"tabIndex",0),h=C[0],v=C[1];return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===0,onClick:function(){function p(){return v(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===1,onClick:function(){function p(){return v(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===2,onClick:function(){function p(){return v(2)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog"})," Mode"]},"Mode"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h===3,onClick:function(){function p(){return v(3)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},g=function(s,d){var C=(0,a.useLocalState)(d,"tabIndex",0),h=C[0],v=C[1];switch(h){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,m);case 3:return(0,e.createComponentVNode)(2,l);default:return"WE SHOULDN'T BE HERE!"}},i=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.vents;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return h("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.direction?"Blowing":"Siphoning",icon:N.direction?"sign-out-alt":"sign-in-alt",onClick:function(){function V(){return h("command",{cmd:"direction",val:!N.direction,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure Checks",children:[(0,e.createComponentVNode)(2,t.Button,{content:"External",selected:N.checks===1,onClick:function(){function V(){return h("command",{cmd:"checks",val:1,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Internal",selected:N.checks===2,onClick:function(){function V(){return h("command",{cmd:"checks",val:2,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Pressure Target",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:N.external})," kPa\xA0",(0,e.createComponentVNode)(2,t.Button,{content:"Set",icon:"cog",onClick:function(){function V(){return h("command",{cmd:"set_external_pressure",id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Reset",icon:"redo-alt",onClick:function(){function V(){return h("command",{cmd:"set_external_pressure",val:101.325,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.scrubbers;return p.map(function(N){return(0,e.createComponentVNode)(2,t.Section,{title:N.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[(0,e.createComponentVNode)(2,t.Button,{content:N.power?"On":"Off",selected:N.power,icon:"power-off",onClick:function(){function V(){return h("command",{cmd:"power",val:!N.power,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N.scrubbing?"Scrubbing":"Siphoning",icon:N.scrubbing?"filter":"sign-in-alt",onClick:function(){function V(){return h("command",{cmd:"scrubbing",val:!N.scrubbing,id_tag:N.id_tag})}return V}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,t.Button,{content:N.widenet?"Extended":"Normal",selected:N.widenet,icon:"expand-arrows-alt",onClick:function(){function V(){return h("command",{cmd:"widenet",val:!N.widenet,id_tag:N.id_tag})}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filtering",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Carbon Dioxide",selected:N.filter_co2,onClick:function(){function V(){return h("command",{cmd:"co2_scrub",val:!N.filter_co2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Plasma",selected:N.filter_toxins,onClick:function(){function V(){return h("command",{cmd:"tox_scrub",val:!N.filter_toxins,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrous Oxide",selected:N.filter_n2o,onClick:function(){function V(){return h("command",{cmd:"n2o_scrub",val:!N.filter_n2o,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Oxygen",selected:N.filter_o2,onClick:function(){function V(){return h("command",{cmd:"o2_scrub",val:!N.filter_o2,id_tag:N.id_tag})}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Nitrogen",selected:N.filter_n2,onClick:function(){function V(){return h("command",{cmd:"n2_scrub",val:!N.filter_n2,id_tag:N.id_tag})}return V}()})]})]})},N.name)})},m=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.modes,N=v.presets,V=v.emagged,S=v.mode,I=v.preset;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"System Mode",children:Object.keys(p).map(function(L){var w=p[L];if(!w.emagonly||V)return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:w.name,icon:"cog",selected:w.id===S,onClick:function(){function A(){return h("mode",{mode:w.id})}return A}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.desc})]},w.name)})}),(0,e.createComponentVNode)(2,t.Section,{title:"System Presets",children:[(0,e.createComponentVNode)(2,t.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,e.createComponentVNode)(2,t.Table,{mt:1,children:N.map(function(L){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",width:1,children:(0,e.createComponentVNode)(2,t.Button,{content:L.name,icon:"cog",selected:L.id===I,onClick:function(){function w(){return h("preset",{preset:L.id})}return w}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.desc})]},L.name)})})]})],4)},l=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.thresholds;return(0,e.createComponentVNode)(2,t.Section,{title:"Alarm Thresholds",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Value"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,e.createComponentVNode)(2,t.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),p.map(function(N){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:N.name}),N.settings.map(function(V){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:V.selected===-1?"Off":V.selected,onClick:function(){function S(){return h("command",{cmd:"set_threshold",env:V.env,var:V.val})}return S}()})},V.val)})]},N.name)})]})})}},12333:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockAccessController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AirlockAccessController=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.exterior_status,m=i.interior_status,l=i.processing,u,s;return c==="open"?u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:l,onClick:function(){function d(){return g("force_ext")}return d}()}):u=(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:l,onClick:function(){function d(){return g("cycle_ext_door")}return d}()}),m==="open"?s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Lock Interior Door",icon:"exclamation-triangle",disabled:l,color:m==="open"?"red":l?"yellow":null,onClick:function(){function d(){return g("force_int")}return d}()}):s=(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:l,onClick:function(){function d(){return g("cycle_int_door")}return d}()}),(0,e.createComponentVNode)(2,o.Window,{width:330,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"External Door Status",children:c==="closed"?"Locked":"Open"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Door Status",children:m==="closed"?"Locked":"Open"})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",children:(0,e.createComponentVNode)(2,t.Box,{children:[u,s]})})]})})}return b}()},28736:function(T,r,n){"use strict";r.__esModule=!0,r.AirlockElectronics=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(49148),b=1,y=2,B=4,k=8,g=r.AirlockElectronics=function(){function m(l,u){return(0,e.createComponentVNode)(2,o.Window,{width:450,height:565,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})})}return m}(),i=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.unrestricted_dir;return(0,e.createComponentVNode)(2,t.Section,{title:"Access Control",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:h&B,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:B})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:h&y,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:y})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:h&k,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:k})}return v}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:h&b,onClick:function(){function v(){return d("unrestricted_access",{unres_dir:b})}return v}()})})]})]})})},c=function(l,u){var s=(0,a.useBackend)(u),d=s.act,C=s.data,h=C.selected_accesses,v=C.one_access,p=C.regions;return(0,e.createComponentVNode)(2,f.AccessList,{usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:v,content:"One",onClick:function(){function N(){return d("set_one_access",{access:"one"})}return N}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!v,content:"All",onClick:function(){function N(){return d("set_one_access",{access:"all"})}return N}()})],4),accesses:p,selectedList:h,accessMod:function(){function N(V){return d("set",{access:V})}return N}(),grantAll:function(){function N(){return d("grant_all")}return N}(),denyAll:function(){function N(){return d("clear_all")}return N}(),grantDep:function(){function N(V){return d("grant_region",{region:V})}return N}(),denyDep:function(){function N(V){return d("deny_region",{region:V})}return N}()})}},47365:function(T,r,n){"use strict";r.__esModule=!0,r.AlertModal=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(92986),f=n(36036),b=n(98595),y=-1,B=1,k=r.AlertModal=function(){function c(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.autofocus,h=d.buttons,v=h===void 0?[]:h,p=d.large_buttons,N=d.message,V=N===void 0?"":N,S=d.timeout,I=d.title,L=(0,t.useLocalState)(l,"selected",0),w=L[0],A=L[1],x=110+(V.length>30?Math.ceil(V.length/4):0)+(V.length&&p?5:0),E=325+(v.length>2?100:0),P=function(){function D(M){w===0&&M===y?A(v.length-1):w===v.length-1&&M===B?A(0):A(w+M)}return D}();return(0,e.createComponentVNode)(2,b.Window,{title:I,height:x,width:E,children:[!!S&&(0,e.createComponentVNode)(2,a.Loader,{value:S}),(0,e.createComponentVNode)(2,b.Window.Content,{onKeyDown:function(){function D(M){var R=window.event?M.which:M.keyCode;R===o.KEY_SPACE||R===o.KEY_ENTER?s("choose",{choice:v[w]}):R===o.KEY_ESCAPE?s("cancel"):R===o.KEY_LEFT?(M.preventDefault(),P(y)):(R===o.KEY_TAB||R===o.KEY_RIGHT)&&(M.preventDefault(),P(B))}return D}(),children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,m:1,children:(0,e.createComponentVNode)(2,f.Box,{color:"label",overflow:"hidden",children:V})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:[!!C&&(0,e.createComponentVNode)(2,f.Autofocus),(0,e.createComponentVNode)(2,g,{selected:w})]})]})})})]})}return c}(),g=function(m,l){var u=(0,t.useBackend)(l),s=u.data,d=s.buttons,C=d===void 0?[]:d,h=s.large_buttons,v=s.swapped_buttons,p=m.selected;return(0,e.createComponentVNode)(2,f.Flex,{fill:!0,align:"center",direction:v?"row":"row-reverse",justify:"space-around",wrap:!0,children:C==null?void 0:C.map(function(N,V){return h&&C.length<3?(0,e.createComponentVNode)(2,f.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{button:N,id:V.toString(),selected:p===V})},V):(0,e.createComponentVNode)(2,f.Flex.Item,{grow:h?1:0,children:(0,e.createComponentVNode)(2,i,{button:N,id:V.toString(),selected:p===V})},V)})})},i=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.large_buttons,h=m.button,v=m.selected,p=h.length>7?"100%":7;return(0,e.createComponentVNode)(2,f.Button,{mx:C?1:0,pt:C?.33:0,content:h,fluid:!!C,onClick:function(){function N(){return s("choose",{choice:h})}return N}(),selected:v,textAlign:"center",height:!!C&&2,width:!C&&p})}},71824:function(T,r,n){"use strict";r.__esModule=!0,r.AppearanceChanger=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AppearanceChanger=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.change_race,l=c.species,u=c.specimen,s=c.change_gender,d=c.gender,C=c.change_eye_color,h=c.change_skin_tone,v=c.change_skin_color,p=c.change_runechat_color,N=c.change_head_accessory_color,V=c.change_hair_color,S=c.change_secondary_hair_color,I=c.change_facial_hair_color,L=c.change_secondary_facial_hair_color,w=c.change_head_marking_color,A=c.change_body_marking_color,x=c.change_tail_marking_color,E=c.change_head_accessory,P=c.head_accessory_styles,D=c.head_accessory_style,M=c.change_hair,R=c.hair_styles,O=c.hair_style,F=c.change_hair_gradient,_=c.change_facial_hair,U=c.facial_hair_styles,z=c.facial_hair_style,$=c.change_head_markings,G=c.head_marking_styles,X=c.head_marking_style,J=c.change_body_markings,se=c.body_marking_styles,ie=c.body_marking_style,me=c.change_tail_markings,q=c.tail_marking_styles,re=c.tail_marking_style,ae=c.change_body_accessory,le=c.body_accessory_styles,Z=c.body_accessory_style,ne=c.change_alt_head,te=c.alt_head_styles,fe=c.alt_head_style,pe=!1;return(C||h||v||N||p||V||S||I||L||w||A||x)&&(pe=!0),(0,e.createComponentVNode)(2,o.Window,{width:800,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Species",children:l.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.specimen,selected:ce.specimen===u,onClick:function(){function Ve(){return i("race",{race:ce.specimen})}return Ve}()},ce.specimen)})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gender",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Male",selected:d==="male",onClick:function(){function ce(){return i("gender",{gender:"male"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Female",selected:d==="female",onClick:function(){function ce(){return i("gender",{gender:"female"})}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Genderless",selected:d==="plural",onClick:function(){function ce(){return i("gender",{gender:"plural"})}return ce}()})]}),!!pe&&(0,e.createComponentVNode)(2,b),!!E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head accessory",children:P.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headaccessorystyle,selected:ce.headaccessorystyle===D,onClick:function(){function Ve(){return i("head_accessory",{head_accessory:ce.headaccessorystyle})}return Ve}()},ce.headaccessorystyle)})}),!!M&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair",children:R.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.hairstyle,selected:ce.hairstyle===O,onClick:function(){function Ve(){return i("hair",{hair:ce.hairstyle})}return Ve}()},ce.hairstyle)})}),!!F&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hair Gradient",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Change Style",onClick:function(){function ce(){return i("hair_gradient")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Offset",onClick:function(){function ce(){return i("hair_gradient_offset")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Color",onClick:function(){function ce(){return i("hair_gradient_colour")}return ce}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Change Alpha",onClick:function(){function ce(){return i("hair_gradient_alpha")}return ce}()})]}),!!_&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Facial hair",children:U.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.facialhairstyle,selected:ce.facialhairstyle===z,onClick:function(){function Ve(){return i("facial_hair",{facial_hair:ce.facialhairstyle})}return Ve}()},ce.facialhairstyle)})}),!!$&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Head markings",children:G.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.headmarkingstyle,selected:ce.headmarkingstyle===X,onClick:function(){function Ve(){return i("head_marking",{head_marking:ce.headmarkingstyle})}return Ve}()},ce.headmarkingstyle)})}),!!J&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body markings",children:se.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodymarkingstyle,selected:ce.bodymarkingstyle===ie,onClick:function(){function Ve(){return i("body_marking",{body_marking:ce.bodymarkingstyle})}return Ve}()},ce.bodymarkingstyle)})}),!!me&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tail markings",children:q.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.tailmarkingstyle,selected:ce.tailmarkingstyle===re,onClick:function(){function Ve(){return i("tail_marking",{tail_marking:ce.tailmarkingstyle})}return Ve}()},ce.tailmarkingstyle)})}),!!ae&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Body accessory",children:le.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.bodyaccessorystyle,selected:ce.bodyaccessorystyle===Z,onClick:function(){function Ve(){return i("body_accessory",{body_accessory:ce.bodyaccessorystyle})}return Ve}()},ce.bodyaccessorystyle)})}),!!ne&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alternate head",children:te.map(function(ce){return(0,e.createComponentVNode)(2,t.Button,{content:ce.altheadstyle,selected:ce.altheadstyle===fe,onClick:function(){function Ve(){return i("alt_head",{alt_head:ce.altheadstyle})}return Ve}()},ce.altheadstyle)})})]})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_runechat_color",text:"Change runechat color",action:"runechat_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}];return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Colors",children:m.map(function(l){return!!c[l.key]&&(0,e.createComponentVNode)(2,t.Button,{content:l.text,onClick:function(){function u(){return i(l.action)}return u}()},l.key)})})}},72285:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosAlertConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.priority||[],m=i.minor||[],l=i.mode||{};return(0,e.createComponentVNode)(2,o.Window,{width:350,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Alarms",children:(0,e.createVNode)(1,"ul",null,[c.length===0&&(0,e.createVNode)(1,"li","color-good","No Priority Alerts",16),c.map(function(u){return(0,e.createVNode)(1,"li","color-bad",u,0,null,u)}),m.length===0&&(0,e.createVNode)(1,"li","color-good","No Minor Alerts",16),m.map(function(u){return(0,e.createVNode)(1,"li","color-average",u,0,null,u)}),Object.keys(l).length===0&&(0,e.createVNode)(1,"li","color-good","All Areas Filtering",16),Object.keys(l).map(function(u){return(0,e.createVNode)(1,"li","color-good",[u,(0,e.createTextVNode)(" mode is "),l[u]],0,null,alert)})],0)})})})}return b}()},65805:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(36352),f=n(98595),b=function(c){if(c===0)return(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Good"});if(c===1)return(0,e.createComponentVNode)(2,t.Box,{color:"orange",bold:!0,children:"Warning"});if(c===2)return(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,children:"DANGER"})},y=function(c){if(c===0)return"green";if(c===1)return"orange";if(c===2)return"red"},B=r.AtmosControl=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=(0,a.useLocalState)(m,"tabIndex",0),C=d[0],h=d[1],v=function(){function p(N){switch(N){case 0:return(0,e.createComponentVNode)(2,k);case 1:return(0,e.createComponentVNode)(2,g);default:return"WE SHOULDN'T BE HERE!"}}return p}();return(0,e.createComponentVNode)(2,f.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:C===0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===0,onClick:function(){function p(){return h(0)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"table"})," Data View"]},"DataView"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===1,onClick:function(){function p(){return h(1)}return p}(),children:[(0,e.createComponentVNode)(2,t.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),v(C)]})})})}return i}(),k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Access"})]}),d.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,o.TableCell,{children:C.name}),(0,e.createComponentVNode)(2,o.TableCell,{children:b(C.danger)}),(0,e.createComponentVNode)(2,o.TableCell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Access",onClick:function(){function h(){return u("open_alarm",{aref:C.ref})}return h}()})})]},C.name)})]})})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.alarms;return(0,e.createComponentVNode)(2,t.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,t.NanoMap,{children:d.filter(function(C){return C.z===2}).map(function(C){return(0,e.createComponentVNode)(2,t.NanoMap.MarkerIcon,{x:C.x,y:C.y,icon:"circle",tooltip:C.name,color:y(C.danger),onClick:function(){function h(){return u("open_alarm",{aref:C.ref})}return h}()},C.ref)})})})}},87816:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosFilter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosFilter=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.on,m=i.pressure,l=i.max_pressure,u=i.filter_type,s=i.filter_type_list;return(0,e.createComponentVNode)(2,o.Window,{width:380,height:140,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_pressure")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:l,value:m,onDrag:function(){function d(C,h){return g("custom_pressure",{pressure:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===l,width:2.2,onClick:function(){function d(){return g("max_pressure")}return d}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Filter",children:s.map(function(d){return(0,e.createComponentVNode)(2,t.Button,{selected:d.gas_type===u,content:d.label,onClick:function(){function C(){return g("set_filter",{filter:d.gas_type})}return C}()},d.label)})})]})})})})}return b}()},52977:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosMixer=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.on,l=c.pressure,u=c.max_pressure,s=c.node1_concentration,d=c.node2_concentration;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:165,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:m?"On":"Off",color:m?null:"red",selected:m,onClick:function(){function C(){return i("power")}return C}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:l===0,width:2.2,onClick:function(){function C(){return i("min_pressure")}return C}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:l,onDrag:function(){function C(h,v){return i("custom_pressure",{pressure:v})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:l===u,width:2.2,onClick:function(){function C(){return i("max_pressure")}return C}()})]}),(0,e.createComponentVNode)(2,b,{node_name:"Node 1",node_ref:s}),(0,e.createComponentVNode)(2,b,{node_name:"Node 2",node_ref:d})]})})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=B.node_name,l=B.node_ref;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:m,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:l===0,onClick:function(){function u(){return i("set_node",{node_name:m,concentration:(l-10)/100})}return u}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(){function u(s,d){return i("set_node",{node_name:m,concentration:d/100})}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:l===100,onClick:function(){function u(){return i("set_node",{node_name:m,concentration:(l+10)/100})}return u}()})]})}},11748:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosPump=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.AtmosPump=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.on,m=i.rate,l=i.max_rate,u=i.gas_unit,s=i.step;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:110,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:c?"On":"Off",color:c?null:"red",selected:c,onClick:function(){function d(){return g("power")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",textAlign:"center",disabled:m===0,width:2.2,onClick:function(){function d(){return g("min_rate")}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:u,width:6.1,lineHeight:1.5,step:s,minValue:0,maxValue:l,value:m,onDrag:function(){function d(C,h){return g("custom_rate",{rate:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",textAlign:"center",disabled:m===l,width:2.2,onClick:function(){function d(){return g("max_rate")}return d}()})]})]})})})})}return b}()},69321:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosTankControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(44879),f=n(76910),b=n(98595),y=r.AtmosTankControl=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.sensors||{};return(0,e.createComponentVNode)(2,b.Window,{width:400,height:400,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:[Object.keys(l).map(function(u){return(0,e.createComponentVNode)(2,t.Section,{title:u,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[Object.keys(l[u]).indexOf("pressure")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Pressure",children:[l[u].pressure," kpa"]}):"",Object.keys(l[u]).indexOf("temperature")>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[l[u].temperature," K"]}):"",["o2","n2","plasma","co2","n2o"].map(function(s){return Object.keys(l[u]).indexOf(s)>-1?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:(0,f.getGasLabel)(s),children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:(0,f.getGasColor)(s),value:l[u][s],minValue:0,maxValue:100,children:(0,o.toFixed)(l[u][s],2)+"%"})},(0,f.getGasLabel)(s)):""})]})},u)}),m.inlet&&Object.keys(m.inlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Inlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.inlet.on,"power-off"),content:m.inlet.on?"On":"Off",color:m.inlet.on?null:"red",selected:m.inlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"inlet"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"L/s",width:6.1,lineHeight:1.5,step:1,minValue:0,maxValue:50,value:m.inlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"inlet",val:d})}return u}()})})]})}):"",m.outlet&&Object.keys(m.outlet).length>0?(0,e.createComponentVNode)(2,t.Section,{title:"Outlet Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:(m.outlet.on,"power-off"),content:m.outlet.on?"On":"Off",color:m.outlet.on?null:"red",selected:m.outlet.on,onClick:function(){function u(){return c("toggle_active",{dev:"outlet"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rate",children:(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:5066,value:m.outlet.rate,onDrag:function(){function u(s,d){return c("set_pressure",{dev:"outlet",val:d})}return u}()})})]})}):""]})})}return B}()},92444:function(T,r,n){"use strict";r.__esModule=!0,r.AugmentMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=r.AugmentMenu=function(){function k(g,i){return(0,e.createComponentVNode)(2,o.Window,{width:700,height:660,theme:"malfunction",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,y,{context:i})})})})}return k}(),y=function(g){var i=g.context,c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.usable_swarms,s=l.ability_tabs,d=l.known_abilities,C=(0,a.useLocalState)(i,"selectedTab",s[0]),h=C[0],v=C[1],p=(0,a.useLocalState)(i,"searchText",""),N=p[0],V=p[1],S=function(){var E=s.find(function(D){return D.category_name===h.category_name});if(!E)return[];var P=Math.min(E.category_stage,4);return E.abilities.filter(function(D){return D.stage<=P&&(!N||D.name.toLowerCase().includes(N.toLowerCase()))}).sort(function(D,M){return["intruder","destroyer"].includes(h.category_name.toLowerCase())?D.stage-M.stage:0})},I=S(),L=s.find(function(x){return x.category_name===h.category_name}),w=["intruder","destroyer"].includes(h.category_name.toLowerCase()),A=function(E){var P=d.find(function(R){return R.ability_path===E.ability_path}),D=P?P.cost:E.cost,M=P&&P.current_level>0?P.current_level+" / "+P.max_level:"0 / "+E.max_level;return(0,e.createComponentVNode)(2,t.Stack.Item,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{height:"20px",width:"35px",mb:1,textAlign:"center",content:D,disabled:D>u||P&&P.current_level===P.max_level,tooltip:"Purchase this ability?",onClick:function(){function R(){m("purchase",{ability_path:E.ability_path}),v(h)}return R}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:E.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:E.desc||"Description not available"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level: ",(0,e.createVNode)(1,"span",null,M,0,{style:{color:"green"}}),w&&E.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),E.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},E.name)};return(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,style:{marginRight:"10px"},children:[(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Swarms: "),(0,e.createVNode)(1,"span",null,u,0,{style:{color:"green"}})],4),w&&L&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)("Category Stage: "),(0,e.createVNode)(1,"span",null,Math.min(L.category_stage,4),0,{style:{color:"green"}})],4)]}),(0,e.createVNode)(1,"div","Section__buttons",(0,e.createComponentVNode)(2,t.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function x(E,P){return V(P)}return x}(),value:N}),2)],4,{style:{display:"flex",alignItems:"center"}}),children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[s.map(function(x){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h.category_name===x.category_name,onClick:function(){function E(){v(x),V("")}return E}(),children:(0,f.capitalize)(x.category_name)},x.category_name)}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:h.category_name==="upgrades",onClick:function(){function x(){return v({category_name:"upgrades"})}return x}(),children:"Upgrades"},"upgrades")]}),h.category_name==="upgrades"?(0,e.createComponentVNode)(2,B,{act:m,abilityTabs:s,knownAbilities:d,usableSwarms:u}):(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:I.map(A)})]})},B=function(g){var i=g.act,c=g.abilityTabs,m=g.knownAbilities,l=g.usableSwarms,u=m.filter(function(d){return d.current_levell,tooltip:"Upgrade this ability?",onClick:function(){function v(){return i("purchase",{ability_path:C.ability_path})}return v}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",children:C.name})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"13px",children:C.upgrade_text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Level:"," ",(0,e.createVNode)(1,"span",null,C.current_level+" / "+C.max_level,0,{style:{color:"green"}}),h&&h.stage>0&&(0,e.createVNode)(1,"span",null,[(0,e.createTextVNode)(" (Stage: "),h.stage,(0,e.createTextVNode)(")")],0)]}),(0,e.createComponentVNode)(2,t.Stack.Divider)]})})]},C.name)};return(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:u.map(s)})}},59179:function(T,r,n){"use strict";r.__esModule=!0,r.Autolathe=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),f=n(36036),b=n(98595),y=n(25328),B=function(i,c,m,l){return i.requirements===null?!0:!(i.requirements.metal*l>c||i.requirements.glass*l>m)},k=r.Autolathe=function(){function g(i,c){var m=(0,o.useBackend)(c),l=m.act,u=m.data,s=u.total_amount,d=u.max_amount,C=u.metal_amount,h=u.glass_amount,v=u.busyname,p=u.busyamt,N=u.showhacked,V=u.buildQueue,S=u.buildQueueLen,I=u.recipes,L=u.categories,w=(0,o.useSharedState)(c,"category",0),A=w[0],x=w[1];A===0&&(A="Tools");var E=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),P=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),D=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),M=(0,o.useSharedState)(c,"search_text",""),R=M[0],O=M[1],F=(0,y.createSearch)(R,function($){return $.name}),_="";S>0&&(_=V.map(function($,G){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"times",color:"transparent",content:V[G][0],onClick:function(){function X(){return l("remove_from_queue",{remove_from_queue:V.indexOf($)+1})}return X}()},$)},G)}));var U=(0,a.flow)([(0,t.filter)(function($){return($.category.indexOf(A)>-1||R)&&(u.showhacked||!$.hacked)}),R&&(0,t.filter)(F),(0,t.sortBy)(function($){return $.name.toLowerCase()})])(I),z="Build";return R?z="Results for: '"+R+"':":A&&(z="Build ("+A+")"),(0,e.createComponentVNode)(2,b.Window,{width:750,height:525,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"70%",children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:z,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"150px",options:L,selected:A,onSelected:function(){function $(G){return x(G)}return $}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function $(G,X){return O(X)}return $}(),mb:1}),U.map(function($){return(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+$.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===1,disabled:!B($,u.metal_amount,u.glass_amount,1),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:1})}return G}(),children:(0,y.toTitleCase)($.name)}),$.max_multiplier>=10&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===10,disabled:!B($,u.metal_amount,u.glass_amount,10),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:10})}return G}(),children:"10x"}),$.max_multiplier>=25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===25,disabled:!B($,u.metal_amount,u.glass_amount,25),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:25})}return G}(),children:"25x"}),$.max_multiplier>25&&(0,e.createComponentVNode)(2,f.Button,{mr:1,icon:"hammer",selected:u.busyname===$.name&&u.busyamt===$.max_multiplier,disabled:!B($,u.metal_amount,u.glass_amount,$.max_multiplier),onClick:function(){function G(){return l("make",{make:$.uid,multiplier:$.max_multiplier})}return G}(),children:[$.max_multiplier,"x"]}),$.requirements&&Object.keys($.requirements).map(function(G){return(0,y.toTitleCase)(G)+": "+$.requirements[G]}).join(", ")||(0,e.createComponentVNode)(2,f.Box,{children:"No resources required."})]},$.ref)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:[(0,e.createComponentVNode)(2,f.Section,{title:"Materials",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Metal",children:E}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Glass",children:P}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Total",children:D}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Storage",children:[u.fill_percent,"% Full"]})]})}),(0,e.createComponentVNode)(2,f.Section,{title:"Building",children:(0,e.createComponentVNode)(2,f.Box,{color:v?"green":"",children:v||"Nothing"})}),(0,e.createComponentVNode)(2,f.Section,{title:"Build Queue",height:23.7,children:[_,(0,e.createComponentVNode)(2,f.Button,{mt:.5,fluid:!0,icon:"times",content:"Clear All",color:"red",disabled:!u.buildQueueLen,onClick:function(){function $(){return l("clear_queue")}return $}()})]})]})]})})})}return g}()},5147:function(T,r,n){"use strict";r.__esModule=!0,r.BioChipPad=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.BioChipPad=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.implant,m=i.contains_case,l=i.gps,u=i.tag,s=(0,a.useLocalState)(B,"newTag",u),d=s[0],C=s[1];return(0,e.createComponentVNode)(2,o.Window,{width:410,height:325,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Bio-chip Mini-Computer",buttons:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject Case",icon:"eject",disabled:!m,onClick:function(){function h(){return g("eject_case")}return h}()})}),children:c&&m?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{bold:!0,mb:2,children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+c.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),c.name]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Life",children:c.life}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Notes",children:c.notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Function",children:c.function}),!!l&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,t.Input,{width:"5.5rem",value:u,onEnter:function(){function h(){return g("tag",{newtag:d})}return h}(),onInput:function(){function h(v,p){return C(p)}return h}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:u===d,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function h(){return g("tag",{newtag:d})}return h}(),children:(0,e.createComponentVNode)(2,t.Icon,{name:"pen"})})]})]})],4):m?(0,e.createComponentVNode)(2,t.Box,{children:"This bio-chip case has no implant!"}):(0,e.createComponentVNode)(2,t.Box,{children:"Please insert a bio-chip casing!"})})})})}return b}()},64273:function(T,r,n){"use strict";r.__esModule=!0,r.Biogenerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(62411),b=r.Biogenerator=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.config,d=u.container,C=u.processing,h=s.title;return(0,e.createComponentVNode)(2,o.Window,{width:390,height:595,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:C,name:h}),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),d?(0,e.createComponentVNode)(2,g):(0,e.createComponentVNode)(2,y)]})})})}return i}(),y=function(c,m){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The biogenerator is missing a container."]})})})},B=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.biomass,C=s.container,h=s.container_curr_reagents,v=s.container_max_reagents;return(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"5px",children:d}),(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"21px",mt:"8px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:"10px",color:"silver",children:"Container:"}),C?(0,e.createComponentVNode)(2,t.ProgressBar,{value:h,maxValue:v,children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:h+" / "+v+" units"})}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"None"})]})]})},k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.has_plants,C=s.container;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!d,tooltip:d?"":"There are no plants in the biogenerator.",tooltipPosition:"top-start",content:"Activate",onClick:function(){function h(){return u("activate")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!C,tooltip:C?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){function h(){return u("detach_container")}return h}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!d,tooltip:d?"":"There are no stored plants to eject.",tooltipPosition:"top-end",content:"Eject Plants",onClick:function(){function h(){return u("eject_plants")}return h}()})})]})})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.biomass,C=s.product_list,h=(0,a.useSharedState)(m,"vendAmount",1),v=h[0],p=h[1],N=Object.entries(C).map(function(V,S){var I=Object.entries(V[1]).map(function(L){return L[1]});return(0,e.createComponentVNode)(2,t.Collapsible,{title:V[0],open:!0,children:I.map(function(L){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",ml:"2px",children:L.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"20%",children:[L.cost*v,(0,e.createComponentVNode)(2,t.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"right",width:"40%",children:(0,e.createComponentVNode)(2,t.Button,{content:"Vend",disabled:d.25?750+400*Math.random():290+150*Math.random(),time:60+150*Math.random(),children:(0,e.createComponentVNode)(2,t.Stack,{mb:"30px",fontsize:"256px",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,color:"red",fontsize:"256px",textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"skull",size:14,mb:"64px"}),(0,e.createVNode)(1,"br"),"E$#OR:& U#KN!WN IN%ERF#R_NCE"]})})})})}return k}(),y=r.BluespaceTap=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.product||[],s=l.desiredMiningPower,d=l.miningPower,C=l.points,h=l.totalPoints,v=l.powerUse,p=l.availablePower,N=l.emagged,V=l.autoShutown,S=l.stabilizers,I=l.stabilizerPower,L=l.stabilizerPriority,w=s>d&&"bad"||"good";return(0,e.createComponentVNode)(2,o.Window,{width:650,height:450,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Input Management",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Input",children:[(0,e.createComponentVNode)(2,t.Button,{icon:V&&!N?"toggle-on":"toggle-off",content:"Auto shutdown",color:V&&!N?"green":"red",disabled:!!N,tooltip:"Turn auto shutdown on or off",tooltipPosition:"top",onClick:function(){function A(){return m("auto_shutdown")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:S&&!N?"toggle-on":"toggle-off",content:"Stabilizers",color:S&&!N?"green":"red",disabled:!!N,tooltip:"Turn stabilizers on or off",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizers")}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:L&&!N?"toggle-on":"toggle-off",content:"Stabilizer priority",color:L&&!N?"green":"red",disabled:!!N,tooltip:"On: Mining power will not exceed what can be stabilized",tooltipPosition:"top",onClick:function(){function A(){return m("stabilizer_priority")}return A}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Desired Mining Power",children:(0,f.formatPower)(s)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{labelStyle:{"vertical-align":"top"},label:"Set Desired Mining Power",children:(0,e.createComponentVNode)(2,t.Stack,{width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"step-backward",disabled:s===0||N,tooltip:"Set to 0",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:0})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",tooltip:"Decrease by 10 MW",tooltipPosition:"bottom",disabled:s===0||N,onClick:function(){function A(){return m("set",{set_power:s-1e7})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:s===0||N,tooltip:"Decrease by 1 MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s-1e6})}return A}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mx:1,children:(0,e.createComponentVNode)(2,t.NumberInput,{disabled:N,minvalue:0,value:s,maxvalue:1/0,step:1,onChange:function(){function A(x,E){return m("set",{set_power:E})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:N,tooltip:"Increase by one MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e6})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:N,tooltip:"Increase by 10MW",tooltipPosition:"bottom",onClick:function(){function A(){return m("set",{set_power:s+1e7})}return A}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Power Use",children:(0,f.formatPower)(v)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mining Power Use",children:(0,f.formatPower)(d)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stabilizer Power Use",children:(0,f.formatPower)(I)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Surplus Power",children:(0,f.formatPower)(p)})]})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available Points",children:C}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{align:"end",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.name,children:(0,e.createComponentVNode)(2,t.Button,{disabled:A.price>=C,onClick:function(){function x(){return m("vend",{target:A.key})}return x}(),content:A.price})},A.key)})})})})]})})]})})})}return k}(),B=r.Alerts=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.product||[],s=l.miningPower,d=l.stabilizerPower,C=l.emagged,h=l.safeLevels,v=l.autoShutown,p=l.stabilizers,N=l.overhead;return(0,e.createFragment)([!v&&!C&&(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Auto shutdown disabled"}),C?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"All safeties disabled"}):s<=15e6?"":p?s>d+15e6?(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers overwhelmed, Instability likely"}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"High Power, engaging stabilizers"}):(0,e.createComponentVNode)(2,t.NoticeBox,{danger:1,children:"Stabilizers disabled, Instability likely"})],0)}return k}()},33758:function(T,r,n){"use strict";r.__esModule=!0,r.BodyScanner=void 0;var e=n(89005),a=n(44879),t=n(25328),o=n(72253),f=n(36036),b=n(98595),y=[["good","Alive"],["average","Critical"],["bad","DEAD"]],B=[["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],k=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radiation","radLoss"],["Brute","bruteLoss"],["Cellular","cloneLoss"],["Burn","fireLoss"],["Inebriation","drunkenness"]],g={average:[.25,.5],bad:[.5,1/0]},i=function(S,I){for(var L=[],w=0;w0?S.filter(function(I){return!!I}).reduce(function(I,L){return(0,e.createFragment)([I,(0,e.createComponentVNode)(2,f.Box,{children:L},L)],0)},null):null},m=function(S){if(S>100){if(S<300)return"mild infection";if(S<400)return"mild infection+";if(S<500)return"mild infection++";if(S<700)return"acute infection";if(S<800)return"acute infection+";if(S<900)return"acute infection++";if(S>=900)return"septic"}return""},l=r.BodyScanner=function(){function V(S,I){var L=(0,o.useBackend)(I),w=L.data,A=w.occupied,x=w.occupant,E=x===void 0?{}:x,P=A?(0,e.createComponentVNode)(2,u,{occupant:E}):(0,e.createComponentVNode)(2,N);return(0,e.createComponentVNode)(2,b.Window,{width:700,height:600,title:"Body Scanner",children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:P})})}return V}(),u=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,s,{occupant:I}),(0,e.createComponentVNode)(2,d,{occupant:I}),(0,e.createComponentVNode)(2,C,{occupant:I}),(0,e.createComponentVNode)(2,v,{organs:I.extOrgan}),(0,e.createComponentVNode)(2,p,{organs:I.intOrgan})]})},s=function(S,I){var L=(0,o.useBackend)(I),w=L.act,A=L.data,x=A.occupant;return(0,e.createComponentVNode)(2,f.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Button,{icon:"print",onClick:function(){function E(){return w("print_p")}return E}(),children:"Print Report"}),(0,e.createComponentVNode)(2,f.Button,{icon:"user-slash",onClick:function(){function E(){return w("ejectify")}return E}(),children:"Eject"})],4),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:y[x.stat][0],children:y[x.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempC)}),"\xB0C,\xA0",(0,e.createComponentVNode)(2,f.AnimatedNumber,{value:(0,a.round)(x.bodyTempF)}),"\xB0F"]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Implants",children:x.implant_len?(0,e.createComponentVNode)(2,f.Box,{children:x.implant.map(function(E){return E.name}).join(", ")}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"None"})})]})})},d=function(S){var I=S.occupant;return I.hasBorer||I.blind||I.colourblind||I.nearsighted||I.hasVirus?(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:B.map(function(L,w){if(I[L[0]])return(0,e.createComponentVNode)(2,f.Box,{color:L[1],bold:L[1]==="bad",children:L[2]},L[2])})}):(0,e.createComponentVNode)(2,f.Section,{title:"Abnormalities",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No abnormalities found."})})},C=function(S){var I=S.occupant;return(0,e.createComponentVNode)(2,f.Section,{title:"Damage",children:(0,e.createComponentVNode)(2,f.Table,{children:i(k,function(L,w,A){return(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Table.Row,{color:"label",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:[L[0],":"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:!!w&&w[0]+":"})]}),(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,h,{value:I[L[1]],marginBottom:A100)&&"average"||!!I.status.robotic&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{m:-.5,min:"0",max:I.maxHealth,mt:L>0&&"0.5rem",value:I.totalLoss/I.maxHealth,ranges:g,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Tooltip,{content:"Total damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"heartbeat",mr:.5}),(0,a.round)(I.totalLoss)]})}),!!I.bruteLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Brute damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,f.Icon,{name:"bone",mr:.5}),(0,a.round)(I.bruteLoss)]})}),!!I.fireLoss&&(0,e.createComponentVNode)(2,f.Tooltip,{content:"Burn damage",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"fire",mr:.5}),(0,a.round)(I.fireLoss)]})})]})})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.Box,{color:"average",inline:!0,children:c([!!I.internalBleeding&&"Internal bleeding",!!I.burnWound&&"Critical tissue burns",!!I.lungRuptured&&"Ruptured lung",!!I.status.broken&&I.status.broken,m(I.germ_level),!!I.open&&"Open incision"])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:[c([!!I.status.splinted&&(0,e.createComponentVNode)(2,f.Box,{color:"good",children:"Splinted"}),!!I.status.robotic&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),!!I.status.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})]),c(I.shrapnel.map(function(w){return w.known?w.name:"Unknown object"}))]})]})]},L)})]})})},p=function(S){return S.organs.length===0?(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"N/A"})}):(0,e.createComponentVNode)(2,f.Section,{title:"Internal Organs",children:(0,e.createComponentVNode)(2,f.Table,{children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:"Damage"}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",children:"Injuries"})]}),S.organs.map(function(I,L){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{color:!!I.dead&&"bad"||I.germ_level>100&&"average"||I.robotic>0&&"label",width:"33%",children:(0,t.capitalize)(I.name)}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:I.maxHealth,value:I.damage/I.maxHealth,mt:L>0&&"0.5rem",ranges:g,children:(0,a.round)(I.damage)})}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:L>0&&"calc(0.5rem + 2px)",children:[(0,e.createComponentVNode)(2,f.Box,{color:"average",inline:!0,children:c([m(I.germ_level)])}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,children:c([I.robotic===1&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Robotic"}),I.robotic===2&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"Assisted"}),!!I.dead&&(0,e.createComponentVNode)(2,f.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},L)})]})})},N=function(){return(0,e.createComponentVNode)(2,f.Section,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},67963:function(T,r,n){"use strict";r.__esModule=!0,r.BookBinder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=n(39473),y=r.BookBinder=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.selectedbook,u=m.book_categories,s=[];return u.map(function(d){return s[d.description]=d.category_id}),(0,e.createComponentVNode)(2,o.Window,{width:600,height:400,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Book Binder",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",width:"auto",content:"Print Book",onClick:function(){function d(){return c("print_book")}return d}()}),children:[(0,e.createComponentVNode)(2,t.Box,{ml:10,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:"1rem"}),"Book Binder"]}),(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:l.title,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_title")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:"auto",content:l.author,onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_author")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"190px",options:u.map(function(d){return d.description}),onSelected:function(){function d(C){return c("toggle_binder_category",{category_id:s[C]})}return d}()})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",content:"Edit Summary",onClick:function(){function d(){return(0,f.modalOpen)(g,"edit_selected_summary")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:l.summary})]}),(0,e.createVNode)(1,"br"),u.filter(function(d){return l.categories.includes(d.category_id)}).map(function(d){return(0,e.createComponentVNode)(2,t.Button,{content:d.description,selected:!0,icon:"unlink",onClick:function(){function C(){return c("toggle_binder_category",{category_id:d.category_id})}return C}()},d.category_id)})]})})]})})})]})}return B}()},61925:function(T,r,n){"use strict";r.__esModule=!0,r.BotCall=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(i){var c=[{modes:[0],label:"Idle",color:"green"},{modes:[1,2,3],label:"Arresting",color:"yellow"},{modes:[4,5],label:"Patrolling",color:"average"},{modes:[9],label:"Moving",color:"average"},{modes:[6,11],label:"Responding",color:"green"},{modes:[12],label:"Delivering Cargo",color:"blue"},{modes:[13],label:"Returning Home",color:"blue"},{modes:[7,8,10,14,15,16,17,18,19],label:"Working",color:"blue"}],m=c.find(function(l){return l.modes.includes(i)});return(0,e.createComponentVNode)(2,t.Box,{color:m.color,children:[" ",m.label," "]})},b=r.BotCall=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=(0,a.useLocalState)(c,"tabIndex",0),d=s[0],C=s[1],h={0:"Security",1:"Medibot",2:"Cleanbot",3:"Floorbot",4:"Mule",5:"Honkbot"},v=function(){function p(N){return h[N]?(0,e.createComponentVNode)(2,y,{model:h[N]}):"This should not happen. Report on Paradise Github"}return p}();return(0,e.createComponentVNode)(2,o.Window,{width:700,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:d===0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:Array.from({length:6}).map(function(p,N){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:d===N,onClick:function(){function V(){return C(N)}return V}(),children:h[N]},N)})})}),v(d)]})})})}return g}(),y=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.bots;return s[i.model]!==void 0?(0,e.createComponentVNode)(2,k,{model:[i.model]}):(0,e.createComponentVNode)(2,B,{model:[i.model]})},B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data;return(0,e.createComponentVNode)(2,t.Stack,{justify:"center",align:"center",fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Box,{bold:1,color:"bad",children:["No ",[i.model]," detected"]})})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.bots;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Model"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Location"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Interface"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Call"})]}),s[i.model].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.model}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.on?f(d.status):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Off"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.location}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Interface",onClick:function(){function C(){return l("interface",{botref:d.UID})}return C}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Call",onClick:function(){function C(){return l("call",{botref:d.UID})}return C}()})})]},d.UID)})]})})})}},20464:function(T,r,n){"use strict";r.__esModule=!0,r.BotClean=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotClean=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.locked,l=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,C=c.canhack,h=c.emagged,v=c.remote_disabled,p=c.painame,N=c.cleanblood,V=c.area;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Cleaning Settings",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:l,onClick:function(){function S(){return i("blood")}return S}()})}),(0,e.createComponentVNode)(2,t.Section,{title:"Misc Settings",children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:V?"Reset Area Selection":"Restrict to Current Area",onClick:function(){function S(){return i("area")}return S}()}),V!==null&&(0,e.createComponentVNode)(2,t.LabeledList,{mb:1,children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Locked Area",children:V})})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:l,onClick:function(){function S(){return i("ejectpai")}return S}()})})]})})}return y}()},69479:function(T,r,n){"use strict";r.__esModule=!0,r.BotFloor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotFloor=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.noaccess,l=c.painame,u=c.hullplating,s=c.replace,d=c.eat,C=c.make,h=c.fixfloor,v=c.nag_empty,p=c.magnet,N=c.tiles_amount;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Floor Settings",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"5px",children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tiles Left",children:N})}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Add tiles to new hull plating",tooltip:"Fixing a plating requires the removal of floor tile. This will place it back after repairing. Same goes for hull breaches",disabled:m,onClick:function(){function V(){return i("autotile")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Add floor tiles on exposed hull plating",tooltip:"Example: It will add tiles to maintenance",disabled:m,onClick:function(){function V(){return i("replacetiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Repair damaged tiles and platings",disabled:m,onClick:function(){function V(){return i("fixfloors")}return V}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Miscellaneous",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Finds tiles",disabled:m,onClick:function(){function V(){return i("eattiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Make pieces of metal into tiles when empty",disabled:m,onClick:function(){function V(){return i("maketiles")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:v,content:"Transmit notice when empty",disabled:m,onClick:function(){function V(){return i("nagonempty")}return V}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:p,content:"Traction Magnets",disabled:m,onClick:function(){function V(){return i("anchored")}return V}()})]}),l&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,icon:"eject",content:l,disabled:m,onClick:function(){function V(){return i("ejectpai")}return V}()})})]})})}return y}()},59887:function(T,r,n){"use strict";r.__esModule=!0,r.BotHonk=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotHonk=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:220,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.BotStatus)})})}return y}()},80063:function(T,r,n){"use strict";r.__esModule=!0,r.BotMed=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotMed=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.locked,l=c.noaccess,u=c.maintpanel,s=c.on,d=c.autopatrol,C=c.canhack,h=c.emagged,v=c.remote_disabled,p=c.painame,N=c.shut_up,V=c.declare_crit,S=c.stationary_mode,I=c.heal_threshold,L=c.injection_amount,w=c.use_beaker,A=c.treat_virus,x=c.reagent_glass;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Communication Settings",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Speaker",checked:!N,disabled:l,onClick:function(){function E(){return i("toggle_speaker")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Critical Patient Alerts",checked:V,disabled:l,onClick:function(){function E(){return i("toggle_critical_alerts")}return E}()})]}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Treatment Settings",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Healing Threshold",children:(0,e.createComponentVNode)(2,t.Slider,{value:I.value,minValue:I.min,maxValue:I.max,step:5,disabled:l,onChange:function(){function E(P,D){return i("set_heal_threshold",{target:D})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Injection Level",children:(0,e.createComponentVNode)(2,t.Slider,{value:L.value,minValue:L.min,maxValue:L.max,step:5,format:function(){function E(P){return P+"u"}return E}(),disabled:l,onChange:function(){function E(P,D){return i("set_injection_amount",{target:D})}return E}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reagent Source",children:(0,e.createComponentVNode)(2,t.Button,{content:w?"Beaker":"Internal Synthesizer",icon:w?"flask":"cogs",disabled:l,onClick:function(){function E(){return i("toggle_use_beaker")}return E}()})}),x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x.amount,minValue:0,maxValue:x.max_amount,children:[x.amount," / ",x.max_amount]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{ml:1,children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",disabled:l,onClick:function(){function E(){return i("eject_reagent_glass")}return E}()})})]})})]}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{mt:1,fluid:!0,content:"Treat Viral Infections",checked:A,disabled:l,onClick:function(){function E(){return i("toggle_treat_viral")}return E}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,content:"Stationary Mode",checked:S,disabled:l,onClick:function(){function E(){return i("toggle_stationary_mode")}return E}()})]}),p&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:p,disabled:l,onClick:function(){function E(){return i("ejectpai")}return E}()})})]})})})}return y}()},74439:function(T,r,n){"use strict";r.__esModule=!0,r.BotSecurity=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(92963),b=r.BotSecurity=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.noaccess,l=c.painame,u=c.check_id,s=c.check_weapons,d=c.check_warrant,C=c.arrest_mode,h=c.arrest_declare;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:445,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,f.BotStatus),(0,e.createComponentVNode)(2,t.Section,{title:"Who To Arrest",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Unidentifiable Persons",disabled:m,onClick:function(){function v(){return i("authid")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:s,content:"Unauthorized Weapons",disabled:m,onClick:function(){function v(){return i("authweapon")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:d,content:"Wanted Criminals",disabled:m,onClick:function(){function v(){return i("authwarrant")}return v}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Arrest Procedure",children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:C,content:"Detain Targets Indefinitely",disabled:m,onClick:function(){function v(){return i("arrtype")}return v}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:h,content:"Announce Arrests On Radio",disabled:m,onClick:function(){function v(){return i("arrdeclare")}return v}()})]}),l&&(0,e.createComponentVNode)(2,t.Section,{title:"pAI",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:l,disabled:m,onClick:function(){function v(){return i("ejectpai")}return v}()})})]})})}return y}()},10833:function(T,r,n){"use strict";r.__esModule=!0,r.BrigCells=void 0;var e=n(89005),a=n(98595),t=n(36036),o=n(72253),f=function(k,g){var i=k.cell,c=(0,o.useBackend)(g),m=c.act,l=i.cell_id,u=i.occupant,s=i.crimes,d=i.brigged_by,C=i.time_left_seconds,h=i.time_set_seconds,v=i.ref,p="";C>0&&(p+=" BrigCells__listRow--active");var N=function(){m("release",{ref:v})};return(0,e.createComponentVNode)(2,t.Table.Row,{className:p,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:h})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.TimeDisplay,{totalSeconds:C})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{type:"button",onClick:N,children:"Release"})})]})},b=function(k){var g=k.cells;return(0,e.createComponentVNode)(2,t.Table,{className:"BrigCells__list",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Cell"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Occupant"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Crimes"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Brigged By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{header:!0,children:"Release"})]}),g.map(function(i){return(0,e.createComponentVNode)(2,f,{cell:i},i.ref)})]})},y=r.BrigCells=function(){function B(k,g){var i=(0,o.useBackend)(g),c=i.act,m=i.data,l=m.cells;return(0,e.createComponentVNode)(2,a.Window,{theme:"security",width:800,height:400,children:(0,e.createComponentVNode)(2,a.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b,{cells:l})})})})})}return B}()},45761:function(T,r,n){"use strict";r.__esModule=!0,r.BrigTimer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.BrigTimer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;i.nameText=i.occupant,i.timing&&(i.prisoner_hasrec?i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:i.occupant}):i.nameText=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:i.occupant}));var c="pencil-alt";i.prisoner_name&&(i.prisoner_hasrec||(c="exclamation-triangle"));var m=[],l=0;for(l=0;lm?this.substring(0,m)+"...":this};var k=function(l,u){var s,d;if(!u)return[];var C=l.findIndex(function(h){return h.name===u.name});return[(s=l[C-1])==null?void 0:s.name,(d=l[C+1])==null?void 0:d.name]},g=function(l,u){u===void 0&&(u="");var s=(0,f.createSearch)(u,function(d){return d.name});return(0,t.flow)([(0,a.filter)(function(d){return d==null?void 0:d.name}),u&&(0,a.filter)(s),(0,a.sortBy)(function(d){return d.name})])(l)},i=r.CameraConsole=function(){function m(l,u){var s=(0,b.useBackend)(u),d=s.act,C=s.data,h=s.config,v=C.mapRef,p=C.activeCamera,N=g(C.cameras),V=k(N,p),S=V[0],I=V[1];return(0,e.createComponentVNode)(2,B.Window,{width:870,height:708,children:[(0,e.createVNode)(1,"div","CameraConsole__left",(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,c)})}),2),(0,e.createVNode)(1,"div","CameraConsole__right",[(0,e.createVNode)(1,"div","CameraConsole__toolbar",[(0,e.createVNode)(1,"b",null,"Camera: ",16),p&&p.name||"\u2014"],0),(0,e.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-left",disabled:!S,onClick:function(){function L(){return d("switch_camera",{name:S})}return L}()}),(0,e.createComponentVNode)(2,y.Button,{icon:"chevron-right",disabled:!I,onClick:function(){function L(){return d("switch_camera",{name:I})}return L}()})],4),(0,e.createComponentVNode)(2,y.ByondUi,{className:"CameraConsole__map",params:{id:v,type:"map"}})],4)]})}return m}(),c=r.CameraConsoleContent=function(){function m(l,u){var s=(0,b.useBackend)(u),d=s.act,C=s.data,h=(0,b.useLocalState)(u,"searchText",""),v=h[0],p=h[1],N=C.activeCamera,V=g(C.cameras,v);return(0,e.createComponentVNode)(2,y.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.Stack.Item,{children:(0,e.createComponentVNode)(2,y.Input,{fluid:!0,placeholder:"Search for a camera",onInput:function(){function S(I,L){return p(L)}return S}()})}),(0,e.createComponentVNode)(2,y.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,children:V.map(function(S){return(0,e.createVNode)(1,"div",(0,o.classes)(["Button","Button--fluid","Button--color--transparent",N&&S.name===N.name&&"Button--selected"]),S.name.trimLongStr(23),0,{title:S.name,onClick:function(){function I(){return d("switch_camera",{name:S.name})}return I}()},S.name)})})})]})}return m}()},52927:function(T,r,n){"use strict";r.__esModule=!0,r.Canister=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(49968),b=n(98595),y=r.Canister=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.act,m=i.data,l=m.portConnected,u=m.tankPressure,s=m.releasePressure,d=m.defaultReleasePressure,C=m.minReleasePressure,h=m.maxReleasePressure,v=m.valveOpen,p=m.name,N=m.canLabel,V=m.colorContainer,S=m.color_index,I=m.hasHoldingTank,L=m.holdingTank,w="";S.prim&&(w=V.prim.options[S.prim].name);var A="";S.sec&&(A=V.sec.options[S.sec].name);var x="";S.ter&&(x=V.ter.options[S.ter].name);var E="";S.quart&&(E=V.quart.options[S.quart].name);var P=[],D=[],M=[],R=[],O=0;for(O=0;Op.current_positions&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:p.total_positions-p.current_positions})||(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"0"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"-",disabled:d.cooldown_time||!p.can_close,onClick:function(){function N(){return s("make_job_unavailable",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{content:"+",disabled:d.cooldown_time||!p.can_open,onClick:function(){function N(){return s("make_job_available",{job:p.title})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:d.target_dept&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:d.priority_jobs.indexOf(p.title)>-1?"Yes":""})||(0,e.createComponentVNode)(2,t.Button,{content:p.is_priority?"Yes":"No",selected:p.is_priority,disabled:d.cooldown_time||!p.can_prioritize,onClick:function(){function N(){return s("prioritize_job",{job:p.title})}return N}()})})]},p.title)})]})})]}):v=(0,e.createComponentVNode)(2,B);break;case 2:!d.authenticated||!d.scan_name?v=(0,e.createComponentVNode)(2,B):d.modify_name?v=(0,e.createComponentVNode)(2,f.AccessList,{accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(){function p(N){return s("set",{access:N})}return p}(),grantAll:function(){function p(){return s("grant_all")}return p}(),denyAll:function(){function p(){return s("clear_all")}return p}(),grantDep:function(){function p(N){return s("grant_region",{region:N})}return p}(),denyDep:function(){function p(N){return s("deny_region",{region:N})}return p}()}):v=(0,e.createComponentVNode)(2,k);break;case 3:d.authenticated?d.records.length?v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Records",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Delete All Records",disabled:!d.authenticated||d.records.length===0||d.target_dept,onClick:function(){function p(){return s("wipe_all_logs")}return p}()}),children:[(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Crewman"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Old Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"New Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Authorized By"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Reason"}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Deleted By"})]}),d.records.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.transferee}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.oldvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.newvalue}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.whodidit}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.timestamp}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.reason}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.deletedby})]},p.timestamp)})]}),!!d.iscentcom&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!d.authenticated||d.records.length===0,onClick:function(){function p(){return s("wipe_my_logs")}return p}()})})]}):v=(0,e.createComponentVNode)(2,g):v=(0,e.createComponentVNode)(2,B);break;case 4:!d.authenticated||!d.scan_name?v=(0,e.createComponentVNode)(2,B):v=(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Your Team",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Sec Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Actions"})]}),d.people_dept.map(function(p){return(0,e.createComponentVNode)(2,t.Table.Row,{height:2,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.crimstat}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:p.buttontext,disabled:!p.demotable,onClick:function(){function N(){return s("remote_demote",{remote_demote:p.name})}return N}()})})]},p.title)})]})});break;default:v=(0,e.createComponentVNode)(2,t.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,e.createComponentVNode)(2,o.Window,{width:800,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:h}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:C}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v})]})})})}return c}()},64083:function(T,r,n){"use strict";r.__esModule=!0,r.CargoConsole=void 0;var e=n(89005),a=n(64795),t=n(88510),o=n(72253),f=n(36036),b=n(98595),y=n(25328),B=r.CargoConsole=function(){function u(s,d){return(0,e.createComponentVNode)(2,b.Window,{width:900,height:800,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,l)]})})})}return u}(),k=function(s,d){var C=(0,o.useLocalState)(d,"contentsModal",null),h=C[0],v=C[1],p=(0,o.useLocalState)(d,"contentsModalTitle",null),N=p[0],V=p[1];if(h!==null&&N!==null)return(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:[(0,e.createComponentVNode)(2,f.Box,{width:"100%",bold:!0,children:(0,e.createVNode)(1,"h1",null,[N,(0,e.createTextVNode)(" contents:")],0)}),(0,e.createComponentVNode)(2,f.Box,{children:h.map(function(S){return(0,e.createComponentVNode)(2,f.Box,{children:["- ",S]},S)})}),(0,e.createComponentVNode)(2,f.Box,{m:2,children:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function S(){v(null),V(null)}return S}()})})]})},g=function(s,d){var C=(0,o.useBackend)(d),h=C.act,v=C.data,p=v.is_public,N=v.timeleft,V=v.moving,S=v.at_station,I,L;return!V&&!S?(I="Docked off-station",L="Call Shuttle"):!V&&S?(I="Docked at the station",L="Return Shuttle"):V&&(L="In Transit...",N!==1?I="Shuttle is en route (ETA: "+N+" minutes)":I="Shuttle is en route (ETA: "+N+" minute)"),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Status",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Shuttle Status",children:I}),p===0&&(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Controls",children:[(0,e.createComponentVNode)(2,f.Button,{content:L,disabled:V,onClick:function(){function w(){return h("moveShuttle")}return w}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Central Command Messages",onClick:function(){function w(){return h("showMessages")}return w}()})]})]})})})},i=function(s,d){var C,h=(0,o.useBackend)(d),v=h.act,p=h.data,N=p.accounts,V=(0,o.useLocalState)(d,"selectedAccount"),S=V[0],I=V[1],L=[];return N.map(function(w){return L[w.name]=w.account_UID}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Payment",children:[(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(w){return w.name}),selected:(C=N.filter(function(w){return w.account_UID===S})[0])==null?void 0:C.name,onSelected:function(){function w(A){return I(L[A])}return w}()}),N.filter(function(w){return w.account_UID===S}).map(function(w){return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Account Name",children:(0,e.createComponentVNode)(2,f.Stack.Item,{mt:1,children:w.name})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Balance",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:w.balance})})]},w.account_UID)})]})})},c=function(s,d){var C=(0,o.useBackend)(d),h=C.act,v=C.data,p=v.requests,N=v.categories,V=v.supply_packs,S=(0,o.useSharedState)(d,"category","Emergency"),I=S[0],L=S[1],w=(0,o.useSharedState)(d,"search_text",""),A=w[0],x=w[1],E=(0,o.useLocalState)(d,"contentsModal",null),P=E[0],D=E[1],M=(0,o.useLocalState)(d,"contentsModalTitle",null),R=M[0],O=M[1],F=(0,y.createSearch)(A,function(X){return X.name}),_=(0,o.useLocalState)(d,"selectedAccount"),U=_[0],z=_[1],$=(0,a.flow)([(0,t.filter)(function(X){return X.cat===N.filter(function(J){return J.name===I})[0].category||A}),A&&(0,t.filter)(F),(0,t.sortBy)(function(X){return X.name.toLowerCase()})])(V),G="Crate Catalogue";return A?G="Results for '"+A+"':":I&&(G="Browsing "+I),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:G,buttons:(0,e.createComponentVNode)(2,f.Dropdown,{width:"190px",options:N.map(function(X){return X.name}),selected:I,onSelected:function(){function X(J){return L(J)}return X}()}),children:[(0,e.createComponentVNode)(2,f.Input,{fluid:!0,placeholder:"Search for...",onInput:function(){function X(J,se){return x(se)}return X}(),mb:1}),(0,e.createComponentVNode)(2,f.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:$.map(function(X){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{bold:!0,children:[X.name," (",X.cost," Credits)"]}),(0,e.createComponentVNode)(2,f.Table.Cell,{textAlign:"right",pr:1,children:[(0,e.createComponentVNode)(2,f.Button,{content:"Order 1",icon:"shopping-cart",disabled:!U,onClick:function(){function J(){return h("order",{crate:X.ref,multiple:!1,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Order Multiple",icon:"cart-plus",disabled:!U||X.singleton,onClick:function(){function J(){return h("order",{crate:X.ref,multiple:!0,account:U})}return J}()}),(0,e.createComponentVNode)(2,f.Button,{content:"View Contents",icon:"search",onClick:function(){function J(){D(X.contents),O(X.name)}return J}()})]})]},X.name)})})})]})})},m=function(s,d){var C=s.request,h,v;switch(C.department){case"Engineering":v="CE",h="orange";break;case"Medical":v="CMO",h="teal";break;case"Science":v="RD",h="purple";break;case"Supply":v="CT",h="brown";break;case"Service":v="HOP",h="olive";break;case"Security":v="HOS",h="red";break;case"Command":v="CAP",h="blue";break;case"Assistant":v="Any Head",h="grey";break}return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{mt:.5,children:"Approval Required:"}),!!C.req_cargo_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"brown",content:"QM",icon:"user-tie",tooltip:"This Order requires approval from the QM still"})}),!!C.req_head_approval&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:h,content:v,disabled:C.req_cargo_approval,icon:"user-tie",tooltip:C.req_cargo_approval?"This Order first requires approval from the QM before the "+v+" can approve it":"This Order requires approval from the "+v+" still"})})]})},l=function(s,d){var C=(0,o.useBackend)(d),h=C.act,v=C.data,p=v.requests,N=v.orders,V=v.shipments;return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Orders",children:[(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Requests"}),(0,e.createComponentVNode)(2,f.Table,{children:p.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{className:"Cargo_RequestList",children:[(0,e.createComponentVNode)(2,f.Table.Cell,{mb:1,children:[(0,e.createComponentVNode)(2,f.Box,{children:["Order #",S.ordernum,": ",S.supply_type," (",S.cost," credits) for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)," with"," ",S.department?"The "+S.department+" Department":"Their Personal"," Account"]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]}),(0,e.createComponentVNode)(2,m,{request:S})]}),(0,e.createComponentVNode)(2,f.Stack.Item,{textAlign:"right",children:[(0,e.createComponentVNode)(2,f.Button,{content:"Approve",color:"green",disabled:!S.can_approve,onClick:function(){function I(){return h("approve",{ordernum:S.ordernum})}return I}()}),(0,e.createComponentVNode)(2,f.Button,{content:"Deny",color:"red",disabled:!S.can_deny,onClick:function(){function I(){return h("deny",{ordernum:S.ordernum})}return I}()})]})]},S.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Orders Awaiting Delivery"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:N.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})}),(0,e.createComponentVNode)(2,f.Box,{bold:!0,children:"Order in Transit"}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:V.map(function(S){return(0,e.createComponentVNode)(2,f.Table.Row,{children:(0,e.createComponentVNode)(2,f.Table.Cell,{children:[(0,e.createComponentVNode)(2,f.Box,{children:["- #",S.ordernum,": ",S.supply_type," for ",(0,e.createVNode)(1,"b",null,S.orderedby,0)]}),(0,e.createComponentVNode)(2,f.Box,{italic:!0,children:["Reason: ",S.comment]})]})},S.ordernum)})})]})}},36232:function(T,r,n){"use strict";r.__esModule=!0,r.ChameleonAppearances=r.Chameleon=void 0;var e=n(89005),a=n(25328),t=n(64795),o=n(88510),f=n(72253),b=n(36036),y=n(98595),B=r.Chameleon=function(){function i(c,m){return(0,e.createComponentVNode)(2,y.Window,{width:431,height:500,theme:"syndicate",children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,g)})})}return i}(),k=function(c,m){m===void 0&&(m="");var l=(0,a.createSearch)(m,function(u){return u.name});return(0,t.flow)([(0,o.filter)(function(u){return u==null?void 0:u.name}),m&&(0,o.filter)(l)])(c)},g=r.ChameleonAppearances=function(){function i(c,m){var l=(0,f.useBackend)(m),u=l.act,s=l.data,d=(0,f.useLocalState)(m,"searchText",""),C=d[0],h=d[1],v=k(s.chameleon_skins,C),p=s.selected_appearance;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search for an appearance",onInput:function(){function N(V,S){return h(S)}return N}()})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Item Appearance",children:v.map(function(N){var V=N.name+"_"+N.icon_state;return(0,e.createComponentVNode)(2,b.ImageButton,{dmIcon:N.icon,dmIconState:N.icon_state,imageSize:64,m:.5,compact:!0,selected:V===p,tooltip:N.name,style:{opacity:V===p&&"1"||"0.5"},onClick:function(){function S(){u("change_appearance",{new_appearance:V})}return S}()},V)})})})]})}return i}()},87331:function(T,r,n){"use strict";r.__esModule=!0,r.ChangelogView=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ChangelogView=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=(0,a.useLocalState)(B,"onlyRecent",0),m=c[0],l=c[1],u=i.cl_data,s=i.last_cl,d={FIX:(0,e.createComponentVNode)(2,t.Icon,{name:"tools",title:"Fix"}),WIP:(0,e.createComponentVNode)(2,t.Icon,{name:"hard-hat",title:"WIP",color:"orange"}),TWEAK:(0,e.createComponentVNode)(2,t.Icon,{name:"sliders-h",title:"Tweak"}),SOUNDADD:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",title:"Sound Added",color:"green"}),SOUNDDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-mute",title:"Sound Removed",color:"red"}),CODEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",title:"Code Addition",color:"green"}),CODEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"minus",title:"Code Removal",color:"red"}),IMAGEADD:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-plus",title:"Sprite Addition",color:"green"}),IMAGEDEL:(0,e.createComponentVNode)(2,t.Icon,{name:"folder-minus",title:"Sprite Removal",color:"red"}),SPELLCHECK:(0,e.createComponentVNode)(2,t.Icon,{name:"font",title:"Spelling/Grammar Fix"}),EXPERIMENT:(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-triangle",title:"Experimental",color:"orange"})},C=function(){function h(v){return v in d?d[v]:(0,e.createComponentVNode)(2,t.Icon,{name:"plus",color:"green"})}return h}();return(0,e.createComponentVNode)(2,o.Window,{width:750,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"ParadiseSS13 Changelog",mt:2,buttons:(0,e.createComponentVNode)(2,t.Button,{content:m?"Showing all changes":"Showing changes since last connection",onClick:function(){function h(){return l(!m)}return h}()}),children:u.map(function(h){return!m&&h.merge_ts<=s||(0,e.createComponentVNode)(2,t.Section,{mb:2,title:h.author+" - Merged on "+h.merge_date,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"#"+h.num,onClick:function(){function v(){return g("open_pr",{pr_number:h.num})}return v}()}),children:h.entries.map(function(v){return(0,e.createComponentVNode)(2,t.Box,{m:1,children:[C(v.etype)," ",v.etext]},v)})},h)})})})})}return b}()},91360:function(T,r,n){"use strict";r.__esModule=!0,r.CheckboxListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),f=n(72253),b=n(98595),y=r.CheckboxListInputModal=function(){function k(g,i){var c=(0,f.useBackend)(i),m=c.act,l=c.data,u=l.items,s=u===void 0?[]:u,d=l.message,C=d===void 0?"":d,h=l.init_value,v=l.timeout,p=l.title,N=(0,f.useLocalState)(i,"edittedItems",s),V=N[0],S=N[1],I=330+Math.ceil(C.length/3),L=function(){function w(A){A===void 0&&(A=null);var x=[].concat(V);x=x.map(function(E){return E.key===A.key?Object.assign({},E,{checked:!A.checked}):E}),S(x)}return w}();return(0,e.createComponentVNode)(2,b.Window,{title:p,width:325,height:I,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{className:"ListInput__Section",fill:!0,title:C,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,B,{filteredItems:V,onClick:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return k}(),B=function(g,i){var c=g.filteredItems,m=g.onClick;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:c.map(function(l,u){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,id:u,onClick:function(){function s(){return m(l)}return s}(),checked:l.checked,style:{animation:"none",transition:"none"},children:l.key.replace(/^\w/,function(s){return s.toUpperCase()})},u)})})}},36108:function(T,r,n){"use strict";r.__esModule=!0,r.ChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(85870),f=n(98595),b=[1,5,10,20,30,50],y=[1,5,10],B=r.ChemDispenser=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.chemicals;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:400+C.length*8,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,i)]})})})}return c}(),k=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.amount,h=d.energy,v=d.maxEnergy;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h,minValue:0,maxValue:v,ranges:{good:[v*.5,1/0],average:[v*.25,v*.5],bad:[-1/0,v*.25]},children:[h," / ",v," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispense",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:b.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:C===p,content:p,onClick:function(){function V(){return s("amount",{amount:p})}return V}()})},N)})})})]})})})},g=function(m,l){for(var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.chemicals,h=C===void 0?[]:C,v=[],p=0;p<(h.length+1)%3;p++)v.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:d.glass?"Drink Dispenser":"Chemical Dispenser",children:[h.map(function(N,V){return(0,e.createComponentVNode)(2,t.Button,{m:.1,width:"32.5%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",content:N.title,style:{"margin-left":"2px"},onClick:function(){function S(){return s("dispense",{reagent:N.id})}return S}()},V)}),v.map(function(N,V){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%"},V)})]})})},i=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.isBeakerLoaded,h=d.beakerCurrentVolume,v=d.beakerMaxVolume,p=d.beakerContents,N=p===void 0?[]:p;return(0,e.createComponentVNode)(2,t.Stack.Item,{height:16,children:(0,e.createComponentVNode)(2,t.Section,{title:d.glass?"Glass":"Beaker",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Box,{children:[!!C&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",mr:2,children:[h," / ",v," units"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!C,onClick:function(){function V(){return s("ejectBeaker")}return V}()})]}),children:(0,e.createComponentVNode)(2,o.BeakerContents,{beakerLoaded:C,beakerContents:N,buttons:function(){function V(S){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Isolate",icon:"compress-arrows-alt",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:-1})}return I}()}),y.map(function(I,L){return(0,e.createComponentVNode)(2,t.Button,{content:I,onClick:function(){function w(){return s("remove",{reagent:S.id,amount:I})}return w}()},L)}),(0,e.createComponentVNode)(2,t.Button,{content:"ALL",onClick:function(){function I(){return s("remove",{reagent:S.id,amount:S.volume})}return I}()})],0)}return V}()})})})}},13146:function(T,r,n){"use strict";r.__esModule=!0,r.ChemHeater=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(85870),b=n(98595),y=r.ChemHeater=function(){function g(i,c){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:275,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return g}(),B=function(i,c){var m=(0,t.useBackend)(c),l=m.act,u=m.data,s=u.targetTemp,d=u.targetTempReached,C=u.autoEject,h=u.isActive,v=u.currentTemp,p=u.isBeakerLoaded;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Settings",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Auto-eject",icon:C?"toggle-on":"toggle-off",selected:C,onClick:function(){function N(){return l("toggle_autoeject")}return N}()}),(0,e.createComponentVNode)(2,o.Button,{content:h?"On":"Off",icon:"power-off",selected:h,disabled:!p,onClick:function(){function N(){return l("toggle_on")}return N}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"65px",unit:"K",step:10,stepPixelSize:3,value:(0,a.round)(s,0),minValue:0,maxValue:1e3,onDrag:function(){function N(V,S){return l("adjust_temperature",{target:S})}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Reading",color:d?"good":"average",children:p&&(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:v,format:function(){function N(V){return(0,a.toFixed)(V)+" K"}return N}()})||"\u2014"})]})})})},k=function(i,c){var m=(0,t.useBackend)(c),l=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerCurrentVolume,C=u.beakerMaxVolume,h=u.beakerContents;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:!!s&&(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,color:"label",mr:2,children:[d," / ",C," units"]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",onClick:function(){function v(){return l("eject_beaker")}return v}()})]}),children:(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:s,beakerContents:h})})})}},56541:function(T,r,n){"use strict";r.__esModule=!0,r.ChemMaster=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(85870),b=n(3939),y=n(35840),B=["icon"];function k(I,L){if(I==null)return{};var w={};for(var A in I)if({}.hasOwnProperty.call(I,A)){if(L.includes(A))continue;w[A]=I[A]}return w}function g(I,L){I.prototype=Object.create(L.prototype),I.prototype.constructor=I,i(I,L)}function i(I,L){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,A){return w.__proto__=A,w},i(I,L)}var c=[1,5,10],m=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=L.args.analysis;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:E.condi?"Condiment Analysis":"Reagent Analysis",children:(0,e.createComponentVNode)(2,t.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:P.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:(P.desc||"").length>0?P.desc:"N/A"}),P.blood_type&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood type",children:P.blood_type}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:P.blood_dna})],4),!E.condi&&(0,e.createComponentVNode)(2,t.Button,{icon:E.printing?"spinner":"print",disabled:E.printing,iconSpin:!!E.printing,ml:"0.5rem",content:"Print",onClick:function(){function D(){return x("print",{idx:P.idx,beaker:L.args.beaker})}return D}()})]})})})})},l=function(I){return I[I.ToDisposals=0]="ToDisposals",I[I.ToBeaker=1]="ToBeaker",I}(l||{}),u=r.ChemMaster=function(){function I(L,w){return(0,e.createComponentVNode)(2,o.Window,{width:575,height:650,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,s),(0,e.createComponentVNode)(2,d),(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,S)]})})]})}return I}(),s=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.beaker,D=E.beaker_reagents,M=E.buffer_reagents,R=M.length>0;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Beaker",fill:!0,scrollable:!0,buttons:R?(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}):(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!P,content:"Eject and Clear Buffer",onClick:function(){function O(){return x("eject")}return O}()}),children:P?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function O(F,_){return(0,e.createComponentVNode)(2,t.Box,{mb:_0?(0,e.createComponentVNode)(2,f.BeakerContents,{beakerLoaded:!0,beakerContents:D,buttons:function(){function M(R,O){return(0,e.createComponentVNode)(2,t.Box,{mb:O0&&(R=M.map(function(O){var F=O.id,_=O.sprite;return(0,e.createComponentVNode)(2,N,{icon:_,translucent:!0,onClick:function(){function U(){return x("set_sprite_style",{production_mode:P,style:F})}return U}(),selected:D===F},F)})),(0,e.createComponentVNode)(2,p,{productionData:L.productionData,children:R&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:R})})},S=function(L,w){var A=(0,a.useBackend)(w),x=A.act,E=A.data,P=E.loaded_pill_bottle_style,D=E.containerstyles,M=E.loaded_pill_bottle,R={width:"20px",height:"20px"},O=D.map(function(F){var _=F.color,U=F.name,z=P===_;return(0,e.createComponentVNode)(2,t.Button,{style:{position:"relative",width:R.width,height:R.height},onClick:function(){function $(){return x("set_container_style",{style:_})}return $}(),icon:z&&"check",iconStyle:{position:"relative","z-index":1},tooltip:U,tooltipPosition:"top",children:[!z&&(0,e.createVNode)(1,"div",null,null,1,{style:{display:"inline-block"}}),(0,e.createVNode)(1,"span","Button",null,1,{style:{display:"inline-block",position:"absolute",top:0,left:0,margin:0,padding:0,width:R.width,height:R.height,"background-color":_,opacity:.6,filter:"alpha(opacity=60)"}})]},_)});return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Container Customization",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!M,content:"Eject Container",onClick:function(){function F(){return x("ejectp")}return F}()}),children:M?(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Style",children:[(0,e.createComponentVNode)(2,t.Button,{style:{width:R.width,height:R.height},icon:"tint-slash",onClick:function(){function F(){return x("clear_container_style")}return F}(),selected:!P,tooltip:"Default",tooltipPosition:"top"}),O]})}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"No pill bottle or patch pack loaded."})})})};(0,b.modalRegisterBodyOverride)("analyze",m)},37173:function(T,r,n){"use strict";r.__esModule=!0,r.CloningConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(79140),b=1,y=32,B=128,k=r.CloningConsole=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.tab,N=v.has_scanner,V=v.pod_amount;return(0,e.createComponentVNode)(2,o.Window,{width:640,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cloning Console",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected scanner",children:N?"Online":"Missing"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Connected pods",children:V})]})}),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===1,icon:"home",onClick:function(){function S(){return h("menu",{tab:1})}return S}(),children:"Main Menu"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:p===2,icon:"user",onClick:function(){function S(){return h("menu",{tab:2})}return S}(),children:"Damage Configuration"})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,g)})]})})}return u}(),g=function(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.tab,p;return v===1?p=(0,e.createComponentVNode)(2,i):v===2&&(p=(0,e.createComponentVNode)(2,c)),p},i=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.pods,N=v.pod_amount,V=v.selected_pod_UID;return(0,e.createComponentVNode)(2,t.Box,{children:[!N&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No pods connected."}),!!N&&p.map(function(S,I){return(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Pod "+(I+1),children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"96px",shrink:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:(0,f.resolveAsset)("pod_"+(S.cloning?"cloning":"idle")+".gif"),style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{selected:V===S.uid,onClick:function(){function L(){return h("select_pod",{uid:S.uid})}return L}(),children:"Select"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Progress",children:[!S.cloning&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Pod is inactive."}),!!S.cloning&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.clone_progress,maxValue:100,color:"good"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:S.biomass,ranges:{good:[2*S.biomass_storage_capacity/3,S.biomass_storage_capacity],average:[S.biomass_storage_capacity/3,2*S.biomass_storage_capacity/3],bad:[0,S.biomass_storage_capacity/3]},minValue:0,maxValue:S.biomass_storage_capacity,children:[S.biomass,"/",S.biomass_storage_capacity+" ("+100*S.biomass/S.biomass_storage_capacity+"%)"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sanguine Reagent",children:S.sanguine_reagent}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Osseous Reagent",children:S.osseous_reagent})]})})]})},S)})]})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.selected_pod_data,N=v.has_scanned,V=v.scanner_has_patient,S=v.feedback,I=v.scan_successful,L=v.cloning_cost,w=v.has_scanner,A=v.currently_scanning;return(0,e.createComponentVNode)(2,t.Box,{children:[!w&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No scanner connected."}),!!w&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Scanner Info",buttons:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hourglass-half",onClick:function(){function x(){return h("scan")}return x}(),disabled:!V||A,children:"Scan"}),(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function x(){return h("eject")}return x}(),disabled:!V||A,children:"Eject Patient"})]}),children:[!N&&!A&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:V?"No scan detected for current patient.":"No patient is in the scanner."}),(!!N||!!A)&&(0,e.createComponentVNode)(2,t.Box,{color:S.color,children:S.text})]}),(0,e.createComponentVNode)(2,t.Section,{layer:2,title:"Damages Breakdown",children:(0,e.createComponentVNode)(2,t.Box,{children:[(!I||!N)&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No valid scan detected."}),!!I&&!!N&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return h("fix_all")}return x}(),children:"Repair All Damages"}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return h("fix_none")}return x}(),children:"Repair No Damages"})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function x(){return h("clone")}return x}(),children:"Clone"})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[0],maxValue:p.biomass_storage_capacity,ranges:{bad:[2*p.biomass_storage_capacity/3,p.biomass_storage_capacity],average:[p.biomass_storage_capacity/3,2*p.biomass_storage_capacity/3],good:[0,p.biomass_storage_capacity/3]},color:L[0]>p.biomass?"bad":null,children:["Biomass: ",L[0],"/",p.biomass,"/",p.biomass_storage_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[1],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[1]>p.sanguine_reagent?"bad":"good",children:["Sanguine: ",L[1],"/",p.sanguine_reagent,"/",p.max_reagent_capacity]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:L[2],maxValue:p.max_reagent_capacity,ranges:{bad:[2*p.max_reagent_capacity/3,p.max_reagent_capacity],average:[p.max_reagent_capacity/3,2*p.max_reagent_capacity/3],good:[0,p.max_reagent_capacity/3]},color:L[2]>p.osseous_reagent?"bad":"good",children:["Osseous: ",L[2],"/",p.osseous_reagent,"/",p.max_reagent_capacity]})})]}),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,l)]})]})})]})]})},m=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.patient_limb_data,N=v.limb_list,V=v.desired_limb_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Limbs",children:N.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"15%",height:"20px",children:[p[S][4],":"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),p[S][3]===0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0]+V[S][1],maxValue:p[S][5],ranges:{good:[0,p[S][5]/3],average:[p[S][5]/3,2*p[S][5]/3],bad:[2*p[S][5]/3,p[S][5]]},children:["Post-Cloning Damage: ",(0,e.createComponentVNode)(2,t.Icon,{name:"bone"})," "+V[S][0]+" / ",(0,e.createComponentVNode)(2,t.Icon,{name:"fire"})," "+V[S][1]]})}),p[S][3]!==0&&(0,e.createComponentVNode)(2,t.Stack.Item,{width:"60%",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",p[S][4]," is missing!"]})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[!!p[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][3],onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"replace"})}return L}(),children:"Replace Limb"})}),!p[S][3]&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][0]||p[S][1]),checked:!(V[S][0]||V[S][1]),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"damage"})}return L}(),children:"Repair Damages"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&b),checked:!(V[S][2]&b),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"bone"})}return L}(),children:"Mend Bone"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&y),checked:!(V[S][2]&y),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"ib"})}return L}(),children:"Mend IB"}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!(p[S][2]&B),checked:!(V[S][2]&B),onClick:function(){function L(){return h("toggle_limb_repair",{limb:S,type:"critburn"})}return L}(),children:"Mend Critical Burn"})]})]})]},S)})})},l=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.patient_organ_data,N=v.organ_list,V=v.desired_organ_data;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Organs",children:N.map(function(S,I){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack,{align:"baseline",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"20%",height:"20px",children:[p[S][3],":"," "]}),p[S][5]!=="heart"&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!!p[S][2]&&(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!V[S][2]&&!V[S][1],onClick:function(){function L(){return h("toggle_organ_repair",{organ:S,type:"replace"})}return L}(),children:"Replace Organ"}),!p[S][2]&&(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{disabled:!p[S][0],checked:!V[S][0],onClick:function(){function L(){return h("toggle_organ_repair",{organ:S,type:"damage"})}return L}(),children:"Repair Damages"})})]})}),p[S][5]==="heart"&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Heart replacement is required for cloning."}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[!!p[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{color:"bad",value:0,children:["The patient's ",p[S][3]," is missing!"]}),!p[S][2]&&(0,e.createComponentVNode)(2,t.ProgressBar,{value:V[S][0],maxValue:p[S][4],ranges:{good:[0,p[S][4]/3],average:[p[S][4]/3,2*p[S][4]/3],bad:[2*p[S][4]/3,p[S][4]]},children:"Post-Cloning Damage: "+V[S][0]})]})]})},S)})})}},98723:function(T,r,n){"use strict";r.__esModule=!0,r.CloningPod=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.CloningPod=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.biomass,m=i.biomass_storage_capacity,l=i.sanguine_reagent,u=i.osseous_reagent,s=i.organs,d=i.currently_cloning;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Liquid Storage",children:[(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Biomass:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:c,ranges:{good:[2*m/3,m],average:[m/3,2*m/3],bad:[0,m/3]},minValue:0,maxValue:m})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Sanguine Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:l+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:l,step:1,unit:"units",onChange:function(){function C(h,v){return g("remove_reagent",{reagent:"sanguine_reagent",amount:v})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function C(){return g("purge_reagent",{reagent:"sanguine_reagent"})}return C}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{height:"25px",align:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{color:"label",width:"25%",children:["Osseous Reagent:"," "]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:u+" units"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.NumberInput,{value:0,minValue:0,maxValue:u,step:1,unit:"units",onChange:function(){function C(h,v){return g("remove_reagent",{reagent:"osseous_reagent",amount:v})}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove All",onClick:function(){function C(){return g("purge_reagent",{reagent:"osseous_reagent"})}return C}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Organ Storage",children:[!d&&(0,e.createComponentVNode)(2,t.Box,{children:[!s&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Notice: No organs loaded."}),!!s&&s.map(function(C){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:C.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:1}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Eject",onClick:function(){function h(){return g("eject_organ",{organ_ref:C.ref})}return h}()})})]},C)})]}),!!d&&(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Unable to access organ storage while cloning."]})})]})]})})}return b}()},18259:function(T,r,n){"use strict";r.__esModule=!0,r.CoinMint=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=r.CoinMint=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data,m=c.materials,l=c.moneyBag,u=c.moneyBagContent,s=c.moneyBagMaxContent,d=(l?210:138)+Math.ceil(m.length/4)*64;return(0,e.createComponentVNode)(2,f.Window,{width:210,height:d,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.NoticeBox,{m:0,info:!0,children:["Total coins produced: ",c.totalCoins]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Coin Type",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",color:c.active&&"bad",tooltip:!l&&"Need a money bag",disabled:!l,onClick:function(){function C(){return i("activate")}return C}()}),children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.ProgressBar,{minValue:0,maxValue:c.maxMaterials,value:c.totalMaterials})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",tooltip:"Eject selected material",onClick:function(){function C(){return i("ejectMat")}return C}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:m.map(function(C){return(0,e.createComponentVNode)(2,o.Button,{bold:!0,inline:!0,translucent:!0,m:.2,textAlign:"center",selected:C.id===c.chosenMaterial,tooltip:C.name,content:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",C.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:C.amount})]}),onClick:function(){function h(){return i("selectMaterial",{material:C.id})}return h}()},C.id)})})]})})}),!!l&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Money Bag",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject",disabled:c.active,onClick:function(){function C(){return i("ejectBag")}return C}()}),children:(0,e.createComponentVNode)(2,o.ProgressBar,{width:"100%",minValue:0,maxValue:s,value:u,children:[u," / ",s]})})})]})})})}return y}()},93858:function(T,r,n){"use strict";r.__esModule=!0,r.HexColorInput=r.ColorSelector=r.ColorPickerModal=r.ColorInput=void 0;var e=n(89005),a=n(51057),t=n(72253),o=n(36036),f=n(98595),b=n(44879),y=n(14448),B=n(4454),k=n(35840),g=n(9394),i=n(19203),c=["prefixed","alpha","color","fluid","onChange"];/**
* @file
* @copyright 2023 itsmeow
* @license MIT
- */function m(w,A){w.prototype=Object.create(A.prototype),w.prototype.constructor=w,l(w,A)}function l(w,A){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,E){return x.__proto__=E,x},l(w,A)}function u(w,A){if(w==null)return{};var x={};for(var E in w)if({}.hasOwnProperty.call(w,E)){if(A.includes(E))continue;x[E]=w[E]}return x}var s=r.ColorPickerModal=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.timeout,M=P.message,R=P.title,O=P.autofocus,F=P.default_color,_=F===void 0?"#000000":F,U=(0,t.useLocalState)(x,"color_picker_choice",(0,y.hexToHsva)(_)),z=U[0],$=U[1];return(0,e.createComponentVNode)(2,f.Window,{height:400,title:R,width:600,theme:"generic",children:[!!D&&(0,e.createComponentVNode)(2,a.Loader,{value:D}),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[M&&(0,e.createComponentVNode)(2,o.Stack.Item,{m:1,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",overflow:"hidden",children:M})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[!!O&&(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,d,{color:z,setColor:$,defaultColor:_})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i.InputButtons,{input:(0,y.hsvaToHex)(z)})})]})})]})}return w}(),d=r.ColorSelector=function(){function w(A,x){var E=A.color,P=A.setColor,D=A.defaultColor,M=function(){function F(_){P(function(U){return Object.assign({},U,_)})}return F}(),R=(0,y.hsvaToRgba)(E),O=(0,y.hsvaToHex)(E);return(0,e.createComponentVNode)(2,o.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{mr:2,children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createVNode)(1,"div","react-colorful",[(0,e.createComponentVNode)(2,N,{hsva:E,onChange:M}),(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M,className:"react-colorful__last-control"})],4)}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Current"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Previous"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Tooltip,{content:O,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:O})}),(0,e.createComponentVNode)(2,o.Tooltip,{content:D,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:D})})]})]})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:!0,fontSize:"15px",lineHeight:"24px",children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"Hex:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"24px",children:(0,e.createComponentVNode)(2,v,{fluid:!0,color:(0,y.hsvaToHex)(E).substring(1),onChange:function(){function F(_){g.logger.info(_),P((0,y.hexToHsva)(_))}return F}(),prefixed:!0})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"H:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:E.h,callback:function(){function F(_,U){return M({h:U})}return F}(),max:360,unit:"\xB0"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"S:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,S,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:E.s,callback:function(){function F(_,U){return M({s:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"V:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,I,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:E.v,callback:function(){function F(_,U){return M({v:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"R:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"r"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:R.r,callback:function(){function F(_,U){R.r=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"G:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"g"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:R.g,callback:function(){function F(_,U){R.g=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"B:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"b"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:R.b,callback:function(){function F(_,U){R.b=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})})]})})]})}return w}(),C=function(A){var x=A.value,E=A.callback,P=A.min,D=P===void 0?0:P,M=A.max,R=M===void 0?100:M,O=A.unit;return(0,e.createComponentVNode)(2,o.NumberInput,{width:"70px",value:Math.round(x),step:1,minValue:D,maxValue:R,onChange:E,unit:O})},h=function(A){return"#"+A},v=r.HexColorInput=function(){function w(A){var x=A.prefixed,E=A.alpha,P=A.color,D=A.fluid,M=A.onChange,R=u(A,c),O=function(){function _(U){return U.replace(/([^0-9A-F]+)/gi,"").substring(0,E?8:6)}return _}(),F=function(){function _(U){return(0,y.validHex)(U,E)}return _}();return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p,Object.assign({},R,{fluid:D,color:P,onChange:M,escape:O,format:x?h:void 0,validate:F})))}return w}(),p=r.ColorInput=function(w){function A(E){var P;return P=w.call(this)||this,P.props=void 0,P.state=void 0,P.handleInput=function(D){var M=P.props.escape(D.currentTarget.value);P.setState({localValue:M})},P.handleBlur=function(D){D.currentTarget&&(P.props.validate(D.currentTarget.value)?P.props.onChange(P.props.escape?P.props.escape(D.currentTarget.value):D.currentTarget.value):P.setState({localValue:P.props.escape(P.props.color)}))},P.props=E,P.state={localValue:P.props.escape(P.props.color)},P}m(A,w);var x=A.prototype;return x.componentDidUpdate=function(){function E(P,D){P.color!==this.props.color&&this.setState({localValue:this.props.escape(this.props.color)})}return E}(),x.render=function(){function E(){return(0,e.createComponentVNode)(2,o.Box,{className:(0,k.classes)(["Input",this.props.fluid&&"Input--fluid"]),children:[(0,e.createVNode)(1,"div","Input__baseline",".",16),(0,e.createVNode)(64,"input","Input__input",null,1,{value:this.props.format?this.props.format(this.state.localValue):this.state.localValue,spellCheck:"false",onInput:this.handleInput,onBlur:this.handleBlur})]})}return E}(),A}(e.Component),N=function(A){var x=A.hsva,E=A.onChange,P=function(O){E({s:O.left*100,v:100-O.top*100})},D=function(O){E({s:(0,b.clamp)(x.s+O.left*100,0,100),v:(0,b.clamp)(x.v-O.top*100,0,100)})},M={"background-color":(0,y.hsvaToHslString)({h:x.h,s:100,v:100,a:1})+" !important"};return(0,e.createVNode)(1,"div","react-colorful__saturation_value",(0,e.createComponentVNode)(2,B.Interactive,{onMove:P,onKey:D,"aria-label":"Color","aria-valuetext":"Saturation "+Math.round(x.s)+"%, Brightness "+Math.round(x.v)+"%",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation_value-pointer",top:1-x.v/100,left:x.s/100,color:(0,y.hsvaToHslString)(x)})}),2,{style:M})},V=function(A){var x=A.className,E=A.hue,P=A.onChange,D=function(F){P({h:360*F.left})},M=function(F){P({h:(0,b.clamp)(E+F.left*360,0,360)})},R=(0,k.classes)(["react-colorful__hue",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{onMove:D,onKey:M,"aria-label":"Hue","aria-valuenow":Math.round(E),"aria-valuemax":"360","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__hue-pointer",left:E/360,color:(0,y.hsvaToHslString)({h:E,s:100,v:100,a:1})})}),2)},S=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({s:100*F.left})},M=function(F){P({s:(0,b.clamp)(E.s+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__saturation",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:E.h,s:0,v:E.v,a:1})+", "+(0,y.hsvaToHslString)({h:E.h,s:100,v:E.v,a:1})+")"},onMove:D,onKey:M,"aria-label":"Saturation","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation-pointer",left:E.s/100,color:(0,y.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},I=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({v:100*F.left})},M=function(F){P({v:(0,b.clamp)(E.v+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__value",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:E.h,s:E.s,v:0,a:1})+", "+(0,y.hsvaToHslString)({h:E.h,s:E.s,v:100,a:1})+")"},onMove:D,onKey:M,"aria-label":"Value","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__value-pointer",left:E.v/100,color:(0,y.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},L=function(A){var x=A.className,E=A.color,P=A.onChange,D=A.target,M=(0,y.hsvaToRgba)(E),R=function($){M[D]=$,P((0,y.rgbaToHsva)(M))},O=function($){R(255*$.left)},F=function($){R((0,b.clamp)(M[D]+$.left*255,0,255))},_=(0,k.classes)(["react-colorful__"+D,x]),U=D==="r"?"rgb("+Math.round(M.r)+",0,0)":D==="g"?"rgb(0,"+Math.round(M.g)+",0)":"rgb(0,0,"+Math.round(M.b)+")";return(0,e.createVNode)(1,"div",_,(0,e.createComponentVNode)(2,B.Interactive,{onMove:O,onKey:F,"aria-valuenow":M[D],"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__"+D+"-pointer",left:M[D]/255,color:U})}),2)}},8444:function(T,r,n){"use strict";r.__esModule=!0,r.ColourMatrixTester=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ColourMatrixTester=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.colour_data,m=[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:190,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Matrix",children:m.map(function(l){return(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",textColor:"label",children:l.map(function(u){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:1,children:[u.name,":\xA0",(0,e.createComponentVNode)(2,t.NumberInput,{width:4,value:c[u.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(){function s(d,C){return g("setvalue",{idx:u.idx+1,value:C})}return s}()})]},u.name)})},l)})})})})})}return b}()},63818:function(T,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(s){switch(s){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,i);case 3:return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,c)})});case 4:return(0,e.createComponentVNode)(2,l);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},b=r.CommunicationsComputer=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),f(p)]})})})}return u}(),y=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.authenticated,N=v.noauthbutton,V=v.esc_section,S=v.esc_callable,I=v.esc_recallable,L=v.esc_status,w=v.authhead,A=v.is_ai,x=v.lastCallLoc,E=!1,P;return p?p===1?P="Command":p===2?P="Captain":p===3?P="CentComm Officer":p===4?(P="CentComm Secure Connection",E=!0):P="ERROR: Report This Bug!":P="Not Logged In",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:P})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:p?"sign-out-alt":"id-card",selected:p,disabled:N,content:p?"Log Out ("+P+")":"Log In",onClick:function(){function D(){return h("auth")}return D}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:L}),!!S&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!w,onClick:function(){function D(){return h("callshuttle")}return D}()})}),!!I&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!w||A,onClick:function(){function D(){return h("cancelshuttle")}return D}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},B=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.is_admin;return p?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,g)},k=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.is_admin,N=v.gamma_armory_location,V=v.admin_levels,S=v.authenticated,I=v.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"CentComm Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:V,required_access:p,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!p,onClick:function(){function L(){return h("send_to_cc_announcement_page")}return L}()}),S===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!p,onClick:function(){function L(){return h("make_other_announcement")}return L}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Response Team",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!p,onClick:function(){function L(){return h("dispatch_ert")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:I,content:I?"ERT calling enabled":"ERT calling disabled",tooltip:I?"Command can request an ERT":"ERTs cannot be requested",disabled:!p,onClick:function(){function L(){return h("toggle_ert_allowed")}return L}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!p,onClick:function(){function L(){return h("send_nuke_codes")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gamma Armory",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:N?"Send Gamma Armory":"Recall Gamma Armory",disabled:!p,onClick:function(){function L(){return h("move_gamma_armory")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"coins",content:"View Economy",disabled:!p,onClick:function(){function L(){return h("view_econ")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!p,onClick:function(){function L(){return h("view_fax")}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,g)})]})},g=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.msg_cooldown,N=v.emagged,V=v.cc_cooldown,S=v.security_level_color,I=v.str_security_level,L=v.levels,w=v.authcapt,A=v.authhead,x=v.messages,E="Make Priority Announcement";p>0&&(E+=" ("+p+"s)");var P=N?"Message [UNKNOWN]":"Message CentComm",D="Request Authentication Codes";return V>0&&(P+=" ("+V+"s)",D+=" ("+V+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:S,children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:L,required_access:w})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:E,disabled:!w||p>0,onClick:function(){function M(){return h("announce")}return M}()})}),!!N&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:P,disabled:!w||V>0,onClick:function(){function M(){return h("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!w,onClick:function(){function M(){return h("RestoreBackup")}return M}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:P,disabled:!w||V>0,onClick:function(){function M(){return h("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:D,disabled:!w||V>0,onClick:function(){function M(){return h("nukerequest")}return M}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!A,onClick:function(){function M(){return h("status")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"View ("+x.length+")",disabled:!A,onClick:function(){function M(){return h("messagelist")}return M}()})})]})})})],4)},i=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.stat_display,N=v.authhead,V=v.current_message_title,S=p.presets.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.name===p.type,disabled:!N,onClick:function(){function w(){return h("setstat",{statdisp:L.name})}return w}()},L.name)}),I=p.alerts.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.alert===p.icon,disabled:!N,onClick:function(){function w(){return h("setstat",{statdisp:3,alert:L.alert})}return w}()},L.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function L(){return h("main")}return L}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:p.line_1,disabled:!N,onClick:function(){function L(){return h("setmsg1")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:p.line_2,disabled:!N,onClick:function(){function L(){return h("setmsg2")}return L}()})})]})})})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.authhead,N=v.current_message_title,V=v.current_message,S=v.messages,I=v.security_level,L;if(N)L=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!p,onClick:function(){function A(){return h("messagelist")}return A}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:V})})});else{var w=S.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!p||N===A.title,onClick:function(){function x(){return h("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!p,onClick:function(){function x(){return h("delmessage",{msgid:A.id})}return x}()})]},A.id)});L=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function A(){return h("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w})})}return(0,e.createComponentVNode)(2,t.Box,{children:L})},m=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=s.levels,N=s.required_access,V=s.use_confirm,S=v.security_level;return V?p.map(function(I){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:I.icon,content:I.name,disabled:!N||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return h("newalertlevel",{level:I.id})}return L}()},I.name)}):p.map(function(I){return(0,e.createComponentVNode)(2,t.Button,{icon:I.icon,content:I.name,disabled:!N||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return h("newalertlevel",{level:I.id})}return L}()},I.name)})},l=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.is_admin,N=v.possible_cc_sounds;if(!p)return h("main");var V=(0,a.useLocalState)(d,"subtitle",""),S=V[0],I=V[1],L=(0,a.useLocalState)(d,"text",""),w=L[0],A=L[1],x=(0,a.useLocalState)(d,"classified",0),E=x[0],P=x[1],D=(0,a.useLocalState)(d,"beepsound","Beep"),M=D[0],R=D[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Central Command Report",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function O(){return h("main")}return O}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:S,onChange:function(){function O(F,_){return I(_)}return O}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:w,onChange:function(){function O(F,_){return A(_)}return O}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function O(){return h("make_cc_announcement",{subtitle:S,text:w,classified:E,beepsound:M})}return O}()}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"260px",height:"20px",options:N,selected:M,onSelected:function(){function O(F){return R(F)}return O}(),disabled:E})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"volume-up",mx:"5px",disabled:E,tooltip:"Test sound",onClick:function(){function O(){return h("test_sound",{sound:M})}return O}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:E,content:"Classified",fluid:!0,tooltip:E?"Sent to station communications consoles":"Publically announced",onClick:function(){function O(){return P(!E)}return O}()})})]})]})})}},20562:function(T,r,n){"use strict";r.__esModule=!0,r.CompostBin=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.CompostBin=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.biomass,m=i.compost,l=i.biomass_capacity,u=i.compost_capacity,s=i.potassium,d=i.potassium_capacity,C=i.potash,h=i.potash_capacity,v=(0,a.useSharedState)(B,"vendAmount",1),p=v[0],N=v[1];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:250,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{label:"Resources",children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:c,minValue:0,maxValue:l,ranges:{good:[l*.5,1/0],average:[l*.25,l*.5],bad:[-1/0,l*.25]},children:[c," / ",l," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:m,minValue:0,maxValue:u,ranges:{good:[u*.5,1/0],average:[u*.25,u*.5],bad:[-1/0,u*.25]},children:[m," / ",u," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potassium",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:s,minValue:0,maxValue:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[s," / ",d," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potash",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:C,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[C," / ",h," Units"]})})]})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:p,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function V(S,I){return N(I)}return V}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,align:"center",content:"Make Soil",disabled:m<25*p,icon:"arrow-circle-down",onClick:function(){function V(){return g("create",{amount:p})}return V}()})})})]})})})}return b}()},21813:function(T,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(73379),b=n(98595);function y(h,v){h.prototype=Object.create(v.prototype),h.prototype.constructor=h,B(h,v)}function B(h,v){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},B(h,v)}var k={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},g=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(Math.random()*2e4),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],i=r.Contractor=function(){function h(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I;S.unauthorized?I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,d,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function x(){}return x}()})}):S.load_animation_completed?I=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,c)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:S.page===1?(0,e.createComponentVNode)(2,l,{height:"100%"}):(0,e.createComponentVNode)(2,s,{height:"100%"})})],4):I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,d,{height:"100%",allMessages:g,finishedTimeout:3e3,onFinished:function(){function x(){return V("complete_load_animation")}return x}()})});var L=(0,t.useLocalState)(p,"viewingPhoto",""),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,b.Window,{theme:"syndicate",width:500,height:600,children:[w&&(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,b.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:I})})]})}return h}(),c=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.tc_available,L=S.tc_paid_out,w=S.completed_contracts,A=S.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},v,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[I," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:I<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function x(){return V("claim")}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[L," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",inline:!0,children:w})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},m=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},v,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===1,onClick:function(){function L(){return V("page",{page:1})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===2,onClick:function(){function L(){return V("page",{page:2})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},l=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.contracts,L=S.contract_active,w=S.can_extract,A=!!L&&I.filter(function(M){return M.status===1})[0],x=A&&A.time_left>0,E=(0,t.useLocalState)(p,"viewingPhoto",""),P=E[0],D=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!w||x,icon:"parachute-box",content:["Call Extraction",x&&(0,e.createComponentVNode)(2,f.Countdown,{timeLeft:A.time_left,format:function(){function M(R,O){return" ("+O.substr(3)+")"}return M}()})],onClick:function(){function M(){return V("extract")}return M}()})},v,{children:I.slice().sort(function(M,R){return M.status===1?-1:R.status===1?1:M.status-R.status}).map(function(M){var R;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:M.status===1&&"good",children:M.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:M.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function O(){return D("target_photo_"+M.uid+".png")}return O}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!k[M.status]&&(0,e.createComponentVNode)(2,o.Box,{color:k[M.status][1],inline:!0,mt:M.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:k[M.status][0]}),M.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function O(){return V("abort")}return O}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[M.fluff_message,!!M.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",M.completed_time]}),!!M.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!M.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",M.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",u(M)]}),(R=M.difficulties)==null?void 0:R.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:O.name+" ("+O.reward+" TC)",onClick:function(){function _(){return V("activate",{uid:M.uid,difficulty:F+1})}return _}()},F)}),!!M.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[M.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(M.objective.rewards.tc||0)+" TC",",\xA0",(M.objective.rewards.credits||0)+" Credits",")"]})]})]})},M.uid)})})))},u=function(v){if(!(!v.objective||v.status>1)){var p=v.objective.locs.user_area_id,N=v.objective.locs.user_coords,V=v.objective.locs.target_area_id,S=v.objective.locs.target_coords,I=p===V;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:I?"dot-circle-o":"arrow-alt-circle-right-o",color:I?"green":"yellow",rotation:I?null:-(0,a.rad2deg)(Math.atan2(S[1]-N[1],S[0]-N[0])),lineHeight:I?null:"0.85",size:"1.5"})})}},s=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.rep,L=S.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},v,{children:L.map(function(w){return(0,e.createComponentVNode)(2,o.Section,{title:w.name,children:[w.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:I-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:w.stock===0?"bad":"good",ml:"0.5rem",children:[w.stock," in stock"]})]},w.uid)})})))},d=function(h){function v(N){var V;return V=h.call(this,N)||this,V.timer=null,V.state={currentIndex:0,currentDisplay:[]},V}y(v,h);var p=v.prototype;return p.tick=function(){function N(){var V=this.props,S=this.state;if(S.currentIndex<=V.allMessages.length){this.setState(function(L){return{currentIndex:L.currentIndex+1}});var I=S.currentDisplay;I.push(V.allMessages[S.currentIndex])}else clearTimeout(this.timer),setTimeout(V.onFinished,V.finishedTimeout)}return N}(),p.componentDidMount=function(){function N(){var V=this,S=this.props.linesPerSecond,I=S===void 0?2.5:S;this.timer=setInterval(function(){return V.tick()},1e3/I)}return N}(),p.componentWillUnmount=function(){function N(){clearTimeout(this.timer)}return N}(),p.render=function(){function N(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(V){return(0,e.createFragment)([V,(0,e.createVNode)(1,"br")],0,V)})})}return N}(),v}(e.Component),C=function(v,p){var N=(0,t.useLocalState)(p,"viewingPhoto",""),V=N[0],S=N[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:V}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function I(){return S("")}return I}()})]})}},54151:function(T,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ConveyorSwitch=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.slowFactor,m=i.oneWay,l=i.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:l>0?"forward":l<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!m,onClick:function(){function u(){return g("toggleOneWay")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function u(){return g("slowFactor",{value:c-5})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function u(){return g("slowFactor",{value:c-1})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(){function u(s){return s+"x"}return u}(),onChange:function(){function u(s,d){return g("slowFactor",{value:d})}return u}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function u(){return g("slowFactor",{value:c+1})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function u(){return g("slowFactor",{value:c+5})}return u}()})," "]})]})})]})})})})}return b}()},73169:function(T,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(89005),a=n(88510),t=n(25328),o=n(72253),f=n(36036),b=n(36352),y=n(76910),B=n(98595),k=n(96184),g=["color"];function i(C,h){if(C==null)return{};var v={};for(var p in C)if({}.hasOwnProperty.call(C,p)){if(h.includes(p))continue;v[p]=C[p]}return v}var c=function(h,v){return h.dead?"Deceased":parseInt(h.health,10)<=v?"Critical":parseInt(h.stat,10)===1?"Unconscious":"Living"},m=function(h,v){return h.dead?"red":parseInt(h.health,10)<=v?"orange":parseInt(h.stat,10)===1?"blue":"green"},l=r.CrewMonitor=function(){function C(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=(0,o.useLocalState)(v,"tabIndex",V.tabIndex),I=S[0],L=S[1],w=function(){function x(E){L(E),N("set_tab_index",{tab_index:E})}return x}(),A=function(){function x(E){switch(E){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}return x}();return(0,e.createComponentVNode)(2,B.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"table",selected:I===0,onClick:function(){function x(){return w(0)}return x}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"map-marked-alt",selected:I===1,onClick:function(){function x(){return w(1)}return x}(),children:"Map View"},"MapView")]})}),A(I)]})})})}return C}(),u=function(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=V.possible_levels,I=V.viewing_current_z_level,L=V.is_advanced,w=V.highlightedNames,A=(0,a.sortBy)(function(M){return!w.includes(M.name)},function(M){return M.name})(V.crewmembers||[]),x=(0,o.useLocalState)(v,"search",""),E=x[0],P=x[1],D=(0,t.createSearch)(E,function(M){return M.name+"|"+M.assignment+"|"+M.area});return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function M(R,O){return P(O)}return M}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:L?(0,e.createComponentVNode)(2,f.Dropdown,{mr:"5px",width:"50px",options:S,selected:I,onSelected:function(){function M(R){return N("switch_level",{new_level:R})}return M}()}):null})]}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{tooltip:"Clear highlights",icon:"square-xmark",onClick:function(){function M(){return N("clear_highlighted_names")}return M}()})}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Location"})]}),A.filter(D).map(function(M,R){var O=w.includes(M.name);return(0,e.createComponentVNode)(2,f.Table.Row,{bold:!!M.is_command,children:[(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,k.ButtonCheckbox,{checked:O,tooltip:"Mark on map",onClick:function(){function F(){return N(O?"remove_highlighted_name":"add_highlighted_name",{name:M.name})}return F}()})}),(0,e.createComponentVNode)(2,b.TableCell,{children:[M.name," (",M.assignment,")"]}),(0,e.createComponentVNode)(2,b.TableCell,{children:[(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:m(M,V.critThreshold),children:c(M,V.critThreshold)}),M.sensor_type>=2||V.ignoreSensors?(0,e.createComponentVNode)(2,f.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.oxy,children:M.oxy}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.toxin,children:M.tox}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.burn,children:M.fire}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.brute,children:M.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,b.TableCell,{children:M.sensor_type===3||V.ignoreSensors?V.isAI||V.isObserver?(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"location-arrow",content:M.area+" ("+M.x+", "+M.y+")",onClick:function(){function F(){return N("track",{track:M.ref})}return F}()}):M.area+" ("+M.x+", "+M.y+")":(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:"grey",children:"Not Available"})})]},R)})]})]})},s=function(h,v){var p=h.color,N=i(h,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.NanoMap.Marker,Object.assign({},N,{children:(0,e.createVNode)(1,"span","highlighted-marker color-border-"+p)})))},d=function(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=V.highlightedNames;return(0,e.createComponentVNode)(2,f.Box,{height:"100vh",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,f.NanoMap,{zoom:V.zoom,offsetX:V.offsetX,offsetY:V.offsetY,onZoom:function(){function I(L){return N("set_zoom",{zoom:L})}return I}(),onOffsetChange:function(){function I(L,w){return N("set_offset",{offset_x:w.offsetX,offset_y:w.offsetY})}return I}(),children:V.crewmembers.filter(function(I){return I.sensor_type===3||V.ignoreSensors}).map(function(I){var L=m(I,V.critThreshold),w=S.includes(I.name),A=function(){return V.isObserver?N("track",{track:I.ref}):null},x=function(){return N(w?"remove_highlighted_name":"add_highlighted_name",{name:I.name})},E=I.name+" ("+I.assignment+")";return w?(0,e.createComponentVNode)(2,s,{x:I.x,y:I.y,tooltip:E,color:L,onClick:A,onDblClick:x},I.ref):(0,e.createComponentVNode)(2,f.NanoMap.MarkerIcon,{x:I.x,y:I.y,icon:"circle",tooltip:E,color:L,onClick:A,onDblClick:x},I.ref)})})})}},63987:function(T,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=r.Cryo=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:520,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B)})})})}return g}(),B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.isOperating,d=u.hasOccupant,C=u.occupant,h=C===void 0?[]:C,v=u.cellTemperature,p=u.cellTemperatureStatus,N=u.isBeakerLoaded,V=u.cooldownProgress,S=u.auto_eject_healthy,I=u.auto_eject_dead;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",onClick:function(){function L(){return l("ejectOccupant")}return L}(),disabled:!d,children:"Eject"}),children:d?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[h.stat][0],children:b[h.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),f.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h[L.type])})})},L.id)})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Cell",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function L(){return l("ejectBeaker")}return L}(),disabled:!N,children:"Eject Beaker"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",onClick:function(){function L(){return l(s?"switchOff":"switchOn")}return L}(),selected:s,children:s?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:p,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dosage interval",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!N&&"average",value:V,minValue:0,maxValue:100})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:S?"toggle-on":"toggle-off",selected:S,onClick:function(){function L(){return l(S?"auto_eject_healthy_off":"auto_eject_healthy_on")}return L}(),children:S?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"toggle-on":"toggle-off",selected:I,onClick:function(){function L(){return l(I?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:I?"On":"Off"})})]})})})],4)},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerLabel,C=u.beakerVolume;return s?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!d&&"average",children:[d||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!C&&"bad",ml:1,children:C?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:C,format:function(){function h(v){return Math.round(v)+" units remaining"}return h}()}):"Beaker is empty"})],4):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"bad",children:"No beaker loaded"})}},86099:function(T,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=r.CryopodConsole=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.account_name,u=m.allow_items;return(0,e.createComponentVNode)(2,o.Window,{title:"Cryopod Console",width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(l||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,y),!!u&&(0,e.createComponentVNode)(2,B)]})})}return k}(),y=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:l.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(u,s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u.name,children:u.rank},s)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.frozen_items,s=function(C){var h=C.toString();return h.startsWith("the ")&&(h=h.slice(4,h.length)),(0,f.toTitleCase)(h)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:u.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s(d.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function C(){return m("one_item",{item:d.uid})}return C}()})},d)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function d(){return m("all_items")}return d}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},12692:function(T,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],B=[5,10,20,30,50],k=r.DNAModifier=function(){function p(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.irradiating,A=L.dnaBlockSize,x=L.occupant;V.dnaBlockSize=A,V.isDNAInvalid=!x.isViableSubject||!x.uniqueIdentity||!x.structuralEnzymes;var E;return w&&(E=(0,e.createComponentVNode)(2,h,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,f.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,g)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)})]})})]})}return p}(),g=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.locked,A=L.hasOccupant,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Engaged":"Disengaged",onClick:function(){function E(){return I("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||w,icon:"user-slash",content:"Eject",onClick:function(){function E(){return I("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:x.minHealth,max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[x.stat][0],children:b[x.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),V.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:x.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:L.occupant.uniqueEnzymes?L.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},i=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedMenuKey,A=L.hasOccupant,x=L.occupant;if(A){if(V.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return w==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,l)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,l)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,u):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,C)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:y.map(function(P,D){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:P[2],selected:w===P[0],onClick:function(){function M(){return I("selectMenuKey",{key:P[0]})}return M}(),children:P[1]},D)})}),E]})},c=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedUIBlock,A=L.selectedUISubBlock,x=L.selectedUITarget,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,v,{dnaString:E.uniqueIdentity,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:x,format:function(){function P(D){return D.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(D,M){return I("changeUITarget",{value:M})}return P}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function P(){return I("pulseUIRadiation")}return P}()})]})},m=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedSEBlock,A=L.selectedSESubBlock,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,v,{dnaString:x.structuralEnzymes,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return I("pulseSERadiation")}return E}()})]})},l=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:w,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationIntensity",{value:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationDuration",{value:P})}return x}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function x(){return I("pulseRadiation")}return x}()})]})},u=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.buffers,A=w.map(function(x,E){return(0,e.createComponentVNode)(2,s,{id:E+1,name:"Buffer "+(E+1),buffer:x},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,d)})]})},s=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=N.id,A=N.name,x=N.buffer,E=L.isInjectorReady,P=A+(x.data?" - "+x.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:P,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!x.data,icon:"trash",content:"Clear",onClick:function(){function D(){return I("bufferOption",{option:"clear",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function D(){return I("bufferOption",{option:"changeLabel",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data||!L.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function D(){return I("bufferOption",{option:"saveDisk",id:w})}return D}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveUI",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveUIAndUE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveSE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"loadDisk",id:w})}return D}()})]}),!!x.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:x.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[x.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!x.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"createInjector",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"createInjector",id:w,block:1})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"transfer",id:w})}return D}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},d=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!w||!A.data,icon:"trash",content:"Wipe",onClick:function(){function x(){return I("wipeDisk")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function x(){return I("ejectDisk")}return x}()})],4),children:w?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},C=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.isBeakerLoaded,A=L.beakerVolume,x=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function E(){return I("ejectBeaker")}return E}()}),children:w?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[B.map(function(E,P){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function D(){return I("injectRejuvenators",{amount:E})}return D}()},P)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return I("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:x||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},h=function(N,V){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),N.duration,(0,e.createTextVNode)(" second"),N.duration===1?"":"s"],0)})]})},v=function(N,V){for(var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=N.dnaString,A=N.selectedBlock,x=N.selectedSubblock,E=N.blockSize,P=N.action,D=w.split(""),M=0,R=[],O=function(){for(var U=F/E+1,z=[],$=function(){var J=G+1;z.push((0,e.createComponentVNode)(2,t.Button,{selected:A===U&&x===J,content:D[F+G],mb:"0",onClick:function(){function se(){return I(P,{block:U,subblock:J})}return se}()}))},G=0;Gd.spawnpoints?"red":"green",children:[d.total," total, versus ",d.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{width:10.5,textAlign:"center",icon:"ambulance",content:"Send ERT",onClick:function(){function N(){return s("dispatch_ert",{silent:v})}return N}()})})]})})})},g=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:C&&C.length?C.map(function(h){return(0,e.createComponentVNode)(2,t.Section,{title:h.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:h.sender_real_name,onClick:function(){function v(){return s("view_player_panel",{uid:h.sender_uid})}return v}(),tooltip:"View player panel"}),children:h.message},(0,f.decodeHtmlEntities)(h.time))}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"broadcast-tower",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No ERT requests."]})})})})},i=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=(0,a.useLocalState)(l,"text",""),h=C[0],v=C[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:19,fluid:!0,multiline:1,value:h,onChange:function(){function p(N,V){return v(V)}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function p(){return s("deny_ert",{reason:h})}return p}()})]})})}},90217:function(T,r,n){"use strict";r.__esModule=!0,r.EconomyManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=r.EconomyManager=function(){function B(k,g){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:325,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return B}(),y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.next_payroll_time;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Global",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"global"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"department"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Members",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"department_members"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Single Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"crew_member"})}return u}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",l," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function u(){return c("delay_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function u(){return c("set_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function u(){return c("accelerate_payroll")}return u}()})]}),(0,e.createComponentVNode)(2,t.NoticeBox,{children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons!"]})],4)}},82565:function(T,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.Electropack=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data,m=c.power,l=c.code,u=c.frequency,s=c.minFrequency,d=c.maxFrequency;return(0,e.createComponentVNode)(2,f.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:m?"power-off":"times",content:m?"On":"Off",selected:m,onClick:function(){function C(){return i("power")}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function C(){return i("reset",{reset:"freq"})}return C}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:s/10,maxValue:d/10,value:u/10,format:function(){function C(h){return(0,a.toFixed)(h,1)}return C}(),width:"80px",onChange:function(){function C(h,v){return i("freq",{freq:v})}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function C(){return i("reset",{reset:"code"})}return C}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onChange:function(){function C(h,v){return i("code",{code:v})}return C}()})})]})})})})}return y}()},11243:function(T,r,n){"use strict";r.__esModule=!0,r.Emojipedia=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=r.Emojipedia=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.data,m=c.emoji_list,l=(0,t.useLocalState)(g,"searchText",""),u=l[0],s=l[1],d=m.filter(function(C){return C.name.toLowerCase().includes(u.toLowerCase())});return(0,e.createComponentVNode)(2,f.Window,{width:325,height:400,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Emojipedia v1.0.1",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by name",value:u,onInput:function(){function C(h,v){return s(v)}return C}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Click on an emoji to copy its tag!",tooltipPosition:"bottom",icon:"circle-question"})],4),children:d.map(function(C){return(0,e.createComponentVNode)(2,o.Button,{m:1,color:"transparent",className:(0,a.classes)(["emoji16x16","emoji-"+C.name]),style:{transform:"scale(1.5)"},tooltip:C.name,onClick:function(){function h(){y(C.name)}return h}()},C.name)})})})})}return B}(),y=function(k){var g=document.createElement("input"),i=":"+k+":";g.value=i,document.body.appendChild(g),g.select(),document.execCommand("copy"),document.body.removeChild(g)}},36730:function(T,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(64795),y=n(88510),B=r.EvolutionMenu=function(){function i(c,m){return(0,e.createComponentVNode)(2,f.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)]})})})}return i}(),k=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.evo_points,C=s.can_respec;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:d}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!C,content:"Readapt",icon:"sync",onClick:function(){function h(){return u("readapt")}return h}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})})},g=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.evo_points,C=s.ability_tabs,h=s.purchased_abilities,v=s.view_mode,p=(0,t.useLocalState)(m,"selectedTab",C[0]),N=p[0],V=p[1],S=(0,t.useLocalState)(m,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(m,"ability_tabs",C[0].abilities),A=w[0],x=w[1],E=function(R,O){if(O===void 0&&(O=""),!R||R.length===0)return[];var F=(0,a.createSearch)(O,function(_){return _.name+"|"+_.description});return(0,b.flow)([(0,y.filter)(function(_){return _==null?void 0:_.name}),(0,y.filter)(F),(0,y.sortBy)(function(_){return _==null?void 0:_.name})])(R)},P=function(R){if(L(R),R==="")return x(N.abilities);x(E(C.map(function(O){return O.abilities}).flat(),R))},D=function(R){V(R),x(R.abilities),L("")};return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function M(R,O){P(O)}return M}(),value:I}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"square-o":"check-square-o",selected:!v,content:"Compact",onClick:function(){function M(){return u("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"check-square-o":"square-o",selected:v,content:"Expanded",onClick:function(){function M(){return u("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:C.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===""&&N===M,onClick:function(){function R(){D(M)}return R}(),children:M.category},M)})}),A.map(function(M,R){return(0,e.createComponentVNode)(2,o.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{ml:.5,color:"#dedede",children:M.name}),h.includes(M.power_path)&&(0,e.createComponentVNode)(2,o.Stack.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,o.Box,{as:"span",bold:!0,color:"#1b945c",children:M.cost})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,o.Button,{mr:.5,disabled:M.cost>d||h.includes(M.power_path),content:"Evolve",onClick:function(){function O(){return u("purchase",{power_path:M.power_path})}return O}()})})]}),!!v&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},R)})]})})}},17370:function(T,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(89005),a=n(35840),t=n(25328),o=n(72253),f=n(36036),b=n(73379),y=n(98595),B=["id","amount","lineDisplay","onClick"];function k(p,N){if(p==null)return{};var V={};for(var S in p)if({}.hasOwnProperty.call(p,S)){if(N.includes(S))continue;V[S]=p[S]}return V}var g=2e3,i={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function p(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.linked;return A?(0,e.createComponentVNode)(2,y.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,y.Window.Content,{className:"Exofab",children:[(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)}),w&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,u)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,s)})]})})]})]})}):(0,e.createComponentVNode)(2,h)}return p}(),m=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.materials,A=L.capacity,x=Object.values(w).reduce(function(E,P){return E+P},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,f.Box,{color:"label",mt:"0.25rem",children:[(x/A*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(E){return(0,e.createComponentVNode)(2,d,{mt:-2,id:E,bold:E==="metal"||E==="glass",onClick:function(){function P(){return I("withdraw",{id:E})}return P}()},E)})})},l=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.curCategory,A=L.categories,x=L.designs,E=L.syncing,P=(0,o.useLocalState)(V,"searchText",""),D=P[0],M=P[1],R=(0,t.createSearch)(D,function(z){return z.name}),O=x.filter(R),F=(0,o.useLocalState)(V,"levelsModal",!1),_=F[0],U=F[1];return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,f.Dropdown,{width:"19rem",className:"Exofab__dropdown",selected:w,options:A,onSelected:function(){function z($){return I("category",{cat:$})}return z}()}),buttons:(0,e.createComponentVNode)(2,f.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,f.Button,{icon:"plus",content:"Queue all",onClick:function(){function z(){return I("queueall")}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"info",content:"Show current tech levels",onClick:function(){function z(){return U(!0)}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"unlink",color:"red",tooltip:"Disconnect from R&D network",onClick:function(){function z(){return I("unlink")}return z}()})]}),children:[(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function z($,G){return M(G)}return z}()}),O.map(function(z){return(0,e.createComponentVNode)(2,C,{design:z},z.id)}),O.length===0&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No designs found."})]})},u=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.buildStart,x=L.buildEnd,E=L.worldTime;return(0,e.createComponentVNode)(2,f.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:A,current:E,end:x,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:["Building ",w,"\xA0(",(0,e.createComponentVNode)(2,b.Countdown,{current:E,timeLeft:x-E,format:function(){function P(D,M){return M.substr(3)}return P}()}),")"]})]})})})},s=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.queue,A=L.processingQueue,x=Object.entries(L.queueDeficit).filter(function(P){return P[1]<0}),E=w.reduce(function(P,D){return P+D.time},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Button,{selected:A,icon:A?"toggle-on":"toggle-off",content:"Process",onClick:function(){function P(){return I("process")}return P}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:w.length===0,icon:"eraser",content:"Clear",onClick:function(){function P(){return I("unqueueall")}return P}()})]}),children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:w.length===0?(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:w.map(function(P,D){return(0,e.createComponentVNode)(2,f.Box,{color:P.notEnough&&"bad",children:[D+1,". ",P.name,D>0&&(0,e.createComponentVNode)(2,f.Button,{icon:"arrow-up",onClick:function(){function M(){return I("queueswap",{from:D+1,to:D})}return M}()}),D0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,f.Divider),"Processing time:",(0,e.createComponentVNode)(2,f.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,bold:!0,children:new Date(E/10*1e3).toISOString().substr(14,5)})]}),Object.keys(x).length>0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,f.Divider),"Lacking materials to complete:",x.map(function(P){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:P[0],amount:-P[1],lineDisplay:!0})},P[0])})]})],0)})})},d=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=N.id,A=N.amount,x=N.lineDisplay,E=N.onClick,P=k(N,B),D=L.materials[w]||0,M=A||D;if(!(M<=0&&!(w==="metal"||w==="glass"))){var R=A&&A>D;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",x&&"Exofab__material--line"])},P,{children:x?(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:(0,a.classes)(["materials32x32",w])}),(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__material--amount",color:R&&"bad",ml:0,mr:1,children:M.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,f.Button,{width:"85%",color:"transparent",onClick:E,children:(0,e.createComponentVNode)(2,f.Box,{mt:1,className:(0,a.classes)(["materials32x32",w])})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--name",children:w}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--amount",children:[M.toLocaleString("en-US")," cm\xB3 (",Math.round(M/g*10)/10," ","sheets)"]})]})],4)})))}},C=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=N.design;return(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,f.Button,{disabled:w.notEnough||L.building,icon:"cog",content:w.name,onClick:function(){function A(){return I("build",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"plus-circle",onClick:function(){function A(){return I("queue",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design--cost",children:Object.entries(w.cost).map(function(A){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:A[0],amount:A[1],lineDisplay:!0})},A[0])})}),(0,e.createComponentVNode)(2,f.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"clock"}),w.time>0?(0,e.createFragment)([w.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})},h=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.controllers;return(0,e.createComponentVNode)(2,y.Window,{children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Link"})]}),w.map(function(A){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.addr}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.net_id}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{content:"Link",icon:"link",onClick:function(){function x(){return I("linktonetworkcontroller",{target_controller:A.addr})}return x}()})})]},A.addr)})]})})})})},v=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.tech_levels,A=(0,o.useLocalState)(V,"levelsModal",!1),x=A[0],E=A[1];return x?(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:(0,e.createComponentVNode)(2,f.Section,{title:"Current tech levels",buttons:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function P(){E(!1)}return P}()}),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:w.map(function(P){var D=P.name,M=P.level;return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:D,children:M},D)})})})}):null}},59128:function(T,r,n){"use strict";r.__esModule=!0,r.ExperimentConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),b=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),y=r.ExperimentConsole=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.open,u=m.feedback,s=m.occupant,d=m.occupant_name,C=m.occupant_status,h=function(){function p(){if(!s)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var N=function(){function S(){return f.get(C)}return S}(),V=N();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V.color,children:V.text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Experiments",children:[0,1,2].map(function(S){return(0,e.createComponentVNode)(2,t.Button,{icon:b.get(S).icon,content:b.get(S).label,onClick:function(){function I(){return c("experiment",{experiment_type:S})}return I}()},S)})})]})}return p}(),v=h();return(0,e.createComponentVNode)(2,o.Window,{theme:"abductor",width:350,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:u})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){function p(){return c("door")}return p}()}),children:v})]})})}return B}()},97086:function(T,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=0,b=1013,y=function(g){var i="good",c=80,m=95,l=110,u=120;return gl?i="average":g>u&&(i="bad"),i},B=r.ExternalAirlockController=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.chamber_pressure,s=l.exterior_status,d=l.interior_status,C=l.processing;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:205,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:y(u),value:u,minValue:f,maxValue:b,children:[u," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!C,onClick:function(){function h(){return m("abort")}return h}()}),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:C,onClick:function(){function h(){return m("cycle_ext")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:C,onClick:function(){function h(){return m("cycle_int")}return h}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:d==="open"?"red":C?"yellow":null,onClick:function(){function h(){return m("force_ext")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:d==="open"?"red":C?"yellow":null,onClick:function(){function h(){return m("force_int")}return h}()})]})]})]})})}return k}()},96142:function(T,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.FaxMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:295,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.scan_name?"eject":"id-card",selected:i.scan_name,content:i.scan_name?i.scan_name:"-----",tooltip:i.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return g("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,disabled:i.nologin,content:i.realauth?"Log Out":"Log In",onClick:function(){function c(){return g("auth")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:i.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i.paper?"eject":"paperclip",disabled:!i.authenticated&&!i.paper,content:i.paper?i.paper:"-----",onClick:function(){function c(){return g("paper")}return c}()}),!!i.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return g("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:i.destination?i.destination:"-----",disabled:!i.authenticated,onClick:function(){function c(){return g("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:i.sendError?i.sendError:"Send",disabled:!i.paper||!i.destination||!i.authenticated||i.sendError,onClick:function(){function c(){return g("send")}return c}()})})]})})]})})}return b}()},74123:function(T,r,n){"use strict";r.__esModule=!0,r.FilingCabinet=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.FilingCabinet=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=k.config,m=i.contents,l=c.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Contents",children:[!m&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"folder-open",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"The ",l," is empty."]})}),!!m&&m.slice().map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:u.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){function s(){return g("retrieve",{index:u.index})}return s}()})})]},u)})]})})})})}return b}()},83767:function(T,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=k.icon_state,u=k.direction,s=k.isSelected,d=k.onSelect;return(0,e.createComponentVNode)(2,t.DmIcon,{icon:m.icon,icon_state:l,direction:u,onClick:d,style:{"border-style":s&&"solid"||"none","border-width":"2px","border-color":"orange",padding:s&&"0px"||"2px"}})},b={NORTH:1,SOUTH:2,EAST:4,WEST:8},y=r.FloorPainter=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.availableStyles,u=m.selectedStyle,s=m.selectedDir;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function d(){return c("cycle_style",{offset:-1})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:l,selected:u,width:"150px",nochevron:!0,onSelected:function(){function d(C){return c("select_style",{style:C})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function d(){return c("cycle_style",{offset:1})}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:l.map(function(d){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,f,{icon_state:d,isSelected:u===d,onSelect:function(){function C(){return c("select_style",{style:d})}return C}()})},d)})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:[b.NORTH,null,b.SOUTH].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[d+b.WEST,d,d+b.EAST].map(function(C){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:C===null?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,f,{icon_state:u,direction:C,isSelected:C===s,onSelect:function(){function h(){return c("select_direction",{direction:C})}return h}()})},C)})},d)})})})})]})})})}return B}()},53424:function(T,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=function(l){return l?"("+l.join(", ")+")":"ERROR"},y=function(l,u){if(!(!l||!u)){if(l[2]!==u[2])return null;var s=Math.atan2(u[1]-l[1],u[0]-l[0]),d=Math.sqrt(Math.pow(u[1]-l[1],2)+Math.pow(u[0]-l[0],2));return{angle:(0,a.rad2deg)(s),distance:d}}},B=r.GPS=function(){function m(l,u){var s=(0,t.useBackend)(u),d=s.data,C=d.emped,h=d.active,v=d.area,p=d.position,N=d.saved;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:C?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,k,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,g)}),h?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{area:v,position:p})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{title:"Saved Position",position:N})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,c,{height:"100%"})})],0):(0,e.createComponentVNode)(2,k)],0)})})})}return m}(),k=function(l,u){var s=l.emp;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:s?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),s?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},g=function(l,u){var s=(0,t.useBackend)(u),d=s.act,C=s.data,h=C.active,v=C.tag,p=C.same_z,N=(0,t.useLocalState)(u,"newTag",v),V=N[0],S=N[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function I(){return d("toggle")}return I}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:v,onEnter:function(){function I(){return d("tag",{newtag:V})}return I}(),onInput:function(){function I(L,w){return S(w)}return I}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:v===V,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function I(){return d("tag",{newtag:V})}return I}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!p,icon:p?"compress":"expand",content:p?"Local Sector":"Global",onClick:function(){function I(){return d("same_z")}return I}()})})]})})},i=function(l,u){var s=l.title,d=l.area,C=l.position;return(0,e.createComponentVNode)(2,o.Section,{title:s||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[d&&(0,e.createFragment)([d,(0,e.createVNode)(1,"br")],0),b(C)]})})},c=function(l,u){var s=(0,t.useBackend)(u),d=s.data,C=d.position,h=d.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},l,{children:(0,e.createComponentVNode)(2,o.Table,{children:h.map(function(v){return Object.assign({},v,y(C,v.position))}).map(function(v,p){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:p%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:v.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:v.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:v.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(v.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:v.distance>0?"arrow-right":"circle",rotation:-v.angle}),"\xA0",Math.floor(v.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:b(v.position)})]},p)})})})))}},89124:function(T,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(3939),f=n(98595),b=r.GeneModder=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.has_seed;return(0,e.createComponentVNode)(2,f.Window,{width:950,height:650,children:[(0,e.createVNode)(1,"div","GeneModder__left",(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,l,{scrollable:!0})}),2),(0,e.createVNode)(1,"div","GeneModder__right",(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,o.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),v===0?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})}),2)]})}return u}(),y=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})},B=function(s,d){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},k=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.has_seed,N=v.seed,V=v.has_disk,S=v.disk,I,L;return p?I=(0,e.createComponentVNode)(2,t.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+N.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:N.name,onClick:function(){function w(){return h("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return h("variant_name")}return w}()})]}):I=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:"None",onClick:function(){function w(){return h("eject_seed")}return w}()})}),V?L=S.name:L="None",(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plant Sample",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:L,tooltip:"Select Empty Disk",onClick:function(){function w(){return h("select_empty_disk")}return w}()})})})]})})},g=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.disk,N=v.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:[N.map(function(V){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:V.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function S(){return h("extract",{id:V.id})}return S}()})})]},V)})," ",(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract All",disabled:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function V(){return h("bulk_extract_core")}return V}()})})})]},"Core Genes")},i=function(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.reagent_genes,p=h.has_reagent;return(0,e.createComponentVNode)(2,m,{title:"Reagent Genes",gene_set:v,do_we_show:p})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.trait_genes,p=h.has_trait;return(0,e.createComponentVNode)(2,m,{title:"Trait Genes",gene_set:v,do_we_show:p})},m=function(s,d){var C=s.title,h=s.gene_set,v=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.data,S=V.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:C,open:!0,children:v?h.map(function(I){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:I.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(S!=null&&S.can_extract),icon:"save",onClick:function(){function L(){return N("extract",{id:I.id})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return N("remove",{id:I.id})}return L}()})})]},I)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},C)},l=function(s,d){var C=s.title,h=s.gene_set,v=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.data,S=V.has_seed,I=V.empty_disks,L=V.stat_disks,w=V.trait_disks,A=V.reagent_disks;return(0,e.createComponentVNode)(2,t.Section,{title:"Disks",children:[(0,e.createVNode)(1,"br"),"Empty Disks: ",I,(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){function x(){return N("eject_empty_disk")}return x}()}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stats",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[L.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[x.stat==="All"?(0,e.createComponentVNode)(2,t.Button,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(x!=null&&x.ready)||!S,icon:"arrow-circle-down",onClick:function(){function E(){return N("bulk_replace_core",{index:x.index})}return E}()}):(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!x||!S,content:"Replace",onClick:function(){function E(){return N("replace",{index:x.index,stat:x.stat})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return N("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Traits",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[w.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){function E(){return N("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return N("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Reagents",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[A.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){function E(){return N("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return N("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})})]})]})}},73053:function(T,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(89005),a=n(36036),t=n(98595),o=n(41874),f=r.GenericCrewManifest=function(){function b(y,B){return(0,e.createComponentVNode)(2,t.Window,{theme:"nologo",width:588,height:510,children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return b}()},42914:function(T,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.GhostHudPanel=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.data,c=i.security,m=i.medical,l=i.diagnostic,u=i.radioactivity,s=i.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:207,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,b,{label:"Medical",type:"medical",is_active:m}),(0,e.createComponentVNode)(2,b,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,b,{label:"Diagnostic",type:"diagnostic",is_active:l}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Radioactivity",type:"radioactivity",is_active:u,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Antag HUD",is_active:s,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=B.label,m=B.type,l=m===void 0?null:m,u=B.is_active,s=B.act_on,d=s===void 0?"hud_on":s,C=B.act_off,h=C===void 0?"hud_off":C;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:u?"On":"Off",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){function v(){return i(u?h:d,{hud_type:l})}return v}()})})]})}},25825:function(T,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.GlandDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.glands,m=c===void 0?[]:c;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(l){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:l.color,content:l.amount||"0",disabled:!l.amount,onClick:function(){function u(){return g("dispense",{gland_id:l.id})}return u}()},l.id)})})})})}return b}()},10270:function(T,r,n){"use strict";r.__esModule=!0,r.GravityGen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.GravityGen=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.charging_state,m=i.charge_count,l=i.breaker,u=i.ext_power,s=function(){function C(h){return h>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",h===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:u?"good":"bad",children:["[ ",u?"Powered":"Unpowered"," ]"]})}return C}(),d=function(){function C(h){if(h>0)return(0,e.createComponentVNode)(2,t.NoticeBox,{danger:!0,p:1.5,children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}return C}();return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[d(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l?"power-off":"times",content:l?"Online":"Offline",color:l?"green":"red",px:1.5,onClick:function(){function C(){return g("breaker")}return C}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:u?"good":"bad",children:s(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:m/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}return b}()},48657:function(T,r,n){"use strict";r.__esModule=!0,r.GuestPass=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(49148),b=r.GuestPass=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:690,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){function m(){return i("mode",{mode:0})}return m}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function m(){return i("mode",{mode:1})}return m}(),children:["Records (",c.issue_log.length,")"]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function m(){return i("scan")}return m}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!c.showlogs&&(0,e.createComponentVNode)(2,t.Section,{title:"Issue Guest Pass",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Issue To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){function m(){return i("giv_name")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reason",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){function m(){return i("reason")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){function m(){return i("duration")}return m}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function m(){return i("issue")}return m}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function m(l){return i("access",{access:l})}return m}(),grantAll:function(){function m(){return i("grant_all")}return m}(),denyAll:function(){function m(){return i("clear_all")}return m}(),grantDep:function(){function m(l){return i("grant_region",{region:l})}return m}(),denyDep:function(){function m(l){return i("deny_region",{region:l})}return m}()})}):(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card",size:5,color:"gray",mb:5}),(0,e.createVNode)(1,"br"),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){function m(){return i("print")}return m}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(m,l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:m},l)})})||(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No logs"]})})})})]})})})}return y}()},67834:function(T,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=[1,5,10,20,30,50],b=null,y=r.HandheldChemDispenser=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:390,height:430,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return g}(),B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.amount,d=u.energy,C=u.maxEnergy,h=u.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:d,minValue:0,maxValue:C,ranges:{good:[C*.5,1/0],average:[C*.25,C*.5],bad:[-1/0,C*.25]},children:[d," / ",C," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:f.map(function(v,p){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:s===v,content:v,onClick:function(){function N(){return l("amount",{amount:v})}return N}()})},p)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"dispense"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"remove"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"isolate"})}return v}()})]})})]})})})},k=function(i,c){for(var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.chemicals,d=s===void 0?[]:s,C=u.current_reagent,h=[],v=0;v<(d.length+1)%3;v++)h.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:u.glass?"Drink Selector":"Chemical Selector",children:[d.map(function(p,N){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:C===p.id,content:p.title,style:{"margin-left":"2px"},onClick:function(){function V(){return l("dispense",{reagent:p.id})}return V}()},N)}),h.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},N)})]})})}},46098:function(T,r,n){"use strict";r.__esModule=!0,r.HealthSensor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.HealthSensor=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.act,m=i.data,l=m.on,u=m.user_health,s=m.minHealth,d=m.maxHealth,C=m.alarm_health;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanning",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",content:l?"On":"Off",color:l?null:"red",selected:l,onClick:function(){function h(){return c("scan_toggle")}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health activation",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:s,maxValue:d,value:C,format:function(){function h(v){return(0,a.toFixed)(v,1)}return h}(),width:"80px",onDrag:function(){function h(v,p){return c("alarm_health",{alarm_health:p})}return h}()})}),u!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:y(u),bold:u>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:u})})})]})})})})}return B}(),y=function(k){return k>50?"green":k>0?"orange":"red"}},36771:function(T,r,n){"use strict";r.__esModule=!0,r.Holodeck=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Holodeck=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=(0,a.useLocalState)(k,"currentDeck",""),l=m[0],u=m[1],s=(0,a.useLocalState)(k,"showReload",!1),d=s[0],C=s[1],h=c.decks,v=c.ai_override,p=c.emagged,N=function(){function V(S){i("select_deck",{deck:S}),u(S),C(!0),setTimeout(function(){C(!1)},3e3)}return V}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[d&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Holodeck Control System",children:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",l]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[h.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:V,selected:V===l,onClick:function(){function S(){return N(V)}return S}()},V)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!v&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){function V(){return i("ai_override")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:p?"bad":"good",children:[p?"Off":"On",!!p&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function V(){return i("wildlifecarp")}return V}()})]})})]})]})})]})})]})}return y}(),b=function(B,k){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"white",children:(0,e.createVNode)(1,"h1",null,"\xA0Recalibrating projection apparatus.\xA0",16)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,"Please, wait for 3 seconds.",16)})]})}},25471:function(T,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.Instrument=function(){function i(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,g)]})})]})}return i}(),y=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.help;if(d)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function C(){return u("help")}return C}()})]})})})},B=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.lines,C=s.playing,h=s.repeat,v=s.maxRepeats,p=s.tempo,N=s.minTempo,V=s.maxTempo,S=s.tickLag,I=s.volume,L=s.minVolume,w=s.maxVolume,A=s.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function x(){return u("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return u("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return u("import")}return x}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:C,disabled:d.length===0||h<0,icon:"play",content:"Play",onClick:function(){function x(){return u("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C,icon:"stop",content:"Stop",onClick:function(){function x(){return u("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:v,value:h,stepPixelSize:59,onChange:function(){function x(E,P){return u("repeat",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:p>=V,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p+S})}return x}()}),(0,a.round)(600/p)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:p<=N,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p-S})}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:w,value:I,stepPixelSize:6,onDrag:function(){function x(E,P){return u("setvolume",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,k)]})},k=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.allowedInstrumentNames,C=s.instrumentLoaded,h=s.instrument,v=s.canNoteShift,p=s.noteShift,N=s.noteShiftMin,V=s.noteShiftMax,S=s.sustainMode,I=s.sustainLinearDuration,L=s.sustainExponentialDropoff,w=s.legacy,A=s.sustainDropoffVolume,x=s.sustainHeldNote,E,P;return S===1?(E="Linear",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:I,step:.5,stepPixelSize:85,format:function(){function D(M){return(0,a.round)(M*100)/100+" seconds"}return D}(),onChange:function(){function D(M,R){return u("setlinearfalloff",{new:R/10})}return D}()})):S===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function D(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return D}(),onChange:function(){function D(M,R){return u("setexpfalloff",{new:R})}return D}()})),d.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:w?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:C?(0,e.createComponentVNode)(2,o.Dropdown,{options:d,selected:h,width:"50%",onSelected:function(){function D(M){return u("switchinstrument",{name:M})}return D}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&v)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:N,maxValue:V,value:p,stepPixelSize:2,format:function(){function D(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return D}(),onChange:function(){function D(M,R){return u("setnoteshift",{new:R})}return D}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,mb:"0.4rem",onSelected:function(){function D(M){return u("setsustainmode",{new:M})}return D}()}),P]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function D(M,R){return u("setdropoffvolume",{new:R})}return D}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){function D(){return u("togglesustainhold")}return D}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function D(){return u("reset")}return D}()})]})})})},g=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.playing,C=s.lines,h=s.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!h||d,icon:"plus",content:"Add Line",onClick:function(){function v(){return u("newline",{line:C.length+1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"chevron-up":"chevron-down",onClick:function(){function v(){return u("edit")}return v}()})],4),children:!!h&&(C.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:C.map(function(v,p){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:p+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"pen",onClick:function(){function N(){return u("modifyline",{line:p+1})}return N}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"trash",onClick:function(){function N(){return u("deleteline",{line:p+1})}return N}()})],4),children:v},p)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},13618:function(T,r,n){"use strict";r.__esModule=!0,r.KeyComboModal=void 0;var e=n(89005),a=n(70611),t=n(72253),o=n(36036),f=n(98595),b=n(19203),y=n(51057),B=function(l){return l.key!==a.KEY.Alt&&l.key!==a.KEY.Control&&l.key!==a.KEY.Shift&&l.key!==a.KEY.Escape},k={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},g=3,i=function(l){var u="";if(l.altKey&&(u+="Alt"),l.ctrlKey&&(u+="Ctrl"),l.shiftKey&&!(l.keyCode>=48&&l.keyCode<=57)&&(u+="Shift"),l.location===g&&(u+="Numpad"),B(l))if(l.shiftKey&&l.keyCode>=48&&l.keyCode<=57){var s=l.keyCode-48;u+="Shift"+s}else{var d=l.key.toUpperCase();u+=k[d]||d}return u},c=r.KeyComboModal=function(){function m(l,u){var s=(0,t.useBackend)(u),d=s.act,C=s.data,h=C.init_value,v=C.large_buttons,p=C.message,N=p===void 0?"":p,V=C.title,S=C.timeout,I=(0,t.useLocalState)(u,"input",h),L=I[0],w=I[1],A=(0,t.useLocalState)(u,"binding",!0),x=A[0],E=A[1],P=function(){function R(O){if(!x){O.key===a.KEY.Enter&&d("submit",{entry:L}),(0,a.isEscape)(O.key)&&d("cancel");return}if(O.preventDefault(),B(O)){D(i(O)),E(!1);return}else if(O.key===a.KEY.Escape){D(h),E(!1);return}}return R}(),D=function(){function R(O){O!==L&&w(O)}return R}(),M=130+(N.length>30?Math.ceil(N.length/3):0)+(N.length&&v?5:0);return(0,e.createComponentVNode)(2,f.Window,{title:V,width:240,height:M,children:[S&&(0,e.createComponentVNode)(2,y.Loader,{value:S}),(0,e.createComponentVNode)(2,f.Window.Content,{onKeyDown:function(){function R(O){P(O)}return R}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:N})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:x,content:x&&x!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function R(){D(h),E(!0)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,b.InputButtons,{input:L})})]})]})})]})}return m}()},35655:function(T,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.KeycardAuth=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!i.swiping&&!i.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!i.redAvailable,onClick:function(){function l(){return g("triggerevent",{triggerevent:"Red Alert"})}return l}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Emergency Response Team"})}return l}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return l}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return l}(),content:"Revoke"})]})]})})]})});var m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!i.hasSwiped&&!i.ertreason&&i.event==="Emergency Response Team"?m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):i.hasConfirm?m=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):i.isRemote?m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):i.hasSwiped&&(m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,i.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:i.ertreason?"":"red",icon:i.ertreason?"check":"pencil-alt",content:i.ertreason?i.ertreason:"-----",disabled:i.busy,onClick:function(){function l(){return g("ert")}return l}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:i.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:i.busy||i.hasConfirm,onClick:function(){function l(){return g("reset")}return l}()}),children:m})]})})}return b}()},62955:function(T,r,n){"use strict";r.__esModule=!0,r.KitchenMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(62411),b=r.KitchenMachine=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.data,m=i.config,l=c.ingredients,u=c.operating,s=m.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:u,name:s}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,e.createComponentVNode)(2,t.Table,{className:"Ingredient__Table",children:l.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{tr:5,children:[(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:d.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[d.amount," ",d.units]}),2)]},d.name)})})})})]})})})}return B}(),y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.inactive,u=m.tooltip;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?u:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){function s(){return c("cook")}return s}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?u:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){function s(){return c("eject")}return s}()})})]})})}},9525:function(T,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.LawManager=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.isAdmin,s=l.isSlaved,d=l.isMalf,C=l.isAIMalf,h=l.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:d?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(u&&s)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",s,"."]}),!!(d||C)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:h===0,onClick:function(){function v(){return m("set_view",{set_view:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:h===1,onClick:function(){function v(){return m("set_view",{set_view:1})}return v}()})]}),h===0&&(0,e.createComponentVNode)(2,b),h===1&&(0,e.createComponentVNode)(2,y)]})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.has_zeroth_laws,s=l.zeroth_laws,d=l.has_ion_laws,C=l.ion_laws,h=l.ion_law_nr,v=l.has_inherent_laws,p=l.inherent_laws,N=l.has_supplied_laws,V=l.supplied_laws,S=l.channels,I=l.channel,L=l.isMalf,w=l.isAdmin,A=l.zeroth_law,x=l.ion_law,E=l.inherent_law,P=l.supplied_law,D=l.supplied_law_position;return(0,e.createFragment)([!!u&&(0,e.createComponentVNode)(2,B,{title:"ERR_NULL_VALUE",laws:s,ctx:i}),!!d&&(0,e.createComponentVNode)(2,B,{title:h,laws:C,ctx:i}),!!v&&(0,e.createComponentVNode)(2,B,{title:"Inherent",laws:p,ctx:i}),!!N&&(0,e.createComponentVNode)(2,B,{title:"Supplied",laws:V,ctx:i}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:S.map(function(M){return(0,e.createComponentVNode)(2,t.Button,{content:M.channel,selected:M.channel===I,onClick:function(){function R(){return m("law_channel",{law_channel:M.channel})}return R}()},M.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function M(){return m("state_laws")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function M(){return m("notify_laws")}return M}()})})]})}),!!L&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(w&&!u)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_zeroth_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_ion_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_inherent_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:P}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:D,onClick:function(){function M(){return m("change_supplied_law_position")}return M}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_supplied_law")}return M}()})]})]})]})})],0)},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name+" - "+s.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function d(){return m("transfer_laws",{transfer_laws:s.ref})}return d}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.laws.has_ion_laws>0&&s.laws.ion_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_zeroth_laws>0&&s.laws.zeroth_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_inherent_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_supplied_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)})]})},s.name)})})},B=function(g,i){var c=(0,a.useBackend)(g.ctx),m=c.act,l=c.data,u=l.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:g.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),g.laws.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:s.state?"Yes":"No",selected:s.state,onClick:function(){function d(){return m("state_law",{ref:s.ref,state_law:s.state?0:1})}return d}()}),!!u&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function d(){return m("edit_law",{edit_law:s.ref})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function d(){return m("delete_law",{delete_law:s.ref})}return d}()})],4)]})]},s.law)})]})})}},85066:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=r.LibraryComputer=function(){function h(v,p){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return h}(),y=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:I.summary}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!I.isProgrammatic&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Categories",children:I.categories.join(", ")})]}),(0,e.createVNode)(1,"br"),L===I.ckey&&(0,e.createComponentVNode)(2,t.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return V("delete_book",{bookid:I.id,user_ckey:L})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Report Book",icon:"flag",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,f.modalOpen)(p,"report_book",{bookid:I.id})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,f.modalOpen)(p,"rate_info",{bookid:I.id})}return w}()})]})},B=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=v.args,L=S.selected_report,w=S.report_categories,A=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reasons",children:(0,e.createComponentVNode)(2,t.Box,{children:w.map(function(x,E){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:x.category_id===L,onClick:function(){function P(){return V("set_report",{report_type:x.category_id})}return P}()}),(0,e.createVNode)(1,"br")],4,E)})})})]}),(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){function x(){return V("submit_report",{bookid:I.id,user_ckey:A})}return x}()})]})},k=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.selected_rating,L=Array(10).fill().map(function(w,A){return 1+A});return(0,e.createComponentVNode)(2,t.Stack,{children:[L.map(function(w,A){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{bold:!0,icon:"star",color:I>=w?"caution":"default",onClick:function(){function x(){return V("set_rating",{rating_value:w})}return x}()})},A)}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,ml:2,fontSize:"150%",children:[I+"/10",(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},g=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.current_rating?I.current_rating:0,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Ratings",children:I.total_ratings?I.total_ratings:0})]}),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,t.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){function w(){return V("rate_book",{bookid:I.id,user_ckey:L})}return w}()})]})},i=function(v,p){var N=(0,a.useBackend)(p),V=N.data,S=(0,a.useLocalState)(p,"tabIndex",0),I=S[0],L=S[1],w=V.login_state;return(0,e.createComponentVNode)(2,t.Stack.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===0,onClick:function(){function A(){return L(0)}return A}(),children:"Book Archives"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===1,onClick:function(){function A(){return L(1)}return A}(),children:"Corporate Literature"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===2,onClick:function(){function A(){return L(2)}return A}(),children:"Upload Book"}),w===1&&(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===3,onClick:function(){function A(){return L(3)}return A}(),children:"Patron Manager"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===4,onClick:function(){function A(){return L(4)}return A}(),children:"Inventory"})]})})},c=function(v,p){var N=(0,a.useLocalState)(p,"tabIndex",0),V=N[0];switch(V){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,u);case 2:return(0,e.createComponentVNode)(2,s);case 3:return(0,e.createComponentVNode)(2,d);case 4:return(0,e.createComponentVNode)(2,C);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.searchcontent,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.title||"Input Title",onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.author||"Input Author",onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Ratings",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:1,width:"min-content",content:I.ratingmin,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_ratingmin")}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:"To"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:1,width:"min-content",content:I.ratingmax,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_ratingmax")}return x}()})})]})})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Dropdown,{mt:.6,width:"190px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_search_category",{category_id:A[E]})}return x}()})})})}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_search_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Search",icon:"eraser",onClick:function(){function x(){return V("clear_search")}return x}()}),I.ckey?(0,e.createComponentVNode)(2,t.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){function x(){return V("clear_ckey_search")}return x}()}):(0,e.createComponentVNode)(2,t.Button,{content:"Find My Books",icon:"search",onClick:function(){function x(){return V("find_users_books",{user_ckey:w})}return x}()})]})]})},l=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.external_booklist,L=S.archive_pagenumber,w=S.num_pages,A=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpagemax")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{bold:!0,content:L,onClick:function(){function x(){return(0,f.modalOpen)(p,"setpagenumber")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",disabled:L===w,onClick:function(){function x(){return V("incrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",disabled:L===w,onClick:function(){function x(){return V("incrementpagemax")}return x}()})],4),children:[(0,e.createComponentVNode)(2,m),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ratings"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Category"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(x){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:.5}),x.title.length>45?x.title.substr(0,45)+"...":x.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:x.author.length>30?x.author.substr(0,30)+"...":x.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[x.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.categories.join(", ").substr(0,45)}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[A===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function E(){return V("order_external_book",{bookid:x.id})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function E(){return(0,f.modalOpen)(p,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},u=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.programmatic_booklist,L=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(w,A){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:2}),w.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[L===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function x(){return V("order_programmatic_book",{bookid:w.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function x(){return(0,f.modalOpen)(p,"expand_info",{bookid:w.id})}return x}()})]})]},A)})]})})},s=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.selectedbook,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:I.copyright,content:"Upload Book",onClick:function(){function x(){return V("uploadbook",{user_ckey:w})}return x}()}),children:[I.copyright?(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.title,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_selected_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.author,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_selected_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"240px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_upload_category",{category_id:A[E]})}return x}()})})})]}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,disabled:I.copyright,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_upload_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:75,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",disabled:I.copyright,content:"Edit Summary",onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:I.summary})]})})]})]})},d=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.checkout_data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Patron"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-tag"}),L.patron_name]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.timeleft>=0?L.timeleft:"LATE"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:(0,e.createComponentVNode)(2,t.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:L.timeleft>=0,onClick:function(){function A(){return V("reportlost",{libraryid:L.libraryid})}return A}()})})]},w)})]})})},C=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.inventory_list;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"LIB ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.libraryid}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"})," ",L.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.checked_out?"Checked Out":"Available"})]},w)})]})})};(0,f.modalRegisterBodyOverride)("expand_info",y),(0,f.modalRegisterBodyOverride)("report_book",B),(0,f.modalRegisterBodyOverride)("rate_info",g)},9516:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=r.LibraryManager=function(){function i(c,m){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return i}(),y=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.pagestate;switch(d){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,g);case 3:return(0,e.createComponentVNode)(2,k);default:return"WE SHOULDN'T BE HERE!"}},B=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ssid_delete")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_delete")}return d}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_search")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function d(){return u("view_reported_books")}return d}()})]})},k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.reports;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"All Reported Books",(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function C(){return u("return")}return C}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Uploader CKEY"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Report Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reporter Ckey"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:C.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),C.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:C.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:C.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:C.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function h(){return u("delete_book",{bookid:C.id})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function h(){return u("unflag_book",{bookid:C.id})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function h(){return u("view_book",{bookid:C.id})}return h}()})]})]},C.id)})]})})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.ckey,C=s.booklist;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"Books uploaded by ",d,(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function h(){return u("return")}return h}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),C.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),h.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:h.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){function v(){return u("delete_book",{bookid:h.id})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function v(){return u("view_book",{bookid:h.id})}return v}()})]})]},h.id)})]})})}},90447:function(T,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),f=n(72253),b=n(92986),y=n(98595),B=r.ListInputModal=function(){function i(c,m){var l=(0,f.useBackend)(m),u=l.act,s=l.data,d=s.items,C=d===void 0?[]:d,h=s.message,v=h===void 0?"":h,p=s.init_value,N=s.timeout,V=s.title,S=(0,f.useLocalState)(m,"selected",C.indexOf(p)),I=S[0],L=S[1],w=(0,f.useLocalState)(m,"searchBarVisible",C.length>10),A=w[0],x=w[1],E=(0,f.useLocalState)(m,"searchQuery",""),P=E[0],D=E[1],M=function(){function G(X){var J=z.length-1;if(X===b.KEY_DOWN)if(I===null||I===J){var se;L(0),(se=document.getElementById("0"))==null||se.scrollIntoView()}else{var ie;L(I+1),(ie=document.getElementById((I+1).toString()))==null||ie.scrollIntoView()}else if(X===b.KEY_UP)if(I===null||I===0){var me;L(J),(me=document.getElementById(J.toString()))==null||me.scrollIntoView()}else{var q;L(I-1),(q=document.getElementById((I-1).toString()))==null||q.scrollIntoView()}}return G}(),R=function(){function G(X){X!==I&&L(X)}return G}(),O=function(){function G(){x(!1),x(!0)}return G}(),F=function(){function G(X){var J=String.fromCharCode(X),se=C.find(function(q){return q==null?void 0:q.toLowerCase().startsWith(J==null?void 0:J.toLowerCase())});if(se){var ie,me=C.indexOf(se);L(me),(ie=document.getElementById(me.toString()))==null||ie.scrollIntoView()}}return G}(),_=function(){function G(X){var J;X!==P&&(D(X),L(0),(J=document.getElementById("0"))==null||J.scrollIntoView())}return G}(),U=function(){function G(){x(!A),D("")}return G}(),z=C.filter(function(G){return G==null?void 0:G.toLowerCase().includes(P.toLowerCase())}),$=330+Math.ceil(v.length/3);return A||setTimeout(function(){var G;return(G=document.getElementById(I.toString()))==null?void 0:G.focus()},1),(0,e.createComponentVNode)(2,y.Window,{title:V,width:325,height:$,children:[N&&(0,e.createComponentVNode)(2,a.Loader,{value:N}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function G(X){var J=window.event?X.which:X.keyCode;(J===b.KEY_DOWN||J===b.KEY_UP)&&(X.preventDefault(),M(J)),J===b.KEY_ENTER&&(X.preventDefault(),u("submit",{entry:z[I]})),!A&&J>=b.KEY_A&&J<=b.KEY_Z&&(X.preventDefault(),F(J)),J===b.KEY_ESCAPE&&(X.preventDefault(),u("cancel"))}return G}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function G(){return U()}return G}()}),className:"ListInput__Section",fill:!0,title:v,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k,{filteredItems:z,onClick:R,onFocusSearch:O,searchBarVisible:A,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,g,{filteredItems:z,onSearch:_,searchQuery:P,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:z[I]})})]})})})]})}return i}(),k=function(c,m){var l=(0,f.useBackend)(m),u=l.act,s=c.filteredItems,d=c.onClick,C=c.onFocusSearch,h=c.searchBarVisible,v=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:s.map(function(p,N){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:N,onClick:function(){function V(){return d(N)}return V}(),onDblClick:function(){function V(S){S.preventDefault(),u("submit",{entry:s[v]})}return V}(),onKeyDown:function(){function V(S){var I=window.event?S.which:S.keyCode;h&&I>=b.KEY_A&&I<=b.KEY_Z&&(S.preventDefault(),C())}return V}(),selected:N===v,style:{animation:"none",transition:"none"},children:p.replace(/^\w/,function(V){return V.toUpperCase()})},N)})})},g=function(c,m){var l=(0,f.useBackend)(m),u=l.act,s=c.filteredItems,d=c.onSearch,C=c.searchQuery,h=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function v(p){p.preventDefault(),u("submit",{entry:s[h]})}return v}(),onInput:function(){function v(p,N){return d(N)}return v}(),placeholder:"Search...",value:C})}},26826:function(T,r,n){"use strict";r.__esModule=!0,r.Loadout=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b={Default:function(){function c(m,l){return m.gear.gear_tier-l.gear.gear_tier}return c}(),Alphabetical:function(){function c(m,l){return m.gear.name.toLowerCase().localeCompare(l.gear.name.toLowerCase())}return c}(),Cost:function(){function c(m,l){return m.gear.cost-l.gear.cost}return c}()},y=r.Loadout=function(){function c(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=(0,t.useLocalState)(l,"search",!1),h=C[0],v=C[1],p=(0,t.useLocalState)(l,"searchText",""),N=p[0],V=p[1],S=(0,t.useLocalState)(l,"category",Object.keys(d.gears)[0]),I=S[0],L=S[1],w=(0,t.useLocalState)(l,"tweakedGear",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,f.Window,{width:975,height:650,children:[A&&(0,e.createComponentVNode)(2,i,{tweakedGear:A,setTweakedGear:x}),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,B,{category:I,setCategory:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,g,{setTweakedGear:x})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"75%",children:(0,e.createComponentVNode)(2,k,{category:I,search:h,setSearch:v,searchText:N,setSearchText:V})})]})})]})})]})}return c}(),B=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.category,h=m.setCategory;return(0,e.createComponentVNode)(2,o.Tabs,{fluid:!0,textAlign:"center",style:{"flex-wrap":"wrap-reverse"},children:Object.keys(d.gears).map(function(v){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===C,style:{"white-space":"nowrap"},onClick:function(){function p(){return h(v)}return p}(),children:v},v)})})},k=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.user_tier,h=d.gear_slots,v=d.max_gear_slots,p=m.category,N=m.search,V=m.setSearch,S=m.searchText,I=m.setSearchText,L=(0,t.useLocalState)(l,"sortType","Default"),w=L[0],A=L[1],x=(0,t.useLocalState)(l,"sortReverse",!1),E=x[0],P=x[1],D=(0,a.createSearch)(S,function(R){return R.name}),M;return S.length>2?M=Object.entries(d.gears).reduce(function(R,O){var F=O[0],_=O[1];return R.concat(Object.entries(_).map(function(U){var z=U[0],$=U[1];return{key:z,gear:$}}))},[]).filter(function(R){var O=R.gear;return D(O)}):M=Object.entries(d.gears[p]).map(function(R){var O=R[0],F=R[1];return{key:O,gear:F}}),M.sort(b[w]),E&&(M=M.reverse()),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:p,buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{height:1.66,selected:w,options:Object.keys(b),onSelected:function(){function R(O){return A(O)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:E?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:E?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){function R(){return P(!E)}return R}()})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Input,{width:20,placeholder:"Search...",value:S,onInput:function(){function R(O){return I(O.target.value)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"magnifying-glass",selected:N,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){function R(){V(!N),I("")}return R}()})})]}),children:M.map(function(R){var O=R.key,F=R.gear,_=12,U=Object.keys(d.selected_gears).includes(O),z=F.cost===1?F.cost+" Point":F.cost+" Points",$=(0,e.createComponentVNode)(2,o.Box,{children:[F.name.length>_&&(0,e.createComponentVNode)(2,o.Box,{children:F.name}),F.gear_tier>C&&(0,e.createComponentVNode)(2,o.Box,{mt:F.name.length>_&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),G=(0,e.createFragment)([F.allowed_roles&&(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"user",tooltip:(0,e.createComponentVNode)(2,o.Section,{m:-1,title:"Allowed Roles",children:F.allowed_roles.map(function(J){return(0,e.createComponentVNode)(2,o.Box,{children:J},J)})}),tooltipPosition:"left"}),Object.entries(F.tweaks).map(function(J){var se=J[0],ie=J[1];return ie.map(function(me){return(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:me.icon,tooltip:me.tooltip,tooltipPosition:"top"},se)})}),(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"info",tooltip:F.desc,tooltipPosition:"top"})],0),X=(0,e.createComponentVNode)(2,o.Box,{class:"Loadout-InfoBox",children:[(0,e.createComponentVNode)(2,o.Box,{style:{"flex-grow":1},fontSize:1,color:"gold",opacity:.75,children:F.gear_tier>0&&"Tier "+F.gear_tier}),(0,e.createComponentVNode)(2,o.Box,{fontSize:.75,opacity:.66,children:z})]});return(0,e.createComponentVNode)(2,o.ImageButton,{m:.5,imageSize:84,dmIcon:F.icon,dmIconState:F.icon_state,tooltip:(F.name.length>_||F.gear_tier>0)&&$,tooltipPosition:"bottom",selected:U,disabled:F.gear_tier>C||h+F.cost>v&&!U,buttons:G,buttonsAlt:X,onClick:function(){function J(){return s("toggle_gear",{gear:O})}return J}(),children:F.name},O)})})},g=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.setTweakedGear,h=Object.entries(d.gears).reduce(function(v,p){var N=p[0],V=p[1],S=Object.entries(V).filter(function(I){var L=I[0];return Object.keys(d.selected_gears).includes(L)}).map(function(I){var L=I[0],w=I[1];return Object.assign({key:L},w)});return v.concat(S)},[]);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Selected Equipment",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"Clear Loadout",tooltipPosition:"bottom-end",onClick:function(){function v(){return s("clear_loadout")}return v}()}),children:h.map(function(v){return(0,e.createComponentVNode)(2,o.ImageButton,{fluid:!0,imageSize:32,dmIcon:v.icon,dmIconState:v.icon_state,buttons:(0,e.createFragment)([Object.entries(v.tweaks).length>0&&(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"gears",iconColor:"gray",width:"33px",onClick:function(){function p(){return C(v)}return p}()}),(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"times",iconColor:"red",width:"32px",onClick:function(){function p(){return s("toggle_gear",{gear:v.key})}return p}()})],0),children:v.name},v.key)})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:d.gear_slots,maxValue:d.max_gear_slots,ranges:{bad:[d.max_gear_slots,1/0],average:[d.max_gear_slots*.66,d.max_gear_slots],good:[0,d.max_gear_slots*.66]},children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:["Used points ",d.gear_slots,"/",d.max_gear_slots]})})})})]})},i=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.tweakedGear,h=m.setTweakedGear;return(0,e.createComponentVNode)(2,o.Dimmer,{children:(0,e.createComponentVNode)(2,o.Box,{className:"Loadout-Modal__background",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,width:20,height:20,title:C.name,buttons:(0,e.createComponentVNode)(2,o.Button,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){function v(){return h("")}return v}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:Object.entries(C.tweaks).map(function(v){var p=v[0],N=v[1];return N.map(function(V){var S=d.selected_gears[C.key][p];return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V.name,color:S?"":"gray",buttons:(0,e.createComponentVNode)(2,o.Button,{color:"transparent",icon:"pen",onClick:function(){function I(){return s("set_tweak",{gear:C.key,tweak:p})}return I}()}),children:[S||"Default",(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{"background-color":""+S}})]},p)})})})})})})}},77613:function(T,r,n){"use strict";r.__esModule=!0,r.MODsuitContent=r.MODsuit=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:A,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(){function D(M,R){return P("configure",{key:w,value:R,ref:x})}return D}()})},b=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:A,onClick:function(){function D(){return P("configure",{key:w,value:!A,ref:x})}return D}()})},y=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"paint-brush",onClick:function(){function D(){return P("configure",{key:w,ref:x})}return D}()}),(0,e.createComponentVNode)(2,t.ColorBox,{color:A,mr:.5})],4)},B=function(I,L){var w=I.name,A=I.value,x=I.values,E=I.module_ref,P=(0,a.useBackend)(L),D=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(R){return D("configure",{key:w,value:R,ref:E})}return M}()})},k=function(I,L){var w=I.name,A=I.display_name,x=I.type,E=I.value,P=I.values,D=I.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,f,Object.assign({},I))),bool:(0,e.normalizeProps)((0,e.createComponentVNode)(2,b,Object.assign({},I))),color:(0,e.normalizeProps)((0,e.createComponentVNode)(2,y,Object.assign({},I))),list:(0,e.normalizeProps)((0,e.createComponentVNode)(2,B,Object.assign({},I)))};return(0,e.createComponentVNode)(2,t.Box,{children:[A,": ",M[x]]})},g=function(I,L){var w=I.active,A=I.userradiated,x=I.usertoxins,E=I.usermaxtoxins,P=I.threatlevel;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Level",color:w&&A?"bad":"good",children:w&&A?"IRRADIATED!":"RADIATION-FREE"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxins Level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?x/E:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:x})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Hazard Level",color:w&&P?"bad":"good",bold:!0,children:w&&P?P:0})})]})},i=function(I,L){var w=I.active,A=I.userhealth,x=I.usermaxhealth,E=I.userbrute,P=I.userburn,D=I.usertoxin,M=I.useroxy;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?A/x:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?A:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?P/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?P:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?D/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})})]})],4)},c=function(I,L){var w=I.active,A=I.statustime,x=I.statusid,E=I.statushealth,P=I.statusmaxhealth,D=I.statusbrute,M=I.statusburn,R=I.statustoxin,O=I.statusoxy,F=I.statustemp,_=I.statusnutrition,U=I.statusfingerprints,z=I.statusdna,$=I.statusviruses;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Time",children:w?A:"00:00:00"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Number",children:w?x||"0":"???"})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/P:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?R/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:R})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?O/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:O})})})})]}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Body Temperature",children:w?F:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Nutrition Status",children:w?_:0})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"DNA",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:w?U:"???"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:w?z:"???"})]})}),!!w&&!!$&&(0,e.createComponentVNode)(2,t.Section,{title:"Diseases",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),$.map(function(G){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[G.stage,"/",G.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.cure})]},G.name)})]})})],0)},m={rad_counter:g,health_analyzer:i,status_readout:c},l=function(){return(0,e.createComponentVNode)(2,t.Section,{align:"center",fill:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,e.createComponentVNode)(2,t.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},u=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data;return(0,e.createComponentVNode)(2,t.Dimmer,{children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},s=function(I,L){var w=I.configuration_data,A=I.module_ref,x=Object.keys(w);return(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[x.map(function(E){var P=w[E];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{name:E,display_name:P.display_name,type:P.type,value:P.value,values:P.values,module_ref:A})},P.key)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:I.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},d=function(I){switch(I){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},C=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.malfunctioning,D=x.locked,M=x.open,R=x.selected_module,O=x.complexity,F=x.complexity_max,_=x.wearer_name,U=x.wearer_job,z=P?"Malfunctioning":E?"Active":"Inactive";return(0,e.createComponentVNode)(2,t.Section,{title:"Parameters",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:E?"Deactivate":"Activate",onClick:function(){function $(){return A("activate")}return $}()}),children:z}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:D?"lock-open":"lock",content:D?"Unlock":"Lock",onClick:function(){function $(){return A("lock")}return $}()}),children:D?"Locked":"Unlocked"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover",children:M?"Open":"Closed"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Selected Module",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[O," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[_,", ",U]})]})})},h=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.control,D=x.helmet,M=x.chestplate,R=x.gauntlets,O=x.boots,F=x.core,_=x.charge;return(0,e.createComponentVNode)(2,t.Section,{title:"Hardware",children:[(0,e.createComponentVNode)(2,t.Collapsible,{title:"Parts",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Control Unit",children:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Helmet",children:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:O||"None"})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core",children:F&&(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Type",children:F}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:_/100,content:_+"%",ranges:{good:[.6,1/0],average:[.3,.6],bad:[-1/0,.3]}})})]})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},v=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.modules,D=P.filter(function(M){return!!M.id});return(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:D.length!==0&&D.map(function(M){var R=m[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,u),(0,e.normalizeProps)((0,e.createComponentVNode)(2,R,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},p=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.complexity_max,P=x.modules,D=(0,a.useLocalState)(L,"module_configuration",null),M=D[0],R=D[1];return(0,e.createComponentVNode)(2,t.Section,{title:"Modules",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:P.length!==0&&P.map(function(O){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:O.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===O.ref&&(0,e.createComponentVNode)(2,s,{configuration_data:O.configuration_data,module_ref:O.ref,onExit:function(){function F(){return R(null)}return F}()}),(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[O.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[O.cooldown>0&&O.cooldown/10||"0","/",O.cooldown_time/10,"s"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("select",{ref:O.ref})}return F}(),icon:"bullseye",selected:O.module_active,tooltip:d(O.module_type),tooltipPosition:"left",disabled:!O.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return R(O.ref)}return F}(),icon:"cog",selected:M===O.ref,tooltip:"Configure",tooltipPosition:"left",disabled:O.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:O.ref})}return F}(),icon:"thumbtack",selected:O.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!O.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:O.description})]})})},O.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},N=r.MODsuitContent=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!P,children:!!P&&(0,e.createComponentVNode)(2,l)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,h)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)})]})})}return S}(),V=r.MODsuit=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,o.Window,{theme:E,width:400,height:620,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,N)})})})}return S}()},78624:function(T,r,n){"use strict";r.__esModule=!0,r.MagnetController=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=n(3939),y=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]),B=r.MagnetController=function(){function k(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=l.autolink,s=l.code,d=l.frequency,C=l.linkedMagnets,h=l.magnetConfiguration,v=l.path,p=l.pathPosition,N=l.probing,V=l.powerState,S=l.speed;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[!u&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:N?"spinner":"sync",iconSpin:!!N,disabled:N,onClick:function(){function I(){return m("probe_magnets")}return I}()}),title:"Magnet Linking",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,a.toFixed)(d/10,1)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:s})]})}),(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{icon:V?"power-off":"times",content:V?"On":"Off",selected:V,onClick:function(){function I(){return m("toggle_power")}return I}()}),title:"Controller Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:S.value,minValue:S.min,maxValue:S.max,onChange:function(){function I(L,w){return m("set_speed",{speed:w})}return I}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Path",children:[Array.from(y.entries()).map(function(I){var L=I[0],w=I[1],A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button,{icon:A,tooltip:x,onClick:function(){function E(){return m("path_add",{code:L})}return E}()},L)}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){function I(){return m("path_clear")}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){function I(){return(0,b.modalOpen)(i,"path_custom_input")}return I}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:v.map(function(I,L){var w=y.get(I)||{icon:"question"},A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button.Confirm,{selected:L+2===p,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return m("path_remove",{index:L+1,code:I})}return E}()},L)})})]})]})}),C.map(function(I,L){var w=I.uid,A=I.powerState,x=I.electricityLevel,E=I.magneticField;return(0,e.createComponentVNode)(2,o.Section,{title:"Magnet #"+(L+1)+" Configuration",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:A?"power-off":"times",content:A?"On":"Off",selected:A,onClick:function(){function P(){return m("toggle_magnet_power",{id:w})}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Move Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:x,minValue:h.electricityLevel.min,maxValue:h.electricityLevel.max,onChange:function(){function P(D,M){return m("set_electricity_level",{id:w,electricityLevel:M})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Field Size",children:(0,e.createComponentVNode)(2,o.Slider,{value:E,minValue:h.magneticField.min,maxValue:h.magneticField.max,onChange:function(){function P(D,M){return m("set_magnetic_field",{id:w,magneticField:M})}return P}()})})]})},w)})]})]})}return k}()},72106:function(T,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.MechBayConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.recharge_port,m=c&&c.mech,l=m&&m.cell,u=m&&m.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:155,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function s(){return g("reconnect")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:m.health/m.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:l.charge/l.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:l.charge})," / "+l.maxcharge]})})]})})})})}return b}()},7466:function(T,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=n(25328),y=r.MechaControlConsole=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.act,m=i.data,l=m.beacons,u=m.stored_data;return u.length?(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function s(){return c("clear_log")}return s}()}),children:u.map(function(s){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",s.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,b.decodeHtmlEntities)(s.message)})]},s.time)})})})}):(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:l.length&&l.map(function(s){return(0,e.createComponentVNode)(2,o.Section,{title:s.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function d(){return c("send_message",{mt:s.uid})}return d}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function d(){return c("get_log",{mt:s.uid})}return d}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function d(){return c("shock",{mt:s.uid})}return d}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.maxHealth*.75,1/0],average:[s.maxHealth*.5,s.maxHealth*.75],bad:[-1/0,s.maxHealth*.5]},value:s.health,maxValue:s.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:s.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.cellMaxCharge*.75,1/0],average:[s.cellMaxCharge*.5,s.cellMaxCharge*.75],bad:[-1/0,s.cellMaxCharge*.5]},value:s.cellCharge,maxValue:s.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[s.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:s.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,b.toTitleCase)(s.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:s.active||"None"}),s.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[s.cargoMax*.75,1/0],average:[s.cargoMax*.5,s.cargoMax*.75],good:[-1/0,s.cargoMax*.5]},value:s.cargoUsed,maxValue:s.cargoMax})})||null]})},s.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return B}()},79625:function(T,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(3939),b=n(98595),y=n(321),B=n(5485),k=n(22091),g={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},i={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(A,x){(0,f.modalOpen)(A,"edit",{field:x.edit,value:x.value})},m=function(A,x){var E=A.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:E.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:E.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[E.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:E.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:E.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:g[E.severity],children:E.severity})]})})})},l=r.MedicalRecords=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.loginState,M=P.screen;if(!D.logged_in)return(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});var R;return M===2?R=(0,e.createComponentVNode)(2,u):M===3?R=(0,e.createComponentVNode)(2,s):M===4?R=(0,e.createComponentVNode)(2,d):M===5?R=(0,e.createComponentVNode)(2,p):M===6?R=(0,e.createComponentVNode)(2,N):M===7&&(R=(0,e.createComponentVNode)(2,V)),(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,L),R]})})]})}return w}(),u=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.records,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder",!0),G=$[0],X=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function J(){return P("screen",{screen:3})}return J}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function J(se,ie){return F(ie)}return J}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,S,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,S,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,S,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,S,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,S,{id:"m_stat",children:"Mental Status"})]}),M.filter((0,a.createSearch)(O,function(J){return J.name+"|"+J.id+"|"+J.rank+"|"+J.p_stat+"|"+J.m_stat})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+i[J.p_stat],onClick:function(){function se(){return P("view_record",{view_record:J.ref})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.m_stat})]},J.id)})]})})})],4)},s=function(A,x){var E=(0,t.useBackend)(x),P=E.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,translucent:!0,lineHeight:3,icon:"trash",content:"Delete All Medical Records",onClick:function(){function D(){return P("del_all_med_records")}return D}()})})]})})},d=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical,R=D.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function O(){return P("print_record")}return O}()}),children:(0,e.createComponentVNode)(2,C)})}),!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function O(){return P("new_med_record")}return O}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!M.empty,content:"Delete Medical Record",onClick:function(){function O(){return P("del_med_record")}return O}()}),children:(0,e.createComponentVNode)(2,h)})}),(0,e.createComponentVNode)(2,v)],4)],0)},C=function(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.general;return!D||!D.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:D.fields.map(function(M,R){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:M.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:M.value}),!!M.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function O(){return c(x,M)}return O}()})]},R)})})}),!!D.has_photos&&D.photos.map(function(M,R){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:M,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",R+1]},R)})]})},h=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical;return!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"Medical records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:M.fields.map(function(R,O){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:R.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(R.value),!!R.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:R.line_break?"1rem":"initial",onClick:function(){function F(){return c(x,R)}return F}()})]},O)})})})})},v=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function R(){return(0,f.modalOpen)(x,"add_comment")}return R}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):M.comments.map(function(R,O){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function F(){return P("del_comment",{del_comment:O+1})}return F}()})]},O)})})})},p=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.virus,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId2","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder2",!0),G=$[0],X=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function J(se,ie){return F(ie)}return J}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,I,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,I,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,I,{id:"severity",children:"Severity"})]}),M.filter((0,a.createSearch)(O,function(J){return J.name+"|"+J.max_stages+"|"+J.severity})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+J.severity,onClick:function(){function se(){return P("vir",{vir:J.D})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:g[J.severity],children:J.severity})]},J.id)})]})})})})],4)},N=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.goals;return(0,e.createComponentVNode)(2,o.Section,{title:"Virology Goals",fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:M.length!==0&&M.map(function(R){return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:R.name,children:[(0,e.createComponentVNode)(2,o.Table,{children:(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:R.delivered,minValue:0,maxValue:R.deliverygoal,ranges:{good:[R.deliverygoal*.5,1/0],average:[R.deliverygoal*.25,R.deliverygoal*.5],bad:[-1/0,R.deliverygoal*.25]},children:[R.delivered," / ",R.deliverygoal," Units"]})})})}),(0,e.createComponentVNode)(2,o.Box,{children:R.report})]})},R.id)})||(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:"No Goals Detected"})})})})},V=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medbots;return M.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),M.map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},S=function(A,x){var E=(0,t.useLocalState)(x,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder",!0),R=M[0],O=M[1],F=A.id,_=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},I=function(A,x){var E=(0,t.useLocalState)(x,"sortId2","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder2",!0),R=M[0],O=M[1],F=A.id,_=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},L=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.screen,R=D.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:M===2,onClick:function(){function O(){P("screen",{screen:2})}return O}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function O(){P("screen",{screen:5})}return O}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"vial",selected:M===6,onClick:function(){function O(){P("screen",{screen:6})}return O}(),children:"Virology Goals"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===7,onClick:function(){function O(){return P("screen",{screen:7})}return O}(),children:"Medibot Tracking"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"Record Maintenance"}),M===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["Record: ",R.fields[0].value]})]})})};(0,f.modalRegisterBodyOverride)("virus",m)},54989:function(T,r,n){"use strict";r.__esModule=!0,r.MerchVendor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=g.product,s=g.productImage,d=g.productCategory,C=l.user_money;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:u.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:u.price>C,icon:"shopping-cart",content:u.price,textAlign:"left",onClick:function(){function h(){return m("purchase",{name:u.name,category:d})}return h}()})})]})},b=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=(0,a.useLocalState)(i,"tabIndex",1),u=l[0],s=m.products,d=m.imagelist,C=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:s[C[u]].map(function(h){return(0,e.createComponentVNode)(2,f,{product:h,productImage:d[h.path],productCategory:C[u]},h.name)})})},y=r.MerchVendor=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.user_cash,s=l.inserted_cash;return(0,e.createComponentVNode)(2,o.Window,{title:"Merch Computer",width:450,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,e.createVNode)(1,"b",null,s,0)," credits inserted."]}),(0,e.createComponentVNode)(2,t.Button,{disabled:!s,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){function d(){return m("change")}return d}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives.",u!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[u||0,(0,e.createTextVNode)(" credits")],0),"."]})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,b)]})})]})})})}return k}(),B=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=(0,a.useLocalState)(i,"tabIndex",1),u=l[0],s=l[1],d=m.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:u===1,onClick:function(){function C(){return s(1)}return C}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:u===2,onClick:function(){function C(){return s(2)}return C}(),children:"Decorations"})]})}},87684:function(T,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=["title","items","gridLayout"];function y(l,u){if(l==null)return{};var s={};for(var d in l)if({}.hasOwnProperty.call(l,d)){if(u.includes(d))continue;s[d]=l[d]}return s}var B={Alphabetical:function(){function l(u,s){return u-s}return l}(),Availability:function(){function l(u,s){return-(u.affordable-s.affordable)}return l}(),Price:function(){function l(u,s){return u.price-s.price}return l}()},k=r.MiningVendor=function(){function l(u,s){var d=(0,t.useLocalState)(s,"gridLayout",!1),C=d[0],h=d[1];return(0,e.createComponentVNode)(2,f.Window,{width:400,height:525,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,c,{gridLayout:C,setGridLayout:h}),(0,e.createComponentVNode)(2,i,{gridLayout:C})]})})})}return l}(),g=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.has_id,p=h.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:v,children:v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",p.name,".",(0,e.createVNode)(1,"br"),"You have ",p.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function N(){return C("logoff")}return N}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},i=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.has_id,p=h.id,N=h.items,V=u.gridLayout,S=(0,t.useLocalState)(s,"search",""),I=S[0],L=S[1],w=(0,t.useLocalState)(s,"sort","Alphabetical"),A=w[0],x=w[1],E=(0,t.useLocalState)(s,"descending",!1),P=E[0],D=E[1],M=(0,a.createSearch)(I,function(F){return F[0]}),R=!1,O=Object.entries(N).map(function(F,_){var U=Object.entries(F[1]).filter(M).map(function(z){return z[1].affordable=v&&p.points>=z[1].price,z[1]}).sort(B[A]);if(U.length!==0)return P&&(U=U.reverse()),R=!0,(0,e.createComponentVNode)(2,m,{title:F[0],items:U,gridLayout:V},F[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:R?O:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(u,s){var d=u.gridLayout,C=u.setGridLayout,h=(0,t.useLocalState)(s,"search",""),v=h[0],p=h[1],N=(0,t.useLocalState)(s,"sort",""),V=N[0],S=N[1],I=(0,t.useLocalState)(s,"descending",!1),L=I[0],w=I[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{mt:.2,placeholder:"Search by item name..",width:"100%",onInput:function(){function A(x,E){return p(E)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:d?"list":"table-cells-large",height:1.75,tooltip:d?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){function A(){return C(!d)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(B),width:"100%",onSelected:function(){function A(x){return S(x)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:L?"arrow-down":"arrow-up",height:1.75,tooltip:L?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function A(){return w(!L)}return A}()})})]})})},m=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=u.title,p=u.items,N=u.gridLayout,V=y(u,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:v},V,{children:p.map(function(S){return N?(0,e.createComponentVNode)(2,o.ImageButton,{mb:.5,imageSize:57.5,dmIcon:S.icon,dmIconState:S.icon_state,disabled:!h.has_id||h.id.points0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:ae>=10?"9+":ae})}),(0,e.createComponentVNode)(2,s,{icon:"briefcase",title:"Job Openings",selected:O===1,onClick:function(){function le(){return x("jobs")}return le}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(le){return(0,e.createComponentVNode)(2,s,{icon:le.icon,title:le.name,selected:O===2&&F[U-1]===le,onClick:function(){function Z(){return x("channel",{uid:le.uid})}return Z}(),children:le.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:le.unread>=10?"9+":le.unread})},le)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!D)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function le(){return(0,y.modalOpen)(w,"wanted_notice")}return le}()}),(0,e.createComponentVNode)(2,s,{security:!0,icon:me?"minus-square":"minus-square-o",title:"Censor Mode: "+(me?"On":"Off"),mb:"0.5rem",onClick:function(){function le(){return q(!me)}return le}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,s,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function le(){return(0,y.modalOpen)(w,"create_story")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:"plus-circle",title:"New Channel",onClick:function(){function le(){return(0,y.modalOpen)(w,"create_channel")}return le}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,s,{icon:R?"spinner":"print",iconSpin:R,title:R?"Printing...":"Print Newspaper",onClick:function(){function le(){return x("print_newspaper")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function le(){return x("toggle_mute")}return le}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,B.TemporaryNotice),re]})]})})]})}return I}(),s=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=L.icon,P=E===void 0?"":E,D=L.iconSpin,M=L.selected,R=M===void 0?!1:M,O=L.security,F=O===void 0?!1:O,_=L.onClick,U=L.title,z=L.children,$=i(L,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",R&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:_},$,{children:[R&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:D,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:U}),z]})))},d=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.screen,D=E.is_admin,M=E.channel_idx,R=E.channel_can_manage,O=E.channels,F=E.stories,_=E.wanted,U=(0,t.useLocalState)(w,"fullStories",[]),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"censorMode",!1),X=G[0],J=G[1],se=P===2&&M>-1?O[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!_&&(0,e.createComponentVNode)(2,h,{story:_,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:se?se.icon:"newspaper",mr:"0.5rem"}),se?se.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ie){return!z.includes(ie.uid)&&ie.body.length+3>c?Object.assign({},ie,{body_short:ie.body.substr(0,c-4)+"..."}):ie}).map(function(ie,me){return(0,e.createComponentVNode)(2,h,{story:ie},me)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!se&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([X&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!se.admin&&!D,selected:se.censored,icon:se.censored?"comment-slash":"comment",content:se.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ie(){return x("censor_channel",{uid:se.uid})}return ie}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!R,icon:"cog",content:"Manage",onClick:function(){function ie(){return(0,y.modalOpen)(w,"manage_channel",{uid:se.uid})}return ie}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:se.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:se.author||"N/A"}),!!D&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:se.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:se.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),F.reduce(function(ie,me){return ie+me.view_count},0).toLocaleString()]})]})})]})},C=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.jobs,D=E.wanted,M=Object.entries(P).reduce(function(R,O){var F=O[0],_=O[1];return R+_.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!D&&(0,e.createComponentVNode)(2,h,{story:D,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:M>0?m.map(function(R){return Object.assign({},l[R],{id:R,jobs:P[R]})}).filter(function(R){return!!R&&R.jobs.length>0}).map(function(R){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+R.id]),title:R.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:R.fluff_text}),children:R.jobs.map(function(O){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!O.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",O.title]},O.title)})},R.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},h=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=L.story,D=L.wanted,M=D===void 0?!1:D,R=E.is_admin,O=(0,t.useLocalState)(w,"fullStories",[]),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"censorMode",!1),z=U[0],$=U[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",M&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([M&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),P.censor_flags&2&&"[REDACTED]"||P.title||"News from "+P.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!M&&z&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:P.censor_flags&2,icon:P.censor_flags&2?"comment-slash":"comment",content:P.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function G(){return x("censor_story",{uid:P.uid})}return G}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!R&&(0,e.createFragment)([(0,e.createTextVNode)("ckey: "),P.author_ckey,(0,e.createTextVNode)(" |\xA0")],0),!M&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),P.view_count.toLocaleString(),(0,e.createTextVNode)(" |\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,f.timeAgo)(P.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:P.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!P.has_photo&&(0,e.createComponentVNode)(2,v,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function(G,X){return(0,e.createComponentVNode)(2,o.Box,{children:G||(0,e.createVNode)(1,"br")},X)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function G(){return _([].concat(F,[P.uid]))}return G}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},v=function(L,w){var A=L.name,x=i(L,g),E=(0,t.useLocalState)(w,"viewingPhoto",""),P=E[0],D=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function M(){return D(A)}return M}()},x)))},p=function(L,w){var A=(0,t.useLocalState)(w,"viewingPhoto",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:x}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function P(){return E("")}return P}()})]})},N=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=!!L.args.uid&&E.channels.filter(function(te){return te.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!P){(0,y.modalClose)(w);return}var D=L.id==="manage_channel",M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(P==null?void 0:P.name)||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(P==null?void 0:P.description)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"icon",(P==null?void 0:P.icon)||"newspaper"),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"isPublic",D?!!(P!=null&&P.public):!1),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin)===1||!1),Z=le[0],ne=le[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:D?"Manage "+P.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function te(fe,pe){return _(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:z,onInput:function(){function te(fe,pe){return $(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:X,onInput:function(){function te(fe,pe){return J(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ie,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,pe){return me(pe)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ie,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:re,icon:re?"toggle-on":"toggle-off",content:re?"Yes":"No",onClick:function(){function te(){return ae(!re)}return te}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:z.substr(0,49),description:X.substr(0,128),icon:ie,public:re?1:0,admin_locked:Z?1:0})}return te}()})]})},V=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.channels,M=E.channel_idx,R=M===void 0?-1:M,O=!!L.args.is_admin,F=L.args.scanned_user,_=D.slice().sort(function(te,fe){if(R<0)return 0;var pe=D[R-1];if(pe.uid===te.uid)return-1;if(pe.uid===fe.uid)return 1}).filter(function(te){return O||!te.frozen&&(te.author===F||!!te.public)}),U=(0,t.useLocalState)(w,"author",F||"Unknown"),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"channel",_.length>0?_[0].name:""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"title",""),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"body",""),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",!1),Z=le[0],ne=le[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!O,width:"100%",value:z,onInput:function(){function te(fe,pe){return $(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:X,options:_.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return J(fe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:ie,onInput:function(){function te(fe,pe){return me(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:re,onInput:function(){function te(fe,pe){return ae(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function te(){return x(P?"eject_photo":"attach_photo")}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:ie,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"}),re.split("\n").map(function(te,fe){return(0,e.createComponentVNode)(2,o.Box,{children:te||(0,e.createVNode)(1,"br")},fe)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),O&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:z.trim().length===0||X.trim().length===0||ie.trim().length===0||re.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,"create_story","",{author:z,channel:X,title:ie.substr(0,127),body:re.substr(0,1023),admin_locked:Z?1:0})}return te}()})]})},S=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.wanted,M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(D==null?void 0:D.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(D==null?void 0:D.title.substr(8))||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(D==null?void 0:D.body)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"adminLocked",(D==null?void 0:D.admin_locked)===1||!1),ie=se[0],me=se[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function q(re,ae){return _(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:z,maxLength:"128",onInput:function(){function q(re,ae){return $(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:X,maxLength:"512",rows:"4",onInput:function(){function q(re,ae){return J(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function q(){return x(P?"eject_photo":"attach_photo")}return q}()}),!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"})]}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:ie,icon:ie?"lock":"lock-open",content:ie?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return me(!ie)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!D,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function q(){x("clear_wanted_notice"),(0,y.modalClose)(w)}return q}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.trim().length===0||X.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:z.substr(0,127),description:X.substr(0,511),admin_locked:ie?1:0})}return q}()})]})};(0,y.modalRegisterBodyOverride)("create_channel",N),(0,y.modalRegisterBodyOverride)("manage_channel",N),(0,y.modalRegisterBodyOverride)("create_story",V),(0,y.modalRegisterBodyOverride)("wanted_notice",S)},48286:function(T,r,n){"use strict";r.__esModule=!0,r.Noticeboard=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=r.Noticeboard=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data,m=c.papers;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:300,theme:"noticeboard",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:m.map(function(l){return(0,e.createComponentVNode)(2,o.Stack.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){function u(){return i("interact",{paper:l.ref})}return u}(),onContextMenu:function(){function u(s){s.preventDefault(),i("showFull",{paper:l.ref})}return u}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,fontSize:.75,title:l.name,children:(0,a.decodeHtmlEntities)(l.contents)})},l.ref)})})})})}return y}()},41166:function(T,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.NuclearBomb=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return i.extended?(0,e.createComponentVNode)(2,o.Window,{width:350,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authdisk?"eject":"id-card",selected:i.authdisk,content:i.diskname?i.diskname:"-----",tooltip:i.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return g("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!i.authdisk,selected:i.authcode,content:i.codemsg,onClick:function(){function c(){return g("code")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.anchored?"check":"times",selected:i.anchored,disabled:!i.authdisk,content:i.anchored?"YES":"NO",onClick:function(){function c(){return g("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:i.time,disabled:!i.authfull,tooltip:"Set Timer",onClick:function(){function c(){return g("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.safety?"check":"times",selected:i.safety,disabled:!i.authfull,content:i.safety?"ON":"OFF",tooltip:i.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return g("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(i.timer,"bomb"),disabled:i.safety||!i.authfull,color:"red",content:i.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return g("toggle_armed")}return c}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:350,height:115,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function c(){return g("deploy")}return c}()})})})})}return b}()},52416:function(T,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(92986),f=n(72253),b=n(36036),y=n(98595),B=r.NumberInputModal=function(){function g(i,c){var m=(0,f.useBackend)(c),l=m.act,u=m.data,s=u.init_value,d=u.large_buttons,C=u.message,h=C===void 0?"":C,v=u.timeout,p=u.title,N=(0,f.useLocalState)(c,"input",s),V=N[0],S=N[1],I=function(){function A(x){x!==V&&S(x)}return A}(),L=function(){function A(x){x!==V&&S(x)}return A}(),w=140+Math.max(Math.ceil(h.length/3),h.length>0&&d?5:0);return(0,e.createComponentVNode)(2,y.Window,{title:p,width:270,height:w,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&l("submit",{entry:V}),E===o.KEY_ESCAPE&&l("cancel")}return A}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:h})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{input:V,onClick:L,onChange:I})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return g}(),k=function(i,c){var m=(0,f.useBackend)(c),l=m.act,u=m.data,s=u.min_value,d=u.max_value,C=u.init_value,h=u.round_value,v=i.input,p=i.onClick,N=i.onChange,V=Math.round(v!==s?Math.max(v/2,s):d/2),S=v===s&&s>0||v===1;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===s,icon:"angle-double-left",onClick:function(){function I(){return p(s)}return I}(),tooltip:v===s?"Min":"Min ("+s+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!h,minValue:s,maxValue:d,onChange:function(){function I(L,w){return N(w)}return I}(),onEnter:function(){function I(L,w){return l("submit",{entry:w})}return I}(),value:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===d,icon:"angle-double-right",onClick:function(){function I(){return p(d)}return I}(),tooltip:v===d?"Max":"Max ("+d+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:S,icon:"divide",onClick:function(){function I(){return p(V)}return I}(),tooltip:S?"Split":"Split ("+V+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===C,icon:"redo",onClick:function(){function I(){return p(C)}return I}(),tooltip:C?"Reset ("+C+")":"Reset"})})]})}},1218:function(T,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(98595),f=n(36036),b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],g=r.OperatingComputer=function(){function l(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.hasOccupant,p=h.choice,N;return p?N=(0,e.createComponentVNode)(2,m):N=v?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!p,icon:"user",onClick:function(){function V(){return C("choiceOff")}return V}(),children:"Patient"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!!p,icon:"cog",onClick:function(){function V(){return C("choiceOn")}return V}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,children:N})})]})})})}return l}(),i=function(u,s){var d=(0,t.useBackend)(s),C=d.data,h=C.occupant;return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:h.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:b[h.stat][0],children:b[h.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.maxHealth,value:h.health/h.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),y.map(function(v,p){return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:v[0]+" Damage",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:"100",value:h[v[1]]/100,ranges:B,children:(0,a.round)(h[v[1]])},p)},p)}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.maxTemp,value:h.bodyTemperature/h.maxTemp,color:k[h.temperatureSuitability+3],children:[(0,a.round)(h.btCelsius),"\xB0C, ",(0,a.round)(h.btFaren),"\xB0F"]})}),!!h.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.bloodMax,value:h.bloodLevel/h.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[h.bloodPercent,"%, ",h.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Pulse",children:[h.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Current Procedure",level:"2",children:h.inSurgery?(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Procedure",children:h.surgeryName}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Next Step",children:h.stepName})]}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},m=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.verbose,p=h.health,N=h.healthAlarm,V=h.oxy,S=h.oxyAlarm,I=h.crit;return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,f.Button,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"On":"Off",onClick:function(){function L(){return C(v?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,f.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){function L(){return C(p?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:N,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return C("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,f.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function L(){return C(V?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:S,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return C("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,f.Button,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"On":"Off",onClick:function(){function L(){return C(I?"critOff":"critOn")}return L}()})})]})}},46892:function(T,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(35840);function y(d,C){var h=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(h)return(h=h.call(d)).next.bind(h);if(Array.isArray(d)||(h=B(d))||C&&d&&typeof d.length=="number"){h&&(d=h);var v=0;return function(){return v>=d.length?{done:!0}:{done:!1,value:d[v++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(d,C){if(d){if(typeof d=="string")return k(d,C);var h={}.toString.call(d).slice(8,-1);return h==="Object"&&d.constructor&&(h=d.constructor.name),h==="Map"||h==="Set"?Array.from(d):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?k(d,C):void 0}}function k(d,C){(C==null||C>d.length)&&(C=d.length);for(var h=0,v=Array(C);hh},m=function(C,h){var v=C.name,p=h.name;if(!v||!p)return 0;var N=v.match(g),V=p.match(g);if(N&&V&&v.replace(g,"")===p.replace(g,"")){var S=parseInt(N[1],10),I=parseInt(V[1],10);return S-I}return c(v,p)},l=function(C,h){var v=C.searchText,p=C.source,N=C.title,V=C.color,S=C.sorted,I=p.filter(i(v));return S&&I.sort(m),p.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+p.length+")",children:I.map(function(L){return(0,e.createComponentVNode)(2,u,{thing:L,color:V},L.name)})})},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=C.color,V=C.thing;return(0,e.createComponentVNode)(2,o.Button,{color:N,tooltip:V.assigned_role?(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",mr:"0.5em",className:(0,b.classes)(["job_icons16x16",V.assigned_role_sprite])})," ",V.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){function S(){return p("orbit",{ref:V.ref})}return S}(),children:[V.name,V.orbiters&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,children:["(",V.orbiters," ",(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),")"]})]})},s=r.Orbit=function(){function d(C,h){for(var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.alive,S=N.antagonists,I=N.highlights,L=N.response_teams,w=N.tourist,A=N.auto_observe,x=N.dead,E=N.ssd,P=N.ghosts,D=N.misc,M=N.npcs,R=(0,t.useLocalState)(h,"searchText",""),O=R[0],F=R[1],_={},U=y(S),z;!(z=U()).done;){var $=z.value;_[$.antag]===void 0&&(_[$.antag]=[]),_[$.antag].push($)}var G=Object.entries(_);G.sort(function(J,se){return c(J[0],se[0])});var X=function(){function J(se){for(var ie=0,me=[G.map(function(ae){var le=ae[0],Z=ae[1];return Z}),w,I,V,P,E,x,M,D];ie0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:G.map(function(J){var se=J[0],ie=J[1];return(0,e.createComponentVNode)(2,o.Section,{title:se+" - ("+ie.length+")",level:2,children:ie.filter(i(O)).sort(m).map(function(me){return(0,e.createComponentVNode)(2,u,{color:"bad",thing:me},me.name)})},se)})}),I.length>0&&(0,e.createComponentVNode)(2,l,{title:"Highlights",source:I,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,l,{title:"Response Teams",source:L,searchText:O,color:"purple"}),(0,e.createComponentVNode)(2,l,{title:"Tourists",source:w,searchText:O,color:"violet"}),(0,e.createComponentVNode)(2,l,{title:"Alive",source:V,searchText:O,color:"good"}),(0,e.createComponentVNode)(2,l,{title:"Ghosts",source:P,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,l,{title:"SSD",source:E,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,l,{title:"Dead",source:x,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,l,{title:"NPCs",source:M,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,l,{title:"Misc",source:D,searchText:O,sorted:!1})]})})}return d}()},15421:function(T,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=n(9394);function y(d){if(d==null)throw new TypeError("Cannot destructure "+d)}var B=(0,b.createLogger)("OreRedemption"),k=function(C){return C.toLocaleString("en-US")+" pts"},g=r.OreRedemption=function(){function d(C,h){return(0,e.createComponentVNode)(2,f.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m)]})})})}return d}(),i=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.id,S=N.points,I=N.disk,L=Object.assign({},(y(C),C));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:S>0?"good":"grey",bold:S>0&&"good",children:k(S)})}),(0,e.createComponentVNode)(2,o.Divider),I?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:I.name,tooltip:"Ejects the design disk.",onClick:function(){function w(){return p("eject_disk")}return w}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!I.design||!I.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function w(){return p("download")}return w}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:I.design&&(I.compatible?"good":"bad"),children:I.design||"N/A"})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},c=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.sheets,S=Object.assign({},(y(C),C));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,l,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,u,{ore:I},I.id)})]})))})},m=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.alloys,S=Object.assign({},(y(C),C));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,l,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,s,{ore:I},I.id)})]})))})},l=function(C,h){var v;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:C.title}),(v=C.columns)==null?void 0:v.map(function(p){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:p[1],textAlign:"center",color:"label",bold:!0,children:p[0]},p)})]})})},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=C.ore;if(!(N.value&&N.amount<=0&&!(["metal","glass"].indexOf(N.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",N.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:N.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:N.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return p(N.value?"sheet":"alloy",{id:N.id,amount:I})}return V}()})})]})})},s=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=C.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",N.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:N.amount>=1?"good":"gray",align:"center",children:N.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return p(N.value?"sheet":"alloy",{id:N.id,amount:I})}return V}()})})]})})}},52754:function(T,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(71253),b=n(70752),y=function(g){var i;try{i=b("./"+g+".js")}catch(m){if(m.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",g);throw m}var c=i[g];return c||(0,f.routingError)("missingExport",g)},B=r.PAI=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.app_template,s=l.app_icon,d=l.app_title,C=y(u);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{p:1,fill:!0,scrollable:!0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s,mr:1}),d,u!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function h(){return m("Back")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function h(){return m("MASTER_back")}return h}()})],4)]}),children:(0,e.createComponentVNode)(2,C)})})})})})}return k}()},85175:function(T,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(71253),b=n(59395),y=function(c){var m;try{m=b("./"+c+".js")}catch(u){if(u.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",c);throw u}var l=m[c];return l||(0,f.routingError)("missingExport",c)},B=r.PDA=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.app,C=s.owner;if(!C)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var h=y(d.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:d.icon,mr:1}),d.name]}),children:(0,e.createComponentVNode)(2,h)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,g)})]})})})}return i}(),k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.idInserted,C=s.idLink,h=s.stationTime,v=s.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function p(){return u("Authenticate")}return p}(),content:d?C:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function p(){return u("Eject")}return p}(),content:v?["Eject "+v]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:h})]})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!d.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:d.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function C(){return u("Back")}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:d.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:d.is_home?"disabled":"white",icon:"home",onClick:function(){function C(){u("Home")}return C}()})})]})})}},68654:function(T,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(49968),b=r.Pacman=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.active,l=c.anchored,u=c.broken,s=c.emagged,d=c.fuel_type,C=c.fuel_usage,h=c.fuel_stored,v=c.fuel_cap,p=c.is_ai,N=c.tmp_current,V=c.tmp_max,S=c.tmp_overheat,I=c.output_max,L=c.power_gen,w=c.output_set,A=c.has_fuel,x=h/v,E=N/V,P=w*L,D=Math.round(h/C*2),M=Math.round(D/60),R=D>120?M+" minutes":D+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(u||!l)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!u&&!l&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!u&&!!l&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:m,onClick:function(){function O(){return i("toggle_power")}return O}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:w,minValue:1,maxValue:I*(s?2.5:1),step:1,className:"mt-1",onDrag:function(){function O(F,_){return i("change_power",{change_power:_})}return O}()}),"(",(0,f.formatPower)(P),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[N," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[S>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),S>20&&S<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),S>1&&S<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),S===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:m||p||!A,onClick:function(){function O(){return i("eject_fuel")}return O}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(h/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[C/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(C?R:"N/A"),!A&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return y}()},1701:function(T,r,n){"use strict";r.__esModule=!0,r.PanDEMIC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.PanDEMIC=function(){function l(u,s){var d=(0,a.useBackend)(s),C=d.data,h=C.beakerLoaded,v=C.beakerContainsBlood,p=C.beakerContainsVirus,N=C.resistances,V=N===void 0?[]:N,S;return h?v?v&&!p&&(S=(0,e.createFragment)([(0,e.createTextVNode)("No disease detected in provided blood sample.")],4)):S=(0,e.createFragment)([(0,e.createTextVNode)("No blood sample found in the loaded container.")],4):S=(0,e.createFragment)([(0,e.createTextVNode)("No container loaded.")],4),(0,e.createComponentVNode)(2,o.Window,{width:575,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[S&&!p?(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b,{fill:!0,vertical:!0}),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:S})}):(0,e.createComponentVNode)(2,k),(V==null?void 0:V.length)>0&&(0,e.createComponentVNode)(2,m,{align:"bottom"})]})})})}return l}(),b=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.beakerLoaded;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function p(){return C("eject_beaker")}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!v,onClick:function(){function p(){return C("destroy_eject_beaker")}return p}()})],4)},y=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.beakerContainsVirus,p=u.strain,N=p.commonName,V=p.description,S=p.diseaseAgent,I=p.bloodDNA,L=p.bloodType,w=p.possibleTreatments,A=p.transmissionRoute,x=p.isAdvanced,E=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",children:I?(0,e.createVNode)(1,"span",null,I,0,{style:{"font-family":"'Courier New', monospace"}}):"Undetectable"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:L!=null?L:"Undetectable"}})})],4);if(!v)return(0,e.createComponentVNode)(2,t.LabeledList,{children:E});var P;return x&&(N!=null&&N!=="Unknown"?P=(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print Release Forms",onClick:function(){function D(){return C("print_release_forms",{strain_index:u.strainIndex})}return D}(),style:{"margin-left":"auto"}}):P=(0,e.createComponentVNode)(2,t.Button,{icon:"pen",content:"Name Disease",onClick:function(){function D(){return C("name_strain",{strain_index:u.strainIndex})}return D}(),style:{"margin-left":"auto"}})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Common Name",className:"common-name-label",children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,align:"center",children:[N!=null?N:"Unknown",P]})}),V&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:V}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Disease Agent",children:S}),E,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Spread Vector",children:A!=null?A:"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Possible Cures",children:w!=null?w:"None"})]})},B=function(u,s){var d,C=(0,a.useBackend)(s),h=C.act,v=C.data,p=!!v.synthesisCooldown,N=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:p?"spinner":"clone",iconSpin:p,content:"Clone",disabled:p,onClick:function(){function V(){return h("clone_strain",{strain_index:u.strainIndex})}return V}()}),u.sectionButtons],0);return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:(d=u.sectionTitle)!=null?d:"Strain Information",buttons:N,children:(0,e.createComponentVNode)(2,y,{strain:u.strain,strainIndex:u.strainIndex})})})},k=function(u,s){var d,C=(0,a.useBackend)(s),h=C.act,v=C.data,p=v.selectedStrainIndex,N=v.strains,V=N[p-1];if(N.length===0)return(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No disease detected in provided blood sample."})});if(N.length===1){var S;return(0,e.createFragment)([(0,e.createComponentVNode)(2,B,{strain:N[0],strainIndex:1,sectionButtons:(0,e.createComponentVNode)(2,b)}),((S=N[0].symptoms)==null?void 0:S.length)>0&&(0,e.createComponentVNode)(2,i,{strain:N[0]})],0)}var I=(0,e.createComponentVNode)(2,b);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Culture Information",fill:!0,buttons:I,children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",style:{height:"100%"},children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:N.map(function(L,w){var A;return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"virus",selected:p-1===w,onClick:function(){function x(){return h("switch_strain",{strain_index:w+1})}return x}(),children:(A=L.commonName)!=null?A:"Unknown"},w)})})}),(0,e.createComponentVNode)(2,B,{strain:V,strainIndex:p}),((d=V.symptoms)==null?void 0:d.length)>0&&(0,e.createComponentVNode)(2,i,{className:"remove-section-bottom-padding",strain:V})]})})})},g=function(u){return u.reduce(function(s,d){return s+d},0)},i=function(u){var s=u.strain.symptoms;return(0,e.createComponentVNode)(2,t.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Infection Symptoms",fill:!0,className:u.className,children:(0,e.createComponentVNode)(2,t.Table,{className:"symptoms-table",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stealth"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Resistance"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stage Speed"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Transmissibility"})]}),s.map(function(d,C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stealth}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.resistance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stageSpeed}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.transmissibility})]},C)}),(0,e.createComponentVNode)(2,t.Table.Row,{className:"table-spacer"}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"font-weight":"bold"},children:"Total"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.stealth}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.resistance}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.stageSpeed}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.transmissibility}))})]})]})})})},c=["flask","vial","eye-dropper"],m=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.synthesisCooldown,p=h.beakerContainsVirus,N=h.resistances;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Antibodies",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,wrap:!0,children:N.map(function(V,S){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:c[S%c.length],disabled:!!v,onClick:function(){function I(){return C("clone_vaccine",{resistance_index:S+1})}return I}(),mr:"0.5em"}),V]},S)})})})})}},67921:function(T,r,n){"use strict";r.__esModule=!0,r.ParticleAccelerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(25328),f=n(79646),b=n(36352),y=n(98595),B=n(35840),k=n(38307),g=function(u){switch(u){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},i=r.ParticleAccelerator=function(){function l(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,y.Window,{width:395,height:v?160:A==="north"||A==="south"?540:465,children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{dmIcon:"sync",content:"Connect",onClick:function(){function x(){return C("scan")}return x}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",mb:"5px",children:(0,e.createComponentVNode)(2,t.Box,{color:v?"good":"bad",children:v?"Operational":"Error: Verify Configuration"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:!v,onClick:function(){function x(){return C("power")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!v||N===0,onClick:function(){function x(){return C("remove_strength")}return x}(),mr:"4px"}),N,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!v||N===V,onClick:function(){function x(){return C("add_strength")}return x}(),ml:"4px"})]})]})}),v?"":(0,e.createComponentVNode)(2,t.Section,{title:A?"EM Acceleration Chamber Orientation: "+(0,o.capitalize)(A):"Place EM Acceleration Chamber Next To Console",children:A===0?"":A==="north"||A==="south"?(0,e.createComponentVNode)(2,m):(0,e.createComponentVNode)(2,c)})]})})}return l}(),c=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})},m=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,tooltip:x.status,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})}},71432:function(T,r,n){"use strict";r.__esModule=!0,r.PdaPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.PdaPainter=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:l?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,b)})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"download",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){function l(){return m("insert_pda")}return l}()})]})})})},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.pda_colors;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,B)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Table,{className:"PdaPainter__list",children:Object.keys(u).map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function d(){return m("choose_pda",{selectedPda:s})}return d}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+u[s][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s})]},s)})})})})]})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.current_appearance,s=l.preview_appearance;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Current PDA",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){function d(){return m("eject_pda")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function d(){return m("paint_pda")}return d}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Preview",children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})})]})}},33388:function(T,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.PersonalCrafting=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.busy,u=m.category,s=m.display_craftable_only,d=m.display_compact,C=m.prev_cat,h=m.next_cat,v=m.subcategory,p=m.prev_subcat,N=m.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!l&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:u,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:s?"check-square-o":"square-o",selected:s,onClick:function(){function V(){return c("toggle_recipes")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:d?"check-square-o":"square-o",selected:d,onClick:function(){function V(){return c("toggle_compact")}return V}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:C,icon:"arrow-left",onClick:function(){function V(){return c("backwardCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-right",onClick:function(){function V(){return c("forwardCat")}return V}()})]}),v&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:p,icon:"arrow-left",onClick:function(){function V(){return c("backwardSubCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function V(){return c("forwardSubCat")}return V}()})]}),d?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})]})})}return B}(),b=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function C(){return c("make",{make:d.ref})}return C}()}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)}),!l&&s.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)})]})})},y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function C(){return c("make",{make:d.ref})}return C}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.name)}),!l&&s.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.name)})]})}},56150:function(T,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Photocopier=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:440,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Photocopier",color:"silver",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Copies:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"2em",bold:!0,children:m.copynumber}),(0,e.createComponentVNode)(2,t.Stack.Item,{float:"right",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"minus",textAlign:"center",content:"",onClick:function(){function l(){return c("minus")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function l(){return c("add")}return l}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Toner:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,children:m.toner})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Document:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.copyitem&&!m.mob,content:m.copyitem?m.copyitem:m.mob?m.mob+"'s ass!":"document",onClick:function(){function l(){return c("removedocument")}return l}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Folder:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.folder,content:m.folder?m.folder:"folder",onClick:function(){function l(){return c("removefolder")}return l}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,y)]})})})}return B}(),b=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function u(){return c("copy")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function u(){return c("scandocument")}return u}()}),!!l&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){function u(){return c("ai_text")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function u(){return c("ai_pic")}return u}()})],4)],0)},y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:m.files.map(function(l){return(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:m.toner<=0,onClick:function(){function u(){return c("filecopy",{uid:l.uid})}return u}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function u(){return c("deletefile",{uid:l.uid})}return u}()})]})},l.name)})})}},84676:function(T,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=["tempKey"];function b(g,i){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(i.includes(m))continue;c[m]=g[m]}return c}var y={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},B=function(i,c){var m=i.tempKey,l=b(i,f),u=y[m];if(!u)return null;var s=(0,a.useBackend)(c),d=s.data,C=s.act,h=d.currentTemp,v=u.label,p=u.icon,N=m===h,V=function(){C("setTemp",{temp:m})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:N,onClick:V},l,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:p}),v]})))},k=r.PoolController=function(){function g(i,c){for(var m=(0,a.useBackend)(c),l=m.data,u=l.emagged,s=l.currentTemp,d=y[s]||y.normal,C=d.label,h=d.color,v=[],p=0,N=Object.entries(y);p50?"battery-half":"battery-quarter")||h==="C"&&"bolt"||h==="F"&&"battery-full"||h==="M"&&"slash",color:h==="N"&&(v>50?"yellow":"red")||h==="C"&&"yellow"||h==="F"&&"green"||h==="M"&&"orange"}),(0,e.createComponentVNode)(2,B.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(v)+"%"})],4)};u.defaultHooks=f.pureComponentHooks;var s=function(C){var h,v,p=C.status;switch(p){case"AOn":h=!0,v=!0;break;case"AOff":h=!0,v=!1;break;case"On":h=!1,v=!0;break;case"Off":h=!1,v=!1;break}var N=(v?"On":"Off")+(" ["+(h?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,B.ColorBox,{color:v?"good":"bad",content:h?void 0:"M",title:N})};s.defaultHooks=f.pureComponentHooks},50992:function(T,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(29319),f=n(3939),b=n(321),y=n(5485),B=n(98595),k=r.PrisonerImplantManager=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.loginState,d=u.prisonerInfo,C=u.chemicalInfo,h=u.trackingInfo,v;if(!s.logged_in)return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.LoginScreen)})});var p=[1,5,10];return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:d.name?"eject":"id-card",selected:d.name,content:d.name?d.name:"-----",tooltip:d.name?"Eject ID":"Insert ID",onClick:function(){function N(){return l("id_card")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[d.points!==null?d.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:d.points===null,content:"Reset",onClick:function(){function N(){return l("reset_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[d.goal!==null?d.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:d.goal===null,content:"Edit",onClick:function(){function N(){return(0,f.modalOpen)(c,"set_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:d.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:h.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:N.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:N.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function V(){return(0,f.modalOpen)(c,"warn",{uid:N.uid})}return V}()})})]})]},N.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:C.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:N.volume})}),p.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:N.volumec;return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:!0,title:N.name,dmIcon:N.icon,dmIconState:N.icon_state,buttonsAlt:(0,e.createComponentVNode)(2,t.Button,{bold:!0,translucent:!0,fontSize:1.5,tooltip:V&&"Not enough tickets",disabled:V,onClick:function(){function S(){return g("purchase",{purchase:N.itemID})}return S}(),children:[N.cost,(0,e.createComponentVNode)(2,t.Icon,{m:0,mt:.25,name:"ticket",color:V?"bad":"good",size:1.6})]}),children:N.desc},N.name)})})})})})})}return b}()},94813:function(T,r,n){"use strict";r.__esModule=!0,r.RCD=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=n(49148),y=r.RCD=function(){function l(u,s){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:670,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return l}(),B=function(u,s){var d=(0,a.useBackend)(s),C=d.data,h=C.matter,v=C.max_matter,p=v*.7,N=v*.25;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Matter Storage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[p,1/0],average:[N,p],bad:[-1/0,N]},value:h,maxValue:v,children:(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:h+" / "+v+" units"})})})})},k=function(){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Construction Type",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,g,{mode_type:"Floors and Walls"}),(0,e.createComponentVNode)(2,g,{mode_type:"Airlocks"}),(0,e.createComponentVNode)(2,g,{mode_type:"Windows"}),(0,e.createComponentVNode)(2,g,{mode_type:"Deconstruction"})]})})})},g=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=u.mode_type,p=h.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",content:v,selected:p===v?1:0,onClick:function(){function N(){return C("mode",{mode:v})}return N}()})})},i=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.door_name,p=h.electrochromic,N=h.airlock_glass;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Airlock Settings",children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,e.createFragment)([(0,e.createTextVNode)("Rename: "),(0,e.createVNode)(1,"b",null,v,0)],0),onClick:function(){function V(){return(0,f.modalOpen)(s,"renameAirlock")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:N===1&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:p?"toggle-on":"toggle-off",content:"Electrochromic",selected:p,onClick:function(){function V(){return C("electrochromic")}return V}()})})]})})})},c=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.tab,p=h.locked,N=h.one_access,V=h.selected_accesses,S=h.regions;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"cog",selected:v===1,onClick:function(){function I(){return C("set_tab",{tab:1})}return I}(),children:"Airlock Types"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===2,icon:"list",onClick:function(){function I(){return C("set_tab",{tab:2})}return I}(),children:"Airlock Access"})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v===1?(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Types",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m,{check_number:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m,{check_number:1})})]})}):v===2&&p?(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Access",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock-open",content:"Unlock",onClick:function(){function I(){return C("set_lock",{new_lock:"unlock"})}return I}()}),children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Airlock access selection is currently locked."]})})}):(0,e.createComponentVNode)(2,b.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock",content:"Lock",onClick:function(){function I(){return C("set_lock",{new_lock:"lock"})}return I}()}),usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:N,content:"One",onClick:function(){function I(){return C("set_one_access",{access:"one"})}return I}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!N,width:4,content:"All",onClick:function(){function I(){return C("set_one_access",{access:"all"})}return I}()})],4),accesses:S,selectedList:V,accessMod:function(){function I(L){return C("set",{access:L})}return I}(),grantAll:function(){function I(){return C("grant_all")}return I}(),denyAll:function(){function I(){return C("clear_all")}return I}(),grantDep:function(){function I(L){return C("grant_region",{region:L})}return I}(),denyDep:function(){function I(L){return C("deny_region",{region:L})}return I}()})})],4)},m=function(u,s){for(var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.door_types_ui_list,p=h.door_type,N=u.check_number,V=[],S=0;Sf?w=(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"There are new messages"}):w=(0,e.createComponentVNode)(2,t.Box,{color:"label",mb:1,children:"There are no new messages"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,e.createComponentVNode)(2,t.Button,{width:9,content:L?"Speaker Off":"Speaker On",selected:!L,icon:L?"volume-mute":"volume-up",onClick:function(){function A(){return N("toggleSilent")}return A}()}),children:[w,(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Messages",icon:S>f?"envelope-open-text":"envelope",onClick:function(){function A(){return N("setScreen",{setScreen:6})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Assistance",icon:"hand-paper",onClick:function(){function A(){return N("setScreen",{setScreen:1})}return A}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Supplies",icon:"box",onClick:function(){function A(){return N("setScreen",{setScreen:2})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Secondary Goal",icon:"clipboard-list",onClick:function(){function A(){return N("setScreen",{setScreen:11})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Relay Anonymous Information",icon:"comment",onClick:function(){function A(){return N("setScreen",{setScreen:3})}return A}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Print Shipping Label",icon:"tag",onClick:function(){function A(){return N("setScreen",{setScreen:9})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function A(){return N("setScreen",{setScreen:10})}return A}()})]})}),!!I&&(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function A(){return N("setScreen",{setScreen:8})}return A}()})})]})})},i=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.department,I=[],L;switch(h.purpose){case"ASSISTANCE":I=V.assist_dept,L="Request assistance from another department";break;case"SUPPLIES":I=V.supply_dept,L="Request supplies from another department";break;case"INFO":I=V.info_dept,L="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:L,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return N("setScreen",{setScreen:0})}return w}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:I.filter(function(w){return w!==S}).map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function A(){return N("writeInput",{write:w,priority:y})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function A(){return N("writeInput",{write:w,priority:B})}return A}()})]},w)})})})})},c=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S;switch(h.type){case"SUCCESS":S="Message sent successfully";break;case"FAIL":S="Unable to contact messaging server";break}return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:S,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function I(){return N("setScreen",{setScreen:0})}return I}()})})},m=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S,I;switch(h.type){case"MESSAGES":S=V.message_log,I="Message Log";break;case"SHIPPING":S=V.shipping_log,I="Shipping label print log";break}return S.reverse(),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:I,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return N("setScreen",{setScreen:0})}return L}()}),children:S.map(function(L){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"left",children:[L.map(function(w,A){return(0,e.createVNode)(1,"div",null,w,0,null,A)}),(0,e.createVNode)(1,"hr")]},L)})})})},l=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.recipient,I=V.message,L=V.msgVerified,w=V.msgStamped;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function A(){return N("setScreen",{setScreen:0})}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:w})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function A(){return N("department",{department:S})}return A}()})})})],4)},u=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.message,I=V.announceAuth;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return N("setScreen",{setScreen:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function L(){return N("writeAnnouncement")}return L}()})],4),children:S})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(I&&S),onClick:function(){function L(){return N("sendAnnouncement")}return L}()})]})})],4)},s=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.shipDest,I=V.msgVerified,L=V.ship_dept;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return N("setScreen",{setScreen:0})}return w}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:I})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(S&&I),onClick:function(){function w(){return N("printLabel")}return w}()})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Destinations",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:L.map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:(0,e.createComponentVNode)(2,t.Button,{content:S===w?"Selected":"Select",selected:S===w,onClick:function(){function A(){return N("shipSelect",{shipSelect:w})}return A}()})},w)})})})})],4)},d=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.secondaryGoalAuth,I=V.secondaryGoalEnabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return N("setScreen",{setScreen:0})}return L}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?S?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Request Secondary Goal",icon:"clipboard-list",disabled:!(S&&I),onClick:function(){function L(){return N("requestSecondaryGoal")}return L}()})]})})],4)}},9861:function(T,r,n){"use strict";r.__esModule=!0,r.RndBackupConsole=r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.RndBackupConsole=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.network_name,l=c.has_disk,u=c.disk_name,s=c.linked,d=c.techs,C=c.last_timestamp;return(0,e.createComponentVNode)(2,o.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Device Info",children:[(0,e.createComponentVNode)(2,t.Box,{mb:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Network",children:s?(0,e.createComponentVNode)(2,t.Button,{content:m,icon:"unlink",selected:1,onClick:function(){function h(){return i("unlink")}return h}()}):"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Loaded Disk",children:l?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u+" (Last backup: "+C+")",icon:"save",selected:1,onClick:function(){function h(){return i("eject_disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Save all",onClick:function(){function h(){return i("saveall2disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load all",onClick:function(){function h(){return i("saveall2network")}return h}()})],4):"None"})]})}),!!s||(0,e.createComponentVNode)(2,b)]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Section,{title:"Tech Info",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Tech Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Disk Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),Object.keys(d).map(function(h){return!(d[h].network_level>0||d[h].disk_level>0)||(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].network_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].disk_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Load to network",disabled:!l||!s,onClick:function(){function v(){return i("savetech2network",{tech:h})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load to disk",disabled:!l||!s,onClick:function(){function v(){return i("savetech2disk",{tech:h})}return v}()})]})]},h)})]})})})]})})}return y}(),b=r.LinkMenu=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.controllers;return(0,e.createComponentVNode)(2,t.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),m.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function u(){return i("linktonetworkcontroller",{target_controller:l.addr})}return u}()})})]},l.addr)})]})})}return y}()},68303:function(T,r,n){"use strict";r.__esModule=!0,r.AnalyzerMenu=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=r.AnalyzerMenu=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.data,c=g.act,m=i.tech_levels,l=i.loaded_item,u=i.linked_analyzer,s=i.can_discover;return u?l?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Object Analysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Deconstruct",icon:"microscope",onClick:function(){function d(){c("deconstruct")}return d}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Eject",icon:"eject",onClick:function(){function d(){c("eject_item")}return d}()}),!s||(0,e.createComponentVNode)(2,o.Button,{content:"Discover",icon:"atom",onClick:function(){function d(){c("discover")}return d}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:l.name})})}),(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Current Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Object Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"New Level"})]}),m.map(function(d){return(0,e.createComponentVNode)(2,b,{techLevel:d},d.id)})]})})],4):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})}return y}(),b=function(B,k){var g=B.techLevel,i=g.name,c=g.desc,m=g.level,l=g.object_level,u=g.ui_icon,s=l!=null,d=s&&l>=m?Math.max(l,m+1):m;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:c})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:u})," ",i]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m}),s?(0,e.createComponentVNode)(2,o.Table.Cell,{children:l}):(0,e.createComponentVNode)(2,o.Table.Cell,{className:"research-level-no-effect",children:"-"}),(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)([d!==m&&"upgraded-level"]),children:d})]})}},37556:function(T,r,n){"use strict";r.__esModule=!0,r.DataDiskMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o="design",f="tech",b=function(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.act,d=u.disk_data;return d?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:d.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:d.desc})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function C(){return s("updt_tech")}return C}()})})]}):null},y=function(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.act,d=u.disk_data;if(!d)return null;var C=d.name,h=d.lathe_types,v=d.materials,p=h.join(", ");return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:C}),p?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),v.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,N.name,0,{style:{"text-transform":"capitalize"}})," x ",N.amount]},N.name)}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function N(){return s("updt_design")}return N}()})})]})},B=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.disk_data;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Section,Object.assign({buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Erase",icon:"eraser",disabled:!d,onClick:function(){function C(){return u("erase_disk")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",icon:"eject",onClick:function(){function C(){u("eject_disk")}return C}()})],4)},c)))},k=function(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.act,d=u.disk_type,C=u.to_copy,h=c.title;return(0,e.createComponentVNode)(2,B,{title:h,children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:C.sort(function(v,p){return v.name.localeCompare(p.name)}).map(function(v){var p=v.name,N=v.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:p,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function V(){d===f?s("copy_tech",{id:N}):s("copy_design",{id:N})}return V}()})},N)})})})})},g=r.DataDiskMenu=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.data,s=u.disk_type,d=u.disk_data;if(!s)return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",children:"No disk loaded."});switch(s){case o:return d?(0,e.createComponentVNode)(2,B,{title:"Design Disk",children:(0,e.createComponentVNode)(2,y)}):(0,e.createComponentVNode)(2,k,{title:"Design Disk"});case f:return d?(0,e.createComponentVNode)(2,B,{title:"Technology Disk",children:(0,e.createComponentVNode)(2,b)}):(0,e.createComponentVNode)(2,k,{title:"Technology Disk"});default:return(0,e.createFragment)([(0,e.createTextVNode)("UNRECOGNIZED DISK TYPE")],4)}}return i}()},16830:function(T,r,n){"use strict";r.__esModule=!0,r.LatheCategory=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),f=r.LatheCategory=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.data,i=k.act,c=g.category,m=g.matching_designs,l=g.menu,u=l===4,s=u?"build":"imprint";return(0,e.createComponentVNode)(2,t.Section,{title:c,children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,t.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:m.map(function(d){var C=d.id,h=d.name,v=d.can_build,p=d.materials;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:h,disabled:v<1,onClick:function(){function N(){return i(s,{id:C,amount:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function N(){return i(s,{id:C,amount:5})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function N(){return i(s,{id:C,amount:10})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.map(function(N){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",N.is_red?"color-red":null,[N.amount,(0,e.createTextVNode)(" "),N.name],0)],0)})})]},C)})})]})}return b}()},70497:function(T,r,n){"use strict";r.__esModule=!0,r.LatheChemicalStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheChemicalStorage=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=B.act,i=k.loaded_chemicals,c=k.menu===4;return(0,e.createComponentVNode)(2,t.Section,{title:"Chemical Storage",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Purge All",icon:"trash",onClick:function(){function m(){var l=c?"disposeallP":"disposeallI";g(l)}return m}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(m){var l=m.volume,u=m.name,s=m.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+l+" of "+u,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function d(){var C=c?"disposeP":"disposeI";g(C,{id:s})}return d}()})},s)})})]})}return f}()},70864:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMainMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),f=n(68198),b=r.LatheMainMenu=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.data,c=g.act,m=i.menu,l=i.categories,u=m===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:u+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,f.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:l.map(function(s){return(0,e.createComponentVNode)(2,t.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:s,onClick:function(){function d(){c("setCategory",{category:s})}return d}()})},s)})})]})}return y}()},42878:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterialStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterialStorage=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=B.act,i=k.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:i.map(function(c){var m=c.id,l=c.amount,u=c.name,s=function(){function v(p){var N=k.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";g(N,{id:m,amount:p})}return v}(),d=Math.floor(l/2e3),C=l<1,h=d===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:C?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",l," of ",u]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",d," sheet",h,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function v(){return s(1)}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function v(){return s("custom")}return v}()}),l>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function v(){return s(5)}return v}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function v(){return s(50)}return v}()})],0):null})]},m)})})})}return f}()},52662:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterials=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterials=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=k.total_materials,i=k.max_materials,c=k.max_chemicals,m=k.total_chemicals;return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,e.createComponentVNode)(2,t.Table,{width:"auto",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g}),i?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+i}):null]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return f}()},9681:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(12644),f=n(70864),b=n(16830),y=n(42878),B=n(70497),k=["menu"];function g(u,s){if(u==null)return{};var d={};for(var C in u)if({}.hasOwnProperty.call(u,C)){if(s.includes(C))continue;d[C]=u[C]}return d}var i=t.Tabs.Tab,c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.menu===o.MENU.LATHE?["nav_protolathe",v.submenu_protolathe]:["nav_imprinter",v.submenu_imprinter],N=p[0],V=p[1],S=s.menu,I=g(s,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,i,Object.assign({selected:V===S,onClick:function(){function L(){return h(N,{menu:S})}return L}()},I)))},m=function(s){switch(s){case o.PRINTER_MENU.MAIN:return(0,e.createComponentVNode)(2,f.LatheMainMenu);case o.PRINTER_MENU.SEARCH:return(0,e.createComponentVNode)(2,b.LatheCategory);case o.PRINTER_MENU.MATERIALS:return(0,e.createComponentVNode)(2,y.LatheMaterialStorage);case o.PRINTER_MENU.CHEMICALS:return(0,e.createComponentVNode)(2,B.LatheChemicalStorage)}},l=r.LatheMenu=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.menu,p=h.linked_lathe,N=h.linked_imprinter;return v===o.MENU.LATHE&&!p?(0,e.createComponentVNode)(2,t.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):v===o.MENU.IMPRINTER&&!N?(0,e.createComponentVNode)(2,t.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MAIN,icon:"bars",children:"Main Menu"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MATERIALS,icon:"layer-group",children:"Materials"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.CHEMICALS,icon:"flask-vial",children:"Chemicals"})]}),m(h.menu===o.MENU.LATHE?h.submenu_protolathe:h.submenu_imprinter)]})}return u}()},68198:function(T,r,n){"use strict";r.__esModule=!0,r.LatheSearch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheSearch=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"Search...",onEnter:function(){function g(i,c){return k("search",{to_search:c})}return g}()})})}return f}()},81421:function(T,r,n){"use strict";r.__esModule=!0,r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),f=r.LinkMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.controllers;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),c.map(function(m){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.addr}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.net_id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function l(){return g("linktonetworkcontroller",{target_controller:m.addr})}return l}()})})]},m.addr)})]})})})})}return b}()},6256:function(T,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.SettingsMenu=function(){function y(B,k){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,b)]})}return y}(),f=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.sync,l=c.admin;return(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",align:"flex-start",children:(0,e.createComponentVNode)(2,t.Button,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){function u(){i("unlink")}return u}()})})})},b=function(B,k){var g=(0,a.useBackend)(k),i=g.data,c=g.act,m=i.linked_analyzer,l=i.linked_lathe,u=i.linked_imprinter;return(0,e.createComponentVNode)(2,t.Section,{title:"Linked Devices",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){function s(){return c("find_device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Scientific Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!m,content:m?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"analyze"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!l,content:l?"Unlink":"Undetected",onClick:function(){function s(){c("disconnect",{item:"lathe"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Circuit Imprinter",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!u,content:u?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"imprinter"})}return s}()})})]})})}},12644:function(T,r,n){"use strict";r.__esModule=!0,r.RndConsole=r.PRINTER_MENU=r.MENU=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),f=n(35840),b=n(37556),y=n(9681),B=n(81421),k=n(6256),g=n(68303),i=["menu"];function c(p,N){if(p==null)return{};var V={};for(var S in p)if({}.hasOwnProperty.call(p,S)){if(N.includes(S))continue;V[S]=p[S]}return V}var m=o.Tabs.Tab,l=r.MENU={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},u=r.PRINTER_MENU={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},s=function(N){switch(N){case l.MAIN:return(0,e.createComponentVNode)(2,v);case l.DISK:return(0,e.createComponentVNode)(2,b.DataDiskMenu);case l.ANALYZE:return(0,e.createComponentVNode)(2,g.AnalyzerMenu);case l.LATHE:case l.IMPRINTER:return(0,e.createComponentVNode)(2,y.LatheMenu);case l.SETTINGS:return(0,e.createComponentVNode)(2,k.SettingsMenu);default:return"UNKNOWN MENU"}},d=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.menu,A=N.menu,x=c(N,i);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m,Object.assign({selected:w===A,onClick:function(){function E(){return I("nav",{menu:A})}return E}()},x)))},C=r.RndConsole=function(){function p(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data;if(!L.linked)return(0,e.createComponentVNode)(2,B.LinkMenu);var w=L.menu,A=L.linked_analyzer,x=L.linked_lathe,E=L.linked_imprinter,P=L.wait_message;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,d,{icon:"flask",menu:l.MAIN,children:"Research"}),!!A&&(0,e.createComponentVNode)(2,d,{icon:"microscope",menu:l.ANALYZE,children:"Analyze"}),!!x&&(0,e.createComponentVNode)(2,d,{icon:"print",menu:l.LATHE,children:"Protolathe"}),!!E&&(0,e.createComponentVNode)(2,d,{icon:"memory",menu:l.IMPRINTER,children:"Imprinter"}),(0,e.createComponentVNode)(2,d,{icon:"floppy-disk",menu:l.DISK,children:"Disk"}),(0,e.createComponentVNode)(2,d,{icon:"cog",menu:l.SETTINGS,children:"Settings"})]}),s(w),(0,e.createComponentVNode)(2,h)]})})})}return p}(),h=function(N,V){var S=(0,a.useBackend)(V),I=S.data,L=I.wait_message;return L?(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay",children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay__Wrapper",children:(0,e.createComponentVNode)(2,o.NoticeBox,{color:"black",children:L})})}):null},v=function(N,V){var S=(0,a.useBackend)(V),I=S.data,L=I.tech_levels;return(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Level"})]}),L.map(function(w){var A=w.id,x=w.name,E=w.desc,P=w.level,D=w.ui_icon;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:E})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:D})," ",x]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P})]},A)})]})})}},29205:function(T,r,n){"use strict";r.__esModule=!0,r.RndNetController=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=r.RndNetController=function(){function k(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=l.ion,s=(0,t.useLocalState)(i,"mainTabIndex",0),d=s[0],C=s[1],h=function(){function v(p){switch(p){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return v}();return(0,e.createComponentVNode)(2,f.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:d===0,onClick:function(){function v(){return C(0)}return v}(),children:"Network Management"},"ConfigPage"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"floppy-disk",selected:d===1,onClick:function(){function v(){return C(1)}return v}(),children:"Design Management"},"DesignPage")]}),h(d)]})})}return k}(),y=function(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=(0,t.useLocalState)(i,"filterType","ALL"),s=u[0],d=u[1],C=l.network_password,h=l.network_name,v=l.devices,p=[];p.push(s),s==="MSC"&&(p.push("BCK"),p.push("PGN"));var N=s==="ALL"?v:v.filter(function(V){return p.indexOf(V.dclass)>-1});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Network Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Name",children:(0,e.createComponentVNode)(2,o.Button,{content:h||"Unset",selected:h,icon:"edit",onClick:function(){function V(){return m("network_name")}return V}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Password",children:(0,e.createComponentVNode)(2,o.Button,{content:C||"Unset",selected:C,icon:"lock",onClick:function(){function V(){return m("network_password")}return V}()})})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Connected Devices",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="ALL",onClick:function(){function V(){return d("ALL")}return V}(),icon:"network-wired",children:"All Devices"},"AllDevices"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="SRV",onClick:function(){function V(){return d("SRV")}return V}(),icon:"server",children:"R&D Servers"},"RNDServers"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="RDC",onClick:function(){function V(){return d("RDC")}return V}(),icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MFB",onClick:function(){function V(){return d("MFB")}return V}(),icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MSC",onClick:function(){function V(){return d("MSC")}return V}(),icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Unlink"})]}),N.map(function(V){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function S(){return m("unlink_device",{dclass:V.dclass,uid:V.id})}return S}()})})]},V.id)})]})]})],4)},B=function(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=l.designs,s=(0,t.useLocalState)(i,"searchText",""),d=s[0],C=s[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Design Management",children:[(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search for designs",mb:2,onInput:function(){function h(v,p){return C(p)}return h}()}),u.filter((0,a.createSearch)(d,function(h){return h.name})).map(function(h){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,content:h.name,checked:!h.blacklisted,onClick:function(){function v(){return m(h.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:h.uid})}return v}()},h.name)})]})}},63315:function(T,r,n){"use strict";r.__esModule=!0,r.RndServer=void 0;var e=n(89005),a=n(72253),t=n(44879),o=n(36036),f=n(98595),b=r.RndServer=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.active,s=l.network_name;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:500,resizable:!0,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Section,{title:"Server Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Machine power",children:(0,e.createComponentVNode)(2,o.Button,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return m("toggle_active")}return d}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Link status",children:s===null?(0,e.createComponentVNode)(2,o.Box,{color:"red",children:"Unlinked"}):(0,e.createComponentVNode)(2,o.Box,{color:"green",children:"Linked"})})]})}),s===null?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})})}return k}(),y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.network_name;return(0,e.createComponentVNode)(2,o.Section,{title:"Network Info",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Connected network ID",children:u}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function s(){return m("unlink")}return s}()})})]})})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.controllers;return(0,e.createComponentVNode)(2,o.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),u.map(function(s){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:s.netname}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function d(){return m("link",{addr:s.addr})}return d}()})})]},s.addr)})]})})}},26109:function(T,r,n){"use strict";r.__esModule=!0,r.RobotSelfDiagnosis=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=function(k,g){var i=k/g;return i<=.2?"good":i<=.5?"average":"bad"},y=r.RobotSelfDiagnosis=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.data,m=c.component_data;return(0,e.createComponentVNode)(2,o.Window,{width:280,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:m.map(function(l,u){return(0,e.createComponentVNode)(2,t.Section,{title:(0,f.capitalize)(l.name),children:l.installed<=0?(0,e.createComponentVNode)(2,t.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:l.installed===-1?"Destroyed":"Missing"})})}):(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"72%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",color:b(l.brute_damage,l.max_damage),children:l.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:b(l.electronic_damage,l.max_damage),children:l.electronic_damage})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Powered",color:l.powered?"good":"bad",children:l.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:l.status?"good":"bad",children:l.status?"Yes":"No"})]})})]})},u)})})})}return B}()},97997:function(T,r,n){"use strict";r.__esModule=!0,r.RoboticsControlConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.RoboticsControlConsole=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.can_hack,l=c.safety,u=c.show_lock_all,s=c.cyborgs,d=s===void 0?[]:s;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:460,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l?"lock":"unlock",content:l?"Disable Safety":"Enable Safety",selected:l,onClick:function(){function C(){return i("arm",{})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:l,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function C(){return i("masslock",{})}return C}()})]}),(0,e.createComponentVNode)(2,b,{cyborgs:d,can_hack:m})]})})}return y}(),b=function(B,k){var g=B.cyborgs,i=B.can_hack,c=(0,a.useBackend)(k),m=c.act,l=c.data,u="Detonate";return l.detonate_cooldown>0&&(u+=" ("+l.detonate_cooldown+"s)"),g.length?g.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createFragment)([!!s.hackable&&!s.emagged&&(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){function d(){return m("hackbot",{uid:s.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:s.locked_down?"unlock":"lock",color:s.locked_down?"good":"default",content:s.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){function d(){return m("stopbot",{uid:s.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:u,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){function d(){return m("killbot",{uid:s.uid})}return d}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Box,{color:s.status?"bad":s.locked_down?"average":"good",children:s.status?"Not Responding":s.locked_down?"Locked Down":"Nominal"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:(0,e.createComponentVNode)(2,t.Box,{children:s.locstring})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.health>50?"good":"bad",value:s.health/100})}),typeof s.charge=="number"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.charge>30?"good":"bad",value:s.charge/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Capacity",children:(0,e.createComponentVNode)(2,t.Box,{color:s.cell_capacity<3e4?"average":"good",children:s.cell_capacity})})],4)||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"No Power Cell"})}),!!s.is_hacked&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safeties",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"DISABLED"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Module",children:s.module}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:(0,e.createComponentVNode)(2,t.Box,{color:s.synchronization?"default":"average",children:s.synchronization||"None"})})]})},s.uid)}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cyborg units detected within access parameters."})}},54431:function(T,r,n){"use strict";r.__esModule=!0,r.Safe=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Safe=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.dial,s=l.open,d=l.locked,C=l.contents;return(0,e.createComponentVNode)(2,o.Window,{theme:"safe",width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving",children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,e.createComponentVNode)(2,t.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,e.createVNode)(1,"br"),s?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,t.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*u+"deg)","z-index":0}})]}),!s&&(0,e.createComponentVNode)(2,B)]})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.dial,s=l.open,d=l.locked,C=function(v,p){return(0,e.createComponentVNode)(2,t.Button,{disabled:s||p&&!d,icon:"arrow-"+(p?"right":"left"),content:(p?"Right":"Left")+" "+v,iconRight:p,onClick:function(){function N(){return m(p?"turnleft":"turnright",{num:v})}return N}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:d,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){function h(){return m("open")}return h}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[C(50),C(10),C(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[C(1,!0),C(10,!0),C(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:u})]})},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:u.map(function(s,d){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function C(){return m("retrieve",{index:d+1})}return C}(),children:[(0,e.createComponentVNode)(2,t.Box,{as:"img",src:s.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),s.name]}),(0,e.createVNode)(1,"br")],4,s)})})},B=function(g,i){return(0,e.createComponentVNode)(2,t.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,e.createComponentVNode)(2,t.Box,{children:["1. Turn the dial left to the first number.",(0,e.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,e.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,e.createVNode)(1,"br"),"4. Open the safe."]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},29740:function(T,r,n){"use strict";r.__esModule=!0,r.SatelliteControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SatelliteControl=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.satellites,m=i.notice,l=i.meteor_shield,u=i.meteor_shield_coverage,s=i.meteor_shield_coverage_max,d=i.meteor_shield_coverage_percentage;return(0,e.createComponentVNode)(2,o.Window,{width:475,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[l&&(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:d>=100?"good":"average",value:u,maxValue:s,children:[d," %"]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alert",color:"red",children:i.notice}),c.map(function(C){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+C.id,children:[C.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:C.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function h(){return g("toggle",{id:C.id})}return h}()})]},C.id)})]})})]})})}return b}()},44162:function(T,r,n){"use strict";r.__esModule=!0,r.SecureStorage=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=n(36352),y=n(92986),B=r.SecureStorage=function(){function c(m,l){return(0,e.createComponentVNode)(2,f.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,g)})})})})}return c}(),k=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=window.event?m.which:m.keyCode;if(d===y.KEY_ENTER){m.preventDefault(),s("keypad",{digit:"E"});return}if(d===y.KEY_ESCAPE){m.preventDefault(),s("keypad",{digit:"C"});return}if(d===y.KEY_BACKSPACE){m.preventDefault(),s("backspace");return}if(d>=y.KEY_0&&d<=y.KEY_9){m.preventDefault(),s("keypad",{digit:d-y.KEY_0});return}if(d>=y.KEY_NUMPAD_0&&d<=y.KEY_NUMPAD_9){m.preventDefault(),s("keypad",{digit:d-y.KEY_NUMPAD_0});return}},g=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.locked,h=d.no_passcode,v=d.emagged,p=d.user_entered_code,N=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],V=h?"":C?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function S(I){return k(I,l)}return S}(),children:[(0,e.createComponentVNode)(2,o.Stack.Item,{height:7.3,children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+V]),height:"100%",children:v?"ERROR":p})}),(0,e.createComponentVNode)(2,o.Table,{children:N.map(function(S){return(0,e.createComponentVNode)(2,b.TableRow,{children:S.map(function(I){return(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,i,{number:I})},I)})},S[0])})})]})},i=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:C,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+C]),onClick:function(){function h(){return s("keypad",{digit:C})}return h}()})}},6272:function(T,r,n){"use strict";r.__esModule=!0,r.SecurityRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(3939),y=n(321),B=n(5485),k=n(22091),g={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},i=function(p,N){(0,b.modalOpen)(p,"edit",{field:N.edit,value:N.value})},c=r.SecurityRecords=function(){function v(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.loginState,w=I.currentPage,A;if(L.logged_in)w===1?A=(0,e.createComponentVNode)(2,l):w===2&&(A=(0,e.createComponentVNode)(2,d));else return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,m),A]})})]})}return v}(),m=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.currentPage,w=I.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:L===1,onClick:function(){function A(){return S("page",{page:1})}return A}(),children:"List Records"}),L===2&&w&&!w.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:L===2,children:["Record: ",w.fields[0].value]})]})})},l=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.records,w=(0,t.useLocalState)(N,"searchText",""),A=w[0],x=w[1],E=(0,t.useLocalState)(N,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(N,"sortOrder",!0),R=M[0],O=M[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,s)}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"SecurityRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,u,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,u,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,u,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,u,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,u,{id:"status",children:"Criminal Status"})]}),L.filter((0,a.createSearch)(A,function(F){return F.name+"|"+F.id+"|"+F.rank+"|"+F.fingerprint+"|"+F.status})).sort(function(F,_){var U=R?1:-1;return F[P].localeCompare(_[P])*U}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+g[F.status],onClick:function(){function _(){return S("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return _}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",F.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.fingerprint}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.status})]},F.id)})]})})})],4)},u=function(p,N){var V=(0,t.useLocalState)(N,"sortId","name"),S=V[0],I=V[1],L=(0,t.useLocalState)(N,"sortOrder",!0),w=L[0],A=L[1],x=p.id,E=p.children;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:S!==x&&"transparent",fluid:!0,onClick:function(){function P(){S===x?A(!w):(I(x),A(!0))}return P}(),children:[E,S===x&&(0,e.createComponentVNode)(2,o.Icon,{name:w?"sort-up":"sort-down",ml:"0.25rem;"})]})})})},s=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.isPrinting,w=(0,t.useLocalState)(N,"searchText",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:"0.25rem",content:"New Record",icon:"plus",onClick:function(){function E(){return S("new_general")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Cell Log",onClick:function(){function E(){return(0,b.modalOpen)(N,"print_cell_log")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",fluid:!0,onInput:function(){function E(P,D){return x(D)}return E}()})})]})},d=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.isPrinting,w=I.general,A=I.security;return!w||!w.fields?(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"General records lost!"}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Record",onClick:function(){function x(){return S("print_record")}return x}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated with this crew member!",tooltipPosition:"bottom-start",content:"Delete Record",onClick:function(){function x(){return S("delete_general")}return x}()})],4),children:(0,e.createComponentVNode)(2,C)})}),!A||!A.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function x(){return S("new_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Security records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:A.empty,content:"Delete Record",onClick:function(){function x(){return S("delete_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:A.fields.map(function(x,E){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:x.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(x.value),!!x.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:x.line_break?"1rem":"initial",onClick:function(){function P(){return i(N,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,h)],4)],0)},C=function(p,N){var V=(0,t.useBackend)(N),S=V.data,I=S.general;return!I||!I.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:I.fields.map(function(L,w){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(""+L.value),!!L.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:L.line_break?"1rem":"initial",onClick:function(){function A(){return i(N,L)}return A}()})]},w)})})}),!!I.has_photos&&I.photos.map(function(L,w){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:L,style:{width:"96px","margin-top":"5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",w+1]},w)})]})},h=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.security;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function w(){return(0,b.modalOpen)(N,"comment_add")}return w}()}),children:L.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):L.comments.map(function(w,A){return(0,e.createComponentVNode)(2,o.Box,{preserveWhitespace:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:w.header||"Auto-generated"}),(0,e.createVNode)(1,"br"),w.text||w,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function x(){return S("comment_delete",{id:A+1})}return x}()})]},A)})})})}},5099:function(T,r,n){"use strict";r.__esModule=!0,r.SeedExtractor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(3939);function y(u,s){var d=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(d)return(d=d.call(u)).next.bind(d);if(Array.isArray(u)||(d=B(u))||s&&u&&typeof u.length=="number"){d&&(u=d);var C=0;return function(){return C>=u.length?{done:!0}:{done:!1,value:u[C++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(u,s){if(u){if(typeof u=="string")return k(u,s);var d={}.toString.call(u).slice(8,-1);return d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set"?Array.from(u):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?k(u,s):void 0}}function k(u,s){(s==null||s>u.length)&&(s=u.length);for(var d=0,C=Array(s);d=A},h=function(w,A){return w<=A},v=s.split(" "),p=[],N=function(){var w=I.value,A=w.split(":");if(A.length===0)return 0;if(A.length===1)return p.push(function(P){return(P.name+" ("+P.variant+")").toLocaleLowerCase().includes(A[0].toLocaleLowerCase())}),0;if(A.length>2)return{v:function(){function P(D){return!1}return P}()};var x,E=d;if(A[1][A[1].length-1]==="-"?(E=h,x=Number(A[1].substring(0,A[1].length-1))):A[1][A[1].length-1]==="+"?(E=C,x=Number(A[1].substring(0,A[1].length-1))):x=Number(A[1]),isNaN(x))return{v:function(){function P(D){return!1}return P}()};switch(A[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":p.push(function(P){return E(P.lifespan,x)});break;case"e":case"end":case"endurance":p.push(function(P){return E(P.endurance,x)});break;case"m":case"mat":case"maturation":p.push(function(P){return E(P.maturation,x)});break;case"pr":case"prod":case"production":p.push(function(P){return E(P.production,x)});break;case"y":case"yield":p.push(function(P){return E(P.yield,x)});break;case"po":case"pot":case"potency":p.push(function(P){return E(P.potency,x)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":p.push(function(P){return E(P.amount,x)});break;default:return{v:function(){function P(D){return!1}return P}()}}},V,S=y(v),I;!(I=S()).done;)if(V=N(),V!==0&&V)return V.v;return function(L){for(var w=0,A=p;w=1?Number(E):1)}return A}()})]})]})}},2916:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ShuttleConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:i.status?i.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!i.shuttle&&(!!i.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:i.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function m(){return g("move",{move:c.id})}return m}()},c.name)})})||(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:"red",children:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!i.admin_controlled&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorization",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!i.status,onClick:function(){function c(){return g("request")}return c}()})})],0))]})})})})}return b}()},39401:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleManipulator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ShuttleManipulator=function(){function k(g,i){var c=(0,a.useLocalState)(i,"tabIndex",0),m=c[0],l=c[1],u=function(){function s(d){switch(d){case 0:return(0,e.createComponentVNode)(2,b);case 1:return(0,e.createComponentVNode)(2,y);case 2:return(0,e.createComponentVNode)(2,B);default:return"WE SHOULDN'T BE HERE!"}}return s}();return(0,e.createComponentVNode)(2,o.Window,{width:650,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===0,onClick:function(){function s(){return l(0)}return s}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===1,onClick:function(){function s(){return l(1)}return s}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===2,onClick:function(){function s(){return l(2)}return s}(),icon:"tools",children:"Modification"},"Modification")]}),u(m)]})})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID",children:s.id}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Timer",children:s.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Mode",children:s.mode}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Status",children:s.status}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function d(){return m("jump_to",{type:"mobile",id:s.id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function d(){return m("fast_travel",{id:s.id})}return d}()})]})]})},s.name)})})},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.templates_tabs,s=l.existing_shuttle,d=l.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:u.map(function(C){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===s.id,icon:"file",onClick:function(){function h(){return m("select_template_category",{cat:C})}return h}(),children:C},C)})}),!!s&&d[s.id].templates.map(function(C){return(0,e.createComponentVNode)(2,t.Section,{title:C.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[C.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:C.description}),C.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:C.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Load Template",icon:"download",onClick:function(){function h(){return m("select_template",{shuttle_id:C.shuttle_id})}return h}()})})]})},C.name)})]})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.existing_shuttle,s=l.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[u?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:u.status}),u.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:u.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function d(){return m("jump_to",{type:"mobile",id:u.id})}return d}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: None"}),s?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: "+s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:s.description}),s.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:s.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Preview",icon:"eye",onClick:function(){function d(){return m("preview",{shuttle_id:s.shuttle_id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function d(){return m("load",{shuttle_id:s.shuttle_id})}return d}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},86013:function(T,r,n){"use strict";r.__esModule=!0,r.SingularityMonitor=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(44879),f=n(72253),b=n(36036),y=n(76910),B=n(98595),k=n(36352),g=r.SingularityMonitor=function(){function l(u,s){var d=(0,f.useBackend)(s),C=d.act,h=d.data;return h.active===0?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,m)}return l}(),i=function(u){return Math.log2(16+Math.max(0,u))-4},c=function(u,s){var d=(0,f.useBackend)(s),C=d.act,h=d.data,v=h.singularities,p=v===void 0?[]:v;return(0,e.createComponentVNode)(2,B.Window,{width:450,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,title:"Detected Singularities",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"sync",content:"Refresh",onClick:function(){function N(){return C("refresh")}return N}()}),children:(0,e.createComponentVNode)(2,b.Table,{children:p.map(function(N){return(0,e.createComponentVNode)(2,b.Table.Row,{children:[(0,e.createComponentVNode)(2,b.Table.Cell,{children:N.singularity_id+". "+N.area_name}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,width:"120px",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(N.stage)})}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,b.Button,{content:"Details",onClick:function(){function V(){return C("view",{view:N.singularity_id})}return V}()})})]},N.singularity_id)})})})})})},m=function(u,s){var d=(0,f.useBackend)(s),C=d.act,h=d.data,v=h.active,p=h.singulo_stage,N=h.singulo_potential_stage,V=h.singulo_energy,S=h.singulo_high,I=h.singulo_low,L=h.generators,w=L===void 0?[]:L;return(0,e.createComponentVNode)(2,B.Window,{width:550,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:p,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(p)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Potential Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N,minValue:0,maxValue:6,ranges:{good:[1,p+.5],average:[p+.5,p+1.5],bad:[p+1.5,p+2]},children:(0,o.toFixed)(N)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:V,minValue:I,maxValue:S,ranges:{good:[.67*S+.33*I,S],average:[.33*S+.67*I,.67*S+.33*I],bad:[I,.33*S+.67*I]},children:(0,o.toFixed)(V)+"MJ"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function A(){return C("back")}return A}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(A){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Remaining Charge",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:A.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.toFixed)(A.charge)})},A.gen_index)})})})})]})})})}},88284:function(T,r,n){"use strict";r.__esModule=!0,r.Sleeper=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],g=r.Sleeper=function(){function d(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.hasOccupant,S=V?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,s);return(0,e.createComponentVNode)(2,f.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:S}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l)})]})})})}return d}(),i=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,u)],4)},c=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.occupant,S=N.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:"Auto-eject if dead:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{icon:S?"toggle-on":"toggle-off",selected:S,content:S?"On":"Off",onClick:function(){function I(){return p("auto_eject_dead_"+(S?"off":"on"))}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function I(){return p("ejectify")}return I}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:V.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxHealth,value:V.health/V.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]},children:(0,a.round)(V.health,0)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:b[V.stat][0],children:b[V.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxTemp,value:V.bodyTemperature/V.maxTemp,color:k[V.temperatureSuitability+3],children:[(0,a.round)(V.btCelsius,0),"\xB0C,",(0,a.round)(V.btFaren,0),"\xB0F"]})}),!!V.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.bloodMax,value:V.bloodLevel/V.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[V.bloodPercent,"%, ",V.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[V.pulse," BPM"]})],4)]})})},m=function(C,h){var v=(0,t.useBackend)(h),p=v.data,N=p.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Damage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:y.map(function(V,S){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V[0],children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:N[V[1]]/100,ranges:B,children:(0,a.round)(N[V[1]],0)},S)},S)})})})},l=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.hasOccupant,S=N.isBeakerLoaded,I=N.beakerMaxSpace,L=N.beakerFreeSpace,w=N.dialysis,A=w&&L>0;return(0,e.createComponentVNode)(2,o.Section,{title:"Dialysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!S||L<=0||!V,selected:A,icon:A?"toggle-on":"toggle-off",content:A?"Active":"Inactive",onClick:function(){function x(){return p("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!S,icon:"eject",content:"Eject",onClick:function(){function x(){return p("removebeaker")}return x}()})],4),children:S?(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:L/I,ranges:{good:[.5,1/0],average:[.25,.5],bad:[-1/0,.25]},children:[L,"u"]})})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No beaker loaded."})})},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.occupant,S=N.chemicals,I=N.maxchem,L=N.amounts;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Chemicals",children:S.map(function(w,A){var x="",E;return w.overdosing?(x="bad",E=(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle"}),"\xA0 Overdosing!"]})):w.od_warning&&(x="average",E=(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle"}),"\xA0 Close to overdosing"]})),(0,e.createComponentVNode)(2,o.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{title:w.title,level:"3",mx:"0",lineHeight:"18px",buttons:E,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:w.occ_amount/I,color:x,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[w.pretty_amount,"/",I,"u"]}),L.map(function(P,D){return(0,e.createComponentVNode)(2,o.Button,{disabled:!w.injectable||w.occ_amount+P>I||V.stat===2,icon:"syringe",content:"Inject "+P+"u",title:"Inject "+P+"u of "+w.title+" into the occupant",mb:"0",height:"19px",onClick:function(){function M(){return p("chemical",{chemid:w.id,amount:P})}return M}()},D)})]})})},A)})})},s=function(C,h){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},21597:function(T,r,n){"use strict";r.__esModule=!0,r.SlotMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SlotMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;if(i.money===null)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:90,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Could not scan your card or could not find account!"}),(0,e.createComponentVNode)(2,t.Box,{children:"Please wear or hold your ID and try again."})]})})});var c;return i.plays===1?c=i.plays+" player has tried their luck today!":c=i.plays+" players have tried their luck today!",(0,e.createComponentVNode)(2,o.Window,{width:300,height:151,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{lineHeight:2,children:c}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Credits Remaining",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:i.working,content:i.working?"Spinning...":"Spin",onClick:function(){function m(){return g("spin")}return m}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:i.resultlvl,children:i.result})]})})})}return b}()},46348:function(T,r,n){"use strict";r.__esModule=!0,r.Smartfridge=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Smartfridge=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.secure,m=i.can_dry,l=i.drying,u=i.contents;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Secure Access: Please have your identification ready."}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m?"Drying rack":"Contents",buttons:!!m&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:l?"power-off":"times",content:l?"On":"Off",selected:l,onClick:function(){function s(){return g("drying")}return s}()}),children:[!u&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cookie-bite",size:5,color:"brown"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No products loaded."]})}),!!u&&u.slice().sort(function(s,d){return s.display_name.localeCompare(d.display_name)}).map(function(s){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"55%",children:s.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"25%",children:["(",s.quantity," in stock)"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:13,children:[(0,e.createComponentVNode)(2,t.Button,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){function d(){return g("vend",{index:s.vend,amount:1})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:s.quantity,step:1,stepPixelSize:3,onChange:function(){function d(C,h){return g("vend",{index:s.vend,amount:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function d(){return g("vend",{index:s.vend,amount:s.quantity})}return d}()})]})]},s)})]})]})})})}return b}()},86162:function(T,r,n){"use strict";r.__esModule=!0,r.Smes=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),f=n(98595),b=1e3,y=r.Smes=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.capacityPercent,u=m.capacity,s=m.charge,d=m.inputAttempt,C=m.inputting,h=m.inputLevel,v=m.inputLevelMax,p=m.inputAvailable,N=m.outputPowernet,V=m.outputAttempt,S=m.outputting,I=m.outputLevel,L=m.outputLevelMax,w=m.outputUsed,A=l>=100&&"good"||C&&"average"||"bad",x=S&&"good"||s>0&&"average"||"bad";return(0,e.createComponentVNode)(2,f.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stored Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l*.01,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d?"sync-alt":"times",selected:d,onClick:function(){function E(){return c("tryinput")}return E}(),children:d?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:l>=100&&"Fully Charged"||C&&"Charging"||"Not Charging"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Input",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:h===0,onClick:function(){function E(){return c("input",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:h===0,onClick:function(){function E(){return c("input",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:h/b,fillValue:p/b,minValue:0,maxValue:v/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,D){return c("input",{target:D*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:h===v,onClick:function(){function E(){return c("input",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:h===v,onClick:function(){function E(){return c("input",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(p)})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Output Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:V?"power-off":"times",selected:V,onClick:function(){function E(){return c("tryoutput")}return E}(),children:V?"On":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:x,children:N?S?"Sending":s>0?"Not Sending":"No Charge":"Not Connected"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Output",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:I===0,onClick:function(){function E(){return c("output",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:I===0,onClick:function(){function E(){return c("output",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:I/b,minValue:0,maxValue:L/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,D){return c("output",{target:D*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:I===L,onClick:function(){function E(){return c("output",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:I===L,onClick:function(){function E(){return c("output",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Outputting",children:(0,o.formatPower)(w)})]})})]})})})}return B}()},63584:function(T,r,n){"use strict";r.__esModule=!0,r.SolarControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SolarControl=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=0,m=1,l=2,u=i.generated,s=i.generated_ratio,d=i.tracking_state,C=i.tracking_rate,h=i.connected_panels,v=i.connected_tracker,p=i.cdir,N=i.direction,V=i.rotating_direction;return(0,e.createComponentVNode)(2,o.Window,{width:490,height:277,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){function S(){return g("refresh")}return S}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar tracker",color:v?"good":"bad",children:v?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:h>0?"good":"bad",children:h})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power output",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:s,children:u+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[p,"\xB0 (",N,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===l&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),d===m&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",C,"\xB0/h (",V,")"," "]}),d===c&&(0,e.createComponentVNode)(2,t.Box,{children:" Tracker offline "})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[d!==l&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onDrag:function(){function S(I,L){return g("cdir",{cdir:L})}return S}()}),d===l&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:d===c,onClick:function(){function S(){return g("track",{track:c})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:d===m,onClick:function(){function S(){return g("track",{track:m})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:d===l,disabled:!v,onClick:function(){function S(){return g("track",{track:l})}return S}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===m&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:C,format:function(){function S(I){var L=Math.sign(I)>0?"+":"-";return L+Math.abs(I)}return S}(),onDrag:function(){function S(I,L){return g("tdir",{tdir:L})}return S}()}),d===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),d===l&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}return b}()},38096:function(T,r,n){"use strict";r.__esModule=!0,r.SpawnersMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SpawnersMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.spawners||[];return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{children:c.map(function(m){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:m.name+" ("+m.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function l(){return g("jump",{ID:m.uids})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function l(){return g("spawn",{ID:m.uids})}return l}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:m.desc}),!!m.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:m.fluff}),!!m.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:m.important_info})]},m.name)})})})})}return b}()},30586:function(T,r,n){"use strict";r.__esModule=!0,r.SpecMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SpecMenu=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:1100,height:600,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return g}(),b=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("hemomancer")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Vampiric claws",16),(0,e.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood Barrier",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood tendrils",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Sanguine pool",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Predator senses",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood eruption",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"The blood bringers rite",16),(0,e.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4)]})})},y=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("umbrae")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Cloak of darkness",16),(0,e.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow anchor",16),(0,e.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow snare",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Dark passage",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Extinguish",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,e.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Eternal darkness",16),(0,e.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,e.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16)]})})},B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("gargantua")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rejuvenate",16),(0,e.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell",16),(0,e.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Seismic stomp",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood rush",16),(0,e.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell II",16),(0,e.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Overwhelming force",16),(0,e.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Demonic grasp",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Charge",16),(0,e.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Desecrated Duel",16),(0,e.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4)]})})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("dantalion")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Enthrall",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall cap",16),(0,e.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall commune",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Subspace swap",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Pacify",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Decoy",16),(0,e.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rally thralls",16),(0,e.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood bond",16),(0,e.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Mass Hysteria",16),(0,e.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4)]})})}},95152:function(T,r,n){"use strict";r.__esModule=!0,r.StackCraft=void 0;var e=n(89005),a=n(72253),t=n(88510),o=n(64795),f=n(25328),b=n(98595),y=n(36036),B=r.StackCraft=function(){function s(){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:500,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return s}(),k=function(d,C){var h=(0,a.useBackend)(C),v=h.data,p=v.amount,N=v.recipes,V=(0,a.useLocalState)(C,"searchText",""),S=V[0],I=V[1],L=g(N,(0,f.createSearch)(S)),w=(0,a.useLocalState)(C,"",!1),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,title:"Amount: "+p,buttons:(0,e.createFragment)([A&&(0,e.createComponentVNode)(2,y.Input,{width:12.5,value:S,placeholder:"Find recipe",onInput:function(){function E(P,D){return I(D)}return E}()}),(0,e.createComponentVNode)(2,y.Button,{ml:.5,tooltip:"Search",tooltipPosition:"bottom-end",icon:"magnifying-glass",selected:A,onClick:function(){function E(){return x(!A)}return E}()})],0),children:L?(0,e.createComponentVNode)(2,l,{recipes:L}):(0,e.createComponentVNode)(2,y.NoticeBox,{children:"No recipes found!"})})},g=function s(d,C){var h=(0,o.flow)([(0,t.map)(function(v){var p=v[0],N=v[1];return i(N)?C(p)?v:[p,s(N,C)]:C(p)?v:[p,void 0]}),(0,t.filter)(function(v){var p=v[0],N=v[1];return N!==void 0}),(0,t.sortBy)(function(v){var p=v[0],N=v[1];return p}),(0,t.sortBy)(function(v){var p=v[0],N=v[1];return!i(N)}),(0,t.reduce)(function(v,p){var N=p[0],V=p[1];return v[N]=V,v},{})])(Object.entries(d));return Object.keys(h).length?h:void 0},i=function(d){return d.uid===void 0},c=function(d,C){return d.required_amount>C?0:Math.floor(C/d.required_amount)},m=function(d,C){for(var h=(0,a.useBackend)(C),v=h.act,p=d.recipe,N=d.max_possible_multiplier,V=Math.min(N,Math.floor(p.max_result_amount/p.result_amount)),S=[5,10,25],I=[],L=function(){var E=A[w];V>=E&&I.push((0,e.createComponentVNode)(2,y.Button,{bold:!0,translucent:!0,fontSize:.85,width:"32px",content:E*p.result_amount+"x",onClick:function(){function P(){return v("make",{recipe_uid:p.uid,multiplier:E})}return P}()}))},w=0,A=S;w1?I+"x ":"",M=L>1?"s":"",R=""+D+V,O=L+" sheet"+M,F=c(S,N);return(0,e.createComponentVNode)(2,y.ImageButton,{fluid:!0,base64:P,dmIcon:x,dmIconState:E,imageSize:32,disabled:!F,tooltip:O,buttons:w>1&&F>1&&(0,e.createComponentVNode)(2,m,{recipe:S,max_possible_multiplier:F}),onClick:function(){function _(){return v("make",{recipe_uid:A,multiplier:1})}return _}(),children:R})}},38307:function(T,r,n){"use strict";r.__esModule=!0,r.StationAlertConsoleContent=r.StationAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.StationAlertConsole=function(){function y(){return(0,e.createComponentVNode)(2,o.Window,{width:325,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b)})})}return y}(),b=r.StationAlertConsoleContent=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.data,c=i.alarms||[],m=c.Fire||[],l=c.Atmosphere||[],u=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[m.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),m.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Atmospherics Alarms",children:(0,e.createVNode)(1,"ul",null,[l.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),l.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Alarms",children:(0,e.createVNode)(1,"ul",null,[u.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),u.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)})],4)}return y}()},96091:function(T,r,n){"use strict";r.__esModule=!0,r.StationTraitsPanel=void 0;var e=n(89005),a=n(88510),t=n(42127),o=n(72253),f=n(36036),b=n(98595),y=function(i){return i[i.SetupFutureStationTraits=0]="SetupFutureStationTraits",i[i.ViewStationTraits=1]="ViewStationTraits",i}(y||{}),B=function(c,m){var l=(0,o.useBackend)(m),u=l.act,s=l.data,d=s.future_station_traits,C=(0,o.useLocalState)(m,"selectedFutureTrait",null),h=C[0],v=C[1],p=Object.fromEntries(s.valid_station_traits.map(function(V){return[V.name,V.path]})),N=Object.keys(p);return N.sort(),(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Dropdown,{displayText:!h&&"Select trait to add...",onSelected:v,options:N,selected:h,width:"100%"})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"green",icon:"plus",onClick:function(){function V(){if(h){var S=p[h],I=[S];if(d){var L,w=d.map(function(A){return A.path});if(w.indexOf(S)!==-1)return;I=(L=I).concat.apply(L,w)}u("setup_future_traits",{station_traits:I})}}return V}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,f.Divider),Array.isArray(d)?d.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:d.map(function(V){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:V.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"red",icon:"times",onClick:function(){function S(){u("setup_future_traits",{station_traits:(0,a.filterMap)(d,function(I){if(I.path!==V.path)return I.path})})}return S}(),children:"Delete"})})]})},V.path)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){function V(){return u("clear_future_traits")}return V}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function V(){return u("setup_future_traits",{station_traits:[]})}return V}(),children:"Prevent station traits from running next round"})]})]})},k=function(c,m){var l=(0,o.useBackend)(m),u=l.act,s=l.data;return s.current_traits.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:s.current_traits.map(function(d){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:d.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button.Confirm,{content:"Revert",color:"red",disabled:s.too_late_to_revert||!d.can_revert,tooltip:!d.can_revert&&"This trait is not revertable."||s.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){function C(){return u("revert",{ref:d.ref})}return C}()})})]})},d.ref)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:"There are no active station traits."})},g=r.StationTraitsPanel=function(){function i(c,m){var l=(0,o.useLocalState)(m,"station_traits_tab",y.ViewStationTraits),u=l[0],s=l[1],d;switch(u){case y.SetupFutureStationTraits:d=(0,e.createComponentVNode)(2,B);break;case y.ViewStationTraits:d=(0,e.createComponentVNode)(2,k);break;default:(0,t.exhaustiveCheck)(u)}return(0,e.createComponentVNode)(2,b.Window,{title:"Modify Station Traits",height:350,width:350,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"eye",selected:u===y.ViewStationTraits,onClick:function(){function C(){return s(y.ViewStationTraits)}return C}(),children:"View"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"edit",selected:u===y.SetupFutureStationTraits,onClick:function(){function C(){return s(y.SetupFutureStationTraits)}return C}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,f.Divider),d]})]})})})}return i}()},39409:function(T,r,n){"use strict";r.__esModule=!0,r.StripMenu=void 0;var e=n(89005),a=n(88510),t=n(79140),o=n(72253),f=n(36036),b=n(98595),y=5,B=9,k=function(h){return h===0?5:9},g="64px",i=function(h){return h[0]+"/"+h[1]},c=function(h){var v=h.align,p=h.children;return(0,e.createComponentVNode)(2,f.Box,{style:{position:"absolute",left:v==="left"?"6px":"48px","text-align":v,"text-shadow":"2px 2px 2px #000",top:"2px"},children:p})},m={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},l={eyes:{displayName:"eyewear",gridSpot:i([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:i([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,4]),image:"inventory-pda.png"}},u={eyes:{displayName:"eyewear",gridSpot:i([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:i([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,8]),image:"inventory-pda.png"}},s=function(C){return C[C.Completely=1]="Completely",C[C.Hidden=2]="Hidden",C}(s||{}),d=r.StripMenu=function(){function C(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=new Map;if(V.show_mode===0)for(var I=0,L=Object.keys(V.items);I=.01})},(0,a.sortBy)(function(x){return-x.amount})])(h.gases||[]),A=Math.max.apply(Math,[1].concat(w.map(function(x){return x.portion})));return(0,e.createComponentVNode)(2,B.Window,{width:550,height:250,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Relative EER",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(N)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Gas Coefficient",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:L,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:L.toFixed(2)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(V),minValue:0,maxValue:i(1e4),ranges:{teal:[-1/0,i(80)],good:[i(80),i(373)],average:[i(373),i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(V)+" K"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mole Per Tile",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:I,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.toFixed)(I)+" mol"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(S),minValue:0,maxValue:i(5e4),ranges:{good:[i(1),i(300)],average:[-1/0,i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(S)+" kPa"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function x(){return C("back")}return x}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(x){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:(0,y.getGasLabel)(x.name),children:(0,e.createComponentVNode)(2,b.ProgressBar,{color:(0,y.getGasColor)(x.name),value:x.portion,minValue:0,maxValue:A,children:(0,o.toFixed)(x.amount)+" mol ("+x.portion+"%)"})},x.name)})})})})]})})})}},46029:function(T,r,n){"use strict";r.__esModule=!0,r.SyndicateComputerSimple=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SyndicateComputerSimple=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i.rows.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.title,buttons:(0,e.createComponentVNode)(2,t.Button,{content:c.buttontitle,disabled:c.buttondisabled,tooltip:c.buttontooltip,tooltipPosition:"left",onClick:function(){function m(){return g(c.buttonact)}return m}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(m){return(0,e.createComponentVNode)(2,t.Box,{children:m},m)})})]},c.title)})})})}return b}()},36372:function(T,r,n){"use strict";r.__esModule=!0,r.TEG=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(B){return B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},b=r.TEG=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data;return c.error?(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[c.error,(0,e.createComponentVNode)(2,t.Button,{icon:"circle",content:"Recheck",onClick:function(){function m(){return i("check")}return m}()})]})})}):(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cold Loop ("+c.cold_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Inlet",children:[f(c.cold_inlet_temp)," K, ",f(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[f(c.cold_outlet_temp)," K, ",f(c.cold_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Hot Loop ("+c.hot_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Inlet",children:[f(c.hot_inlet_temp)," K, ",f(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[f(c.hot_outlet_temp)," K, ",f(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[f(c.output_power)," W",!!c.warning_switched&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}return y}()},56441:function(T,r,n){"use strict";r.__esModule=!0,r.TachyonArrayContent=r.TachyonArray=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TachyonArray=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.records,l=m===void 0?[]:m,u=c.explosion_target,s=c.toxins_tech,d=c.printing;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shift's Target",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Toxins Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Administration",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print All Logs",disabled:!l.length||d,align:"center",onClick:function(){function C(){return i("print_logs")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!l.length,color:"bad",align:"center",onClick:function(){function C(){return i("delete_logs")}return C}()})]})]})}),l.length?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No Records"})]})})}return y}(),b=r.TachyonArrayContent=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.records,l=m===void 0?[]:m;return(0,e.createComponentVNode)(2,t.Section,{title:"Logged Explosions",children:(0,e.createComponentVNode)(2,t.Flex,{children:(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Epicenter"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actual Size"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Theoretical Size"})]}),l.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.theoretical_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){function s(){return i("delete_record",{index:u.index})}return s}()})})]},u.index)})]})})})})}return y}()},1754:function(T,r,n){"use strict";r.__esModule=!0,r.Tank=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Tank=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c;return i.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:i.connected?"check":"times",content:i.connected?"Internals On":"Internals Off",selected:i.connected,onClick:function(){function m(){return g("internals")}return m}()})}):c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.createComponentVNode)(2,o.Window,{width:325,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tank Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:i.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:i.ReleasePressure===i.minReleasePressure,tooltip:"Min",onClick:function(){function m(){return g("pressure",{pressure:"min"})}return m}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(i.releasePressure),width:"65px",unit:"kPa",minValue:i.minReleasePressure,maxValue:i.maxReleasePressure,onChange:function(){function m(l,u){return g("pressure",{pressure:u})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:i.ReleasePressure===i.maxReleasePressure,tooltip:"Max",onClick:function(){function m(){return g("pressure",{pressure:"max"})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:i.ReleasePressure===i.defaultReleasePressure,tooltip:"Reset",onClick:function(){function m(){return g("pressure",{pressure:"reset"})}return m}()})]}),c]})})})})}return b}()},7579:function(T,r,n){"use strict";r.__esModule=!0,r.TankDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TankDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.o_tanks,m=i.p_tanks;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:c===0,icon:"arrow-circle-down",onClick:function(){function l(){return g("oxygen")}return l}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+m+")",disabled:m===0,icon:"arrow-circle-down",onClick:function(){function l(){return g("plasma")}return l}()})})]})})})}return b}()},16136:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsCore=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TcommsCore=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.ion,d=(0,a.useLocalState)(c,"tabIndex",0),C=d[0],h=d[1],v=function(){function p(N){switch(N){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return p}();return(0,e.createComponentVNode)(2,o.Window,{width:900,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[s===1&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"wrench",selected:C===0,onClick:function(){function p(){return h(0)}return p}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:C===1,onClick:function(){function p(){return h(1)}return p}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:C===2,onClick:function(){function p(){return h(2)}return p}(),children:"User Filtering"},"FilterPage")]}),v(C)]})})}return g}(),b=function(){return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},y=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.active,d=u.sectors_available,C=u.nttc_toggle_jobs,h=u.nttc_toggle_job_color,v=u.nttc_toggle_name_color,p=u.nttc_toggle_command_bold,N=u.nttc_job_indicator_type,V=u.nttc_setting_language,S=u.network_id;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"On":"Off",selected:s,icon:"power-off",onClick:function(){function I(){return l("toggle_active")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Radio Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcements",children:(0,e.createComponentVNode)(2,t.Button,{content:C?"On":"Off",selected:C,icon:"user-tag",onClick:function(){function I(){return l("nttc_toggle_jobs")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"clipboard-list",onClick:function(){function I(){return l("nttc_toggle_job_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function I(){return l("nttc_toggle_name_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){function I(){return l("nttc_toggle_command_bold")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Advanced",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcement Format",children:(0,e.createComponentVNode)(2,t.Button,{content:N||"Unset",selected:N,icon:"pencil-alt",onClick:function(){function I(){return l("nttc_job_indicator_type")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Language Conversion",children:(0,e.createComponentVNode)(2,t.Button,{content:V||"Unset",selected:V,icon:"globe",onClick:function(){function I(){return l("nttc_setting_language")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:S||"Unset",selected:S,icon:"server",onClick:function(){function I(){return l("network_id")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){function I(){return l("import")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function I(){return l("export")}return I}()})]})],4)},B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.link_password,d=u.relay_entries;return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linkage Password",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"lock",onClick:function(){function C(){return l("change_password")}return C}()})})}),(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Unlink"})]}),d.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.status===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Online"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Offline"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",onClick:function(){function h(){return l("unlink",{addr:C.addr})}return h}()})})]},C.addr)})]})]})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.filtered_users;return(0,e.createComponentVNode)(2,t.Section,{title:"User Filtering",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Add User",icon:"user-plus",onClick:function(){function d(){return l("add_filter")}return d}()}),children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"90%"},children:"User"}),(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),s.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function C(){return l("remove_filter",{user:d})}return C}()})})]},d)})]})})}},88046:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsRelay=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TcommsRelay=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.linked,u=m.active,s=m.network_id;return(0,e.createComponentVNode)(2,o.Window,{width:600,height:292,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Relay Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return c("toggle_active")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"server",onClick:function(){function d(){return c("network_id")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:l===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),l===1?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})})}return B}(),b=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.linked_core_id,u=m.linked_core_addr,s=m.hidden_link;return(0,e.createComponentVNode)(2,t.Section,{title:"Link Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hidden Link",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){function d(){return c("toggle_hidden_link")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function d(){return c("unlink")}return d}()})})]})})},y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.cores;return(0,e.createComponentVNode)(2,t.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),l.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function s(){return c("link",{addr:u.addr})}return s}()})})]},u.addr)})]})})}},20802:function(T,r,n){"use strict";r.__esModule=!0,r.Teleporter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Teleporter=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.targetsTeleport?i.targetsTeleport:{},m=0,l=1,u=2,s=i.calibrated,d=i.calibrating,C=i.powerstation,h=i.regime,v=i.teleporterhub,p=i.target,N=i.locked,V=i.adv_beacon_allowed,S=i.advanced_beacon_locking;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:270,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:[(!C||!v)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[v,!C&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),C&&!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),C&&v&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Status",buttons:(0,e.createFragment)(!!V&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xA0"}),(0,e.createComponentVNode)(2,t.Button,{selected:S,icon:S?"toggle-on":"toggle-off",content:S?"Enabled":"Disabled",onClick:function(){function I(){return g("advanced_beacon_locking",{on:S?0:1})}return I}()})],4),0),children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[h===m&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),h===l&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),h===u&&(0,e.createComponentVNode)(2,t.Box,{children:p})]})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Regime:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:h===l?"good":null,onClick:function(){function I(){return g("setregime",{regime:l})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:h===m?"good":null,onClick:function(){function I(){return g("setregime",{regime:m})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:h===u?"good":null,disabled:!N,onClick:function(){function I(){return g("setregime",{regime:u})}return I}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{label:"Calibration",mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[p!=="None"&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:15.8,textAlign:"center",mt:.5,children:d&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"In Progress"})||s&&(0,e.createComponentVNode)(2,t.Box,{color:"good",children:"Optimal"})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Sub-Optimal"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!(s||d),onClick:function(){function I(){return g("calibrate")}return I}()})})]}),p==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(N&&C&&v&&h===u)&&(0,e.createComponentVNode)(2,t.Section,{title:"GPS",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){function I(){return g("load")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function I(){return g("eject")}return I}()})]})})]})})})})}return b}()},48517:function(T,r,n){"use strict";r.__esModule=!0,r.TelescienceConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TelescienceConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.last_msg,m=i.linked_pad,l=i.held_gps,u=i.lastdata,s=i.power_levels,d=i.current_max_power,C=i.current_power,h=i.current_bearing,v=i.current_elevation,p=i.current_sector,N=i.working,V=i.max_z,S=(0,a.useLocalState)(B,"dummyrot",h),I=S[0],L=S[1];return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createFragment)([c,!(u.length>0)||(0,e.createVNode)(1,"ul",null,u.map(function(w){return(0,e.createVNode)(1,"li",null,w,0,null,w)}),0)],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Telepad Status",children:m===1?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Bearing",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:N,value:h,onDrag:function(){function w(A,x){return L(x)}return w}(),onChange:function(){function w(A,x){return g("setbear",{bear:x})}return w}()}),(0,e.createComponentVNode)(2,t.Icon,{ml:1,size:1,name:"arrow-up",rotation:I})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Elevation",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:N,value:v,onChange:function(){function w(A,x){return g("setelev",{elev:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Level",children:s.map(function(w,A){return(0,e.createComponentVNode)(2,t.Button,{content:w,selected:C===w,disabled:A>=d-1||N,onClick:function(){function x(){return g("setpwr",{pwr:A+1})}return x}()},w)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Sector",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:V,value:p,disabled:N,onChange:function(){function w(A,x){return g("setz",{newz:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Telepad Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Send",disabled:N,onClick:function(){function w(){return g("pad_send")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Receive",disabled:N,onClick:function(){function w(){return g("pad_receive")}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Crystal Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Recalibrate Crystals",disabled:N,onClick:function(){function w(){return g("recal_crystals")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Crystals",disabled:N,onClick:function(){function w(){return g("eject_crystals")}return w}()})]})]}):(0,e.createFragment)([(0,e.createTextVNode)("No pad linked to console. Please use a multitool to link a pad.")],4)}),(0,e.createComponentVNode)(2,t.Section,{title:"GPS Actions",children:l===1?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{disabled:l===0||N,content:"Eject GPS",onClick:function(){function w(){return g("eject_gps")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:l===0||N,content:"Store Coordinates",onClick:function(){function w(){return g("store_to_gps")}return w}()})],4):(0,e.createFragment)([(0,e.createTextVNode)("Please insert a GPS to store coordinates to it.")],4)})]})})}return b}()},21800:function(T,r,n){"use strict";r.__esModule=!0,r.TempGun=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.TempGun=function(){function g(i,c){var m=(0,t.useBackend)(c),l=m.act,u=m.data,s=u.target_temperature,d=u.temperature,C=u.max_temp,h=u.min_temp;return(0,e.createComponentVNode)(2,f.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:h,maxValue:C,value:s,format:function(){function v(p){return(0,a.toFixed)(p,2)}return v}(),width:"50px",onDrag:function(){function v(p,N){return l("target_temperature",{target_temperature:N})}return v}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:y(d),bold:d>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(d,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:k(d),children:B(d)})})]})})})})}return g}(),y=function(i){return i<=-100?"blue":i<=0?"teal":i<=100?"green":i<=200?"orange":"red"},B=function(i){return i<=100-273.15?"High":i<=250-273.15?"Medium":i<=300-273.15?"Low":i<=400-273.15?"Medium":"High"},k=function(i){return i<=100-273.15?"red":i<=250-273.15?"orange":i<=300-273.15?"green":i<=400-273.15?"orange":"red"}},24410:function(T,r,n){"use strict";r.__esModule=!0,r.sanitizeMultiline=r.removeAllSkiplines=r.TextInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(72253),f=n(92986),b=n(36036),y=n(98595),B=r.sanitizeMultiline=function(){function c(m){return m.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),k=r.removeAllSkiplines=function(){function c(m){return m.replace(/[\r\n]+/,"")}return c}(),g=r.TextInputModal=function(){function c(m,l){var u=(0,o.useBackend)(l),s=u.act,d=u.data,C=d.max_length,h=d.message,v=h===void 0?"":h,p=d.multiline,N=d.placeholder,V=d.timeout,S=d.title,I=(0,o.useLocalState)(l,"input",N||""),L=I[0],w=I[1],A=function(){function P(D){if(D!==L){var M=p?B(D):k(D);w(M)}}return P}(),x=p||L.length>=40,E=130+(v.length>40?Math.ceil(v.length/4):0)+(x?80:0);return(0,e.createComponentVNode)(2,y.Window,{title:S,width:325,height:E,children:[V&&(0,e.createComponentVNode)(2,a.Loader,{value:V}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function P(D){var M=window.event?D.which:D.keyCode;M===f.KEY_ENTER&&(!x||!D.shiftKey)&&s("submit",{entry:L}),M===f.KEY_ESCAPE&&s("cancel")}return P}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{input:L,onType:A})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:L,message:L.length+"/"+C})})]})})})]})}return c}(),i=function(m,l){var u=(0,o.useBackend)(l),s=u.act,d=u.data,C=d.max_length,h=d.multiline,v=m.input,p=m.onType,N=h||v.length>=40;return(0,e.createComponentVNode)(2,b.TextArea,{autoFocus:!0,autoSelect:!0,height:h||v.length>=40?"100%":"1.8rem",maxLength:C,onEscape:function(){function V(){return s("cancel")}return V}(),onEnter:function(){function V(S){N&&S.shiftKey||(S.preventDefault(),s("submit",{entry:v}))}return V}(),onInput:function(){function V(S,I){return p(I)}return V}(),placeholder:"Type something...",value:v})}},25036:function(T,r,n){"use strict";r.__esModule=!0,r.ThermoMachine=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.ThermoMachine=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"Status",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.temperature,format:function(){function m(l){return(0,a.toFixed)(l,2)}return m}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function m(l){return(0,a.toFixed)(l,2)}return m}()})," kPa"]})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Controls",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){function m(){return i("power")}return m}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Setting",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){function m(){return i("cooling")}return m}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){function m(){return i("target",{target:c.min})}return m}()}),(0,e.createComponentVNode)(2,o.NumberInput,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onDrag:function(){function m(l,u){return i("target",{target:u})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function m(){return i("target",{target:c.max})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function m(){return i("target",{target:c.initial})}return m}()})]})]})})]})})}return y}()},20035:function(T,r,n){"use strict";r.__esModule=!0,r.TransferValve=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TransferValve=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.tank_one,m=i.tank_two,l=i.attached_device,u=i.valve;return(0,e.createComponentVNode)(2,o.Window,{width:460,height:285,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Valve Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:u?"unlock":"lock",content:u?"Open":"Closed",disabled:!c||!m,onClick:function(){function s(){return g("toggle")}return s}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!l,onClick:function(){function s(){return g("device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:l?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:l,disabled:!l,onClick:function(){function s(){return g("remove_device")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Assembly"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment One",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:c?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:c,disabled:!c,onClick:function(){function s(){return g("tankone")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment Two",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:m?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:m,disabled:!m,onClick:function(){function s(){return g("tanktwo")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})})]})})}return b}()},78166:function(T,r,n){"use strict";r.__esModule=!0,r.TurbineComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(44879),b=r.TurbineComputer=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.compressor,s=l.compressor_broken,d=l.turbine,C=l.turbine_broken,h=l.online,v=!!(u&&!s&&d&&!C);return(0,e.createComponentVNode)(2,o.Window,{width:400,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:h?"power-off":"times",content:h?"Online":"Offline",selected:h,disabled:!v,onClick:function(){function p(){return m("toggle_power")}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function p(){return m("disconnect")}return p}()})],4),children:v?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)})})})}return k}(),y=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.compressor,u=m.compressor_broken,s=m.turbine,d=m.turbine_broken,C=m.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!l||u?"bad":"good",children:u?l?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!s||d?"bad":"good",children:d?s?"Offline":"Missing":"Online"})]})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.rpm,u=m.temperature,s=m.power,d=m.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[l," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[u," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Generated Power",children:[s," W"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bearing Heat",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:d,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,f.toFixed)(d)+"%"})})]})}},52847:function(T,r,n){"use strict";r.__esModule=!0,r.Uplink=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(25328),f=n(72253),b=n(36036),y=n(98595),B=n(3939),k=function(h){switch(h){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,d);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},g=r.Uplink=function(){function C(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.cart,I=(0,f.useLocalState)(v,"tabIndex",0),L=I[0],w=I[1],A=(0,f.useLocalState)(v,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,y.Window,{width:900,height:600,theme:"syndicate",children:[(0,e.createComponentVNode)(2,B.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Tabs,{children:[(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0),E("")}return P}(),icon:"store",children:"View Market"},"PurchasePage"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1),E("")}return P}(),icon:"shopping-cart",children:["View Shopping Cart ",S&&S.length?"("+S.length+")":""]},"Cart"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2),E("")}return P}(),icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{onClick:function(){function P(){return N("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(L)})]})})]})}return C}(),i=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.crystals,I=V.cats,L=(0,f.useLocalState)(v,"uplinkItems",I[0].items),w=L[0],A=L[1],x=(0,f.useLocalState)(v,"searchText",""),E=x[0],P=x[1],D=function(U,z){z===void 0&&(z="");var $=(0,o.createSearch)(z,function(G){var X=G.hijack_only===1?"|hijack":"";return G.name+"|"+G.desc+"|"+G.cost+"tc"+X});return(0,t.flow)([(0,a.filter)(function(G){return G==null?void 0:G.name}),z&&(0,a.filter)($),(0,a.sortBy)(function(G){return G==null?void 0:G.name})])(U)},M=function(U){if(P(U),U==="")return A(I[0].items);A(D(I.map(function(z){return z.items}).flat(),U))},R=(0,f.useLocalState)(v,"showDesc",1),O=R[0],F=R[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Current Balance: "+S+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:O,onClick:function(){function _(){return F(!O)}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Random Item",icon:"question",onClick:function(){function _(){return N("buyRandom")}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function _(){return N("refund")}return _}()})],4),children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function _(U,z){M(z)}return _}(),value:E})})})}),(0,e.createComponentVNode)(2,b.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:I.map(function(_){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:E!==""?!1:_.items===w,onClick:function(){function U(){A(_.items),P("")}return U}(),children:_.cat},_)})})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:w.map(function(_){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,l,{i:_,showDecription:O},(0,o.decodeHtmlEntities)(_.name))},(0,o.decodeHtmlEntities)(_.name))})})})})]})]})},c=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.cart,I=V.crystals,L=V.cart_price,w=(0,f.useLocalState)(v,"showDesc",0),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Current Balance: "+I+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:A,onClick:function(){function E(){return x(!A)}return E}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Empty Cart",icon:"trash",onClick:function(){function E(){return N("empty_cart")}return E}(),disabled:!S}),(0,e.createComponentVNode)(2,b.Button,{content:"Purchase Cart ("+L+"TC)",icon:"shopping-cart",onClick:function(){function E(){return N("purchase_cart")}return E}(),disabled:!S||L>I})],4),children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:S?S.map(function(E){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,l,{i:E,showDecription:A,buttons:(0,e.createComponentVNode)(2,s,{i:E})})},(0,o.decodeHtmlEntities)(E.name))}):(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,e.createComponentVNode)(2,m)]})},m=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.cats,I=V.lucky_numbers;return(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"dice",content:"See more suggestions",onClick:function(){function L(){return N("shuffle_lucky_numbers")}return L}()}),children:(0,e.createComponentVNode)(2,b.Stack,{wrap:!0,children:I.map(function(L){return S[L.cat].items[L.item]}).filter(function(L){return L!=null}).map(function(L,w){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",children:(0,e.createComponentVNode)(2,l,{grow:!0,i:L})},w)})})})})},l=function(h,v){var p=h.i,N=h.showDecription,V=N===void 0?1:N,S=h.buttons,I=S===void 0?(0,e.createComponentVNode)(2,u,{i:p}):S;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(p.name),showBottom:V,buttons:I,children:V?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(p.desc)}):null})},u=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=h.i,I=V.crystals;return(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button,{icon:"shopping-cart",color:S.hijack_only===1&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){function L(){return N("add_to_cart",{item:S.obj_path})}return L}(),disabled:S.cost>I}),(0,e.createComponentVNode)(2,b.Button,{content:"Buy ("+S.cost+"TC)"+(S.refundable?" [Refundable]":""),color:S.hijack_only===1&&"red",tooltip:S.hijack_only===1&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){function L(){return N("buyItem",{item:S.obj_path})}return L}(),disabled:S.cost>I})],4)},s=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=h.i,I=V.exploitable;return(0,e.createComponentVNode)(2,b.Stack,{children:[(0,e.createComponentVNode)(2,b.Button,{icon:"times",content:"("+S.cost*S.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){function L(){return N("remove_from_cart",{item:S.obj_path})}return L}()}),(0,e.createComponentVNode)(2,b.Button,{icon:"minus",tooltip:S.limit===0&&"Discount already redeemed!",ml:"5px",onClick:function(){function L(){return N("set_cart_item_quantity",{item:S.obj_path,quantity:--S.amount})}return L}(),disabled:S.amount<=0}),(0,e.createComponentVNode)(2,b.Button.Input,{content:S.amount,width:"45px",tooltipPosition:"bottom-end",tooltip:S.limit===0&&"Discount already redeemed!",onCommit:function(){function L(w,A){return N("set_cart_item_quantity",{item:S.obj_path,quantity:A})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit&&S.amount<=0}),(0,e.createComponentVNode)(2,b.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:S.limit===0&&"Discount already redeemed!",onClick:function(){function L(){return N("set_cart_item_quantity",{item:S.obj_path,quantity:++S.amount})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit})]})},d=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.exploitable,I=(0,f.useLocalState)(v,"selectedRecord",S[0]),L=I[0],w=I[1],A=(0,f.useLocalState)(v,"searchText",""),x=A[0],E=A[1],P=function(R,O){O===void 0&&(O="");var F=(0,o.createSearch)(O,function(_){return _.name});return(0,t.flow)([(0,a.filter)(function(_){return _==null?void 0:_.name}),O&&(0,a.filter)(F),(0,a.sortBy)(function(_){return _.name})])(R)},D=P(S,x);return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(){function M(R,O){return E(O)}return M}()}),(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:D.map(function(M){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:M===L,onClick:function(){function R(){return w(M)}return R}(),children:M.name},M)})})]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:L.name,children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:L.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:L.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:L.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:L.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:L.species})]})})})]})}},12261:function(T,r,n){"use strict";r.__esModule=!0,r.Vending=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=B.product,l=B.productStock,u=B.productIcon,s=B.productIconState,d=c.chargesMoney,C=c.user,h=c.usermoney,v=c.inserted_cash,p=c.vend_ready,N=c.inserted_item_name,V=!d||m.price===0,S="ERROR!",I="";V?(S="FREE",I="arrow-circle-down"):(S=m.price,I="shopping-cart");var L=!p||l===0||!V&&m.price>h&&m.price>v;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,t.DmIcon,{verticalAlign:"middle",icon:u,icon_state:s,fallback:(0,e.createComponentVNode)(2,t.Icon,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:m.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:l<=0&&"bad"||l<=m.max_amount/2&&"average"||"good",children:[l," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:L,icon:I,content:S,textAlign:"left",onClick:function(){function w(){return i("vend",{inum:m.inum})}return w}()})})]})},b=r.Vending=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.user,l=c.usermoney,u=c.inserted_cash,s=c.chargesMoney,d=c.product_records,C=d===void 0?[]:d,h=c.hidden_records,v=h===void 0?[]:h,p=c.stock,N=c.vend_ready,V=c.inserted_item_name,S=c.panel_open,I=c.speaker,L;return L=[].concat(C),c.extended_inventory&&(L=[].concat(L,v)),L=L.filter(function(w){return!!w}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((s?171:89)+L.length*32,585),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!s&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:(0,e.createVNode)(1,"span",null,V,0,{style:{"text-transform":"capitalize"}}),onClick:function(){function w(){return i("eject_item",{})}return w}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!u,icon:"money-bill-wave-alt",content:u?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,u,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:u?"Dispense Change":null,textAlign:"left",onClick:function(){function w(){return i("change")}return w}()})})]}),children:m&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),", ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[l,(0,e.createTextVNode)(" credits")],0),".",(0,e.createVNode)(1,"br")]})})}),!!S&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"check":"volume-mute",selected:I,content:"Speaker",textAlign:"left",onClick:function(){function w(){return i("toggle_voice",{})}return w}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:(0,e.createComponentVNode)(2,t.Table,{children:L.map(function(w){return(0,e.createComponentVNode)(2,f,{product:w,productStock:p[w.name],productIcon:w.icon,productIconState:w.icon_state},w.name)})})})})]})})})}return y}()},68971:function(T,r,n){"use strict";r.__esModule=!0,r.VolumeMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.VolumeMixer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.channels;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:Math.min(95+c.length*50,565),children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:c.map(function(m,l){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:l>0&&"0.5rem",children:m.name}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:.5,children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){function u(){return g("volume",{channel:m.num,volume:0})}return u}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:m.volume,onChange:function(){function u(s,d){return g("volume",{channel:m.num,volume:d})}return u}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){function u(){return g("volume",{channel:m.num,volume:100})}return u}()})})})]})})],4,m.num)})})})})}return b}()},2510:function(T,r,n){"use strict";r.__esModule=!0,r.VotePanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.VotePanel=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.remaining,m=i.question,l=i.choices,u=i.user_vote,s=i.counts,d=i.show_counts;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:360,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),l.map(function(C){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,translucent:!0,lineHeight:3,multiLine:C,content:C+(d?" ("+(s[C]||0)+")":""),onClick:function(){function h(){return g("vote",{target:C})}return h}(),selected:C===u})},C)})]})})})}return b}()},30138:function(T,r,n){"use strict";r.__esModule=!0,r.Wires=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Wires=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.wires||[],m=i.status||[],l=56+c.length*23+(status?0:15+m.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:l,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c.map(function(u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:u.color_name,labelColor:u.seen_color,color:u.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u.cut?"Mend":"Cut",onClick:function(){function s(){return g("cut",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function s(){return g("pulse",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:u.attached?"Detach":"Attach",onClick:function(){function s(){return g("attach",{wire:u.color})}return s}()})],4),children:!!u.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),u.wire,(0,e.createTextVNode)(")")],0)},u.seen_color)})})})}),!!m.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(u){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:u},u)})})})]})})})}return b}()},21400:function(T,r,n){"use strict";r.__esModule=!0,r.WizardApprenticeContract=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.WizardApprenticeContract=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.used;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:555,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,e.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),c?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,e.createComponentVNode)(2,t.Section,{title:"Which school of magic is your apprentice studying?",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,e.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("fire")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,e.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("translocation")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,e.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("restoration")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,e.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("stealth")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,e.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,e.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("honk")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})})]})})}return b}()},49148:function(T,r,n){"use strict";r.__esModule=!0,r.AccessList=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036);function f(g,i){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(c)return(c=c.call(g)).next.bind(c);if(Array.isArray(g)||(c=b(g))||i&&g&&typeof g.length=="number"){c&&(g=c);var m=0;return function(){return m>=g.length?{done:!0}:{done:!1,value:g[m++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(g,i){if(g){if(typeof g=="string")return y(g,i);var c={}.toString.call(g).slice(8,-1);return c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set"?Array.from(g):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?y(g,i):void 0}}function y(g,i){(i==null||i>g.length)&&(i=g.length);for(var c=0,m=Array(i);c0&&!V.includes(O.ref)&&!p.includes(O.ref),checked:p.includes(O.ref),onClick:function(){function F(){return S(O.ref)}return F}()},O.desc)})]})]})})}return g}()},26991:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosScan=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036),f=function(B,k,g,i,c){return Bi?"average":B>c?"bad":"good"},b=r.AtmosScan=function(){function y(B,k){var g=B.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(i){return i.val!=="0"||i.entry==="Pressure"||i.entry==="Temperature"})(g).map(function(i){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:i.entry,color:f(i.val,i.bad_low,i.poor_low,i.poor_high,i.bad_high),children:[i.val,i.units]},i.entry)})})})}return y}()},85870:function(T,r,n){"use strict";r.__esModule=!0,r.BeakerContents=void 0;var e=n(89005),a=n(36036),t=n(15964),o=function(y){return y+" unit"+(y===1?"":"s")},f=r.BeakerContents=function(){function b(y){var B=y.beakerLoaded,k=y.beakerContents,g=k===void 0?[]:k,i=y.buttons;return(0,e.createComponentVNode)(2,a.Stack,{vertical:!0,children:[!B&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"No beaker loaded."})||g.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),g.map(function(c,m){return(0,e.createComponentVNode)(2,a.Stack,{children:[(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",grow:!0,children:[o(c.volume)," of ",c.name]},c.name),!!i&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:i(c,m)})]},c.name)})]})}return b}();f.propTypes={beakerLoaded:t.bool,beakerContents:t.array,buttons:t.arrayOf(t.element)}},92963:function(T,r,n){"use strict";r.__esModule=!0,r.BotStatus=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.BotStatus=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=g.locked,c=g.noaccess,m=g.maintpanel,l=g.on,u=g.autopatrol,s=g.canhack,d=g.emagged,C=g.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",i?"unlock":"lock"," this interface."]}),(0,e.createComponentVNode)(2,t.Section,{title:"General Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:l?"power-off":"times",content:l?"On":"Off",selected:l,disabled:c,onClick:function(){function h(){return k("power")}return h}()})}),u!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Auto Patrol",disabled:c,onClick:function(){function h(){return k("autopatrol")}return h}()})}),!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Maintenance Panel",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Panel Open!"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety System",children:(0,e.createComponentVNode)(2,t.Box,{color:d?"bad":"good",children:d?"DISABLED!":"Enabled"})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:d?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function h(){return k("hack")}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!C,content:"AI Remote Control",disabled:c,onClick:function(){function h(){return k("disableremote")}return h}()})})]})})],4)}return f}()},3939:function(T,r,n){"use strict";r.__esModule=!0,r.modalRegisterBodyOverride=r.modalOpen=r.modalClose=r.modalAnswer=r.ComplexModal=void 0;var e=n(89005),a=n(72253),t=n(36036),o={},f=r.modalOpen=function(){function g(i,c,m){var l=(0,a.useBackend)(i),u=l.act,s=l.data,d=Object.assign(s.modal?s.modal.args:{},m||{});u("modal_open",{id:c,arguments:JSON.stringify(d)})}return g}(),b=r.modalRegisterBodyOverride=function(){function g(i,c){o[i]=c}return g}(),y=r.modalAnswer=function(){function g(i,c,m,l){var u=(0,a.useBackend)(i),s=u.act,d=u.data;if(d.modal){var C=Object.assign(d.modal.args||{},l||{});s("modal_answer",{id:c,answer:m,arguments:JSON.stringify(C)})}}return g}(),B=r.modalClose=function(){function g(i,c){var m=(0,a.useBackend)(i),l=m.act;l("modal_close",{id:c})}return g}(),k=r.ComplexModal=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.data;if(l.modal){var u=l.modal,s=u.id,d=u.text,C=u.type,h,v=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function L(){return B(c)}return L}()}),p,N,V="auto";if(o[s])p=o[s](l.modal,c);else if(C==="input"){var S=l.modal.value;h=function(){function L(w){return y(c,s,S)}return L}(),p=(0,e.createComponentVNode)(2,t.Input,{value:l.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function L(w,A){S=A}return L}()}),N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){function L(){return B(c)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,S)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]})}else if(C==="choice"){var I=typeof l.modal.choices=="object"?Object.values(l.modal.choices):l.modal.choices;p=(0,e.createComponentVNode)(2,t.Dropdown,{options:I,selected:l.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function L(w){return y(c,s,w)}return L}()}),V="initial"}else C==="bento"?p=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:l.modal.choices.map(function(L,w){return(0,e.createComponentVNode)(2,t.Stack.Item,{flex:"1 1 auto",children:(0,e.createComponentVNode)(2,t.Button,{selected:w+1===parseInt(l.modal.value,10),onClick:function(){function A(){return y(c,s,w+1)}return A}(),children:(0,e.createVNode)(1,"img",null,null,1,{src:L})})},w)})}):C==="boolean"&&(N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:l.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){function L(){return y(c,s,0)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:l.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,1)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]}));return(0,e.createComponentVNode)(2,t.Modal,{maxWidth:i.maxWidth||window.innerWidth/2+"px",maxHeight:i.maxHeight||window.innerHeight/2+"px",onEnter:h,mx:"auto",overflowY:V,"padding-bottom":"5px",children:[d&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d}),o[s]&&v,p,N]})}}return g}()},41874:function(T,r,n){"use strict";r.__esModule=!0,r.CrewManifest=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(25328),f=n(76910),b=f.COLORS.department,y=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],B=function(m){return y.indexOf(m)!==-1?"green":"orange"},k=function(m){if(y.indexOf(m)!==-1)return!0},g=function(m){return m.length>0&&(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,color:"white",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"50%",children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"35%",children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"15%",children:"Active"})]}),m.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{color:B(l.rank),bold:k(l.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(l.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(l.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.active})]},l.name+l.rank)})]})},i=r.CrewManifest=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d;if(m.data)d=m.data;else{var C=(0,a.useBackend)(l),h=C.data;d=h}var v=d,p=v.manifest,N=p.heads,V=p.sec,S=p.eng,I=p.med,L=p.sci,w=p.ser,A=p.sup,x=p.misc;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.command,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:g(N)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.security,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:g(V)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.engineering,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:g(S)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.medical,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:g(I)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.science,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:g(L)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.service,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:g(w)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.supply,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:g(A)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:g(x)})]})}return c}()},19203:function(T,r,n){"use strict";r.__esModule=!0,r.InputButtons=void 0;var e=n(89005),a=n(36036),t=n(72253),o=r.InputButtons=function(){function f(b,y){var B=(0,t.useBackend)(y),k=B.act,g=B.data,i=g.large_buttons,c=g.swapped_buttons,m=b.input,l=b.message,u=b.disabled,s=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!i,fluid:!!i,onClick:function(){function C(){return k("submit",{entry:m})}return C}(),textAlign:"center",tooltip:i&&l,disabled:u,width:!i&&6}),d=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!i,fluid:!!i,onClick:function(){function C(){return k("cancel")}return C}(),textAlign:"center",width:!i&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:d}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:d}),!i&&l&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:l})}),i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,mr:c?.5:0,ml:c?0:.5,children:s}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:s})]})}return f}()},195:function(T,r,n){"use strict";r.__esModule=!0,r.InterfaceLockNoticeBox=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.InterfaceLockNoticeBox=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=b.siliconUser,c=i===void 0?g.siliconUser:i,m=b.locked,l=m===void 0?g.locked:m,u=b.normallyLocked,s=u===void 0?g.normallyLocked:u,d=b.onLockStatusChange,C=d===void 0?function(){return k("lock")}:d,h=b.accessText,v=h===void 0?"an ID card":h;return c?(0,e.createComponentVNode)(2,t.NoticeBox,{color:c&&"grey",children:(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:"Interface lock status:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:"1"}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{m:"0",color:s?"red":"green",icon:s?"lock":"unlock",content:s?"Locked":"Unlocked",onClick:function(){function p(){C&&C(!l)}return p}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",v," to ",l?"unlock":"lock"," this interface."]})}return f}()},51057:function(T,r,n){"use strict";r.__esModule=!0,r.Loader=void 0;var e=n(89005),a=n(44879),t=n(36036),o=r.Loader=function(){function f(b){var y=b.value;return(0,e.createVNode)(1,"div","AlertModal__Loader",(0,e.createComponentVNode)(2,t.Box,{className:"AlertModal__LoaderProgress",style:{width:(0,a.clamp01)(y)*100+"%"}}),2)}return f}()},321:function(T,r,n){"use strict";r.__esModule=!0,r.LoginInfo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginInfo=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=g.loginState;if(g)return(0,e.createComponentVNode)(2,t.NoticeBox,{info:!0,children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:["Logged in as: ",i.name," (",i.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!i.id,content:"Eject ID",color:"good",onClick:function(){function c(){return k("login_eject")}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){function c(){return k("login_logout")}return c}()})]})]})})}return f}()},5485:function(T,r,n){"use strict";r.__esModule=!0,r.LoginScreen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginScreen=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=g.loginState,c=g.isAI,m=g.isRobot,l=g.isAdmin;return(0,e.createComponentVNode)(2,t.Section,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",align:"center",justify:"center",children:(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,e.createComponentVNode)(2,t.Box,{color:"label",my:"1rem",children:["ID:",(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:i.id?i.id:"----------",ml:"0.5rem",onClick:function(){function u(){return k("login_insert")}return u}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!i.id,content:"Login",onClick:function(){function u(){return k("login_login",{login_type:1})}return u}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function u(){return k("login_login",{login_type:2})}return u}()}),!!m&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function u(){return k("login_login",{login_type:3})}return u}()}),!!l&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function u(){return k("login_login",{login_type:4})}return u}()})]})})})}return f}()},62411:function(T,r,n){"use strict";r.__esModule=!0,r.Operating=void 0;var e=n(89005),a=n(36036),t=n(15964),o=r.Operating=function(){function f(b){var y=b.operating,B=b.name;if(y)return(0,e.createComponentVNode)(2,a.Dimmer,{children:(0,e.createComponentVNode)(2,a.Flex,{mb:"30px",children:(0,e.createComponentVNode)(2,a.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,e.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,e.createVNode)(1,"br"),"The ",B," is processing..."]})})})}return f}();o.propTypes={operating:t.bool,name:t.string}},13545:function(T,r,n){"use strict";r.__esModule=!0,r.Signaler=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=r.Signaler=function(){function b(y,B){var k=(0,t.useBackend)(B),g=k.act,i=y.data,c=i.code,m=i.frequency,l=i.minFrequency,u=i.maxFrequency;return(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:l/10,maxValue:u/10,value:m/10,format:function(){function s(d){return(0,a.toFixed)(d,1)}return s}(),width:"80px",onDrag:function(){function s(d,C){return g("freq",{freq:C})}return s}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:c,width:"80px",onDrag:function(){function s(d,C){return g("code",{code:C})}return s}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){function s(){return g("signal")}return s}()})]})}return b}()},41984:function(T,r,n){"use strict";r.__esModule=!0,r.SimpleRecords=void 0;var e=n(89005),a=n(72253),t=n(25328),o=n(64795),f=n(88510),b=n(36036),y=r.SimpleRecords=function(){function g(i,c){var m=i.data.records;return(0,e.createComponentVNode)(2,b.Box,{children:m?(0,e.createComponentVNode)(2,k,{data:i.data,recordType:i.recordType}):(0,e.createComponentVNode)(2,B,{data:i.data})})}return g}(),B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=i.data.recordsList,s=(0,a.useLocalState)(c,"searchText",""),d=s[0],C=s[1],h=function(N,V){V===void 0&&(V="");var S=(0,t.createSearch)(V,function(I){return I.Name});return(0,o.flow)([(0,f.filter)(function(I){return I==null?void 0:I.Name}),V&&(0,f.filter)(S),(0,f.sortBy)(function(I){return I.Name})])(u)},v=h(u,d);return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function p(N,V){return C(V)}return p}()}),v.map(function(p){return(0,e.createComponentVNode)(2,b.Box,{children:(0,e.createComponentVNode)(2,b.Button,{mb:.5,content:p.Name,icon:"user",onClick:function(){function N(){return l("Records",{target:p.uid})}return N}()})},p)})]})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=i.data.records,s=u.general,d=u.medical,C=u.security,h;switch(i.recordType){case"MED":h=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Medical Data",children:d?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Blood Type",children:d.blood_type}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Disabilities",children:d.mi_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.mi_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Disabilities",children:d.ma_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.ma_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Allergies",children:d.alg}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.alg_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Current Diseases",children:d.cdi}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.cdi_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:d.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":h=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Security Data",children:C?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Criminal Status",children:C.criminal}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Crimes",children:C.mi_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:C.mi_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Crimes",children:C.ma_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:C.ma_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:C.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Security record lost!"})});break}return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Section,{title:"General Data",children:s?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Name",children:s.name}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:s.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:s.species}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:s.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:s.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:s.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Physical Status",children:s.p_stat}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mental Status",children:s.m_stat})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"General record lost!"})}),h]})}},22091:function(T,r,n){"use strict";r.__esModule=!0,r.TemporaryNotice=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.TemporaryNotice=function(){function f(b,y){var B,k=(0,a.useBackend)(y),g=k.act,i=k.data,c=i.temp;if(c){var m=(B={},B[c.style]=!0,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},m,{children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:c.text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"times-circle",onClick:function(){function l(){return g("cleartemp")}return l}()})})]})})))}}return f}()},95213:function(T,r,n){"use strict";r.__esModule=!0,r.goonstation_PTL=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),f=n(98595);/**
+ */function m(w,A){w.prototype=Object.create(A.prototype),w.prototype.constructor=w,l(w,A)}function l(w,A){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,E){return x.__proto__=E,x},l(w,A)}function u(w,A){if(w==null)return{};var x={};for(var E in w)if({}.hasOwnProperty.call(w,E)){if(A.includes(E))continue;x[E]=w[E]}return x}var s=r.ColorPickerModal=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.timeout,M=P.message,R=P.title,O=P.autofocus,F=P.default_color,_=F===void 0?"#000000":F,U=(0,t.useLocalState)(x,"color_picker_choice",(0,y.hexToHsva)(_)),z=U[0],$=U[1];return(0,e.createComponentVNode)(2,f.Window,{height:400,title:R,width:600,theme:"generic",children:[!!D&&(0,e.createComponentVNode)(2,a.Loader,{value:D}),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[M&&(0,e.createComponentVNode)(2,o.Stack.Item,{m:1,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",overflow:"hidden",children:M})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[!!O&&(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,d,{color:z,setColor:$,defaultColor:_})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i.InputButtons,{input:(0,y.hsvaToHex)(z)})})]})})]})}return w}(),d=r.ColorSelector=function(){function w(A,x){var E=A.color,P=A.setColor,D=A.defaultColor,M=function(){function F(_){P(function(U){return Object.assign({},U,_)})}return F}(),R=(0,y.hsvaToRgba)(E),O=(0,y.hsvaToHex)(E);return(0,e.createComponentVNode)(2,o.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{mr:2,children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createVNode)(1,"div","react-colorful",[(0,e.createComponentVNode)(2,N,{hsva:E,onChange:M}),(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M,className:"react-colorful__last-control"})],4)}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Current"}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"20px",textAlign:"center",children:"Previous"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Tooltip,{content:O,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:O})}),(0,e.createComponentVNode)(2,o.Tooltip,{content:D,position:"bottom",children:(0,e.createComponentVNode)(2,o.Box,{inline:!0,width:"100px",height:"30px",backgroundColor:D})})]})]})}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:!0,fontSize:"15px",lineHeight:"24px",children:(0,e.createComponentVNode)(2,o.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"Hex:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"24px",children:(0,e.createComponentVNode)(2,v,{fluid:!0,color:(0,y.hsvaToHex)(E).substring(1),onChange:function(){function F(_){g.logger.info(_),P((0,y.hexToHsva)(_))}return F}(),prefixed:!0})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"H:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,V,{hue:E.h,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:E.h,callback:function(){function F(_,U){return M({h:U})}return F}(),max:360,unit:"\xB0"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"S:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,S,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:E.s,callback:function(){function F(_,U){return M({s:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"V:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,I,{color:E,onChange:M})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:E.v,callback:function(){function F(_,U){return M({v:U})}return F}(),unit:"%"})})]})}),(0,e.createComponentVNode)(2,o.Stack.Divider),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"R:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"r"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:R.r,callback:function(){function F(_,U){R.r=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"G:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"g"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:R.g,callback:function(){function F(_,U){R.g=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{width:"25px",children:(0,e.createComponentVNode)(2,o.Box,{textColor:"label",children:"B:"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,L,{color:E,onChange:M,target:"b"})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,C,{value:R.b,callback:function(){function F(_,U){R.b=U,M((0,y.rgbaToHsva)(R))}return F}(),max:255})})]})})]})})]})}return w}(),C=function(A){var x=A.value,E=A.callback,P=A.min,D=P===void 0?0:P,M=A.max,R=M===void 0?100:M,O=A.unit;return(0,e.createComponentVNode)(2,o.NumberInput,{width:"70px",value:Math.round(x),step:1,minValue:D,maxValue:R,onChange:E,unit:O})},h=function(A){return"#"+A},v=r.HexColorInput=function(){function w(A){var x=A.prefixed,E=A.alpha,P=A.color,D=A.fluid,M=A.onChange,R=u(A,c),O=function(){function _(U){return U.replace(/([^0-9A-F]+)/gi,"").substring(0,E?8:6)}return _}(),F=function(){function _(U){return(0,y.validHex)(U,E)}return _}();return(0,e.normalizeProps)((0,e.createComponentVNode)(2,p,Object.assign({},R,{fluid:D,color:P,onChange:M,escape:O,format:x?h:void 0,validate:F})))}return w}(),p=r.ColorInput=function(w){function A(E){var P;return P=w.call(this)||this,P.props=void 0,P.state=void 0,P.handleInput=function(D){var M=P.props.escape(D.currentTarget.value);P.setState({localValue:M})},P.handleBlur=function(D){D.currentTarget&&(P.props.validate(D.currentTarget.value)?P.props.onChange(P.props.escape?P.props.escape(D.currentTarget.value):D.currentTarget.value):P.setState({localValue:P.props.escape(P.props.color)}))},P.props=E,P.state={localValue:P.props.escape(P.props.color)},P}m(A,w);var x=A.prototype;return x.componentDidUpdate=function(){function E(P,D){P.color!==this.props.color&&this.setState({localValue:this.props.escape(this.props.color)})}return E}(),x.render=function(){function E(){return(0,e.createComponentVNode)(2,o.Box,{className:(0,k.classes)(["Input",this.props.fluid&&"Input--fluid"]),children:[(0,e.createVNode)(1,"div","Input__baseline",".",16),(0,e.createVNode)(64,"input","Input__input",null,1,{value:this.props.format?this.props.format(this.state.localValue):this.state.localValue,spellCheck:"false",onInput:this.handleInput,onBlur:this.handleBlur})]})}return E}(),A}(e.Component),N=function(A){var x=A.hsva,E=A.onChange,P=function(O){E({s:O.left*100,v:100-O.top*100})},D=function(O){E({s:(0,b.clamp)(x.s+O.left*100,0,100),v:(0,b.clamp)(x.v-O.top*100,0,100)})},M={"background-color":(0,y.hsvaToHslString)({h:x.h,s:100,v:100,a:1})+" !important"};return(0,e.createVNode)(1,"div","react-colorful__saturation_value",(0,e.createComponentVNode)(2,B.Interactive,{onMove:P,onKey:D,"aria-label":"Color","aria-valuetext":"Saturation "+Math.round(x.s)+"%, Brightness "+Math.round(x.v)+"%",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation_value-pointer",top:1-x.v/100,left:x.s/100,color:(0,y.hsvaToHslString)(x)})}),2,{style:M})},V=function(A){var x=A.className,E=A.hue,P=A.onChange,D=function(F){P({h:360*F.left})},M=function(F){P({h:(0,b.clamp)(E+F.left*360,0,360)})},R=(0,k.classes)(["react-colorful__hue",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{onMove:D,onKey:M,"aria-label":"Hue","aria-valuenow":Math.round(E),"aria-valuemax":"360","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__hue-pointer",left:E/360,color:(0,y.hsvaToHslString)({h:E,s:100,v:100,a:1})})}),2)},S=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({s:100*F.left})},M=function(F){P({s:(0,b.clamp)(E.s+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__saturation",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:E.h,s:0,v:E.v,a:1})+", "+(0,y.hsvaToHslString)({h:E.h,s:100,v:E.v,a:1})+")"},onMove:D,onKey:M,"aria-label":"Saturation","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__saturation-pointer",left:E.s/100,color:(0,y.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},I=function(A){var x=A.className,E=A.color,P=A.onChange,D=function(F){P({v:100*F.left})},M=function(F){P({v:(0,b.clamp)(E.v+F.left*100,0,100)})},R=(0,k.classes)(["react-colorful__value",x]);return(0,e.createVNode)(1,"div",R,(0,e.createComponentVNode)(2,B.Interactive,{style:{background:"linear-gradient(to right, "+(0,y.hsvaToHslString)({h:E.h,s:E.s,v:0,a:1})+", "+(0,y.hsvaToHslString)({h:E.h,s:E.s,v:100,a:1})+")"},onMove:D,onKey:M,"aria-label":"Value","aria-valuenow":Math.round(E.s),"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__value-pointer",left:E.v/100,color:(0,y.hsvaToHslString)({h:E.h,s:E.s,v:E.v,a:1})})}),2)},L=function(A){var x=A.className,E=A.color,P=A.onChange,D=A.target,M=(0,y.hsvaToRgba)(E),R=function($){M[D]=$,P((0,y.rgbaToHsva)(M))},O=function($){R(255*$.left)},F=function($){R((0,b.clamp)(M[D]+$.left*255,0,255))},_=(0,k.classes)(["react-colorful__"+D,x]),U=D==="r"?"rgb("+Math.round(M.r)+",0,0)":D==="g"?"rgb(0,"+Math.round(M.g)+",0)":"rgb(0,0,"+Math.round(M.b)+")";return(0,e.createVNode)(1,"div",_,(0,e.createComponentVNode)(2,B.Interactive,{onMove:O,onKey:F,"aria-valuenow":M[D],"aria-valuemax":"100","aria-valuemin":"0",children:(0,e.createComponentVNode)(2,o.Pointer,{className:"react-colorful__"+D+"-pointer",left:M[D]/255,color:U})}),2)}},8444:function(T,r,n){"use strict";r.__esModule=!0,r.ColourMatrixTester=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ColourMatrixTester=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.colour_data,m=[[{name:"RR",idx:0},{name:"RG",idx:1},{name:"RB",idx:2},{name:"RA",idx:3}],[{name:"GR",idx:4},{name:"GG",idx:5},{name:"GB",idx:6},{name:"GA",idx:7}],[{name:"BR",idx:8},{name:"BG",idx:9},{name:"BB",idx:10},{name:"BA",idx:11}],[{name:"AR",idx:12},{name:"AG",idx:13},{name:"AB",idx:14},{name:"AA",idx:15}]];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:190,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Matrix",children:m.map(function(l){return(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",textColor:"label",children:l.map(function(u){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:1,children:[u.name,":\xA0",(0,e.createComponentVNode)(2,t.NumberInput,{width:4,value:c[u.idx],step:.05,minValue:-5,maxValue:5,stepPixelSize:5,onChange:function(){function s(d,C){return g("setvalue",{idx:u.idx+1,value:C})}return s}()})]},u.name)})},l)})})})})})}return b}()},63818:function(T,r,n){"use strict";r.__esModule=!0,r.CommunicationsComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(s){switch(s){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,i);case 3:return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,c)})});case 4:return(0,e.createComponentVNode)(2,l);default:return"ERROR. Unknown menu_state. Please contact NT Technical Support."}},b=r.CommunicationsComputer=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.menu_state;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y),f(p)]})})})}return u}(),y=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.authenticated,N=v.noauthbutton,V=v.esc_section,S=v.esc_callable,I=v.esc_recallable,L=v.esc_status,w=v.authhead,A=v.is_ai,x=v.lastCallLoc,E=!1,P;return p?p===1?P="Command":p===2?P="Captain":p===3?P="CentComm Officer":p===4?(P="CentComm Secure Connection",E=!0):P="ERROR: Report This Bug!":P="Not Logged In",(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authentication",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:E&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Access",children:P})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{icon:p?"sign-out-alt":"id-card",selected:p,disabled:N,content:p?"Log Out ("+P+")":"Log In",onClick:function(){function D(){return h("auth")}return D}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Escape Shuttle",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!L&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:L}),!!S&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"rocket",content:"Call Shuttle",disabled:!w,onClick:function(){function D(){return h("callshuttle")}return D}()})}),!!I&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Options",children:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Recall Shuttle",disabled:!w||A,onClick:function(){function D(){return h("cancelshuttle")}return D}()})}),!!x&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Last Call/Recall From",children:x})]})})})],4)},B=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.is_admin;return p?(0,e.createComponentVNode)(2,k):(0,e.createComponentVNode)(2,g)},k=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.is_admin,N=v.gamma_armory_location,V=v.admin_levels,S=v.authenticated,I=v.ert_allowed;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"CentComm Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:V,required_access:p,use_confirm:1})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:"Make Central Announcement",disabled:!p,onClick:function(){function L(){return h("send_to_cc_announcement_page")}return L}()}),S===4&&(0,e.createComponentVNode)(2,t.Button,{icon:"plus",content:"Make Other Announcement",disabled:!p,onClick:function(){function L(){return h("make_other_announcement")}return L}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Response Team",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"ambulance",content:"Dispatch ERT",disabled:!p,onClick:function(){function L(){return h("dispatch_ert")}return L}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:I,content:I?"ERT calling enabled":"ERT calling disabled",tooltip:I?"Command can request an ERT":"ERTs cannot be requested",disabled:!p,onClick:function(){function L(){return h("toggle_ert_allowed")}return L}(),selected:null})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:"Get Authentication Codes",disabled:!p,onClick:function(){function L(){return h("send_nuke_codes")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gamma Armory",children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"biohazard",content:N?"Send Gamma Armory":"Recall Gamma Armory",disabled:!p,onClick:function(){function L(){return h("move_gamma_armory")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Other",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"coins",content:"View Economy",disabled:!p,onClick:function(){function L(){return h("view_econ")}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fax",content:"Fax Manager",disabled:!p,onClick:function(){function L(){return h("view_fax")}return L}()})]})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"View Command accessible controls",children:(0,e.createComponentVNode)(2,g)})]})},g=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.msg_cooldown,N=v.emagged,V=v.cc_cooldown,S=v.security_level_color,I=v.str_security_level,L=v.levels,w=v.authcapt,A=v.authhead,x=v.messages,E="Make Priority Announcement";p>0&&(E+=" ("+p+"s)");var P=N?"Message [UNKNOWN]":"Message CentComm",D="Request Authentication Codes";return V>0&&(P+=" ("+V+"s)",D+=" ("+V+"s)"),(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Captain-Only Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Alert",color:S,children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Change Alert",children:(0,e.createComponentVNode)(2,m,{levels:L,required_access:w})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Announcement",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bullhorn",content:E,disabled:!w||p>0,onClick:function(){function M(){return h("announce")}return M}()})}),!!N&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",color:"red",content:P,disabled:!w||V>0,onClick:function(){function M(){return h("MessageSyndicate")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!w,onClick:function(){function M(){return h("RestoreBackup")}return M}()})]})||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transmit",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",content:P,disabled:!w||V>0,onClick:function(){function M(){return h("MessageCentcomm")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Nuclear Device",children:(0,e.createComponentVNode)(2,t.Button,{icon:"bomb",content:D,disabled:!w||V>0,onClick:function(){function M(){return h("nukerequest")}return M}()})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Command Staff Actions",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Displays",children:(0,e.createComponentVNode)(2,t.Button,{icon:"tv",content:"Change Status Displays",disabled:!A,onClick:function(){function M(){return h("status")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Incoming Messages",children:(0,e.createComponentVNode)(2,t.Button,{icon:"folder-open",content:"View ("+x.length+")",disabled:!A,onClick:function(){function M(){return h("messagelist")}return M}()})})]})})})],4)},i=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.stat_display,N=v.authhead,V=v.current_message_title,S=p.presets.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.name===p.type,disabled:!N,onClick:function(){function w(){return h("setstat",{statdisp:L.name})}return w}()},L.name)}),I=p.alerts.map(function(L){return(0,e.createComponentVNode)(2,t.Button,{content:L.label,selected:L.alert===p.icon,disabled:!N,onClick:function(){function w(){return h("setstat",{statdisp:3,alert:L.alert})}return w}()},L.alert)});return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Modify Status Screens",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function L(){return h("main")}return L}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Presets",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alerts",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 1",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:p.line_1,disabled:!N,onClick:function(){function L(){return h("setmsg1")}return L}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message Line 2",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:p.line_2,disabled:!N,onClick:function(){function L(){return h("setmsg2")}return L}()})})]})})})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.authhead,N=v.current_message_title,V=v.current_message,S=v.messages,I=v.security_level,L;if(N)L=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:N,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Return To Message List",disabled:!p,onClick:function(){function A(){return h("messagelist")}return A}()}),children:(0,e.createComponentVNode)(2,t.Box,{children:V})})});else{var w=S.map(function(A){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:A.title,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eye",content:"View",disabled:!p||N===A.title,onClick:function(){function x(){return h("messagelist",{msgid:A.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"times",content:"Delete",disabled:!p,onClick:function(){function x(){return h("delmessage",{msgid:A.id})}return x}()})]},A.id)});L=(0,e.createComponentVNode)(2,t.Section,{title:"Messages Received",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function A(){return h("main")}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:w})})}return(0,e.createComponentVNode)(2,t.Box,{children:L})},m=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=s.levels,N=s.required_access,V=s.use_confirm,S=v.security_level;return V?p.map(function(I){return(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:I.icon,content:I.name,disabled:!N||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return h("newalertlevel",{level:I.id})}return L}()},I.name)}):p.map(function(I){return(0,e.createComponentVNode)(2,t.Button,{icon:I.icon,content:I.name,disabled:!N||I.id===S,tooltip:I.tooltip,onClick:function(){function L(){return h("newalertlevel",{level:I.id})}return L}()},I.name)})},l=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.is_admin,N=v.possible_cc_sounds;if(!p)return h("main");var V=(0,a.useLocalState)(d,"subtitle",""),S=V[0],I=V[1],L=(0,a.useLocalState)(d,"text",""),w=L[0],A=L[1],x=(0,a.useLocalState)(d,"classified",0),E=x[0],P=x[1],D=(0,a.useLocalState)(d,"beepsound","Beep"),M=D[0],R=D[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Central Command Report",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){function O(){return h("main")}return O}()}),children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Subtitle here.",fluid:!0,value:S,onChange:function(){function O(F,_){return I(_)}return O}(),mb:"5px"}),(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter Announcement here,\nMultiline input is accepted.",rows:10,fluid:!0,multiline:1,value:w,onChange:function(){function O(F,_){return A(_)}return O}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Send Announcement",fluid:!0,icon:"paper-plane",center:!0,mt:"5px",textAlign:"center",onClick:function(){function O(){return h("make_cc_announcement",{subtitle:S,text:w,classified:E,beepsound:M})}return O}()}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"260px",height:"20px",options:N,selected:M,onSelected:function(){function O(F){return R(F)}return O}(),disabled:E})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"volume-up",mx:"5px",disabled:E,tooltip:"Test sound",onClick:function(){function O(){return h("test_sound",{sound:M})}return O}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:E,content:"Classified",fluid:!0,tooltip:E?"Sent to station communications consoles":"Publically announced",onClick:function(){function O(){return P(!E)}return O}()})})]})]})})}},20562:function(T,r,n){"use strict";r.__esModule=!0,r.CompostBin=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.CompostBin=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.biomass,m=i.compost,l=i.biomass_capacity,u=i.compost_capacity,s=i.potassium,d=i.potassium_capacity,C=i.potash,h=i.potash_capacity,v=(0,a.useSharedState)(B,"vendAmount",1),p=v[0],N=v[1];return(0,e.createComponentVNode)(2,o.Window,{width:360,height:250,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{label:"Resources",children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Biomass",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:c,minValue:0,maxValue:l,ranges:{good:[l*.5,1/0],average:[l*.25,l*.5],bad:[-1/0,l*.25]},children:[c," / ",l," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compost",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:m,minValue:0,maxValue:u,ranges:{good:[u*.5,1/0],average:[u*.25,u*.5],bad:[-1/0,u*.25]},children:[m," / ",u," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potassium",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:s,minValue:0,maxValue:d,ranges:{good:[d*.5,1/0],average:[d*.25,d*.5],bad:[-1/0,d*.25]},children:[s," / ",d," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Potash",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ml:.5,mt:1,width:20,value:C,minValue:0,maxValue:h,ranges:{good:[h*.5,1/0],average:[h*.25,h*.5],bad:[-1/0,h*.25]},children:[C," / ",h," Units"]})})]})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,mr:"5px",color:"silver",children:"Soil clumps to make:"}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:p,width:"32px",minValue:1,maxValue:10,stepPixelSize:7,onChange:function(){function V(S,I){return N(I)}return V}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,align:"center",content:"Make Soil",disabled:m<25*p,icon:"arrow-circle-down",onClick:function(){function V(){return g("create",{amount:p})}return V}()})})})]})})})}return b}()},21813:function(T,r,n){"use strict";r.__esModule=!0,r.Contractor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(73379),b=n(98595);function y(h,v){h.prototype=Object.create(v.prototype),h.prototype.constructor=h,B(h,v)}function B(h,v){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,N){return p.__proto__=N,p},B(h,v)}var k={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},g=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(Math.random()*2e4),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"],i=r.Contractor=function(){function h(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I;S.unauthorized?I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,d,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){function x(){}return x}()})}):S.load_animation_completed?I=(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:(0,e.createComponentVNode)(2,c)}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",overflow:"hidden",children:S.page===1?(0,e.createComponentVNode)(2,l,{height:"100%"}):(0,e.createComponentVNode)(2,s,{height:"100%"})})],4):I=(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,d,{height:"100%",allMessages:g,finishedTimeout:3e3,onFinished:function(){function x(){return V("complete_load_animation")}return x}()})});var L=(0,t.useLocalState)(p,"viewingPhoto",""),w=L[0],A=L[1];return(0,e.createComponentVNode)(2,b.Window,{theme:"syndicate",width:500,height:600,children:[w&&(0,e.createComponentVNode)(2,C),(0,e.createComponentVNode)(2,b.Window.Content,{className:"Contractor",children:(0,e.createComponentVNode)(2,o.Flex,{direction:"column",height:"100%",children:I})})]})}return h}(),c=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.tc_available,L=S.tc_paid_out,w=S.completed_contracts,A=S.rep;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Summary",buttons:(0,e.createComponentVNode)(2,o.Box,{verticalAlign:"middle",mt:"0.25rem",children:[A," Rep"]})},v,{children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",children:[I," TC"]}),(0,e.createComponentVNode)(2,o.Button,{disabled:I<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){function x(){return V("claim")}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"TC Earned",children:[L," TC"]})]})}),(0,e.createComponentVNode)(2,o.Box,{flexBasis:"50%",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,o.Box,{height:"20px",lineHeight:"20px",inline:!0,children:w})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},m=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.page;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Tabs,Object.assign({},v,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===1,onClick:function(){function L(){return V("page",{page:1})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"suitcase"}),"Contracts"]}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===2,onClick:function(){function L(){return V("page",{page:2})}return L}(),children:[(0,e.createComponentVNode)(2,o.Icon,{name:"shopping-cart"}),"Hub"]})]})))},l=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.contracts,L=S.contract_active,w=S.can_extract,A=!!L&&I.filter(function(M){return M.status===1})[0],x=A&&A.time_left>0,E=(0,t.useLocalState)(p,"viewingPhoto",""),P=E[0],D=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,e.createComponentVNode)(2,o.Button,{disabled:!w||x,icon:"parachute-box",content:["Call Extraction",x&&(0,e.createComponentVNode)(2,f.Countdown,{timeLeft:A.time_left,format:function(){function M(R,O){return" ("+O.substr(3)+")"}return M}()})],onClick:function(){function M(){return V("extract")}return M}()})},v,{children:I.slice().sort(function(M,R){return M.status===1?-1:R.status===1?1:M.status-R.status}).map(function(M){var R;return(0,e.createComponentVNode)(2,o.Section,{title:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"1",color:M.status===1&&"good",children:M.target_name}),(0,e.createComponentVNode)(2,o.Flex.Item,{basis:"content",children:M.has_photo&&(0,e.createComponentVNode)(2,o.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){function O(){return D("target_photo_"+M.uid+".png")}return O}()})})]}),className:"Contractor__Contract",buttons:(0,e.createComponentVNode)(2,o.Box,{width:"100%",children:[!!k[M.status]&&(0,e.createComponentVNode)(2,o.Box,{color:k[M.status][1],inline:!0,mt:M.status!==1&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:k[M.status][0]}),M.status===1&&(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){function O(){return V("abort")}return O}()})]}),children:(0,e.createComponentVNode)(2,o.Flex,{children:[(0,e.createComponentVNode)(2,o.Flex.Item,{grow:"2",mr:"0.5rem",children:[M.fluff_message,!!M.completed_time&&(0,e.createComponentVNode)(2,o.Box,{color:"good",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",M.completed_time]}),!!M.dead_extraction&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!M.fail_reason&&(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",M.fail_reason]})]}),(0,e.createComponentVNode)(2,o.Flex.Item,{flexBasis:"100%",children:[(0,e.createComponentVNode)(2,o.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xA0",u(M)]}),(R=M.difficulties)==null?void 0:R.map(function(O,F){return(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!!L,content:O.name+" ("+O.reward+" TC)",onClick:function(){function _(){return V("activate",{uid:M.uid,difficulty:F+1})}return _}()},F)}),!!M.objective&&(0,e.createComponentVNode)(2,o.Box,{color:"white",bold:!0,children:[M.objective.extraction_name,(0,e.createVNode)(1,"br"),"(",(M.objective.rewards.tc||0)+" TC",",\xA0",(M.objective.rewards.credits||0)+" Credits",")"]})]})]})},M.uid)})})))},u=function(v){if(!(!v.objective||v.status>1)){var p=v.objective.locs.user_area_id,N=v.objective.locs.user_coords,V=v.objective.locs.target_area_id,S=v.objective.locs.target_coords,I=p===V;return(0,e.createComponentVNode)(2,o.Flex.Item,{children:(0,e.createComponentVNode)(2,o.Icon,{name:I?"dot-circle-o":"arrow-alt-circle-right-o",color:I?"green":"yellow",rotation:I?null:-(0,a.rad2deg)(Math.atan2(S[1]-N[1],S[0]-N[0])),lineHeight:I?null:"0.85",size:"1.5"})})}},s=function(v,p){var N=(0,t.useBackend)(p),V=N.act,S=N.data,I=S.rep,L=S.buyables;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({title:"Available Purchases",overflow:"auto"},v,{children:L.map(function(w){return(0,e.createComponentVNode)(2,o.Section,{title:w.name,children:[w.description,(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:I-1&&(0,e.createComponentVNode)(2,o.Box,{as:"span",color:w.stock===0?"bad":"good",ml:"0.5rem",children:[w.stock," in stock"]})]},w.uid)})})))},d=function(h){function v(N){var V;return V=h.call(this,N)||this,V.timer=null,V.state={currentIndex:0,currentDisplay:[]},V}y(v,h);var p=v.prototype;return p.tick=function(){function N(){var V=this.props,S=this.state;if(S.currentIndex<=V.allMessages.length){this.setState(function(L){return{currentIndex:L.currentIndex+1}});var I=S.currentDisplay;I.push(V.allMessages[S.currentIndex])}else clearTimeout(this.timer),setTimeout(V.onFinished,V.finishedTimeout)}return N}(),p.componentDidMount=function(){function N(){var V=this,S=this.props.linesPerSecond,I=S===void 0?2.5:S;this.timer=setInterval(function(){return V.tick()},1e3/I)}return N}(),p.componentWillUnmount=function(){function N(){clearTimeout(this.timer)}return N}(),p.render=function(){function N(){return(0,e.createComponentVNode)(2,o.Box,{m:1,children:this.state.currentDisplay.map(function(V){return(0,e.createFragment)([V,(0,e.createVNode)(1,"br")],0,V)})})}return N}(),v}(e.Component),C=function(v,p){var N=(0,t.useLocalState)(p,"viewingPhoto",""),V=N[0],S=N[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Contractor__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:V}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function I(){return S("")}return I}()})]})}},54151:function(T,r,n){"use strict";r.__esModule=!0,r.ConveyorSwitch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ConveyorSwitch=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.slowFactor,m=i.oneWay,l=i.position;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lever position",children:l>0?"forward":l<0?"reverse":"neutral"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Allow reverse",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!m,onClick:function(){function u(){return g("toggleOneWay")}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Slowdown factor",children:(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",onClick:function(){function u(){return g("slowFactor",{value:c-5})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-left",onClick:function(){function u(){return g("slowFactor",{value:c-1})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Slider,{width:"100px",mx:"1px",value:c,fillValue:c,minValue:1,maxValue:50,step:1,format:function(){function u(s){return s+"x"}return u}(),onChange:function(){function u(s,d){return g("slowFactor",{value:d})}return u}()})}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-right",onClick:function(){function u(){return g("slowFactor",{value:c+1})}return u}()})," "]}),(0,e.createComponentVNode)(2,t.Flex.Item,{mx:"1px",children:[" ",(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",onClick:function(){function u(){return g("slowFactor",{value:c+5})}return u}()})," "]})]})})]})})})})}return b}()},73169:function(T,r,n){"use strict";r.__esModule=!0,r.CrewMonitor=void 0;var e=n(89005),a=n(88510),t=n(25328),o=n(72253),f=n(36036),b=n(36352),y=n(76910),B=n(98595),k=n(96184),g=["color"];function i(C,h){if(C==null)return{};var v={};for(var p in C)if({}.hasOwnProperty.call(C,p)){if(h.includes(p))continue;v[p]=C[p]}return v}var c=function(h,v){return h.dead?"Deceased":parseInt(h.health,10)<=v?"Critical":parseInt(h.stat,10)===1?"Unconscious":"Living"},m=function(h,v){return h.dead?"red":parseInt(h.health,10)<=v?"orange":parseInt(h.stat,10)===1?"blue":"green"},l=r.CrewMonitor=function(){function C(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=(0,o.useLocalState)(v,"tabIndex",V.tabIndex),I=S[0],L=S[1],w=function(){function x(E){L(E),N("set_tab_index",{tab_index:E})}return x}(),A=function(){function x(E){switch(E){case 0:return(0,e.createComponentVNode)(2,u);case 1:return(0,e.createComponentVNode)(2,d);default:return"WE SHOULDN'T BE HERE!"}}return x}();return(0,e.createComponentVNode)(2,B.Window,{width:800,height:600,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"table",selected:I===0,onClick:function(){function x(){return w(0)}return x}(),children:"Data View"},"DataView"),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"map-marked-alt",selected:I===1,onClick:function(){function x(){return w(1)}return x}(),children:"Map View"},"MapView")]})}),A(I)]})})})}return C}(),u=function(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=V.possible_levels,I=V.viewing_current_z_level,L=V.is_advanced,w=V.highlightedNames,A=(0,a.sortBy)(function(M){return!w.includes(M.name)},function(M){return M.name})(V.crewmembers||[]),x=(0,o.useLocalState)(v,"search",""),E=x[0],P=x[1],D=(0,t.createSearch)(E,function(M){return M.name+"|"+M.assignment+"|"+M.area});return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,backgroundColor:"transparent",children:[(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{width:"100%",ml:"5px",children:(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(){function M(R,O){return P(O)}return M}()})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:L?(0,e.createComponentVNode)(2,f.Dropdown,{mr:"5px",width:"50px",options:S,selected:I,onSelected:function(){function M(R){return N("switch_level",{new_level:R})}return M}()}):null})]}),(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{tooltip:"Clear highlights",icon:"square-xmark",onClick:function(){function M(){return N("clear_highlighted_names")}return M}()})}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Location"})]}),A.filter(D).map(function(M,R){var O=w.includes(M.name);return(0,e.createComponentVNode)(2,f.Table.Row,{bold:!!M.is_command,children:[(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,k.ButtonCheckbox,{checked:O,tooltip:"Mark on map",onClick:function(){function F(){return N(O?"remove_highlighted_name":"add_highlighted_name",{name:M.name})}return F}()})}),(0,e.createComponentVNode)(2,b.TableCell,{children:[M.name," (",M.assignment,")"]}),(0,e.createComponentVNode)(2,b.TableCell,{children:[(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:m(M,V.critThreshold),children:c(M,V.critThreshold)}),M.sensor_type>=2||V.ignoreSensors?(0,e.createComponentVNode)(2,f.Box,{inline:!0,ml:1,children:["(",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.oxy,children:M.oxy}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.toxin,children:M.tox}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.burn,children:M.fire}),"|",(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:y.COLORS.damageType.brute,children:M.brute}),")"]}):null]}),(0,e.createComponentVNode)(2,b.TableCell,{children:M.sensor_type===3||V.ignoreSensors?V.isAI||V.isObserver?(0,e.createComponentVNode)(2,f.Button,{fluid:!0,icon:"location-arrow",content:M.area+" ("+M.x+", "+M.y+")",onClick:function(){function F(){return N("track",{track:M.ref})}return F}()}):M.area+" ("+M.x+", "+M.y+")":(0,e.createComponentVNode)(2,f.Box,{inline:!0,color:"grey",children:"Not Available"})})]},R)})]})]})},s=function(h,v){var p=h.color,N=i(h,g);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.NanoMap.Marker,Object.assign({},N,{children:(0,e.createVNode)(1,"span","highlighted-marker color-border-"+p)})))},d=function(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=V.highlightedNames;return(0,e.createComponentVNode)(2,f.Box,{height:"100vh",mb:"0.5rem",overflow:"hidden",children:(0,e.createComponentVNode)(2,f.NanoMap,{zoom:V.zoom,offsetX:V.offsetX,offsetY:V.offsetY,onZoom:function(){function I(L){return N("set_zoom",{zoom:L})}return I}(),onOffsetChange:function(){function I(L,w){return N("set_offset",{offset_x:w.offsetX,offset_y:w.offsetY})}return I}(),children:V.crewmembers.filter(function(I){return I.sensor_type===3||V.ignoreSensors}).map(function(I){var L=m(I,V.critThreshold),w=S.includes(I.name),A=function(){return V.isObserver?N("track",{track:I.ref}):null},x=function(){return N(w?"remove_highlighted_name":"add_highlighted_name",{name:I.name})},E=I.name+" ("+I.assignment+")";return w?(0,e.createComponentVNode)(2,s,{x:I.x,y:I.y,tooltip:E,color:L,onClick:A,onDblClick:x},I.ref):(0,e.createComponentVNode)(2,f.NanoMap.MarkerIcon,{x:I.x,y:I.y,icon:"circle",tooltip:E,color:L,onClick:A,onDblClick:x},I.ref)})})})}},63987:function(T,r,n){"use strict";r.__esModule=!0,r.Cryo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=[{label:"Resp.",type:"oxyLoss"},{label:"Toxin",type:"toxLoss"},{label:"Brute",type:"bruteLoss"},{label:"Burn",type:"fireLoss"}],b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=r.Cryo=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:520,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,B)})})})}return g}(),B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.isOperating,d=u.hasOccupant,C=u.occupant,h=C===void 0?[]:C,v=u.cellTemperature,p=u.cellTemperatureStatus,N=u.isBeakerLoaded,V=u.cooldownProgress,S=u.auto_eject_healthy,I=u.auto_eject_dead;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",fill:!0,scrollable:!0,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",onClick:function(){function L(){return l("ejectOccupant")}return L}(),disabled:!d,children:"Eject"}),children:d?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:h.name||"Unknown"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h.health)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[h.stat][0],children:b[h.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),f.map(function(L){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:L.label,children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:h[L.type]/100,ranges:{bad:[.01,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:Math.round(h[L.type])})})},L.id)})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Cell",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",onClick:function(){function L(){return l("ejectBeaker")}return L}(),disabled:!N,children:"Eject Beaker"}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",onClick:function(){function L(){return l(s?"switchOff":"switchOn")}return L}(),selected:s,children:s?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",color:p,children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:v})," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dosage interval",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{average:[-1/0,99],good:[99,1/0]},color:!N&&"average",value:V,minValue:0,maxValue:100})}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject healthy occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:S?"toggle-on":"toggle-off",selected:S,onClick:function(){function L(){return l(S?"auto_eject_healthy_off":"auto_eject_healthy_on")}return L}(),children:S?"On":"Off"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auto-eject dead occupants",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"toggle-on":"toggle-off",selected:I,onClick:function(){function L(){return l(I?"auto_eject_dead_off":"auto_eject_dead_on")}return L}(),children:I?"On":"Off"})})]})})})],4)},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.isBeakerLoaded,d=u.beakerLabel,C=u.beakerVolume;return s?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!d&&"average",children:[d||"No label",":"]}),(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:!C&&"bad",ml:1,children:C?(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:C,format:function(){function h(v){return Math.round(v)+" units remaining"}return h}()}):"Beaker is empty"})],4):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"bad",children:"No beaker loaded"})}},86099:function(T,r,n){"use strict";r.__esModule=!0,r.CryopodConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=r.CryopodConsole=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.account_name,u=m.allow_items;return(0,e.createComponentVNode)(2,o.Window,{title:"Cryopod Console",width:400,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Hello, "+(l||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,e.createComponentVNode)(2,y),!!u&&(0,e.createComponentVNode)(2,B)]})})}return k}(),y=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.frozen_crew;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Crew",children:l.length?(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:l.map(function(u,s){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:u.name,children:u.rank},s)})})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored crew!"})})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.frozen_items,s=function(C){var h=C.toString();return h.startsWith("the ")&&(h=h.slice(4,h.length)),(0,f.toTitleCase)(h)};return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Stored Items",children:u.length?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:s(d.name),buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){function C(){return m("one_item",{item:d.uid})}return C}()})},d)})})}),(0,e.createComponentVNode)(2,t.Button,{content:"Drop All Items",color:"red",onClick:function(){function d(){return m("all_items")}return d}()})],4):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No stored items!"})})}},12692:function(T,r,n){"use strict";r.__esModule=!0,r.DNAModifier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],B=[5,10,20,30,50],k=r.DNAModifier=function(){function p(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.irradiating,A=L.dnaBlockSize,x=L.occupant;V.dnaBlockSize=A,V.isDNAInvalid=!x.isViableSubject||!x.uniqueIdentity||!x.structuralEnzymes;var E;return w&&(E=(0,e.createComponentVNode)(2,h,{duration:w})),(0,e.createComponentVNode)(2,o.Window,{width:660,height:775,children:[(0,e.createComponentVNode)(2,f.ComplexModal),E,(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,g)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i)})]})})]})}return p}(),g=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.locked,A=L.hasOccupant,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"label",inline:!0,mr:"0.5rem",children:"Door Lock:"}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A,selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Engaged":"Disengaged",onClick:function(){function E(){return I("toggleLock")}return E}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!A||w,icon:"user-slash",content:"Eject",onClick:function(){function E(){return I("ejectOccupant")}return E}()})],4),children:A?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:x.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:x.minHealth,max:x.maxHealth,value:x.health/x.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:b[x.stat][0],children:b[x.stat][1]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})}),V.isDNAInvalid?(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Radiation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{min:"0",max:"100",value:x.radiationLevel/100,color:"average"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:L.occupant.uniqueEnzymes?L.occupant.uniqueEnzymes:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"exclamation-circle"}),"\xA0 Unknown"]})})]})],0):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Cell unoccupied."})})},i=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedMenuKey,A=L.hasOccupant,x=L.occupant;if(A){if(V.isDNAInvalid)return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No operation possible on this subject."]})})})}else return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant in DNA modifier."]})})});var E;return w==="ui"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,l)],4):w==="se"?E=(0,e.createFragment)([(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,l)],4):w==="buffer"?E=(0,e.createComponentVNode)(2,u):w==="rejuvenators"&&(E=(0,e.createComponentVNode)(2,C)),(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:y.map(function(P,D){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:P[2],selected:w===P[0],onClick:function(){function M(){return I("selectMenuKey",{key:P[0]})}return M}(),children:P[1]},D)})}),E]})},c=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedUIBlock,A=L.selectedUISubBlock,x=L.selectedUITarget,E=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Unique Identifier",children:[(0,e.createComponentVNode)(2,v,{dnaString:E.uniqueIdentity,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectUIBlock"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:15,stepPixelSize:"20",value:x,format:function(){function P(D){return D.toString(16).toUpperCase()}return P}(),ml:"0",onChange:function(){function P(D,M){return I("changeUITarget",{value:M})}return P}()})})}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){function P(){return I("pulseUIRadiation")}return P}()})]})},m=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.selectedSEBlock,A=L.selectedSESubBlock,x=L.occupant;return(0,e.createComponentVNode)(2,t.Section,{title:"Modify Structural Enzymes",children:[(0,e.createComponentVNode)(2,v,{dnaString:x.structuralEnzymes,selectedBlock:w,selectedSubblock:A,blockSize:V.dnaBlockSize,action:"selectSEBlock"}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){function E(){return I("pulseSERadiation")}return E}()})]})},l=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.radiationIntensity,A=L.radiationDuration;return(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Emitter",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Intensity",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:10,stepPixelSize:20,value:w,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationIntensity",{value:P})}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Knob,{minValue:1,maxValue:20,stepPixelSize:10,unit:"s",value:A,popUpPosition:"right",ml:"0",onChange:function(){function x(E,P){return I("radiationDuration",{value:P})}return x}()})})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-start",mt:"0.5rem",onClick:function(){function x(){return I("pulseRadiation")}return x}()})]})},u=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.buffers,A=w.map(function(x,E){return(0,e.createComponentVNode)(2,s,{id:E+1,name:"Buffer "+(E+1),buffer:x},E)});return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{height:"75%",mt:1,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Buffers",children:A})}),(0,e.createComponentVNode)(2,t.Stack.Item,{height:"25%",children:(0,e.createComponentVNode)(2,d)})]})},s=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=N.id,A=N.name,x=N.buffer,E=L.isInjectorReady,P=A+(x.data?" - "+x.label:"");return(0,e.createComponentVNode)(2,t.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,t.Section,{title:P,mx:"0",lineHeight:"18px",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!x.data,icon:"trash",content:"Clear",onClick:function(){function D(){return I("bufferOption",{option:"clear",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data,icon:"pen",content:"Rename",onClick:function(){function D(){return I("bufferOption",{option:"changeLabel",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!x.data||!L.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-start",onClick:function(){function D(){return I("bufferOption",{option:"saveDisk",id:w})}return D}()})],4),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Write",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveUI",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveUIAndUE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"saveSE",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!L.hasDisk||!L.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"loadDisk",id:w})}return D}()})]}),!!x.data&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:x.owner||(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[x.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!x.ue&&" and Unique Enzymes"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Transfer to",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Injector",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"createInjector",id:w})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!E,icon:E?"syringe":"spinner",iconSpin:!E,content:"Block Injector",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"createInjector",id:w,block:1})}return D}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){function D(){return I("bufferOption",{option:"transfer",id:w})}return D}()})]})],4)]}),!x.data&&(0,e.createComponentVNode)(2,t.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},d=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.hasDisk,A=L.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{disabled:!w||!A.data,icon:"trash",content:"Wipe",onClick:function(){function x(){return I("wipeDisk")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function x(){return I("ejectDisk")}return x}()})],4),children:w?A.data?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Label",children:A.label?A.label:"No label"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Subject",children:A.owner?A.owner:(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"Unknown"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Type",children:[A.type==="ui"?"Unique Identifiers":"Structural Enzymes",!!A.ue&&" and Unique Enzymes"]})]}):(0,e.createComponentVNode)(2,t.Box,{color:"label",children:"Disk is blank."}):(0,e.createComponentVNode)(2,t.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"save-o",size:"4"}),(0,e.createVNode)(1,"br"),"No disk inserted."]})})},C=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.isBeakerLoaded,A=L.beakerVolume,x=L.beakerLabel;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Rejuvenators and Beaker",buttons:(0,e.createComponentVNode)(2,t.Button,{disabled:!w,icon:"eject",content:"Eject",onClick:function(){function E(){return I("ejectBeaker")}return E}()}),children:w?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Inject",children:[B.map(function(E,P){return(0,e.createComponentVNode)(2,t.Button,{disabled:E>A,icon:"syringe",content:E,onClick:function(){function D(){return I("injectRejuvenators",{amount:E})}return D}()},P)}),(0,e.createComponentVNode)(2,t.Button,{disabled:A<=0,icon:"syringe",content:"All",onClick:function(){function E(){return I("injectRejuvenators",{amount:A})}return E}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Beaker",children:[(0,e.createComponentVNode)(2,t.Box,{mb:"0.5rem",children:x||"No label"}),A?(0,e.createComponentVNode)(2,t.Box,{color:"good",children:[A," unit",A===1?"":"s"," remaining"]}):(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Empty"})]})]}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"flask",size:5,color:"silver"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"h3",null,"No beaker loaded.",16)]})})})},h=function(N,V){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"average",children:(0,e.createVNode)(1,"h1",null,[(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"}),(0,e.createTextVNode)("\xA0Irradiating occupant\xA0"),(0,e.createComponentVNode)(2,t.Icon,{name:"radiation"})],4)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,[(0,e.createTextVNode)("For "),N.duration,(0,e.createTextVNode)(" second"),N.duration===1?"":"s"],0)})]})},v=function(N,V){for(var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=N.dnaString,A=N.selectedBlock,x=N.selectedSubblock,E=N.blockSize,P=N.action,D=w.split(""),M=0,R=[],O=function(){for(var U=F/E+1,z=[],$=function(){var J=G+1;z.push((0,e.createComponentVNode)(2,t.Button,{selected:A===U&&x===J,content:D[F+G],mb:"0",onClick:function(){function se(){return I(P,{block:U,subblock:J})}return se}()}))},G=0;Gd.spawnpoints?"red":"green",children:[d.total," total, versus ",d.spawnpoints," spawnpoints"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Dispatch",children:(0,e.createComponentVNode)(2,t.Button,{width:10.5,textAlign:"center",icon:"ambulance",content:"Send ERT",onClick:function(){function N(){return s("dispatch_ert",{silent:v})}return N}()})})]})})})},g=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=d.ert_request_messages;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:C&&C.length?C.map(function(h){return(0,e.createComponentVNode)(2,t.Section,{title:h.time,buttons:(0,e.createComponentVNode)(2,t.Button,{content:h.sender_real_name,onClick:function(){function v(){return s("view_player_panel",{uid:h.sender_uid})}return v}(),tooltip:"View player panel"}),children:h.message},(0,f.decodeHtmlEntities)(h.time))}):(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"broadcast-tower",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No ERT requests."]})})})})},i=function(m,l){var u=(0,a.useBackend)(l),s=u.act,d=u.data,C=(0,a.useLocalState)(l,"text",""),h=C[0],v=C[1];return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Input,{placeholder:"Enter ERT denial reason here,\nMultiline input is accepted.",rows:19,fluid:!0,multiline:1,value:h,onChange:function(){function p(N,V){return v(V)}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Deny ERT",fluid:!0,icon:"times",center:!0,mt:2,textAlign:"center",onClick:function(){function p(){return s("deny_ert",{reason:h})}return p}()})]})})}},90217:function(T,r,n){"use strict";r.__esModule=!0,r.EconomyManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=r.EconomyManager=function(){function B(k,g){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:325,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return B}(),y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.next_payroll_time;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"coins",verticalAlign:"middle",size:3,mr:"1rem"}),"Economy Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.LabeledList,{label:"Pay Bonuses and Deductions",children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Global",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Global Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"global"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Account Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"department"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Department Members",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Department Members Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"department_members"})}return u}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Single Accounts",children:(0,e.createComponentVNode)(2,t.Button,{icon:"dollar-sign",width:"auto",content:"Crew Member Payroll Modification",onClick:function(){function u(){return c("payroll_modification",{mod_type:"crew_member"})}return u}()})})]}),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Box,{mb:.5,children:["Next Payroll in: ",l," Minutes"]}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",width:"auto",color:"bad",content:"Delay Payroll",onClick:function(){function u(){return c("delay_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{width:"auto",content:"Set Payroll Time",onClick:function(){function u(){return c("set_payroll")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",width:"auto",color:"good",content:"Accelerate Payroll",onClick:function(){function u(){return c("accelerate_payroll")}return u}()})]}),(0,e.createComponentVNode)(2,t.NoticeBox,{children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," You take full responsibility for unbalancing the economy with these buttons!"]})],4)}},82565:function(T,r,n){"use strict";r.__esModule=!0,r.Electropack=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.Electropack=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data,m=c.power,l=c.code,u=c.frequency,s=c.minFrequency,d=c.maxFrequency;return(0,e.createComponentVNode)(2,f.Window,{width:360,height:135,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,o.Button,{icon:m?"power-off":"times",content:m?"On":"Off",selected:m,onClick:function(){function C(){return i("power")}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function C(){return i("reset",{reset:"freq"})}return C}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:s/10,maxValue:d/10,value:u/10,format:function(){function C(h){return(0,a.toFixed)(h,1)}return C}(),width:"80px",onChange:function(){function C(h,v){return i("freq",{freq:v})}return C}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"sync",content:"Reset",onClick:function(){function C(){return i("reset",{reset:"code"})}return C}()}),children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onChange:function(){function C(h,v){return i("code",{code:v})}return C}()})})]})})})})}return y}()},11243:function(T,r,n){"use strict";r.__esModule=!0,r.Emojipedia=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=r.Emojipedia=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.data,m=c.emoji_list,l=(0,t.useLocalState)(g,"searchText",""),u=l[0],s=l[1],d=m.filter(function(C){return C.name.toLowerCase().includes(u.toLowerCase())});return(0,e.createComponentVNode)(2,f.Window,{width:325,height:400,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Emojipedia v1.0.1",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by name",value:u,onInput:function(){function C(h,v){return s(v)}return C}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"Click on an emoji to copy its tag!",tooltipPosition:"bottom",icon:"circle-question"})],4),children:d.map(function(C){return(0,e.createComponentVNode)(2,o.Button,{m:1,color:"transparent",className:(0,a.classes)(["emoji16x16","emoji-"+C.name]),style:{transform:"scale(1.5)"},tooltip:C.name,onClick:function(){function h(){y(C.name)}return h}()},C.name)})})})})}return B}(),y=function(k){var g=document.createElement("input"),i=":"+k+":";g.value=i,document.body.appendChild(g),g.select(),document.execCommand("copy"),document.body.removeChild(g)}},36730:function(T,r,n){"use strict";r.__esModule=!0,r.EvolutionMenu=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(64795),y=n(88510),B=r.EvolutionMenu=function(){function i(c,m){return(0,e.createComponentVNode)(2,f.Window,{width:480,height:580,theme:"changeling",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,g)]})})})}return i}(),k=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.evo_points,C=s.can_respec;return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Evolution Points",height:5.5,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:d}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Button,{ml:2.5,disabled:!C,content:"Readapt",icon:"sync",onClick:function(){function h(){return u("readapt")}return h}()}),(0,e.createComponentVNode)(2,o.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})})},g=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.evo_points,C=s.ability_tabs,h=s.purchased_abilities,v=s.view_mode,p=(0,t.useLocalState)(m,"selectedTab",C[0]),N=p[0],V=p[1],S=(0,t.useLocalState)(m,"searchText",""),I=S[0],L=S[1],w=(0,t.useLocalState)(m,"ability_tabs",C[0].abilities),A=w[0],x=w[1],E=function(R,O){if(O===void 0&&(O=""),!R||R.length===0)return[];var F=(0,a.createSearch)(O,function(_){return _.name+"|"+_.description});return(0,b.flow)([(0,y.filter)(function(_){return _==null?void 0:_.name}),(0,y.filter)(F),(0,y.sortBy)(function(_){return _==null?void 0:_.name})])(R)},P=function(R){if(L(R),R==="")return x(N.abilities);x(E(C.map(function(O){return O.abilities}).flat(),R))},D=function(R){V(R),x(R.abilities),L("")};return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Abilities",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Input,{width:"200px",placeholder:"Search Abilities",onInput:function(){function M(R,O){P(O)}return M}(),value:I}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"square-o":"check-square-o",selected:!v,content:"Compact",onClick:function(){function M(){return u("set_view_mode",{mode:0})}return M}()}),(0,e.createComponentVNode)(2,o.Button,{icon:v?"check-square-o":"square-o",selected:v,content:"Expanded",onClick:function(){function M(){return u("set_view_mode",{mode:1})}return M}()})],4),children:[(0,e.createComponentVNode)(2,o.Tabs,{children:C.map(function(M){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:I===""&&N===M,onClick:function(){function R(){D(M)}return R}(),children:M.category},M)})}),A.map(function(M,R){return(0,e.createComponentVNode)(2,o.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{ml:.5,color:"#dedede",children:M.name}),h.includes(M.power_path)&&(0,e.createComponentVNode)(2,o.Stack.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,e.createComponentVNode)(2,o.Stack.Item,{mr:3,textAlign:"right",grow:1,children:[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:["Cost:"," "]}),(0,e.createComponentVNode)(2,o.Box,{as:"span",bold:!0,color:"#1b945c",children:M.cost})]}),(0,e.createComponentVNode)(2,o.Stack.Item,{textAlign:"right",children:(0,e.createComponentVNode)(2,o.Button,{mr:.5,disabled:M.cost>d||h.includes(M.power_path),content:"Evolve",onClick:function(){function O(){return u("purchase",{power_path:M.power_path})}return O}()})})]}),!!v&&(0,e.createComponentVNode)(2,o.Stack,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:M.description+" "+M.helptext})]},R)})]})})}},17370:function(T,r,n){"use strict";r.__esModule=!0,r.ExosuitFabricator=void 0;var e=n(89005),a=n(35840),t=n(25328),o=n(72253),f=n(36036),b=n(73379),y=n(98595),B=["id","amount","lineDisplay","onClick"];function k(p,N){if(p==null)return{};var V={};for(var S in p)if({}.hasOwnProperty.call(p,S)){if(N.includes(S))continue;V[S]=p[S]}return V}var g=2e3,i={bananium:"clown",tranquillite:"mime"},c=r.ExosuitFabricator=function(){function p(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.linked;return A?(0,e.createComponentVNode)(2,y.Window,{width:950,height:625,children:(0,e.createComponentVNode)(2,y.Window.Content,{className:"Exofab",children:[(0,e.createComponentVNode)(2,v),(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,l)}),w&&(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,u)})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m)}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,s)})]})})]})]})}):(0,e.createComponentVNode)(2,h)}return p}(),m=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.materials,A=L.capacity,x=Object.values(w).reduce(function(E,P){return E+P},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,title:"Materials",className:"Exofab__materials",buttons:(0,e.createComponentVNode)(2,f.Box,{color:"label",mt:"0.25rem",children:[(x/A*100).toPrecision(3),"% full"]}),children:["metal","glass","silver","gold","uranium","titanium","plasma","diamond","bluespace","bananium","tranquillite","plastic"].map(function(E){return(0,e.createComponentVNode)(2,d,{mt:-2,id:E,bold:E==="metal"||E==="glass",onClick:function(){function P(){return I("withdraw",{id:E})}return P}()},E)})})},l=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.curCategory,A=L.categories,x=L.designs,E=L.syncing,P=(0,o.useLocalState)(V,"searchText",""),D=P[0],M=P[1],R=(0,t.createSearch)(D,function(z){return z.name}),O=x.filter(R),F=(0,o.useLocalState)(V,"levelsModal",!1),_=F[0],U=F[1];return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__designs",title:(0,e.createComponentVNode)(2,f.Dropdown,{width:"19rem",className:"Exofab__dropdown",selected:w,options:A,onSelected:function(){function z($){return I("category",{cat:$})}return z}()}),buttons:(0,e.createComponentVNode)(2,f.Box,{mt:"2px",children:[(0,e.createComponentVNode)(2,f.Button,{icon:"plus",content:"Queue all",onClick:function(){function z(){return I("queueall")}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"info",content:"Show current tech levels",onClick:function(){function z(){return U(!0)}return z}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"unlink",color:"red",tooltip:"Disconnect from R&D network",onClick:function(){function z(){return I("unlink")}return z}()})]}),children:[(0,e.createComponentVNode)(2,f.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(){function z($,G){return M(G)}return z}()}),O.map(function(z){return(0,e.createComponentVNode)(2,C,{design:z},z.id)}),O.length===0&&(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No designs found."})]})},u=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.building,A=L.buildStart,x=L.buildEnd,E=L.worldTime;return(0,e.createComponentVNode)(2,f.Section,{className:"Exofab__building",stretchContents:!0,children:(0,e.createComponentVNode)(2,f.ProgressBar.Countdown,{start:A,current:E,end:x,children:(0,e.createComponentVNode)(2,f.Stack,{children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Icon,{name:"cog",spin:!0})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:["Building ",w,"\xA0(",(0,e.createComponentVNode)(2,b.Countdown,{current:E,timeLeft:x-E,format:function(){function P(D,M){return M.substr(3)}return P}()}),")"]})]})})})},s=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.queue,A=L.processingQueue,x=Object.entries(L.queueDeficit).filter(function(P){return P[1]<0}),E=w.reduce(function(P,D){return P+D.time},0);return(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,className:"Exofab__queue",title:"Queue",buttons:(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Button,{selected:A,icon:A?"toggle-on":"toggle-off",content:"Process",onClick:function(){function P(){return I("process")}return P}()}),(0,e.createComponentVNode)(2,f.Button,{disabled:w.length===0,icon:"eraser",content:"Clear",onClick:function(){function P(){return I("unqueueall")}return P}()})]}),children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:w.length===0?(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"The queue is empty."}):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--queue",grow:!0,overflow:"auto",children:w.map(function(P,D){return(0,e.createComponentVNode)(2,f.Box,{color:P.notEnough&&"bad",children:[D+1,". ",P.name,D>0&&(0,e.createComponentVNode)(2,f.Button,{icon:"arrow-up",onClick:function(){function M(){return I("queueswap",{from:D+1,to:D})}return M}()}),D0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--time",children:[(0,e.createComponentVNode)(2,f.Divider),"Processing time:",(0,e.createComponentVNode)(2,f.Icon,{name:"clock",mx:"0.5rem"}),(0,e.createComponentVNode)(2,f.Box,{inline:!0,bold:!0,children:new Date(E/10*1e3).toISOString().substr(14,5)})]}),Object.keys(x).length>0&&(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__queue--deficit",shrink:"0",children:[(0,e.createComponentVNode)(2,f.Divider),"Lacking materials to complete:",x.map(function(P){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:P[0],amount:-P[1],lineDisplay:!0})},P[0])})]})],0)})})},d=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=N.id,A=N.amount,x=N.lineDisplay,E=N.onClick,P=k(N,B),D=L.materials[w]||0,M=A||D;if(!(M<=0&&!(w==="metal"||w==="glass"))){var R=A&&A>D;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,f.Stack,Object.assign({align:"center",className:(0,a.classes)(["Exofab__material",x&&"Exofab__material--line"])},P,{children:x?(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{className:(0,a.classes)(["materials32x32",w])}),(0,e.createComponentVNode)(2,f.Stack.Item,{className:"Exofab__material--amount",color:R&&"bad",ml:0,mr:1,children:M.toLocaleString("en-US")})],4):(0,e.createFragment)([(0,e.createComponentVNode)(2,f.Stack.Item,{basis:"content",children:(0,e.createComponentVNode)(2,f.Button,{width:"85%",color:"transparent",onClick:E,children:(0,e.createComponentVNode)(2,f.Box,{mt:1,className:(0,a.classes)(["materials32x32",w])})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:"1",children:[(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--name",children:w}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__material--amount",children:[M.toLocaleString("en-US")," cm\xB3 (",Math.round(M/g*10)/10," ","sheets)"]})]})],4)})))}},C=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=N.design;return(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design",children:[(0,e.createComponentVNode)(2,f.Button,{disabled:w.notEnough||L.building,icon:"cog",content:w.name,onClick:function(){function A(){return I("build",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,f.Button,{icon:"plus-circle",onClick:function(){function A(){return I("queue",{id:w.id})}return A}()}),(0,e.createComponentVNode)(2,f.Box,{className:"Exofab__design--cost",children:Object.entries(w.cost).map(function(A){return(0,e.createComponentVNode)(2,f.Box,{children:(0,e.createComponentVNode)(2,d,{id:A[0],amount:A[1],lineDisplay:!0})},A[0])})}),(0,e.createComponentVNode)(2,f.Stack,{className:"Exofab__design--time",children:(0,e.createComponentVNode)(2,f.Stack.Item,{children:[(0,e.createComponentVNode)(2,f.Icon,{name:"clock"}),w.time>0?(0,e.createFragment)([w.time/10,(0,e.createTextVNode)(" seconds")],0):"Instant"]})})]})},h=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.controllers;return(0,e.createComponentVNode)(2,y.Window,{children:(0,e.createComponentVNode)(2,y.Window.Content,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,f.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,f.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:"Link"})]}),w.map(function(A){return(0,e.createComponentVNode)(2,f.Table.Row,{children:[(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.addr}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:A.net_id}),(0,e.createComponentVNode)(2,f.Table.Cell,{children:(0,e.createComponentVNode)(2,f.Button,{content:"Link",icon:"link",onClick:function(){function x(){return I("linktonetworkcontroller",{target_controller:A.addr})}return x}()})})]},A.addr)})]})})})})},v=function(N,V){var S=(0,o.useBackend)(V),I=S.act,L=S.data,w=L.tech_levels,A=(0,o.useLocalState)(V,"levelsModal",!1),x=A[0],E=A[1];return x?(0,e.createComponentVNode)(2,f.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:window.innerHeight*.75+"px",mx:"auto",children:(0,e.createComponentVNode)(2,f.Section,{title:"Current tech levels",buttons:(0,e.createComponentVNode)(2,f.Button,{content:"Close",onClick:function(){function P(){E(!1)}return P}()}),children:(0,e.createComponentVNode)(2,f.LabeledList,{children:w.map(function(P){var D=P.name,M=P.level;return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:D,children:M},D)})})})}):null}},59128:function(T,r,n){"use strict";r.__esModule=!0,r.ExperimentConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=new Map([[0,{text:"Conscious",color:"good"}],[1,{text:"Unconscious",color:"average"}],[2,{text:"Deceased",color:"bad"}]]),b=new Map([[0,{label:"Probe",icon:"thermometer"}],[1,{label:"Dissect",icon:"brain"}],[2,{label:"Analyze",icon:"search"}]]),y=r.ExperimentConsole=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.open,u=m.feedback,s=m.occupant,d=m.occupant_name,C=m.occupant_status,h=function(){function p(){if(!s)return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No specimen detected."});var N=function(){function S(){return f.get(C)}return S}(),V=N();return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:V.color,children:V.text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Experiments",children:[0,1,2].map(function(S){return(0,e.createComponentVNode)(2,t.Button,{icon:b.get(S).icon,content:b.get(S).label,onClick:function(){function I(){return c("experiment",{experiment_type:S})}return I}()},S)})})]})}return p}(),v=h();return(0,e.createComponentVNode)(2,o.Window,{theme:"abductor",width:350,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:u})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Scanner",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!l,onClick:function(){function p(){return c("door")}return p}()}),children:v})]})})}return B}()},97086:function(T,r,n){"use strict";r.__esModule=!0,r.ExternalAirlockController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=0,b=1013,y=function(g){var i="good",c=80,m=95,l=110,u=120;return gl?i="average":g>u&&(i="bad"),i},B=r.ExternalAirlockController=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.chamber_pressure,s=l.exterior_status,d=l.interior_status,C=l.processing;return(0,e.createComponentVNode)(2,o.Window,{width:330,height:205,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Information",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chamber Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:y(u),value:u,minValue:f,maxValue:b,children:[u," kPa"]})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Actions",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Abort",icon:"ban",color:"red",disabled:!C,onClick:function(){function h(){return m("abort")}return h}()}),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:C,onClick:function(){function h(){return m("cycle_ext")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Cycle to Interior",icon:"arrow-circle-right",disabled:C,onClick:function(){function h(){return m("cycle_int")}return h}()})]}),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{width:"49%",content:"Force Exterior Door",icon:"exclamation-triangle",color:d==="open"?"red":C?"yellow":null,onClick:function(){function h(){return m("force_ext")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{width:"50%",content:"Force Interior Door",icon:"exclamation-triangle",color:d==="open"?"red":C?"yellow":null,onClick:function(){function h(){return m("force_int")}return h}()})]})]})]})})}return k}()},96142:function(T,r,n){"use strict";r.__esModule=!0,r.FaxMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.FaxMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:540,height:295,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.scan_name?"eject":"id-card",selected:i.scan_name,content:i.scan_name?i.scan_name:"-----",tooltip:i.scan_name?"Eject ID":"Insert ID",onClick:function(){function c(){return g("scan")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorize",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authenticated?"sign-out-alt":"id-card",selected:i.authenticated,disabled:i.nologin,content:i.realauth?"Log Out":"Log In",onClick:function(){function c(){return g("auth")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fax Menu",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network",children:i.network}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Document",children:[(0,e.createComponentVNode)(2,t.Button,{icon:i.paper?"eject":"paperclip",disabled:!i.authenticated&&!i.paper,content:i.paper?i.paper:"-----",onClick:function(){function c(){return g("paper")}return c}()}),!!i.paper&&(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){function c(){return g("rename")}return c}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sending To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:i.destination?i.destination:"-----",disabled:!i.authenticated,onClick:function(){function c(){return g("dept")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Action",children:(0,e.createComponentVNode)(2,t.Button,{icon:"envelope",content:i.sendError?i.sendError:"Send",disabled:!i.paper||!i.destination||!i.authenticated||i.sendError,onClick:function(){function c(){return g("send")}return c}()})})]})})]})})}return b}()},74123:function(T,r,n){"use strict";r.__esModule=!0,r.FilingCabinet=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.FilingCabinet=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=k.config,m=i.contents,l=c.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:300,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Contents",children:[!m&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"folder-open",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"The ",l," is empty."]})}),!!m&&m.slice().map(function(u){return(0,e.createComponentVNode)(2,t.Stack,{mt:.5,className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"80%",children:u.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Retrieve",onClick:function(){function s(){return g("retrieve",{index:u.index})}return s}()})})]},u)})]})})})})}return b}()},83767:function(T,r,n){"use strict";r.__esModule=!0,r.FloorPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=k.icon_state,u=k.direction,s=k.isSelected,d=k.onSelect;return(0,e.createComponentVNode)(2,t.DmIcon,{icon:m.icon,icon_state:l,direction:u,onClick:d,style:{"border-style":s&&"solid"||"none","border-width":"2px","border-color":"orange",padding:s&&"0px"||"2px"}})},b={NORTH:1,SOUTH:2,EAST:4,WEST:8},y=r.FloorPainter=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.availableStyles,u=m.selectedStyle,s=m.selectedDir;return(0,e.createComponentVNode)(2,o.Window,{width:405,height:475,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Decal setup",children:[(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",onClick:function(){function d(){return c("cycle_style",{offset:-1})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Dropdown,{options:l,selected:u,width:"150px",nochevron:!0,onSelected:function(){function d(C){return c("select_style",{style:C})}return d}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",onClick:function(){function d(){return c("cycle_style",{offset:1})}return d}()})})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"5px",mb:"5px",children:(0,e.createComponentVNode)(2,t.Flex,{overflowY:"auto",maxHeight:"239px",wrap:"wrap",children:l.map(function(d){return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,f,{icon_state:d,isSelected:u===d,onSelect:function(){function C(){return c("select_style",{style:d})}return C}()})},d)})})}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Direction",children:(0,e.createComponentVNode)(2,t.Table,{style:{display:"inline"},children:[b.NORTH,null,b.SOUTH].map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[d+b.WEST,d,d+b.EAST].map(function(C){return(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:C===null?(0,e.createComponentVNode)(2,t.Icon,{name:"arrows-alt",size:3}):(0,e.createComponentVNode)(2,f,{icon_state:u,direction:C,isSelected:C===s,onSelect:function(){function h(){return c("select_direction",{direction:C})}return h}()})},C)})},d)})})})})]})})})}return B}()},53424:function(T,r,n){"use strict";r.__esModule=!0,r.GPS=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=function(l){return l?"("+l.join(", ")+")":"ERROR"},y=function(l,u){if(!(!l||!u)){if(l[2]!==u[2])return null;var s=Math.atan2(u[1]-l[1],u[0]-l[0]),d=Math.sqrt(Math.pow(u[1]-l[1],2)+Math.pow(u[0]-l[0],2));return{angle:(0,a.rad2deg)(s),distance:d}}},B=r.GPS=function(){function m(l,u){var s=(0,t.useBackend)(u),d=s.data,C=d.emped,h=d.active,v=d.area,p=d.position,N=d.saved;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:C?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,k,{emp:!0})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,g)}),h?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{area:v,position:p})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{title:"Saved Position",position:N})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,basis:"0",children:(0,e.createComponentVNode)(2,c,{height:"100%"})})],0):(0,e.createComponentVNode)(2,k)],0)})})})}return m}(),k=function(l,u){var s=l.emp;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:s?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),s?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},g=function(l,u){var s=(0,t.useBackend)(u),d=s.act,C=s.data,h=C.active,v=C.tag,p=C.same_z,N=(0,t.useLocalState)(u,"newTag",v),V=N[0],S=N[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Settings",buttons:(0,e.createComponentVNode)(2,o.Button,{selected:h,icon:h?"toggle-on":"toggle-off",content:h?"On":"Off",onClick:function(){function I(){return d("toggle")}return I}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tag",children:[(0,e.createComponentVNode)(2,o.Input,{width:"5rem",value:v,onEnter:function(){function I(){return d("tag",{newtag:V})}return I}(),onInput:function(){function I(L,w){return S(w)}return I}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:v===V,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){function I(){return d("tag",{newtag:V})}return I}(),children:(0,e.createComponentVNode)(2,o.Icon,{name:"pen"})})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Range",children:(0,e.createComponentVNode)(2,o.Button,{selected:!p,icon:p?"compress":"expand",content:p?"Local Sector":"Global",onClick:function(){function I(){return d("same_z")}return I}()})})]})})},i=function(l,u){var s=l.title,d=l.area,C=l.position;return(0,e.createComponentVNode)(2,o.Section,{title:s||"Position",children:(0,e.createComponentVNode)(2,o.Box,{fontSize:"1.5rem",children:[d&&(0,e.createFragment)([d,(0,e.createVNode)(1,"br")],0),b(C)]})})},c=function(l,u){var s=(0,t.useBackend)(u),d=s.data,C=d.position,h=d.signals;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,title:"Signals"},l,{children:(0,e.createComponentVNode)(2,o.Table,{children:h.map(function(v){return Object.assign({},v,y(C,v.position))}).map(function(v,p){return(0,e.createComponentVNode)(2,o.Table.Row,{backgroundColor:p%2===0&&"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,o.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:v.tag}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",color:"grey",children:v.area}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:v.distance!==void 0&&(0,e.createComponentVNode)(2,o.Box,{opacity:Math.max(1-Math.min(v.distance,100)/100,.5),children:[(0,e.createComponentVNode)(2,o.Icon,{name:v.distance>0?"arrow-right":"circle",rotation:-v.angle}),"\xA0",Math.floor(v.distance)+"m"]})}),(0,e.createComponentVNode)(2,o.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:b(v.position)})]},p)})})})))}},89124:function(T,r,n){"use strict";r.__esModule=!0,r.GeneModder=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(3939),f=n(98595),b=r.GeneModder=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.has_seed;return(0,e.createComponentVNode)(2,f.Window,{width:950,height:650,children:[(0,e.createVNode)(1,"div","GeneModder__left",(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,l,{scrollable:!0})}),2),(0,e.createVNode)(1,"div","GeneModder__right",(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,o.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),v===0?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})}),2)]})}return u}(),y=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.disk;return(0,e.createComponentVNode)(2,t.Section,{title:"Genes",fill:!0,scrollable:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})},B=function(s,d){return(0,e.createComponentVNode)(2,t.Section,{fill:!0,height:"85%",children:(0,e.createComponentVNode)(2,t.Stack,{height:"100%",children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"green",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"leaf",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),"The plant DNA manipulator is missing a seed."]})})})},k=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.has_seed,N=v.seed,V=v.has_disk,S=v.disk,I,L;return p?I=(0,e.createComponentVNode)(2,t.Stack.Item,{mb:"-6px",mt:"-4px",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+N.image,style:{"vertical-align":"middle",width:"32px",margin:"-1px","margin-left":"-11px"}}),(0,e.createComponentVNode)(2,t.Button,{content:N.name,onClick:function(){function w(){return h("eject_seed")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{ml:"3px",icon:"pen",tooltip:"Name Variant",onClick:function(){function w(){return h("variant_name")}return w}()})]}):I=(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:"None",onClick:function(){function w(){return h("eject_seed")}return w}()})}),V?L=S.name:L="None",(0,e.createComponentVNode)(2,t.Section,{title:"Storage",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Plant Sample",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Data Disk",children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:3.3,content:L,tooltip:"Select Empty Disk",onClick:function(){function w(){return h("select_empty_disk")}return w}()})})})]})})},g=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.disk,N=v.core_genes;return(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core Genes",open:!0,children:[N.map(function(V){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:V.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function S(){return h("extract",{id:V.id})}return S}()})})]},V)})," ",(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract All",disabled:!(p!=null&&p.can_extract),icon:"save",onClick:function(){function V(){return h("bulk_extract_core")}return V}()})})})]},"Core Genes")},i=function(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.reagent_genes,p=h.has_reagent;return(0,e.createComponentVNode)(2,m,{title:"Reagent Genes",gene_set:v,do_we_show:p})},c=function(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.trait_genes,p=h.has_trait;return(0,e.createComponentVNode)(2,m,{title:"Trait Genes",gene_set:v,do_we_show:p})},m=function(s,d){var C=s.title,h=s.gene_set,v=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.data,S=V.disk;return(0,e.createComponentVNode)(2,t.Collapsible,{title:C,open:!0,children:v?h.map(function(I){return(0,e.createComponentVNode)(2,t.Stack,{py:"2px",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"100%",ml:"2px",children:I.name}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Extract",disabled:!(S!=null&&S.can_extract),icon:"save",onClick:function(){function L(){return N("extract",{id:I.id})}return L}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"times",onClick:function(){function L(){return N("remove",{id:I.id})}return L}()})})]},I)}):(0,e.createComponentVNode)(2,t.Stack.Item,{children:"No Genes Detected"})},C)},l=function(s,d){var C=s.title,h=s.gene_set,v=s.do_we_show,p=(0,a.useBackend)(d),N=p.act,V=p.data,S=V.has_seed,I=V.empty_disks,L=V.stat_disks,w=V.trait_disks,A=V.reagent_disks;return(0,e.createComponentVNode)(2,t.Section,{title:"Disks",children:[(0,e.createVNode)(1,"br"),"Empty Disks: ",I,(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:12,icon:"arrow-down",tooltip:"Eject an Empty disk",content:"Eject Empty Disk",onClick:function(){function x(){return N("eject_empty_disk")}return x}()}),(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stats",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[L.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[x.stat==="All"?(0,e.createComponentVNode)(2,t.Button,{content:"Replace All",tooltip:"Write disk stats to seed",disabled:!(x!=null&&x.ready)||!S,icon:"arrow-circle-down",onClick:function(){function E(){return N("bulk_replace_core",{index:x.index})}return E}()}):(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",tooltip:"Write disk stat to seed",disabled:!x||!S,content:"Replace",onClick:function(){function E(){return N("replace",{index:x.index,stat:x.stat})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return N("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Traits",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[w.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk trait to seed",content:"Insert",onClick:function(){function E(){return N("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return N("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Reagents",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,scrollable:!0,children:[A.slice().sort(function(x,E){return x.display_name.localeCompare(E.display_name)}).map(function(x){return(0,e.createComponentVNode)(2,t.Stack,{mr:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"49%",children:x.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:25,children:[(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-circle-down",disabled:!x||!x.can_insert,tooltip:"Add disk reagent to seed",content:"Insert",onClick:function(){function E(){return N("insert",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:6,icon:"arrow-right",content:"Select",tooltip:"Choose as target for extracted genes",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("select",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:5,icon:"arrow-down",content:"Eject",tooltip:"Eject Disk",tooltipPosition:"bottom-start",onClick:function(){function E(){return N("eject_disk",{index:x.index})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{width:2,icon:x.read_only?"lock":"lock-open",content:"",tool_tip:"Set/unset Read Only",onClick:function(){function E(){return N("set_read_only",{index:x.index,read_only:x.read_only})}return E}()})]})]},x)}),(0,e.createComponentVNode)(2,t.Button)]})})]})]})}},73053:function(T,r,n){"use strict";r.__esModule=!0,r.GenericCrewManifest=void 0;var e=n(89005),a=n(36036),t=n(98595),o=n(41874),f=r.GenericCrewManifest=function(){function b(y,B){return(0,e.createComponentVNode)(2,t.Window,{theme:"nologo",width:588,height:510,children:(0,e.createComponentVNode)(2,t.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,a.Section,{noTopPadding:!0,children:(0,e.createComponentVNode)(2,o.CrewManifest)})})})}return b}()},42914:function(T,r,n){"use strict";r.__esModule=!0,r.GhostHudPanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.GhostHudPanel=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.data,c=i.security,m=i.medical,l=i.diagnostic,u=i.pressure,s=i.radioactivity,d=i.ahud;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:217,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,b,{label:"Medical",type:"medical",is_active:m}),(0,e.createComponentVNode)(2,b,{label:"Security",type:"security",is_active:c}),(0,e.createComponentVNode)(2,b,{label:"Diagnostic",type:"diagnostic",is_active:l}),(0,e.createComponentVNode)(2,b,{label:"Pressure",type:"pressure",is_active:u}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Radioactivity",type:"radioactivity",is_active:s,act_on:"rads_on",act_off:"rads_off"}),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,b,{label:"Antag HUD",is_active:d,act_on:"ahud_on",act_off:"ahud_off"})]})})})}return y}(),b=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=B.label,m=B.type,l=m===void 0?null:m,u=B.is_active,s=B.act_on,d=s===void 0?"hud_on":s,C=B.act_off,h=C===void 0?"hud_off":C;return(0,e.createComponentVNode)(2,t.Flex,{pt:.3,color:"label",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{pl:.5,align:"center",width:"80%",children:c}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:.6,content:u?"On":"Off",icon:u?"toggle-on":"toggle-off",selected:u,onClick:function(){function v(){return i(u?h:d,{hud_type:l})}return v}()})})]})}},25825:function(T,r,n){"use strict";r.__esModule=!0,r.GlandDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.GlandDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.glands,m=c===void 0?[]:c;return(0,e.createComponentVNode)(2,o.Window,{width:300,height:338,theme:"abductor",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(l){return(0,e.createComponentVNode)(2,t.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",fontSize:"17px",lineHeight:"55px",icon:"eject",backgroundColor:l.color,content:l.amount||"0",disabled:!l.amount,onClick:function(){function u(){return g("dispense",{gland_id:l.id})}return u}()},l.id)})})})})}return b}()},10270:function(T,r,n){"use strict";r.__esModule=!0,r.GravityGen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.GravityGen=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.charging_state,m=i.charge_count,l=i.breaker,u=i.ext_power,s=function(){function C(h){return h>0?(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"average",children:["[ ",h===1?"Charging":"Discharging"," ]"]}):(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:u?"good":"bad",children:["[ ",u?"Powered":"Unpowered"," ]"]})}return C}(),d=function(){function C(h){if(h>0)return(0,e.createComponentVNode)(2,t.NoticeBox,{danger:!0,p:1.5,children:[(0,e.createVNode)(1,"b",null,"WARNING:",16)," Radiation Detected!"]})}return C}();return(0,e.createComponentVNode)(2,o.Window,{width:350,height:170,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[d(c),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Generator Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:l?"power-off":"times",content:l?"Online":"Offline",color:l?"green":"red",px:1.5,onClick:function(){function C(){return g("breaker")}return C}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Status",color:u?"good":"bad",children:s(c)}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gravity Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:m/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})})]})})]})})})}return b}()},48657:function(T,r,n){"use strict";r.__esModule=!0,r.GuestPass=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(49148),b=r.GuestPass=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:690,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"id-card",selected:!c.showlogs,onClick:function(){function m(){return i("mode",{mode:0})}return m}(),children:"Issue Pass"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"scroll",selected:c.showlogs,onClick:function(){function m(){return i("mode",{mode:1})}return m}(),children:["Records (",c.issue_log.length,")"]})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Card",children:(0,e.createComponentVNode)(2,t.Button,{icon:c.scan_name?"eject":"id-card",selected:c.scan_name,content:c.scan_name?c.scan_name:"-----",tooltip:c.scan_name?"Eject ID":"Insert ID",onClick:function(){function m(){return i("scan")}return m}()})})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:!c.showlogs&&(0,e.createComponentVNode)(2,t.Section,{title:"Issue Guest Pass",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Issue To",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.giv_name?c.giv_name:"-----",disabled:!c.scan_name,onClick:function(){function m(){return i("giv_name")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reason",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.reason?c.reason:"-----",disabled:!c.scan_name,onClick:function(){function m(){return i("reason")}return m}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Duration",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pencil-alt",content:c.duration?c.duration:"-----",disabled:!c.scan_name,onClick:function(){function m(){return i("duration")}return m}()})})]})})}),!c.showlogs&&(c.scan_name?(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:c.printmsg,disabled:!c.canprint,onClick:function(){function m(){return i("issue")}return m}()}),grantableList:c.grantableList,accesses:c.regions,selectedList:c.selectedAccess,accessMod:function(){function m(l){return i("access",{access:l})}return m}(),grantAll:function(){function m(){return i("grant_all")}return m}(),denyAll:function(){function m(){return i("clear_all")}return m}(),grantDep:function(){function m(l){return i("grant_region",{region:l})}return m}(),denyDep:function(){function m(l){return i("deny_region",{region:l})}return m}()})}):(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"id-card",size:5,color:"gray",mb:5}),(0,e.createVNode)(1,"br"),"Please, insert ID Card"]})})})})),!!c.showlogs&&(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,m:0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Issuance Log",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:!c.scan_name,onClick:function(){function m(){return i("print")}return m}()}),children:!!c.issue_log.length&&(0,e.createComponentVNode)(2,t.LabeledList,{children:c.issue_log.map(function(m,l){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:m},l)})})||(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,fontSize:1.5,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No logs"]})})})})]})})})}return y}()},67834:function(T,r,n){"use strict";r.__esModule=!0,r.HandheldChemDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=[1,5,10,20,30,50],b=null,y=r.HandheldChemDispenser=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:390,height:430,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return g}(),B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.amount,d=u.energy,C=u.maxEnergy,h=u.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:d,minValue:0,maxValue:C,ranges:{good:[C*.5,1/0],average:[C*.25,C*.5],bad:[-1/0,C*.25]},children:[d," / ",C," Units"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{children:f.map(function(v,p){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,width:"15%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"cog",selected:s===v,content:v,onClick:function(){function N(){return l("amount",{amount:v})}return N}()})},p)})})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,e.createComponentVNode)(2,t.Stack,{justify:"space-between",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="dispense",content:"Dispense",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"dispense"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="remove",content:"Remove",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"remove"})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"cog",selected:h==="isolate",content:"Isolate",m:"0",width:"32%",onClick:function(){function v(){return l("mode",{mode:"isolate"})}return v}()})]})})]})})})},k=function(i,c){for(var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.chemicals,d=s===void 0?[]:s,C=u.current_reagent,h=[],v=0;v<(d.length+1)%3;v++)h.push(!0);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,height:"18%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:u.glass?"Drink Selector":"Chemical Selector",children:[d.map(function(p,N){return(0,e.createComponentVNode)(2,t.Button,{width:"32%",icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:C===p.id,content:p.title,style:{"margin-left":"2px"},onClick:function(){function V(){return l("dispense",{reagent:p.id})}return V}()},N)}),h.map(function(p,N){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:"1",basis:"25%"},N)})]})})}},46098:function(T,r,n){"use strict";r.__esModule=!0,r.HealthSensor=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.HealthSensor=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.act,m=i.data,l=m.on,u=m.user_health,s=m.minHealth,d=m.maxHealth,C=m.alarm_health;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:125,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Scanning",children:(0,e.createComponentVNode)(2,o.Button,{icon:"power-off",content:l?"On":"Off",color:l?null:"red",selected:l,onClick:function(){function h(){return c("scan_toggle")}return h}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health activation",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:2,stepPixelSize:6,minValue:s,maxValue:d,value:C,format:function(){function h(v){return(0,a.toFixed)(v,1)}return h}(),width:"80px",onDrag:function(){function h(v,p){return c("alarm_health",{alarm_health:p})}return h}()})}),u!==null&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"User health",children:(0,e.createComponentVNode)(2,o.Box,{color:y(u),bold:u>=100,children:(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:u})})})]})})})})}return B}(),y=function(k){return k>50?"green":k>0?"orange":"red"}},36771:function(T,r,n){"use strict";r.__esModule=!0,r.Holodeck=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Holodeck=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=(0,a.useLocalState)(k,"currentDeck",""),l=m[0],u=m[1],s=(0,a.useLocalState)(k,"showReload",!1),d=s[0],C=s[1],h=c.decks,v=c.ai_override,p=c.emagged,N=function(){function V(S){i("select_deck",{deck:S}),u(S),C(!0),setTimeout(function(){C(!1)},3e3)}return V}();return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:[d&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Holodeck Control System",children:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createVNode)(1,"b",null,"Currently Loaded Program:",16)," ",l]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Available Programs",children:[h.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{width:15.5,color:"transparent",content:V,selected:V===l,onClick:function(){function S(){return N(V)}return S}()},V)}),(0,e.createVNode)(1,"hr",null,null,1,{color:"gray"}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[!!v&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Override Protocols",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"Turn On":"Turn Off",color:p?"good":"bad",onClick:function(){function V(){return i("ai_override")}return V}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety Protocols",children:(0,e.createComponentVNode)(2,t.Box,{color:p?"bad":"good",children:[p?"Off":"On",!!p&&(0,e.createComponentVNode)(2,t.Button,{ml:9.5,width:15.5,color:"red",content:"Wildlife Simulation",onClick:function(){function V(){return i("wildlifecarp")}return V}()})]})})]})]})})]})})]})}return y}(),b=function(B,k){return(0,e.createComponentVNode)(2,t.Dimmer,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"spinner",size:"5",spin:!0}),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{color:"white",children:(0,e.createVNode)(1,"h1",null,"\xA0Recalibrating projection apparatus.\xA0",16)}),(0,e.createComponentVNode)(2,t.Box,{color:"label",children:(0,e.createVNode)(1,"h3",null,"Please, wait for 3 seconds.",16)})]})}},25471:function(T,r,n){"use strict";r.__esModule=!0,r.Instrument=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.Instrument=function(){function i(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:505,children:[(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,g)]})})]})}return i}(),y=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.help;if(d)return(0,e.createComponentVNode)(2,o.Modal,{maxWidth:"75%",height:window.innerHeight*.75+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,e.createVNode)(1,"h1",null,"Making a Song",16),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Lines are a series of chords, separated by commas\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(,)"}),(0,e.createTextVNode)(", each with notes separated by hyphens\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"(-)"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("as defined above.")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Notes are played by the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"names of the note"}),(0,e.createTextVNode)(", and optionally, the\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(", and/or the"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave number"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("By default, every note is\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"natural"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("and in\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave 3"}),(0,e.createTextVNode)(". Defining a different state for either is remembered for each"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"note"}),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Example:"}),(0,e.createTextVNode)("\xA0"),(0,e.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,e.createTextVNode)(" will play a\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"good",children:"C"}),(0,e.createTextVNode)("\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"major"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("scale.")],0),(0,e.createVNode)(1,"li",null,[(0,e.createTextVNode)("After a note has an\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"average",children:"accidental"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("or\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"bad",children:"octave"}),(0,e.createTextVNode)(" "),(0,e.createTextVNode)("placed, it will be remembered:\xA0"),(0,e.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,e.createTextVNode)(" is "),(0,e.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],0)],4)],0),(0,e.createVNode)(1,"p",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"Chords"}),(0,e.createTextVNode)("\xA0can be played simply by seperating each note with a hyphen: "),(0,e.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("A"),(0,e.createTextVNode)(" "),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"pause"}),(0,e.createTextVNode)("\xA0may be denoted by an empty chord: "),(0,e.createVNode)(1,"i",null,"C,E,,C,G",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,e.createTextVNode)(",\xA0"),(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"highlight",children:"eg:"}),(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,e.createTextVNode)(".")],0),(0,e.createVNode)(1,"p",null,[(0,e.createTextVNode)("Combined, an example line is: "),(0,e.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,e.createTextVNode)("."),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,e.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,e.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,e.createVNode)(1,"ul",null,[(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Type:"}),(0,e.createTextVNode)("\xA0Whether the instrument is legacy or synthesized."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Current:"}),(0,e.createTextVNode)("\xA0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,e.createTextVNode)("\xA0The pitch to apply to all notes of the song.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,e.createTextVNode)("\xA0How a played note fades out."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,e.createTextVNode)("\xA0The volume threshold at which a note is fully stopped.")],4),(0,e.createVNode)(1,"li",null,[(0,e.createComponentVNode)(2,o.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,e.createTextVNode)("\xA0Whether the last note should be sustained indefinitely.")],4)],4),(0,e.createComponentVNode)(2,o.Button,{color:"grey",content:"Close",onClick:function(){function C(){return u("help")}return C}()})]})})})},B=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.lines,C=s.playing,h=s.repeat,v=s.maxRepeats,p=s.tempo,N=s.minTempo,V=s.maxTempo,S=s.tickLag,I=s.volume,L=s.minVolume,w=s.maxVolume,A=s.ready;return(0,e.createComponentVNode)(2,o.Section,{title:"Instrument",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"info",content:"Help",onClick:function(){function x(){return u("help")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file",content:"New",onClick:function(){function x(){return u("newsong")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"upload",content:"Import",onClick:function(){function x(){return u("import")}return x}()})],4),children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Playback",children:[(0,e.createComponentVNode)(2,o.Button,{selected:C,disabled:d.length===0||h<0,icon:"play",content:"Play",onClick:function(){function x(){return u("play")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!C,icon:"stop",content:"Stop",onClick:function(){function x(){return u("stop")}return x}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Repeat",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:0,maxValue:v,value:h,stepPixelSize:59,onChange:function(){function x(E,P){return u("repeat",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Tempo",children:(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Button,{disabled:p>=V,content:"-",as:"span",mr:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p+S})}return x}()}),(0,a.round)(600/p)," BPM",(0,e.createComponentVNode)(2,o.Button,{disabled:p<=N,content:"+",as:"span",ml:"0.5rem",onClick:function(){function x(){return u("tempo",{new:p-S})}return x}()})]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:L,maxValue:w,value:I,stepPixelSize:6,onDrag:function(){function x(E,P){return u("setvolume",{new:P})}return x}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",children:A?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Ready"}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,e.createComponentVNode)(2,k)]})},k=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.allowedInstrumentNames,C=s.instrumentLoaded,h=s.instrument,v=s.canNoteShift,p=s.noteShift,N=s.noteShiftMin,V=s.noteShiftMax,S=s.sustainMode,I=s.sustainLinearDuration,L=s.sustainExponentialDropoff,w=s.legacy,A=s.sustainDropoffVolume,x=s.sustainHeldNote,E,P;return S===1?(E="Linear",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:.1,maxValue:5,value:I,step:.5,stepPixelSize:85,format:function(){function D(M){return(0,a.round)(M*100)/100+" seconds"}return D}(),onChange:function(){function D(M,R){return u("setlinearfalloff",{new:R/10})}return D}()})):S===2&&(E="Exponential",P=(0,e.createComponentVNode)(2,o.Slider,{minValue:1.025,maxValue:10,value:L,step:.01,format:function(){function D(M){return(0,a.round)(M*1e3)/1e3+"% per decisecond"}return D}(),onChange:function(){function D(M,R){return u("setexpfalloff",{new:R})}return D}()})),d.sort(),(0,e.createComponentVNode)(2,o.Box,{my:-1,children:(0,e.createComponentVNode)(2,o.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,e.createComponentVNode)(2,o.Section,{mt:-1,children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Type",children:w?"Legacy":"Synthesized"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current",children:C?(0,e.createComponentVNode)(2,o.Dropdown,{options:d,selected:h,width:"50%",onSelected:function(){function D(M){return u("switchinstrument",{name:M})}return D}()}):(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"None!"})}),!!(!w&&v)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,e.createComponentVNode)(2,o.Slider,{minValue:N,maxValue:V,value:p,stepPixelSize:2,format:function(){function D(M){return M+" keys / "+(0,a.round)(M/12*100)/100+" octaves"}return D}(),onChange:function(){function D(M,R){return u("setnoteshift",{new:R})}return D}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain Mode",children:[(0,e.createComponentVNode)(2,o.Dropdown,{options:["Linear","Exponential"],selected:E,mb:"0.4rem",onSelected:function(){function D(M){return u("setsustainmode",{new:M})}return D}()}),P]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,e.createComponentVNode)(2,o.Slider,{animated:!0,minValue:.01,maxValue:100,value:A,stepPixelSize:6,onChange:function(){function D(M,R){return u("setdropoffvolume",{new:R})}return D}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,e.createComponentVNode)(2,o.Button,{selected:x,icon:x?"toggle-on":"toggle-off",content:x?"Yes":"No",onClick:function(){function D(){return u("togglesustainhold")}return D}()})})],4)]}),(0,e.createComponentVNode)(2,o.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){function D(){return u("reset")}return D}()})]})})})},g=function(c,m){var l=(0,t.useBackend)(m),u=l.act,s=l.data,d=s.playing,C=s.lines,h=s.editing;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Editor",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!h||d,icon:"plus",content:"Add Line",onClick:function(){function v(){return u("newline",{line:C.length+1})}return v}()}),(0,e.createComponentVNode)(2,o.Button,{selected:!h,icon:h?"chevron-up":"chevron-down",onClick:function(){function v(){return u("edit")}return v}()})],4),children:!!h&&(C.length>0?(0,e.createComponentVNode)(2,o.LabeledList,{children:C.map(function(v,p){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:p+1,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"pen",onClick:function(){function N(){return u("modifyline",{line:p+1})}return N}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:d,icon:"trash",onClick:function(){function N(){return u("deleteline",{line:p+1})}return N}()})],4),children:v},p)})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"Song is empty."}))})}},13618:function(T,r,n){"use strict";r.__esModule=!0,r.KeyComboModal=void 0;var e=n(89005),a=n(70611),t=n(72253),o=n(36036),f=n(98595),b=n(19203),y=n(51057),B=function(l){return l.key!==a.KEY.Alt&&l.key!==a.KEY.Control&&l.key!==a.KEY.Shift&&l.key!==a.KEY.Escape},k={DEL:"Delete",DOWN:"South",END:"Southwest",HOME:"Northwest",INSERT:"Insert",LEFT:"West",PAGEDOWN:"Southeast",PAGEUP:"Northeast",RIGHT:"East",SPACEBAR:"Space",UP:"North"},g=3,i=function(l){var u="";if(l.altKey&&(u+="Alt"),l.ctrlKey&&(u+="Ctrl"),l.shiftKey&&!(l.keyCode>=48&&l.keyCode<=57)&&(u+="Shift"),l.location===g&&(u+="Numpad"),B(l))if(l.shiftKey&&l.keyCode>=48&&l.keyCode<=57){var s=l.keyCode-48;u+="Shift"+s}else{var d=l.key.toUpperCase();u+=k[d]||d}return u},c=r.KeyComboModal=function(){function m(l,u){var s=(0,t.useBackend)(u),d=s.act,C=s.data,h=C.init_value,v=C.large_buttons,p=C.message,N=p===void 0?"":p,V=C.title,S=C.timeout,I=(0,t.useLocalState)(u,"input",h),L=I[0],w=I[1],A=(0,t.useLocalState)(u,"binding",!0),x=A[0],E=A[1],P=function(){function R(O){if(!x){O.key===a.KEY.Enter&&d("submit",{entry:L}),(0,a.isEscape)(O.key)&&d("cancel");return}if(O.preventDefault(),B(O)){D(i(O)),E(!1);return}else if(O.key===a.KEY.Escape){D(h),E(!1);return}}return R}(),D=function(){function R(O){O!==L&&w(O)}return R}(),M=130+(N.length>30?Math.ceil(N.length/3):0)+(N.length&&v?5:0);return(0,e.createComponentVNode)(2,f.Window,{title:V,width:240,height:M,children:[S&&(0,e.createComponentVNode)(2,y.Loader,{value:S}),(0,e.createComponentVNode)(2,f.Window.Content,{onKeyDown:function(){function R(O){P(O)}return R}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Autofocus),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:N})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:x,content:x&&x!==null?"Awaiting input...":""+L,width:"100%",textAlign:"center",onClick:function(){function R(){D(h),E(!0)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,b.InputButtons,{input:L})})]})]})})]})}return m}()},35655:function(T,r,n){"use strict";r.__esModule=!0,r.KeycardAuth=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.KeycardAuth=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=(0,e.createComponentVNode)(2,t.Section,{title:"Keycard Authentication Device",children:(0,e.createComponentVNode)(2,t.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(!i.swiping&&!i.busy)return(0,e.createComponentVNode)(2,o.Window,{width:540,height:280,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,(0,e.createComponentVNode)(2,t.Section,{title:"Choose Action",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Red Alert",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",disabled:!i.redAvailable,onClick:function(){function l(){return g("triggerevent",{triggerevent:"Red Alert"})}return l}(),content:"Red Alert"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ERT",children:(0,e.createComponentVNode)(2,t.Button,{icon:"broadcast-tower",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Emergency Response Team"})}return l}(),content:"Call ERT"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})}return l}(),content:"Revoke"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"door-open",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})}return l}(),content:"Grant"}),(0,e.createComponentVNode)(2,t.Button,{icon:"door-closed",onClick:function(){function l(){return g("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})}return l}(),content:"Revoke"})]})]})})]})});var m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return!i.hasSwiped&&!i.ertreason&&i.event==="Emergency Response Team"?m=(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Fill out the reason for your ERT request."}):i.hasConfirm?m=(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Request Confirmed!"}):i.isRemote?m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):i.hasSwiped&&(m=(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Waiting for second person to confirm..."})),(0,e.createComponentVNode)(2,o.Window,{width:540,height:265,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[c,i.event==="Emergency Response Team"&&(0,e.createComponentVNode)(2,t.Section,{title:"Reason for ERT Call",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{color:i.ertreason?"":"red",icon:i.ertreason?"check":"pencil-alt",content:i.ertreason?i.ertreason:"-----",disabled:i.busy,onClick:function(){function l(){return g("ert")}return l}()})})}),(0,e.createComponentVNode)(2,t.Section,{title:i.event,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-circle-left",content:"Back",disabled:i.busy||i.hasConfirm,onClick:function(){function l(){return g("reset")}return l}()}),children:m})]})})}return b}()},62955:function(T,r,n){"use strict";r.__esModule=!0,r.KitchenMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(62411),b=r.KitchenMachine=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.data,m=i.config,l=c.ingredients,u=c.operating,s=m.title;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:320,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Operating,{operating:u,name:s}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,y)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Ingredients",children:(0,e.createComponentVNode)(2,t.Table,{className:"Ingredient__Table",children:l.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{tr:5,children:[(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:d.name}),2),(0,e.createVNode)(1,"td",null,(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:[d.amount," ",d.units]}),2)]},d.name)})})})})]})})})}return B}(),y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.inactive,u=m.tooltip;return(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:l,tooltip:l?u:"",tooltipPosition:"bottom",content:"Activate",onClick:function(){function s(){return c("cook")}return s}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:l,tooltip:l?u:"",tooltipPosition:"bottom",content:"Eject Contents",onClick:function(){function s(){return c("eject")}return s}()})})]})})}},9525:function(T,r,n){"use strict";r.__esModule=!0,r.LawManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.LawManager=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.isAdmin,s=l.isSlaved,d=l.isMalf,C=l.isAIMalf,h=l.view;return(0,e.createComponentVNode)(2,o.Window,{width:800,height:d?620:365,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!(u&&s)&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:["This unit is slaved to ",s,"."]}),!!(d||C)&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Law Management",selected:h===0,onClick:function(){function v(){return m("set_view",{set_view:0})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Lawsets",selected:h===1,onClick:function(){function v(){return m("set_view",{set_view:1})}return v}()})]}),h===0&&(0,e.createComponentVNode)(2,b),h===1&&(0,e.createComponentVNode)(2,y)]})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.has_zeroth_laws,s=l.zeroth_laws,d=l.has_ion_laws,C=l.ion_laws,h=l.ion_law_nr,v=l.has_inherent_laws,p=l.inherent_laws,N=l.has_supplied_laws,V=l.supplied_laws,S=l.channels,I=l.channel,L=l.isMalf,w=l.isAdmin,A=l.zeroth_law,x=l.ion_law,E=l.inherent_law,P=l.supplied_law,D=l.supplied_law_position;return(0,e.createFragment)([!!u&&(0,e.createComponentVNode)(2,B,{title:"ERR_NULL_VALUE",laws:s,ctx:i}),!!d&&(0,e.createComponentVNode)(2,B,{title:h,laws:C,ctx:i}),!!v&&(0,e.createComponentVNode)(2,B,{title:"Inherent",laws:p,ctx:i}),!!N&&(0,e.createComponentVNode)(2,B,{title:"Supplied",laws:V,ctx:i}),(0,e.createComponentVNode)(2,t.Section,{title:"Statement Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Statement Channel",children:S.map(function(M){return(0,e.createComponentVNode)(2,t.Button,{content:M.channel,selected:M.channel===I,onClick:function(){function R(){return m("law_channel",{law_channel:M.channel})}return R}()},M.channel)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"State Laws",children:(0,e.createComponentVNode)(2,t.Button,{content:"State Laws",onClick:function(){function M(){return m("state_laws")}return M}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Law Notification",children:(0,e.createComponentVNode)(2,t.Button,{content:"Notify",onClick:function(){function M(){return m("notify_laws")}return M}()})})]})}),!!L&&(0,e.createComponentVNode)(2,t.Section,{title:"Add Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"60%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"20%",children:"Actions"})]}),!!(w&&!u)&&(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Zero"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:A}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_zeroth_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_zeroth_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ion"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_ion_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_ion_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Inherent"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:E}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"N/A"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_inherent_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_inherent_law")}return M}()})]})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Supplied"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:P}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:D,onClick:function(){function M(){return m("change_supplied_law_position")}return M}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function M(){return m("change_supplied_law")}return M}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Add",icon:"plus",onClick:function(){function M(){return m("add_supplied_law")}return M}()})]})]})]})})],0)},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.law_sets;return(0,e.createComponentVNode)(2,t.Box,{children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name+" - "+s.header,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Load Laws",icon:"download",onClick:function(){function d(){return m("transfer_laws",{transfer_laws:s.ref})}return d}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.laws.has_ion_laws>0&&s.laws.ion_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_zeroth_laws>0&&s.laws.zeroth_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_inherent_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)}),s.laws.has_supplied_laws>0&&s.laws.inherent_laws.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.index,children:d.law},d.index)})]})},s.name)})})},B=function(g,i){var c=(0,a.useBackend)(g.ctx),m=c.act,l=c.data,u=l.isMalf;return(0,e.createComponentVNode)(2,t.Section,{title:g.title+" Laws",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"10%",children:"Index"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"69%",children:"Law"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"21%",children:"State?"})]}),g.laws.map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.index}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s.law}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{content:s.state?"Yes":"No",selected:s.state,onClick:function(){function d(){return m("state_law",{ref:s.ref,state_law:s.state?0:1})}return d}()}),!!u&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){function d(){return m("edit_law",{edit_law:s.ref})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){function d(){return m("delete_law",{delete_law:s.ref})}return d}()})],4)]})]},s.law)})]})})}},85066:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=r.LibraryComputer=function(){function h(v,p){return(0,e.createComponentVNode)(2,o.Window,{width:1050,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return h}(),y=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:I.summary}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",verticalAlign:"top"})]}),!I.isProgrammatic&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Categories",children:I.categories.join(", ")})]}),(0,e.createVNode)(1,"br"),L===I.ckey&&(0,e.createComponentVNode)(2,t.Button,{content:"Delete Book",icon:"trash",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return V("delete_book",{bookid:I.id,user_ckey:L})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Report Book",icon:"flag",color:"red",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,f.modalOpen)(p,"report_book",{bookid:I.id})}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Rate Book",icon:"star",color:"caution",disabled:I.isProgrammatic,onClick:function(){function w(){return(0,f.modalOpen)(p,"rate_info",{bookid:I.id})}return w}()})]})},B=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=v.args,L=S.selected_report,w=S.report_categories,A=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",title:"Report this book for Rule Violations",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Reasons",children:(0,e.createComponentVNode)(2,t.Box,{children:w.map(function(x,E){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:x.category_id===L,onClick:function(){function P(){return V("set_report",{report_type:x.category_id})}return P}()}),(0,e.createVNode)(1,"br")],4,E)})})})]}),(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,icon:"paper-plane",content:"Submit Report",onClick:function(){function x(){return V("submit_report",{bookid:I.id,user_ckey:A})}return x}()})]})},k=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.selected_rating,L=Array(10).fill().map(function(w,A){return 1+A});return(0,e.createComponentVNode)(2,t.Stack,{children:[L.map(function(w,A){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{bold:!0,icon:"star",color:I>=w?"caution":"default",onClick:function(){function x(){return V("set_rating",{rating_value:w})}return x}()})},A)}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,ml:2,fontSize:"150%",children:[I+"/10",(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"top"})]})]})},g=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=v.args,L=S.user_ckey;return(0,e.createComponentVNode)(2,t.Section,{level:2,m:"-1rem",pb:"1.5rem",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:I.title}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:I.author}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Rating",children:[I.current_rating?I.current_rating:0,(0,e.createComponentVNode)(2,t.Icon,{name:"star",color:"yellow",ml:.5,verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Total Ratings",children:I.total_ratings?I.total_ratings:0})]}),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,t.Button.Confirm,{mt:2,content:"Submit",icon:"paper-plane",onClick:function(){function w(){return V("rate_book",{bookid:I.id,user_ckey:L})}return w}()})]})},i=function(v,p){var N=(0,a.useBackend)(p),V=N.data,S=(0,a.useLocalState)(p,"tabIndex",0),I=S[0],L=S[1],w=V.login_state;return(0,e.createComponentVNode)(2,t.Stack.Item,{mb:1,children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===0,onClick:function(){function A(){return L(0)}return A}(),children:"Book Archives"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===1,onClick:function(){function A(){return L(1)}return A}(),children:"Corporate Literature"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===2,onClick:function(){function A(){return L(2)}return A}(),children:"Upload Book"}),w===1&&(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===3,onClick:function(){function A(){return L(3)}return A}(),children:"Patron Manager"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:I===4,onClick:function(){function A(){return L(4)}return A}(),children:"Inventory"})]})})},c=function(v,p){var N=(0,a.useLocalState)(p,"tabIndex",0),V=N[0];switch(V){case 0:return(0,e.createComponentVNode)(2,l);case 1:return(0,e.createComponentVNode)(2,u);case 2:return(0,e.createComponentVNode)(2,s);case 3:return(0,e.createComponentVNode)(2,d);case 4:return(0,e.createComponentVNode)(2,C);default:return"You are somehow on a tab that doesn't exist! Please let a coder know."}},m=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.searchcontent,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"35%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"edit",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Inputs"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.title||"Input Title",onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{textAlign:"left",icon:"pen",width:20,content:I.author||"Input Author",onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Ratings",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{mr:1,width:"min-content",content:I.ratingmin,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_ratingmin")}return x}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:"To"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{ml:1,width:"min-content",content:I.ratingmax,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_search_ratingmax")}return x}()})})]})})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"40%",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"clipboard-list",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Book Categories"]}),(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Dropdown,{mt:.6,width:"190px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_search_category",{category_id:A[E]})}return x}()})})})}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_search_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",m:".5em",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:1.5,mr:"1rem"}),"Search Actions"]}),(0,e.createComponentVNode)(2,t.Button,{content:"Clear Search",icon:"eraser",onClick:function(){function x(){return V("clear_search")}return x}()}),I.ckey?(0,e.createComponentVNode)(2,t.Button,{mb:.5,content:"Stop Showing My Books",color:"bad",icon:"search",onClick:function(){function x(){return V("clear_ckey_search")}return x}()}):(0,e.createComponentVNode)(2,t.Button,{content:"Find My Books",icon:"search",onClick:function(){function x(){return V("find_users_books",{user_ckey:w})}return x}()})]})]})},l=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.external_booklist,L=S.archive_pagenumber,w=S.num_pages,A=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Access",buttons:(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpagemax")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-left",disabled:L===1,onClick:function(){function x(){return V("deincrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{bold:!0,content:L,onClick:function(){function x(){return(0,f.modalOpen)(p,"setpagenumber")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",disabled:L===w,onClick:function(){function x(){return V("incrementpage")}return x}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"angle-double-right",disabled:L===w,onClick:function(){function x(){return V("incrementpagemax")}return x}()})],4),children:[(0,e.createComponentVNode)(2,m),(0,e.createVNode)(1,"hr"),(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Ratings"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Category"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(x){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:.5}),x.title.length>45?x.title.substr(0,45)+"...":x.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:x.author.length>30?x.author.substr(0,30)+"...":x.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[x.rating,(0,e.createComponentVNode)(2,t.Icon,{name:"star",ml:.5,color:"yellow",verticalAlign:"middle"})]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:x.categories.join(", ").substr(0,45)}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[A===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function E(){return V("order_external_book",{bookid:x.id})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function E(){return(0,f.modalOpen)(p,"expand_info",{bookid:x.id})}return E}()})]})]},x.id)})]})]})},u=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.programmatic_booklist,L=S.login_state;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Corporate Book Catalog",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Actions"})]}),I.map(function(w,A){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:w.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book",mr:2}),w.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:w.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[L===1&&(0,e.createComponentVNode)(2,t.Button,{content:"Order",icon:"print",onClick:function(){function x(){return V("order_programmatic_book",{bookid:w.id})}return x}()}),(0,e.createComponentVNode)(2,t.Button,{content:"More...",onClick:function(){function x(){return(0,f.modalOpen)(p,"expand_info",{bookid:w.id})}return x}()})]})]},A)})]})})},s=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.selectedbook,L=S.book_categories,w=S.user_ckey,A=[];return L.map(function(x){return A[x.description]=x.category_id}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Book System Upload",buttons:(0,e.createComponentVNode)(2,t.Button.Confirm,{bold:!0,width:9.5,icon:"upload",disabled:I.copyright,content:"Upload Book",onClick:function(){function x(){return V("uploadbook",{user_ckey:w})}return x}()}),children:[I.copyright?(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"WARNING: You cannot upload or modify the attributes of a copyrighted book"}):(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{ml:15,mb:3,fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"search-plus",verticalAlign:"middle",size:3,mr:2}),"Book Uploader"]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.title,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_selected_title")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,t.Button,{width:20,textAlign:"left",icon:"pen",disabled:I.copyright,content:I.author,onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_selected_author")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Select Categories",children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Dropdown,{width:"240px",options:L.map(function(x){return x.description}),onSelected:function(){function x(E){return V("toggle_upload_category",{category_id:A[E]})}return x}()})})})]}),(0,e.createVNode)(1,"br"),L.filter(function(x){return I.categories.includes(x.category_id)}).map(function(x){return(0,e.createComponentVNode)(2,t.Button,{content:x.description,disabled:I.copyright,selected:!0,icon:"unlink",onClick:function(){function E(){return V("toggle_upload_category",{category_id:x.category_id})}return E}()},x.category_id)})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mr:75,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Summary",children:(0,e.createComponentVNode)(2,t.Button,{icon:"pen",width:"auto",disabled:I.copyright,content:"Edit Summary",onClick:function(){function x(){return(0,f.modalOpen)(p,"edit_selected_summary")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{children:I.summary})]})})]})]})},d=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.checkout_data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Checked Out Books",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Patron"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time Left"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-tag"}),L.patron_name]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.title}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.timeleft>=0?L.timeleft:"LATE"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:(0,e.createComponentVNode)(2,t.Button,{content:"Mark Lost",icon:"flag",color:"bad",disabled:L.timeleft>=0,onClick:function(){function A(){return V("reportlost",{libraryid:L.libraryid})}return A}()})})]},w)})]})})},C=function(v,p){var N=(0,a.useBackend)(p),V=N.act,S=N.data,I=S.inventory_list;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Library Inventory",children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"LIB ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"})]}),I.map(function(L,w){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:L.libraryid}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"})," ",L.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:L.checked_out?"Checked Out":"Available"})]},w)})]})})};(0,f.modalRegisterBodyOverride)("expand_info",y),(0,f.modalRegisterBodyOverride)("report_book",B),(0,f.modalRegisterBodyOverride)("rate_info",g)},9516:function(T,r,n){"use strict";r.__esModule=!0,r.LibraryManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=r.LibraryManager=function(){function i(c,m){return(0,e.createComponentVNode)(2,o.Window,{width:600,height:600,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,e.createComponentVNode)(2,y)})]})}return i}(),y=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.pagestate;switch(d){case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,g);case 3:return(0,e.createComponentVNode)(2,k);default:return"WE SHOULDN'T BE HERE!"}},B=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data;return(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.4rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-shield",verticalAlign:"middle",size:3,mr:"1rem"}),"Library Manager"]}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"trash",width:"auto",color:"danger",content:"Delete Book by SSID",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ssid_delete")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"user-slash",width:"auto",color:"danger",content:"Delete All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_delete")}return d}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Books By CKEY",onClick:function(){function d(){return(0,f.modalOpen)(m,"specify_ckey_search")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"search",width:"auto",content:"View All Reported Books",onClick:function(){function d(){return u("view_reported_books")}return d}()})]})},k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.reports;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-secret",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"All Reported Books",(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function C(){return u("return")}return C}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Uploader CKEY"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Report Type"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Reporter Ckey"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),d.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:C.uploader_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),C.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:C.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:C.report_description}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:C.reporter_ckey}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",onClick:function(){function h(){return u("delete_book",{bookid:C.id})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Unflag",icon:"flag",color:"caution",onClick:function(){function h(){return u("unflag_book",{bookid:C.id})}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function h(){return u("view_book",{bookid:C.id})}return h}()})]})]},C.id)})]})})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.ckey,C=s.booklist;return(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Table,{className:"Library__Booklist",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.2rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user",verticalAlign:"middle",size:2,mr:"1rem"}),(0,e.createVNode)(1,"br"),"Books uploaded by ",d,(0,e.createVNode)(1,"br")]}),(0,e.createComponentVNode)(2,t.Button,{mt:1,content:"Return to Main",icon:"arrow-alt-circle-left",onClick:function(){function h(){return u("return")}return h}()}),(0,e.createComponentVNode)(2,t.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"SSID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Title"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Author"}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"middle",children:"Administrative Actions"})]}),C.map(function(h){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:h.id}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"book"}),h.title]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"left",children:h.author}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"right",children:[(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Delete",icon:"trash",color:"bad",onClick:function(){function v(){return u("delete_book",{bookid:h.id})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"View",onClick:function(){function v(){return u("view_book",{bookid:h.id})}return v}()})]})]},h.id)})]})})}},90447:function(T,r,n){"use strict";r.__esModule=!0,r.ListInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(36036),f=n(72253),b=n(92986),y=n(98595),B=r.ListInputModal=function(){function i(c,m){var l=(0,f.useBackend)(m),u=l.act,s=l.data,d=s.items,C=d===void 0?[]:d,h=s.message,v=h===void 0?"":h,p=s.init_value,N=s.timeout,V=s.title,S=(0,f.useLocalState)(m,"selected",C.indexOf(p)),I=S[0],L=S[1],w=(0,f.useLocalState)(m,"searchBarVisible",C.length>10),A=w[0],x=w[1],E=(0,f.useLocalState)(m,"searchQuery",""),P=E[0],D=E[1],M=function(){function G(X){var J=z.length-1;if(X===b.KEY_DOWN)if(I===null||I===J){var se;L(0),(se=document.getElementById("0"))==null||se.scrollIntoView()}else{var ie;L(I+1),(ie=document.getElementById((I+1).toString()))==null||ie.scrollIntoView()}else if(X===b.KEY_UP)if(I===null||I===0){var me;L(J),(me=document.getElementById(J.toString()))==null||me.scrollIntoView()}else{var q;L(I-1),(q=document.getElementById((I-1).toString()))==null||q.scrollIntoView()}}return G}(),R=function(){function G(X){X!==I&&L(X)}return G}(),O=function(){function G(){x(!1),x(!0)}return G}(),F=function(){function G(X){var J=String.fromCharCode(X),se=C.find(function(q){return q==null?void 0:q.toLowerCase().startsWith(J==null?void 0:J.toLowerCase())});if(se){var ie,me=C.indexOf(se);L(me),(ie=document.getElementById(me.toString()))==null||ie.scrollIntoView()}}return G}(),_=function(){function G(X){var J;X!==P&&(D(X),L(0),(J=document.getElementById("0"))==null||J.scrollIntoView())}return G}(),U=function(){function G(){x(!A),D("")}return G}(),z=C.filter(function(G){return G==null?void 0:G.toLowerCase().includes(P.toLowerCase())}),$=330+Math.ceil(v.length/3);return A||setTimeout(function(){var G;return(G=document.getElementById(I.toString()))==null?void 0:G.focus()},1),(0,e.createComponentVNode)(2,y.Window,{title:V,width:325,height:$,children:[N&&(0,e.createComponentVNode)(2,a.Loader,{value:N}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function G(X){var J=window.event?X.which:X.keyCode;(J===b.KEY_DOWN||J===b.KEY_UP)&&(X.preventDefault(),M(J)),J===b.KEY_ENTER&&(X.preventDefault(),u("submit",{entry:z[I]})),!A&&J>=b.KEY_A&&J<=b.KEY_Z&&(X.preventDefault(),F(J)),J===b.KEY_ESCAPE&&(X.preventDefault(),u("cancel"))}return G}(),children:(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{compact:!0,icon:A?"search":"font",selected:!0,tooltip:A?"Search Mode. Type to search or use arrow keys to select manually.":"Hotkey Mode. Type a letter to jump to the first match. Enter to select.",tooltipPosition:"left",onClick:function(){function G(){return U()}return G}()}),className:"ListInput__Section",fill:!0,title:v,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,k,{filteredItems:z,onClick:R,onFocusSearch:O,searchBarVisible:A,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:A&&(0,e.createComponentVNode)(2,g,{filteredItems:z,onSearch:_,searchQuery:P,selected:I})}),(0,e.createComponentVNode)(2,o.Stack.Item,{mt:.5,children:(0,e.createComponentVNode)(2,t.InputButtons,{input:z[I]})})]})})})]})}return i}(),k=function(c,m){var l=(0,f.useBackend)(m),u=l.act,s=c.filteredItems,d=c.onClick,C=c.onFocusSearch,h=c.searchBarVisible,v=c.selected;return(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,tabIndex:0,children:s.map(function(p,N){return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:"transparent",id:N,onClick:function(){function V(){return d(N)}return V}(),onDblClick:function(){function V(S){S.preventDefault(),u("submit",{entry:s[v]})}return V}(),onKeyDown:function(){function V(S){var I=window.event?S.which:S.keyCode;h&&I>=b.KEY_A&&I<=b.KEY_Z&&(S.preventDefault(),C())}return V}(),selected:N===v,style:{animation:"none",transition:"none"},children:p.replace(/^\w/,function(V){return V.toUpperCase()})},N)})})},g=function(c,m){var l=(0,f.useBackend)(m),u=l.act,s=c.filteredItems,d=c.onSearch,C=c.searchQuery,h=c.selected;return(0,e.createComponentVNode)(2,o.Input,{width:"100%",autoFocus:!0,autoSelect:!0,onEnter:function(){function v(p){p.preventDefault(),u("submit",{entry:s[h]})}return v}(),onInput:function(){function v(p,N){return d(N)}return v}(),placeholder:"Search...",value:C})}},26826:function(T,r,n){"use strict";r.__esModule=!0,r.Loadout=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b={Default:function(){function c(m,l){return m.gear.gear_tier-l.gear.gear_tier}return c}(),Alphabetical:function(){function c(m,l){return m.gear.name.toLowerCase().localeCompare(l.gear.name.toLowerCase())}return c}(),Cost:function(){function c(m,l){return m.gear.cost-l.gear.cost}return c}()},y=r.Loadout=function(){function c(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=(0,t.useLocalState)(l,"search",!1),h=C[0],v=C[1],p=(0,t.useLocalState)(l,"searchText",""),N=p[0],V=p[1],S=(0,t.useLocalState)(l,"category",Object.keys(d.gears)[0]),I=S[0],L=S[1],w=(0,t.useLocalState)(l,"tweakedGear",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,f.Window,{width:1105,height:650,children:[A&&(0,e.createComponentVNode)(2,i,{tweakedGear:A,setTweakedGear:x}),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,B,{category:I,setCategory:L})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"25%",children:(0,e.createComponentVNode)(2,g,{setTweakedGear:x})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"75%",children:(0,e.createComponentVNode)(2,k,{category:I,search:h,setSearch:v,searchText:N,setSearchText:V})})]})})]})})]})}return c}(),B=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.category,h=m.setCategory;return(0,e.createComponentVNode)(2,o.Tabs,{fluid:!0,textAlign:"center",style:{"flex-wrap":"wrap-reverse"},children:Object.keys(d.gears).map(function(v){return(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:v===C,style:{"white-space":"nowrap"},onClick:function(){function p(){return h(v)}return p}(),children:v},v)})})},k=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.user_tier,h=d.gear_slots,v=d.max_gear_slots,p=m.category,N=m.search,V=m.setSearch,S=m.searchText,I=m.setSearchText,L=(0,t.useLocalState)(l,"sortType","Default"),w=L[0],A=L[1],x=(0,t.useLocalState)(l,"sortReverse",!1),E=x[0],P=x[1],D=(0,a.createSearch)(S,function(R){return R.name}),M;return S.length>2?M=Object.entries(d.gears).reduce(function(R,O){var F=O[0],_=O[1];return R.concat(Object.entries(_).map(function(U){var z=U[0],$=U[1];return{key:z,gear:$}}))},[]).filter(function(R){var O=R.gear;return D(O)}):M=Object.entries(d.gears[p]).map(function(R){var O=R[0],F=R[1];return{key:O,gear:F}}),M.sort(b[w]),E&&(M=M.reverse()),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:p,buttons:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Dropdown,{height:1.66,selected:w,options:Object.keys(b),onSelected:function(){function R(O){return A(O)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:E?"arrow-down-wide-short":"arrow-down-short-wide",tooltip:E?"Ascending order":"Descending order",tooltipPosition:"bottom-end",onClick:function(){function R(){return P(!E)}return R}()})}),N&&(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Input,{width:20,placeholder:"Search...",value:S,onInput:function(){function R(O){return I(O.target.value)}return R}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"magnifying-glass",selected:N,tooltip:"Toggle search field",tooltipPosition:"bottom-end",onClick:function(){function R(){V(!N),I("")}return R}()})})]}),children:M.map(function(R){var O=R.key,F=R.gear,_=12,U=Object.keys(d.selected_gears).includes(O),z=F.cost===1?F.cost+" Point":F.cost+" Points",$=(0,e.createComponentVNode)(2,o.Box,{children:[F.name.length>_&&(0,e.createComponentVNode)(2,o.Box,{children:F.name}),F.gear_tier>C&&(0,e.createComponentVNode)(2,o.Box,{mt:F.name.length>_&&1.5,textColor:"red",children:"That gear is only available at a higher donation tier than you are on."})]}),G=(0,e.createFragment)([F.allowed_roles&&(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"user",tooltip:(0,e.createComponentVNode)(2,o.Section,{m:-1,title:"Allowed Roles",children:F.allowed_roles.map(function(J){return(0,e.createComponentVNode)(2,o.Box,{children:J},J)})}),tooltipPosition:"left"}),Object.entries(F.tweaks).map(function(J){var se=J[0],ie=J[1];return ie.map(function(me){return(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:me.icon,tooltip:me.tooltip,tooltipPosition:"top"},se)})}),(0,e.createComponentVNode)(2,o.Button,{width:"22px",color:"transparent",icon:"info",tooltip:F.desc,tooltipPosition:"top"})],0),X=(0,e.createComponentVNode)(2,o.Box,{class:"Loadout-InfoBox",children:[(0,e.createComponentVNode)(2,o.Box,{style:{"flex-grow":1},fontSize:1,color:"gold",opacity:.75,children:F.gear_tier>0&&"Tier "+F.gear_tier}),(0,e.createComponentVNode)(2,o.Box,{fontSize:.75,opacity:.66,children:z})]});return(0,e.createComponentVNode)(2,o.ImageButton,{m:.5,imageSize:84,dmIcon:F.icon,dmIconState:F.icon_state,tooltip:(F.name.length>_||F.gear_tier>0)&&$,tooltipPosition:"bottom",selected:U,disabled:F.gear_tier>C||h+F.cost>v&&!U,buttons:G,buttonsAlt:X,onClick:function(){function J(){return s("toggle_gear",{gear:O})}return J}(),children:F.name},O)})})},g=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.setTweakedGear,h=Object.entries(d.gears).reduce(function(v,p){var N=p[0],V=p[1],S=Object.entries(V).filter(function(I){var L=I[0];return Object.keys(d.selected_gears).includes(L)}).map(function(I){var L=I[0],w=I[1];return Object.assign({key:L},w)});return v.concat(S)},[]);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Selected Equipment",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"Clear Loadout",tooltipPosition:"bottom-end",onClick:function(){function v(){return s("clear_loadout")}return v}()}),children:h.map(function(v){return(0,e.createComponentVNode)(2,o.ImageButton,{fluid:!0,imageSize:32,dmIcon:v.icon,dmIconState:v.icon_state,buttons:(0,e.createFragment)([Object.entries(v.tweaks).length>0&&(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"gears",iconColor:"gray",width:"33px",onClick:function(){function p(){return C(v)}return p}()}),(0,e.createComponentVNode)(2,o.Button,{translucent:!0,icon:"times",iconColor:"red",width:"32px",onClick:function(){function p(){return s("toggle_gear",{gear:v.key})}return p}()})],0),children:v.name},v.key)})})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:d.gear_slots,maxValue:d.max_gear_slots,ranges:{bad:[d.max_gear_slots,1/0],average:[d.max_gear_slots*.66,d.max_gear_slots],good:[0,d.max_gear_slots*.66]},children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:["Used points ",d.gear_slots,"/",d.max_gear_slots]})})})})]})},i=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.tweakedGear,h=m.setTweakedGear;return(0,e.createComponentVNode)(2,o.Dimmer,{children:(0,e.createComponentVNode)(2,o.Box,{className:"Loadout-Modal__background",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,width:20,height:20,title:C.name,buttons:(0,e.createComponentVNode)(2,o.Button,{color:"red",icon:"times",tooltip:"Close",tooltipPosition:"top",onClick:function(){function v(){return h("")}return v}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:Object.entries(C.tweaks).map(function(v){var p=v[0],N=v[1];return N.map(function(V){var S=d.selected_gears[C.key][p];return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V.name,color:S?"":"gray",buttons:(0,e.createComponentVNode)(2,o.Button,{color:"transparent",icon:"pen",onClick:function(){function I(){return s("set_tweak",{gear:C.key,tweak:p})}return I}()}),children:[S||"Default",(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,width:1,height:1,verticalAlign:"middle",style:{"background-color":""+S}})]},p)})})})})})})}},77613:function(T,r,n){"use strict";r.__esModule=!0,r.MODsuitContent=r.MODsuit=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.NumberInput,{value:A,minValue:-50,maxValue:50,stepPixelSize:5,width:"39px",onChange:function(){function D(M,R){return P("configure",{key:w,value:R,ref:x})}return D}()})},b=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:A,onClick:function(){function D(){return P("configure",{key:w,value:!A,ref:x})}return D}()})},y=function(I,L){var w=I.name,A=I.value,x=I.module_ref,E=(0,a.useBackend)(L),P=E.act;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"paint-brush",onClick:function(){function D(){return P("configure",{key:w,ref:x})}return D}()}),(0,e.createComponentVNode)(2,t.ColorBox,{color:A,mr:.5})],4)},B=function(I,L){var w=I.name,A=I.value,x=I.values,E=I.module_ref,P=(0,a.useBackend)(L),D=P.act;return(0,e.createComponentVNode)(2,t.Dropdown,{displayText:A,options:x,onSelected:function(){function M(R){return D("configure",{key:w,value:R,ref:E})}return M}()})},k=function(I,L){var w=I.name,A=I.display_name,x=I.type,E=I.value,P=I.values,D=I.module_ref,M={number:(0,e.normalizeProps)((0,e.createComponentVNode)(2,f,Object.assign({},I))),bool:(0,e.normalizeProps)((0,e.createComponentVNode)(2,b,Object.assign({},I))),color:(0,e.normalizeProps)((0,e.createComponentVNode)(2,y,Object.assign({},I))),list:(0,e.normalizeProps)((0,e.createComponentVNode)(2,B,Object.assign({},I)))};return(0,e.createComponentVNode)(2,t.Box,{children:[A,": ",M[x]]})},g=function(I,L){var w=I.active,A=I.userradiated,x=I.usertoxins,E=I.usermaxtoxins,P=I.threatlevel;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Radiation Level",color:w&&A?"bad":"good",children:w&&A?"IRRADIATED!":"RADIATION-FREE"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxins Level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?x/E:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:x})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Hazard Level",color:w&&P?"bad":"good",bold:!0,children:w&&P?P:0})})]})},i=function(I,L){var w=I.active,A=I.userhealth,x=I.usermaxhealth,E=I.userbrute,P=I.userburn,D=I.usertoxin,M=I.useroxy;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?A/x:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?A:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?P/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?P:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?D/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/x:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})})]})],4)},c=function(I,L){var w=I.active,A=I.statustime,x=I.statusid,E=I.statushealth,P=I.statusmaxhealth,D=I.statusbrute,M=I.statusburn,R=I.statustoxin,O=I.statusoxy,F=I.statustemp,_=I.statusnutrition,U=I.statusfingerprints,z=I.statusdna,$=I.statusviruses;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Time",children:w?A:"00:00:00"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Operation Number",children:w?x||"0":"???"})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Health",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?E/P:0,ranges:{good:[.5,1/0],average:[.2,.5],bad:[-1/0,.2]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?E:0})})}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Brute",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?D/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?D:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Burn",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?M/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:w?M:0})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Toxin",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?R/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:R})})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Suffocation",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:w?O/P:0,ranges:{good:[-1/0,.2],average:[.2,.5],bad:[.5,1/0]},children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:O})})})})]}),(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Body Temperature",children:w?F:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Nutrition Status",children:w?_:0})})]}),(0,e.createComponentVNode)(2,t.Section,{title:"DNA",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fingerprints",children:w?U:"???"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unique Enzymes",children:w?z:"???"})]})}),!!w&&!!$&&(0,e.createComponentVNode)(2,t.Section,{title:"Diseases",children:(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"signature",tooltip:"Name",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"wind",tooltip:"Type",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Stage",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"flask",tooltip:"Cure",tooltipPosition:"top"})})]}),$.map(function(G){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.type}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[G.stage,"/",G.maxstage]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:G.cure})]},G.name)})]})})],0)},m={rad_counter:g,health_analyzer:i,status_readout:c},l=function(){return(0,e.createComponentVNode)(2,t.Section,{align:"center",fill:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{color:"red",name:"exclamation-triangle",size:15}),(0,e.createComponentVNode)(2,t.Box,{fontSize:"30px",color:"red",children:"ERROR: INTERFACE UNRESPONSIVE"})]})},u=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data;return(0,e.createComponentVNode)(2,t.Dimmer,{children:(0,e.createComponentVNode)(2,t.Stack,{children:(0,e.createComponentVNode)(2,t.Stack.Item,{fontSize:"16px",color:"blue",children:"SUIT UNPOWERED"})})})},s=function(I,L){var w=I.configuration_data,A=I.module_ref,x=Object.keys(w);return(0,e.createComponentVNode)(2,t.Dimmer,{backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[x.map(function(E){var P=w[E];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{name:E,display_name:P.display_name,type:P.type,value:P.value,values:P.values,module_ref:A})},P.key)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,onClick:I.onExit,icon:"times",textAlign:"center",children:"Exit"})})})]})})},d=function(I){switch(I){case 1:return"Use";case 2:return"Toggle";case 3:return"Select"}},C=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.malfunctioning,D=x.locked,M=x.open,R=x.selected_module,O=x.complexity,F=x.complexity_max,_=x.wearer_name,U=x.wearer_job,z=P?"Malfunctioning":E?"Active":"Inactive";return(0,e.createComponentVNode)(2,t.Section,{title:"Parameters",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"power-off",content:E?"Deactivate":"Activate",onClick:function(){function $(){return A("activate")}return $}()}),children:z}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID Lock",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:D?"lock-open":"lock",content:D?"Unlock":"Lock",onClick:function(){function $(){return A("lock")}return $}()}),children:D?"Locked":"Unlocked"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cover",children:M?"Open":"Closed"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Selected Module",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Complexity",children:[O," (",F,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Occupant",children:[_,", ",U]})]})})},h=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.control,D=x.helmet,M=x.chestplate,R=x.gauntlets,O=x.boots,F=x.core,_=x.charge;return(0,e.createComponentVNode)(2,t.Section,{title:"Hardware",children:[(0,e.createComponentVNode)(2,t.Collapsible,{title:"Parts",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Control Unit",children:P}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Helmet",children:D||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Chestplate",children:M||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Gauntlets",children:R||"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Boots",children:O||"None"})]})}),(0,e.createComponentVNode)(2,t.Collapsible,{title:"Core",children:F&&(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Type",children:F}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Core Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:_/100,content:_+"%",ranges:{good:[.6,1/0],average:[.3,.6],bad:[-1/0,.3]}})})]})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",textAlign:"center",children:"No Core Detected"})})]})},v=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.active,P=x.modules,D=P.filter(function(M){return!!M.id});return(0,e.createComponentVNode)(2,t.Section,{title:"Info",children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:D.length!==0&&D.map(function(M){var R=m[M.id];return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[!E&&(0,e.createComponentVNode)(2,u),(0,e.normalizeProps)((0,e.createComponentVNode)(2,R,Object.assign({},M,{active:E})))]},M.ref)})||(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Info Modules Detected"})})})},p=function(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.complexity_max,P=x.modules,D=(0,a.useLocalState)(L,"module_configuration",null),M=D[0],R=D[1];return(0,e.createComponentVNode)(2,t.Section,{title:"Modules",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:P.length!==0&&P.map(function(O){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Collapsible,{title:O.module_name,children:(0,e.createComponentVNode)(2,t.Section,{children:[M===O.ref&&(0,e.createComponentVNode)(2,s,{configuration_data:O.configuration_data,module_ref:O.ref,onExit:function(){function F(){return R(null)}return F}()}),(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"save",tooltip:"Complexity",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"plug",tooltip:"Idle Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"lightbulb",tooltip:"Active Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"bolt",tooltip:"Use Power Cost",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"hourglass-half",tooltip:"Cooldown",tooltipPosition:"top"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{color:"transparent",icon:"tasks",tooltip:"Actions",tooltipPosition:"top"})})]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[O.module_complexity,"/",E]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.idle_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.active_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:O.use_power}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[O.cooldown>0&&O.cooldown/10||"0","/",O.cooldown_time/10,"s"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("select",{ref:O.ref})}return F}(),icon:"bullseye",selected:O.module_active,tooltip:d(O.module_type),tooltipPosition:"left",disabled:!O.module_type}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return R(O.ref)}return F}(),icon:"cog",selected:M===O.ref,tooltip:"Configure",tooltipPosition:"left",disabled:O.configuration_data.length===0}),(0,e.createComponentVNode)(2,t.Button,{onClick:function(){function F(){return A("pin",{ref:O.ref})}return F}(),icon:"thumbtack",selected:O.pinned,tooltip:"Pin",tooltipPosition:"left",disabled:!O.module_type})]})]})]}),(0,e.createComponentVNode)(2,t.Box,{children:O.description})]})})},O.ref)})||(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",children:"No Modules Detected"})})})})},N=r.MODsuitContent=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!P,children:!!P&&(0,e.createComponentVNode)(2,l)||(0,e.createComponentVNode)(2,t.Stack,{vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,C)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,h)}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,v)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,p)})]})})}return S}(),V=r.MODsuit=function(){function S(I,L){var w=(0,a.useBackend)(L),A=w.act,x=w.data,E=x.ui_theme,P=x.interface_break;return(0,e.createComponentVNode)(2,o.Window,{theme:E,width:400,height:620,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,N)})})})}return S}()},78624:function(T,r,n){"use strict";r.__esModule=!0,r.MagnetController=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=n(3939),y=new Map([["n",{icon:"arrow-up",tooltip:"Move North"}],["e",{icon:"arrow-right",tooltip:"Move East"}],["s",{icon:"arrow-down",tooltip:"Move South"}],["w",{icon:"arrow-left",tooltip:"Move West"}],["c",{icon:"crosshairs",tooltip:"Move to Magnet"}],["r",{icon:"dice",tooltip:"Move Randomly"}]]),B=r.MagnetController=function(){function k(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=l.autolink,s=l.code,d=l.frequency,C=l.linkedMagnets,h=l.magnetConfiguration,v=l.path,p=l.pathPosition,N=l.probing,V=l.powerState,S=l.speed;return(0,e.createComponentVNode)(2,f.Window,{width:400,height:600,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[!u&&(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{content:"Probe",icon:N?"spinner":"sync",iconSpin:!!N,disabled:N,onClick:function(){function I(){return m("probe_magnets")}return I}()}),title:"Magnet Linking",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,a.toFixed)(d/10,1)}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:s})]})}),(0,e.createComponentVNode)(2,o.Section,{buttons:(0,e.createComponentVNode)(2,o.Button,{icon:V?"power-off":"times",content:V?"On":"Off",selected:V,onClick:function(){function I(){return m("toggle_power")}return I}()}),title:"Controller Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:S.value,minValue:S.min,maxValue:S.max,onChange:function(){function I(L,w){return m("set_speed",{speed:w})}return I}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Path",children:[Array.from(y.entries()).map(function(I){var L=I[0],w=I[1],A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button,{icon:A,tooltip:x,onClick:function(){function E(){return m("path_add",{code:L})}return E}()},L)}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",confirmIcon:"trash",confirmContent:"",float:"right",tooltip:"Reset Path",tooltipPosition:"left",onClick:function(){function I(){return m("path_clear")}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"file-import",float:"right",tooltip:"Manually input path",tooltipPosition:"left",onClick:function(){function I(){return(0,b.modalOpen)(i,"path_custom_input")}return I}()}),(0,e.createComponentVNode)(2,o.BlockQuote,{children:v.map(function(I,L){var w=y.get(I)||{icon:"question"},A=w.icon,x=w.tooltip;return(0,e.createComponentVNode)(2,o.Button.Confirm,{selected:L+2===p,icon:A,confirmIcon:A,confirmContent:"",tooltip:x,onClick:function(){function E(){return m("path_remove",{index:L+1,code:I})}return E}()},L)})})]})]})}),C.map(function(I,L){var w=I.uid,A=I.powerState,x=I.electricityLevel,E=I.magneticField;return(0,e.createComponentVNode)(2,o.Section,{title:"Magnet #"+(L+1)+" Configuration",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:A?"power-off":"times",content:A?"On":"Off",selected:A,onClick:function(){function P(){return m("toggle_magnet_power",{id:w})}return P}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Move Speed",children:(0,e.createComponentVNode)(2,o.Slider,{value:x,minValue:h.electricityLevel.min,maxValue:h.electricityLevel.max,onChange:function(){function P(D,M){return m("set_electricity_level",{id:w,electricityLevel:M})}return P}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Field Size",children:(0,e.createComponentVNode)(2,o.Slider,{value:E,minValue:h.magneticField.min,maxValue:h.magneticField.max,onChange:function(){function P(D,M){return m("set_magnetic_field",{id:w,magneticField:M})}return P}()})})]})},w)})]})]})}return k}()},72106:function(T,r,n){"use strict";r.__esModule=!0,r.MechBayConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.MechBayConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.recharge_port,m=c&&c.mech,l=m&&m.cell,u=m&&m.name;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:155,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Sync",onClick:function(){function s(){return g("reconnect")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:m.health/m.maxhealth,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]}})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No power port detected. Please re-sync."})||!m&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No mech detected."})||!l&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cell is installed."})||(0,e.createComponentVNode)(2,t.ProgressBar,{value:l.charge/l.maxcharge,ranges:{good:[.7,1/0],average:[.3,.7],bad:[-1/0,.3]},children:[(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:l.charge})," / "+l.maxcharge]})})]})})})})}return b}()},7466:function(T,r,n){"use strict";r.__esModule=!0,r.MechaControlConsole=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=n(25328),y=r.MechaControlConsole=function(){function B(k,g){var i=(0,t.useBackend)(g),c=i.act,m=i.data,l=m.beacons,u=m.stored_data;return u.length?(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Section,{title:"Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"window-close",onClick:function(){function s(){return c("clear_log")}return s}()}),children:u.map(function(s){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",children:["(",s.time,")"]}),(0,e.createComponentVNode)(2,o.Box,{children:(0,b.decodeHtmlEntities)(s.message)})]},s.time)})})})}):(0,e.createComponentVNode)(2,f.Window,{width:420,height:500,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:l.length&&l.map(function(s){return(0,e.createComponentVNode)(2,o.Section,{title:s.name,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{icon:"comment",onClick:function(){function d(){return c("send_message",{mt:s.uid})}return d}(),children:"Message"}),(0,e.createComponentVNode)(2,o.Button,{icon:"eye",onClick:function(){function d(){return c("get_log",{mt:s.uid})}return d}(),children:"View Log"}),(0,e.createComponentVNode)(2,o.Button.Confirm,{color:"red",content:"Sabotage",icon:"bomb",onClick:function(){function d(){return c("shock",{mt:s.uid})}return d}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.maxHealth*.75,1/0],average:[s.maxHealth*.5,s.maxHealth*.75],bad:[-1/0,s.maxHealth*.5]},value:s.health,maxValue:s.maxHealth})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cell Charge",children:s.cell&&(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{good:[s.cellMaxCharge*.75,1/0],average:[s.cellMaxCharge*.5,s.cellMaxCharge*.75],bad:[-1/0,s.cellMaxCharge*.5]},value:s.cellCharge,maxValue:s.cellMaxCharge})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No Cell Installed"})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Air Tank",children:[s.airtank,"kPa"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pilot",children:s.pilot||"Unoccupied"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:(0,b.toTitleCase)(s.location)||"Unknown"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Active Equipment",children:s.active||"None"}),s.cargoMax&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Cargo Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{ranges:{bad:[s.cargoMax*.75,1/0],average:[s.cargoMax*.5,s.cargoMax*.75],good:[-1/0,s.cargoMax*.5]},value:s.cargoUsed,maxValue:s.cargoMax})})||null]})},s.name)})||(0,e.createComponentVNode)(2,o.NoticeBox,{children:"No mecha beacons found."})})})}return B}()},79625:function(T,r,n){"use strict";r.__esModule=!0,r.MedicalRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(3939),b=n(98595),y=n(321),B=n(5485),k=n(22091),g={Minor:"lightgray",Medium:"good",Harmful:"average","Dangerous!":"bad","BIOHAZARD THREAT!":"darkred"},i={"*Deceased*":"deceased","*SSD*":"ssd","Physically Unfit":"physically_unfit",Disabled:"disabled"},c=function(A,x){(0,f.modalOpen)(A,"edit",{field:x.edit,value:x.value})},m=function(A,x){var E=A.args;return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:E.name||"Virus",children:(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Number of stages",children:E.max_stages}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Spread",children:[E.spread_text," Transmission"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Possible cure",children:E.cure}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Notes",children:E.desc}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Severity",color:g[E.severity],children:E.severity})]})})})},l=r.MedicalRecords=function(){function w(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.loginState,M=P.screen;if(!D.logged_in)return(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});var R;return M===2?R=(0,e.createComponentVNode)(2,u):M===3?R=(0,e.createComponentVNode)(2,s):M===4?R=(0,e.createComponentVNode)(2,d):M===5?R=(0,e.createComponentVNode)(2,p):M===6?R=(0,e.createComponentVNode)(2,N):M===7&&(R=(0,e.createComponentVNode)(2,V)),(0,e.createComponentVNode)(2,b.Window,{width:800,height:900,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,L),R]})})]})}return w}(),u=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.records,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder",!0),G=$[0],X=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Manage Records",icon:"wrench",ml:"0.25rem",onClick:function(){function J(){return P("screen",{screen:3})}return J}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search by Name, ID, Physical Status, or Mental Status",onInput:function(){function J(se,ie){return F(ie)}return J}()})})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,S,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,S,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,S,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,S,{id:"p_stat",children:"Patient Status"}),(0,e.createComponentVNode)(2,S,{id:"m_stat",children:"Mental Status"})]}),M.filter((0,a.createSearch)(O,function(J){return J.name+"|"+J.id+"|"+J.rank+"|"+J.p_stat+"|"+J.m_stat})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listRow--"+i[J.p_stat],onClick:function(){function se(){return P("view_record",{view_record:J.ref})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.p_stat}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.m_stat})]},J.id)})]})})})],4)},s=function(A,x){var E=(0,t.useBackend)(x),P=E.act;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"download",content:"Backup to Disk",disabled:!0})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:[(0,e.createComponentVNode)(2,o.Button,{fluid:!0,translucent:!0,lineHeight:3,icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0})," "]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Button.Confirm,{fluid:!0,translucent:!0,lineHeight:3,icon:"trash",content:"Delete All Medical Records",onClick:function(){function D(){return P("del_all_med_records")}return D}()})})]})})},d=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical,R=D.printing;return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{height:"235px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:R?"spinner":"print",disabled:R,iconSpin:!!R,content:"Print Record",ml:"0.5rem",onClick:function(){function O(){return P("print_record")}return O}()}),children:(0,e.createComponentVNode)(2,C)})}),!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function O(){return P("new_med_record")}return O}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Medical records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Medical Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:!!M.empty,content:"Delete Medical Record",onClick:function(){function O(){return P("del_med_record")}return O}()}),children:(0,e.createComponentVNode)(2,h)})}),(0,e.createComponentVNode)(2,v)],4)],0)},C=function(A,x){var E=(0,t.useBackend)(x),P=E.data,D=P.general;return!D||!D.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:D.fields.map(function(M,R){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:M.field,children:[(0,e.createComponentVNode)(2,o.Box,{height:"20px",inline:!0,children:M.value}),!!M.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",onClick:function(){function O(){return c(x,M)}return O}()})]},R)})})}),!!D.has_photos&&D.photos.map(function(M,R){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:M,style:{width:"96px","margin-top":"2.5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",R+1]},R)})]})},h=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical;return!M||!M.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"Medical records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:M.fields.map(function(R,O){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:R.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(R.value),!!R.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:R.line_break?"1rem":"initial",onClick:function(){function F(){return c(x,R)}return F}()})]},O)})})})})},v=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medical;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function R(){return(0,f.modalOpen)(x,"add_comment")}return R}()}),children:M.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):M.comments.map(function(R,O){return(0,e.createComponentVNode)(2,o.Box,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:R.header}),(0,e.createVNode)(1,"br"),R.text,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function F(){return P("del_comment",{del_comment:O+1})}return F}()})]},O)})})})},p=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.virus,R=(0,t.useLocalState)(x,"searchText",""),O=R[0],F=R[1],_=(0,t.useLocalState)(x,"sortId2","name"),U=_[0],z=_[1],$=(0,t.useLocalState)(x,"sortOrder2",!0),G=$[0],X=$[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{ml:"0.25rem",fluid:!0,placeholder:"Search by Name, Max Stages, or Severity",onInput:function(){function J(se,ie){return F(ie)}return J}()})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,I,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,I,{id:"max_stages",children:"Max Stages"}),(0,e.createComponentVNode)(2,I,{id:"severity",children:"Severity"})]}),M.filter((0,a.createSearch)(O,function(J){return J.name+"|"+J.max_stages+"|"+J.severity})).sort(function(J,se){var ie=G?1:-1;return J[U].localeCompare(se[U])*ie}).map(function(J){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listVirus--"+J.severity,onClick:function(){function se(){return P("vir",{vir:J.D})}return se}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"virus"})," ",J.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:J.max_stages}),(0,e.createComponentVNode)(2,o.Table.Cell,{color:g[J.severity],children:J.severity})]},J.id)})]})})})})],4)},N=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.goals;return(0,e.createComponentVNode)(2,o.Section,{title:"Virology Goals",fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:M.length!==0&&M.map(function(R){return(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Section,{title:R.name,children:[(0,e.createComponentVNode)(2,o.Table,{children:(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{textAlign:"center",children:(0,e.createComponentVNode)(2,o.ProgressBar,{value:R.delivered,minValue:0,maxValue:R.deliverygoal,ranges:{good:[R.deliverygoal*.5,1/0],average:[R.deliverygoal*.25,R.deliverygoal*.5],bad:[-1/0,R.deliverygoal*.25]},children:[R.delivered," / ",R.deliverygoal," Units"]})})})}),(0,e.createComponentVNode)(2,o.Box,{children:R.report})]})},R.id)})||(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Box,{textAlign:"center",children:"No Goals Detected"})})})})},V=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.medbots;return M.length===0?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"robot",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"There are no Medibots."]})})})}):(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"MedicalRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Area"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Chemicals"})]}),M.map(function(R){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"MedicalRecords__listMedbot--"+R.on,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"medical"})," ",R.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[R.area||"Unknown"," (",R.x,", ",R.y,")"]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.on?(0,e.createComponentVNode)(2,o.Box,{color:"good",children:"Online"}):(0,e.createComponentVNode)(2,o.Box,{color:"average",children:"Offline"})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:R.use_beaker?"Reservoir: "+R.total_volume+"/"+R.maximum_volume:"Using internal synthesizer"})]},R.id)})]})})})},S=function(A,x){var E=(0,t.useLocalState)(x,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder",!0),R=M[0],O=M[1],F=A.id,_=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},I=function(A,x){var E=(0,t.useLocalState)(x,"sortId2","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(x,"sortOrder2",!0),R=M[0],O=M[1],F=A.id,_=A.children;return(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,color:P!==F&&"transparent",onClick:function(){function U(){P===F?O(!R):(D(F),O(!0))}return U}(),children:[_,P===F&&(0,e.createComponentVNode)(2,o.Icon,{name:R?"sort-up":"sort-down",ml:"0.25rem;"})]})})},L=function(A,x){var E=(0,t.useBackend)(x),P=E.act,D=E.data,M=D.screen,R=D.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:M===2,onClick:function(){function O(){P("screen",{screen:2})}return O}(),children:"List Records"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"database",selected:M===5,onClick:function(){function O(){P("screen",{screen:5})}return O}(),children:"Virus Database"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"vial",selected:M===6,onClick:function(){function O(){P("screen",{screen:6})}return O}(),children:"Virology Goals"}),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"plus-square",selected:M===7,onClick:function(){function O(){return P("screen",{screen:7})}return O}(),children:"Medibot Tracking"}),M===3&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:M===3,children:"Record Maintenance"}),M===4&&R&&!R.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:M===4,children:["Record: ",R.fields[0].value]})]})})};(0,f.modalRegisterBodyOverride)("virus",m)},54989:function(T,r,n){"use strict";r.__esModule=!0,r.MerchVendor=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=g.product,s=g.productImage,d=g.productCategory,C=l.user_money;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:u.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{disabled:u.price>C,icon:"shopping-cart",content:u.price,textAlign:"left",onClick:function(){function h(){return m("purchase",{name:u.name,category:d})}return h}()})})]})},b=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=(0,a.useLocalState)(i,"tabIndex",1),u=l[0],s=m.products,d=m.imagelist,C=["apparel","toy","decoration"];return(0,e.createComponentVNode)(2,t.Table,{children:s[C[u]].map(function(h){return(0,e.createComponentVNode)(2,f,{product:h,productImage:d[h.path],productCategory:C[u]},h.name)})})},y=r.MerchVendor=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.user_cash,s=l.inserted_cash;return(0,e.createComponentVNode)(2,o.Window,{title:"Merch Computer",width:450,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{color:"light-grey",inline:!0,mr:"0.5rem",children:["There is ",(0,e.createVNode)(1,"b",null,s,0)," credits inserted."]}),(0,e.createComponentVNode)(2,t.Button,{disabled:!s,icon:"money-bill-wave-alt",content:"Dispense Change",textAlign:"left",onClick:function(){function d(){return m("change")}return d}()})],4),children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:["Doing your job and not getting any recognition at work? Well, welcome to the merch shop! Here, you can buy cool things in exchange for money you earn when you have completed your Job Objectives.",u!==null&&(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:["Your balance is ",(0,e.createVNode)(1,"b",null,[u||0,(0,e.createTextVNode)(" credits")],0),"."]})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,b)]})})]})})})}return k}(),B=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=(0,a.useLocalState)(i,"tabIndex",1),u=l[0],s=l[1],d=m.login_state;return(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"dice",selected:u===1,onClick:function(){function C(){return s(1)}return C}(),children:"Toys"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"flag",selected:u===2,onClick:function(){function C(){return s(2)}return C}(),children:"Decorations"})]})}},87684:function(T,r,n){"use strict";r.__esModule=!0,r.MiningVendor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=["title","items","gridLayout"];function y(l,u){if(l==null)return{};var s={};for(var d in l)if({}.hasOwnProperty.call(l,d)){if(u.includes(d))continue;s[d]=l[d]}return s}var B={Alphabetical:function(){function l(u,s){return u-s}return l}(),Availability:function(){function l(u,s){return-(u.affordable-s.affordable)}return l}(),Price:function(){function l(u,s){return u.price-s.price}return l}()},k=r.MiningVendor=function(){function l(u,s){var d=(0,t.useLocalState)(s,"gridLayout",!1),C=d[0],h=d[1];return(0,e.createComponentVNode)(2,f.Window,{width:400,height:525,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,g),(0,e.createComponentVNode)(2,c,{gridLayout:C,setGridLayout:h}),(0,e.createComponentVNode)(2,i,{gridLayout:C})]})})})}return l}(),g=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.has_id,p=h.id;return(0,e.createComponentVNode)(2,o.NoticeBox,{success:v,children:v?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{inline:!0,verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",p.name,".",(0,e.createVNode)(1,"br"),"You have ",p.points.toLocaleString("en-US")," points."]}),(0,e.createComponentVNode)(2,o.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){function N(){return C("logoff")}return N}()}),(0,e.createComponentVNode)(2,o.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},i=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.has_id,p=h.id,N=h.items,V=u.gridLayout,S=(0,t.useLocalState)(s,"search",""),I=S[0],L=S[1],w=(0,t.useLocalState)(s,"sort","Alphabetical"),A=w[0],x=w[1],E=(0,t.useLocalState)(s,"descending",!1),P=E[0],D=E[1],M=(0,a.createSearch)(I,function(F){return F[0]}),R=!1,O=Object.entries(N).map(function(F,_){var U=Object.entries(F[1]).filter(M).map(function(z){return z[1].affordable=v&&p.points>=z[1].price,z[1]}).sort(B[A]);if(U.length!==0)return P&&(U=U.reverse()),R=!0,(0,e.createComponentVNode)(2,m,{title:F[0],items:U,gridLayout:V},F[0])});return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:R?O:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No items matching your criteria was found!"})})})},c=function(u,s){var d=u.gridLayout,C=u.setGridLayout,h=(0,t.useLocalState)(s,"search",""),v=h[0],p=h[1],N=(0,t.useLocalState)(s,"sort",""),V=N[0],S=N[1],I=(0,t.useLocalState)(s,"descending",!1),L=I[0],w=I[1];return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{mt:.2,placeholder:"Search by item name..",width:"100%",onInput:function(){function A(x,E){return p(E)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:d?"list":"table-cells-large",height:1.75,tooltip:d?"Toggle List Layout":"Toggle Grid Layout",tooltipPosition:"bottom-start",onClick:function(){function A(){return C(!d)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:"Alphabetical",options:Object.keys(B),width:"100%",onSelected:function(){function A(x){return S(x)}return A}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{icon:L?"arrow-down":"arrow-up",height:1.75,tooltip:L?"Descending order":"Ascending order",tooltipPosition:"bottom-start",onClick:function(){function A(){return w(!L)}return A}()})})]})})},m=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=u.title,p=u.items,N=u.gridLayout,V=y(u,b);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Collapsible,Object.assign({open:!0,title:v},V,{children:p.map(function(S){return N?(0,e.createComponentVNode)(2,o.ImageButton,{mb:.5,imageSize:57.5,dmIcon:S.icon,dmIconState:S.icon_state,disabled:!h.has_id||h.id.points0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:ae>=10?"9+":ae})}),(0,e.createComponentVNode)(2,s,{icon:"briefcase",title:"Job Openings",selected:O===1,onClick:function(){function le(){return x("jobs")}return le}()}),(0,e.createComponentVNode)(2,o.Divider)]}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:F.map(function(le){return(0,e.createComponentVNode)(2,s,{icon:le.icon,title:le.name,selected:O===2&&F[U-1]===le,onClick:function(){function Z(){return x("channel",{uid:le.uid})}return Z}(),children:le.unread>0&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--unread",children:le.unread>=10?"9+":le.unread})},le)})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:[(0,e.createComponentVNode)(2,o.Divider),(!!P||!!D)&&(0,e.createFragment)([(0,e.createComponentVNode)(2,s,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){function le(){return(0,y.modalOpen)(w,"wanted_notice")}return le}()}),(0,e.createComponentVNode)(2,s,{security:!0,icon:me?"minus-square":"minus-square-o",title:"Censor Mode: "+(me?"On":"Off"),mb:"0.5rem",onClick:function(){function le(){return q(!me)}return le}()}),(0,e.createComponentVNode)(2,o.Divider)],4),(0,e.createComponentVNode)(2,s,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){function le(){return(0,y.modalOpen)(w,"create_story")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:"plus-circle",title:"New Channel",onClick:function(){function le(){return(0,y.modalOpen)(w,"create_channel")}return le}()}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,s,{icon:R?"spinner":"print",iconSpin:R,title:R?"Printing...":"Print Newspaper",onClick:function(){function le(){return x("print_newspaper")}return le}()}),(0,e.createComponentVNode)(2,s,{icon:M?"volume-mute":"volume-up",title:"Mute: "+(M?"On":"Off"),onClick:function(){function le(){return x("toggle_mute")}return le}()})]})]})}),(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,width:"100%",children:[(0,e.createComponentVNode)(2,B.TemporaryNotice),re]})]})})]})}return I}(),s=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=L.icon,P=E===void 0?"":E,D=L.iconSpin,M=L.selected,R=M===void 0?!1:M,O=L.security,F=O===void 0?!1:O,_=L.onClick,U=L.title,z=L.children,$=i(L,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({className:(0,a.classes)(["Newscaster__menuButton",R&&"Newscaster__menuButton--selected",F&&"Newscaster__menuButton--security"]),onClick:_},$,{children:[R&&(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,e.createComponentVNode)(2,o.Icon,{name:P,spin:D,size:"2"}),(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__menuButton--title",children:U}),z]})))},d=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.screen,D=E.is_admin,M=E.channel_idx,R=E.channel_can_manage,O=E.channels,F=E.stories,_=E.wanted,U=(0,t.useLocalState)(w,"fullStories",[]),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"censorMode",!1),X=G[0],J=G[1],se=P===2&&M>-1?O[M-1]:null;return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!_&&(0,e.createComponentVNode)(2,h,{story:_,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:se?se.icon:"newspaper",mr:"0.5rem"}),se?se.name:"Headlines"],0),children:F.length>0?F.slice().reverse().map(function(ie){return!z.includes(ie.uid)&&ie.body.length+3>c?Object.assign({},ie,{body_short:ie.body.substr(0,c-4)+"..."}):ie}).map(function(ie,me){return(0,e.createComponentVNode)(2,h,{story:ie},me)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no stories at this time."]})}),!!se&&(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,height:"40%",title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"info-circle",mr:"0.5rem"}),(0,e.createTextVNode)("About")],4),buttons:(0,e.createFragment)([X&&(0,e.createComponentVNode)(2,o.Button,{disabled:!!se.admin&&!D,selected:se.censored,icon:se.censored?"comment-slash":"comment",content:se.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){function ie(){return x("censor_channel",{uid:se.uid})}return ie}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!R,icon:"cog",content:"Manage",onClick:function(){function ie(){return(0,y.modalOpen)(w,"manage_channel",{uid:se.uid})}return ie}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",children:se.description||"N/A"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:se.author||"N/A"}),!!D&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Ckey",children:se.author_ckey}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Public",children:se.public?"Yes":"No"}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Total Views",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"eye",mr:"0.5rem"}),F.reduce(function(ie,me){return ie+me.view_count},0).toLocaleString()]})]})})]})},C=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.jobs,D=E.wanted,M=Object.entries(P).reduce(function(R,O){var F=O[0],_=O[1];return R+_.length},0);return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[!!D&&(0,e.createComponentVNode)(2,h,{story:D,wanted:!0}),(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"briefcase",mr:"0.5rem"}),(0,e.createTextVNode)("Job Openings")],4),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:M>0?m.map(function(R){return Object.assign({},l[R],{id:R,jobs:P[R]})}).filter(function(R){return!!R&&R.jobs.length>0}).map(function(R){return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+R.id]),title:R.title,buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",color:"label",children:R.fluff_text}),children:R.jobs.map(function(O){return(0,e.createComponentVNode)(2,o.Box,{class:(0,a.classes)(["Newscaster__jobOpening",!!O.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",O.title]},O.title)})},R.id)}):(0,e.createComponentVNode)(2,o.Box,{className:"Newscaster__emptyNotice",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"times",size:"3"}),(0,e.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,e.createComponentVNode)(2,o.Section,{height:"17%",children:["Interested in serving Nanotrasen?",(0,e.createVNode)(1,"br"),"Sign up for any of the above position now at the ",(0,e.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},h=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=L.story,D=L.wanted,M=D===void 0?!1:D,R=E.is_admin,O=(0,t.useLocalState)(w,"fullStories",[]),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"censorMode",!1),z=U[0],$=U[1];return(0,e.createComponentVNode)(2,o.Section,{className:(0,a.classes)(["Newscaster__story",M&&"Newscaster__story--wanted"]),title:(0,e.createFragment)([M&&(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle",mr:"0.5rem"}),P.censor_flags&2&&"[REDACTED]"||P.title||"News from "+P.author],0),buttons:(0,e.createComponentVNode)(2,o.Box,{mt:"0.25rem",children:(0,e.createComponentVNode)(2,o.Box,{color:"label",children:[!M&&z&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:(0,e.createComponentVNode)(2,o.Button,{enabled:P.censor_flags&2,icon:P.censor_flags&2?"comment-slash":"comment",content:P.censor_flags&2?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){function G(){return x("censor_story",{uid:P.uid})}return G}()})}),(0,e.createComponentVNode)(2,o.Box,{inline:!0,children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",P.author," |\xA0",!!R&&(0,e.createFragment)([(0,e.createTextVNode)("ckey: "),P.author_ckey,(0,e.createTextVNode)(" |\xA0")],0),!M&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),(0,e.createTextVNode)(" "),P.view_count.toLocaleString(),(0,e.createTextVNode)(" |\xA0")],0),(0,e.createComponentVNode)(2,o.Icon,{name:"clock"})," ",(0,f.timeAgo)(P.publish_time,E.world_time)]})]})}),children:(0,e.createComponentVNode)(2,o.Box,{children:P.censor_flags&2?"[REDACTED]":(0,e.createFragment)([!!P.has_photo&&(0,e.createComponentVNode)(2,v,{name:"story_photo_"+P.uid+".png",float:"right",ml:"0.5rem"}),(P.body_short||P.body).split("\n").map(function(G,X){return(0,e.createComponentVNode)(2,o.Box,{children:G||(0,e.createVNode)(1,"br")},X)}),P.body_short&&(0,e.createComponentVNode)(2,o.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){function G(){return _([].concat(F,[P.uid]))}return G}()}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})],0)})})},v=function(L,w){var A=L.name,x=i(L,g),E=(0,t.useLocalState)(w,"viewingPhoto",""),P=E[0],D=E[1];return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Box,Object.assign({as:"img",className:"Newscaster__photo",src:A,onClick:function(){function M(){return D(A)}return M}()},x)))},p=function(L,w){var A=(0,t.useLocalState)(w,"viewingPhoto",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,o.Modal,{className:"Newscaster__photoZoom",children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",src:x}),(0,e.createComponentVNode)(2,o.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){function P(){return E("")}return P}()})]})},N=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=!!L.args.uid&&E.channels.filter(function(te){return te.uid===L.args.uid}).pop();if(L.id==="manage_channel"&&!P){(0,y.modalClose)(w);return}var D=L.id==="manage_channel",M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(P==null?void 0:P.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(P==null?void 0:P.name)||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(P==null?void 0:P.description)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"icon",(P==null?void 0:P.icon)||"newspaper"),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"isPublic",D?!!(P!=null&&P.public):!1),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",(P==null?void 0:P.admin)===1||!1),Z=le[0],ne=le[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:D?"Manage "+P.name:"Create New Channel",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Owner",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function te(fe,pe){return _(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:z,onInput:function(){function te(fe,pe){return $(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:X,onInput:function(){function te(fe,pe){return J(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Icon",children:[(0,e.createComponentVNode)(2,o.Input,{disabled:!M,value:ie,width:"35%",mr:"0.5rem",onInput:function(){function te(fe,pe){return me(pe)}return te}()}),(0,e.createComponentVNode)(2,o.Icon,{name:ie,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Accept Public Stories?",children:(0,e.createComponentVNode)(2,o.Button,{selected:re,icon:re?"toggle-on":"toggle-off",content:re?"Yes":"No",onClick:function(){function te(){return ae(!re)}return te}()})}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:z.substr(0,49),description:X.substr(0,128),icon:ie,public:re?1:0,admin_locked:Z?1:0})}return te}()})]})},V=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.channels,M=E.channel_idx,R=M===void 0?-1:M,O=!!L.args.is_admin,F=L.args.scanned_user,_=D.slice().sort(function(te,fe){if(R<0)return 0;var pe=D[R-1];if(pe.uid===te.uid)return-1;if(pe.uid===fe.uid)return 1}).filter(function(te){return O||!te.frozen&&(te.author===F||!!te.public)}),U=(0,t.useLocalState)(w,"author",F||"Unknown"),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"channel",_.length>0?_[0].name:""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"title",""),ie=se[0],me=se[1],q=(0,t.useLocalState)(w,"body",""),re=q[0],ae=q[1],le=(0,t.useLocalState)(w,"adminLocked",!1),Z=le[0],ne=le[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Create New Story",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Author",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!O,width:"100%",value:z,onInput:function(){function te(fe,pe){return $(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Dropdown,{selected:X,options:_.map(function(te){return te.name}),mb:"0",width:"100%",onSelected:function(){function te(fe){return J(fe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Divider),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Title",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:ie,onInput:function(){function te(fe,pe){return me(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:re,onInput:function(){function te(fe,pe){return ae(pe)}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){function te(){return x(P?"eject_photo":"attach_photo")}return te}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Section,{noTopPadding:!0,title:ie,maxHeight:"13.5rem",overflow:"auto",children:(0,e.createComponentVNode)(2,o.Box,{mt:"0.5rem",children:[!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"}),re.split("\n").map(function(te,fe){return(0,e.createComponentVNode)(2,o.Box,{children:te||(0,e.createVNode)(1,"br")},fe)}),(0,e.createComponentVNode)(2,o.Box,{clear:"right"})]})})}),O&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:Z,icon:Z?"lock":"lock-open",content:Z?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function te(){return ne(!Z)}return te}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:z.trim().length===0||X.trim().length===0||ie.trim().length===0||re.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function te(){(0,y.modalAnswer)(w,"create_story","",{author:z,channel:X,title:ie.substr(0,127),body:re.substr(0,1023),admin_locked:Z?1:0})}return te}()})]})},S=function(L,w){var A=(0,t.useBackend)(w),x=A.act,E=A.data,P=E.photo,D=E.wanted,M=!!L.args.is_admin,R=L.args.scanned_user,O=(0,t.useLocalState)(w,"author",(D==null?void 0:D.author)||R||"Unknown"),F=O[0],_=O[1],U=(0,t.useLocalState)(w,"name",(D==null?void 0:D.title.substr(8))||""),z=U[0],$=U[1],G=(0,t.useLocalState)(w,"description",(D==null?void 0:D.body)||""),X=G[0],J=G[1],se=(0,t.useLocalState)(w,"adminLocked",(D==null?void 0:D.admin_locked)===1||!1),ie=se[0],me=se[1];return(0,e.createComponentVNode)(2,o.Section,{m:"-1rem",pb:"1.5rem",title:"Manage Wanted Notice",children:[(0,e.createComponentVNode)(2,o.Box,{mx:"0.5rem",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Authority",children:(0,e.createComponentVNode)(2,o.Input,{disabled:!M,width:"100%",value:F,onInput:function(){function q(re,ae){return _(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:(0,e.createComponentVNode)(2,o.Input,{width:"100%",value:z,maxLength:"128",onInput:function(){function q(re,ae){return $(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Input,{multiline:!0,width:"100%",value:X,maxLength:"512",rows:"4",onInput:function(){function q(re,ae){return J(ae)}return q}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"image",selected:P,content:P?"Eject: "+P.name:"Insert Photo",tooltip:!P&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){function q(){return x(P?"eject_photo":"attach_photo")}return q}()}),!!P&&(0,e.createComponentVNode)(2,v,{name:"inserted_photo_"+P.uid+".png",float:"right"})]}),M&&(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,e.createComponentVNode)(2,o.Button,{selected:ie,icon:ie?"lock":"lock-open",content:ie?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){function q(){return me(!ie)}return q}()})})]})}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:!D,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){function q(){x("clear_wanted_notice"),(0,y.modalClose)(w)}return q}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{disabled:F.trim().length===0||z.trim().length===0||X.trim().length===0,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){function q(){(0,y.modalAnswer)(w,L.id,"",{author:F,name:z.substr(0,127),description:X.substr(0,511),admin_locked:ie?1:0})}return q}()})]})};(0,y.modalRegisterBodyOverride)("create_channel",N),(0,y.modalRegisterBodyOverride)("manage_channel",N),(0,y.modalRegisterBodyOverride)("create_story",V),(0,y.modalRegisterBodyOverride)("wanted_notice",S)},48286:function(T,r,n){"use strict";r.__esModule=!0,r.Noticeboard=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=r.Noticeboard=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data,m=c.papers;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:300,theme:"noticeboard",children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:m.map(function(l){return(0,e.createComponentVNode)(2,o.Stack.Item,{align:"center",width:"22.45%",height:"85%",onClick:function(){function u(){return i("interact",{paper:l.ref})}return u}(),onContextMenu:function(){function u(s){s.preventDefault(),i("showFull",{paper:l.ref})}return u}(),children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,fontSize:.75,title:l.name,children:(0,a.decodeHtmlEntities)(l.contents)})},l.ref)})})})})}return y}()},41166:function(T,r,n){"use strict";r.__esModule=!0,r.NuclearBomb=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.NuclearBomb=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return i.extended?(0,e.createComponentVNode)(2,o.Window,{width:350,height:290,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Authorization",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Disk",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.authdisk?"eject":"id-card",selected:i.authdisk,content:i.diskname?i.diskname:"-----",tooltip:i.authdisk?"Eject Disk":"Insert Disk",onClick:function(){function c(){return g("auth")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Auth Code",children:(0,e.createComponentVNode)(2,t.Button,{icon:"key",disabled:!i.authdisk,selected:i.authcode,content:i.codemsg,onClick:function(){function c(){return g("code")}return c}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Arming & Disarming",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bolted to floor",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.anchored?"check":"times",selected:i.anchored,disabled:!i.authdisk,content:i.anchored?"YES":"NO",onClick:function(){function c(){return g("toggle_anchor")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Time Left",children:(0,e.createComponentVNode)(2,t.Button,{icon:"stopwatch",content:i.time,disabled:!i.authfull,tooltip:"Set Timer",onClick:function(){function c(){return g("set_time")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety",children:(0,e.createComponentVNode)(2,t.Button,{icon:i.safety?"check":"times",selected:i.safety,disabled:!i.authfull,content:i.safety?"ON":"OFF",tooltip:i.safety?"Disable Safety":"Enable Safety",onClick:function(){function c(){return g("toggle_safety")}return c}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Arm/Disarm",children:(0,e.createComponentVNode)(2,t.Button,{icon:(i.timer,"bomb"),disabled:i.safety||!i.authfull,color:"red",content:i.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){function c(){return g("toggle_armed")}return c}()})})]})})]})}):(0,e.createComponentVNode)(2,o.Window,{width:350,height:115,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Deployment",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){function c(){return g("deploy")}return c}()})})})})}return b}()},52416:function(T,r,n){"use strict";r.__esModule=!0,r.NumberInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(92986),f=n(72253),b=n(36036),y=n(98595),B=r.NumberInputModal=function(){function g(i,c){var m=(0,f.useBackend)(c),l=m.act,u=m.data,s=u.init_value,d=u.large_buttons,C=u.message,h=C===void 0?"":C,v=u.timeout,p=u.title,N=(0,f.useLocalState)(c,"input",s),V=N[0],S=N[1],I=function(){function A(x){x!==V&&S(x)}return A}(),L=function(){function A(x){x!==V&&S(x)}return A}(),w=140+Math.max(Math.ceil(h.length/3),h.length>0&&d?5:0);return(0,e.createComponentVNode)(2,y.Window,{title:p,width:270,height:w,children:[v&&(0,e.createComponentVNode)(2,a.Loader,{value:v}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function A(x){var E=window.event?x.which:x.keyCode;E===o.KEY_ENTER&&l("submit",{entry:V}),E===o.KEY_ESCAPE&&l("cancel")}return A}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:h})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,k,{input:V,onClick:L,onChange:I})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:V})})]})})})]})}return g}(),k=function(i,c){var m=(0,f.useBackend)(c),l=m.act,u=m.data,s=u.min_value,d=u.max_value,C=u.init_value,h=u.round_value,v=i.input,p=i.onClick,N=i.onChange,V=Math.round(v!==s?Math.max(v/2,s):d/2),S=v===s&&s>0||v===1;return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===s,icon:"angle-double-left",onClick:function(){function I(){return p(s)}return I}(),tooltip:v===s?"Min":"Min ("+s+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.RestrictedInput,{autoFocus:!0,autoSelect:!0,fluid:!0,allowFloats:!h,minValue:s,maxValue:d,onChange:function(){function I(L,w){return N(w)}return I}(),onEnter:function(){function I(L,w){return l("submit",{entry:w})}return I}(),value:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===d,icon:"angle-double-right",onClick:function(){function I(){return p(d)}return I}(),tooltip:v===d?"Max":"Max ("+d+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:S,icon:"divide",onClick:function(){function I(){return p(V)}return I}(),tooltip:S?"Split":"Split ("+V+")"})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Button,{disabled:v===C,icon:"redo",onClick:function(){function I(){return p(C)}return I}(),tooltip:C?"Reset ("+C+")":"Reset"})})]})}},1218:function(T,r,n){"use strict";r.__esModule=!0,r.OperatingComputer=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(98595),f=n(36036),b=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],g=r.OperatingComputer=function(){function l(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.hasOccupant,p=h.choice,N;return p?N=(0,e.createComponentVNode)(2,m):N=v?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,o.Window,{width:650,height:455,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!p,icon:"user",onClick:function(){function V(){return C("choiceOff")}return V}(),children:"Patient"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{selected:!!p,icon:"cog",onClick:function(){function V(){return C("choiceOn")}return V}(),children:"Options"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,scrollable:!0,children:N})})]})})})}return l}(),i=function(u,s){var d=(0,t.useBackend)(s),C=d.data,h=C.occupant;return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Section,{fill:!0,title:"Patient",children:(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Name",children:h.name}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Status",color:b[h.stat][0],children:b[h.stat][1]}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.maxHealth,value:h.health/h.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]}})}),y.map(function(v,p){return(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:v[0]+" Damage",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:"100",value:h[v[1]]/100,ranges:B,children:(0,a.round)(h[v[1]])},p)},p)}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.maxTemp,value:h.bodyTemperature/h.maxTemp,color:k[h.temperatureSuitability+3],children:[(0,a.round)(h.btCelsius),"\xB0C, ",(0,a.round)(h.btFaren),"\xB0F"]})}),!!h.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,f.ProgressBar,{min:"0",max:h.bloodMax,value:h.bloodLevel/h.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[h.bloodPercent,"%, ",h.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Pulse",children:[h.pulse," BPM"]})],4)]})})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Section,{title:"Current Procedure",level:"2",children:h.inSurgery?(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Procedure",children:h.surgeryName}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Next Step",children:h.stepName})]}):(0,e.createComponentVNode)(2,f.Box,{color:"label",children:"No procedure ongoing."})})})]})},c=function(){return(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,align:"center",textAlign:"center",color:"label",children:[(0,e.createComponentVNode)(2,f.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No patient detected."]})})},m=function(u,s){var d=(0,t.useBackend)(s),C=d.act,h=d.data,v=h.verbose,p=h.health,N=h.healthAlarm,V=h.oxy,S=h.oxyAlarm,I=h.crit;return(0,e.createComponentVNode)(2,f.LabeledList,{children:[(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Loudspeaker",children:(0,e.createComponentVNode)(2,f.Button,{selected:v,icon:v?"toggle-on":"toggle-off",content:v?"On":"Off",onClick:function(){function L(){return C(v?"verboseOff":"verboseOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer",children:(0,e.createComponentVNode)(2,f.Button,{selected:p,icon:p?"toggle-on":"toggle-off",content:p?"On":"Off",onClick:function(){function L(){return C(p?"healthOff":"healthOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:N,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return C("health_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm",children:(0,e.createComponentVNode)(2,f.Button,{selected:V,icon:V?"toggle-on":"toggle-off",content:V?"On":"Off",onClick:function(){function L(){return C(V?"oxyOff":"oxyOn")}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,e.createComponentVNode)(2,f.Knob,{bipolar:!0,minValue:-100,maxValue:100,value:S,stepPixelSize:5,ml:"0",onChange:function(){function L(w,A){return C("oxy_adj",{new:A})}return L}()})}),(0,e.createComponentVNode)(2,f.LabeledList.Item,{label:"Critical Alert",children:(0,e.createComponentVNode)(2,f.Button,{selected:I,icon:I?"toggle-on":"toggle-off",content:I?"On":"Off",onClick:function(){function L(){return C(I?"critOff":"critOn")}return L}()})})]})}},46892:function(T,r,n){"use strict";r.__esModule=!0,r.Orbit=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(35840);function y(d,C){var h=typeof Symbol!="undefined"&&d[Symbol.iterator]||d["@@iterator"];if(h)return(h=h.call(d)).next.bind(h);if(Array.isArray(d)||(h=B(d))||C&&d&&typeof d.length=="number"){h&&(d=h);var v=0;return function(){return v>=d.length?{done:!0}:{done:!1,value:d[v++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(d,C){if(d){if(typeof d=="string")return k(d,C);var h={}.toString.call(d).slice(8,-1);return h==="Object"&&d.constructor&&(h=d.constructor.name),h==="Map"||h==="Set"?Array.from(d):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?k(d,C):void 0}}function k(d,C){(C==null||C>d.length)&&(C=d.length);for(var h=0,v=Array(C);hh},m=function(C,h){var v=C.name,p=h.name;if(!v||!p)return 0;var N=v.match(g),V=p.match(g);if(N&&V&&v.replace(g,"")===p.replace(g,"")){var S=parseInt(N[1],10),I=parseInt(V[1],10);return S-I}return c(v,p)},l=function(C,h){var v=C.searchText,p=C.source,N=C.title,V=C.color,S=C.sorted,I=p.filter(i(v));return S&&I.sort(m),p.length>0&&(0,e.createComponentVNode)(2,o.Section,{title:N+" - ("+p.length+")",children:I.map(function(L){return(0,e.createComponentVNode)(2,u,{thing:L,color:V},L.name)})})},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=C.color,V=C.thing;return(0,e.createComponentVNode)(2,o.Button,{color:N,tooltip:V.assigned_role?(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Box,{as:"img",mr:"0.5em",className:(0,b.classes)(["job_icons16x16",V.assigned_role_sprite])})," ",V.assigned_role]}):"",tooltipPosition:"bottom",onClick:function(){function S(){return p("orbit",{ref:V.ref})}return S}(),children:[V.name,V.orbiters&&(0,e.createComponentVNode)(2,o.Box,{inline:!0,ml:1,children:["(",V.orbiters," ",(0,e.createComponentVNode)(2,o.Icon,{name:"eye"}),")"]})]})},s=r.Orbit=function(){function d(C,h){for(var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.alive,S=N.antagonists,I=N.highlights,L=N.response_teams,w=N.tourist,A=N.auto_observe,x=N.dead,E=N.ssd,P=N.ghosts,D=N.misc,M=N.npcs,R=(0,t.useLocalState)(h,"searchText",""),O=R[0],F=R[1],_={},U=y(S),z;!(z=U()).done;){var $=z.value;_[$.antag]===void 0&&(_[$.antag]=[]),_[$.antag].push($)}var G=Object.entries(_);G.sort(function(J,se){return c(J[0],se[0])});var X=function(){function J(se){for(var ie=0,me=[G.map(function(ae){var le=ae[0],Z=ae[1];return Z}),w,I,V,P,E,x,M,D];ie0&&(0,e.createComponentVNode)(2,o.Section,{title:"Antagonists",children:G.map(function(J){var se=J[0],ie=J[1];return(0,e.createComponentVNode)(2,o.Section,{title:se+" - ("+ie.length+")",level:2,children:ie.filter(i(O)).sort(m).map(function(me){return(0,e.createComponentVNode)(2,u,{color:"bad",thing:me},me.name)})},se)})}),I.length>0&&(0,e.createComponentVNode)(2,l,{title:"Highlights",source:I,searchText:O,color:"teal"}),(0,e.createComponentVNode)(2,l,{title:"Response Teams",source:L,searchText:O,color:"purple"}),(0,e.createComponentVNode)(2,l,{title:"Tourists",source:w,searchText:O,color:"violet"}),(0,e.createComponentVNode)(2,l,{title:"Alive",source:V,searchText:O,color:"good"}),(0,e.createComponentVNode)(2,l,{title:"Ghosts",source:P,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,l,{title:"SSD",source:E,searchText:O,color:"grey"}),(0,e.createComponentVNode)(2,l,{title:"Dead",source:x,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,l,{title:"NPCs",source:M,searchText:O,sorted:!1}),(0,e.createComponentVNode)(2,l,{title:"Misc",source:D,searchText:O,sorted:!1})]})})}return d}()},15421:function(T,r,n){"use strict";r.__esModule=!0,r.OreRedemption=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=n(9394);function y(d){if(d==null)throw new TypeError("Cannot destructure "+d)}var B=(0,b.createLogger)("OreRedemption"),k=function(C){return C.toLocaleString("en-US")+" pts"},g=r.OreRedemption=function(){function d(C,h){return(0,e.createComponentVNode)(2,f.Window,{width:490,height:750,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,i,{height:"100%"})}),(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m)]})})})}return d}(),i=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.id,S=N.points,I=N.disk,L=Object.assign({},(y(C),C));return(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({},L,{children:[(0,e.createComponentVNode)(2,o.Box,{color:"average",textAlign:"center",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,e.createComponentVNode)(2,o.Divider),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unclaimed Points",color:S>0?"good":"grey",bold:S>0&&"good",children:k(S)})}),(0,e.createComponentVNode)(2,o.Divider),I?(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Design disk",children:[(0,e.createComponentVNode)(2,o.Button,{selected:!0,bold:!0,icon:"eject",content:I.name,tooltip:"Ejects the design disk.",onClick:function(){function w(){return p("eject_disk")}return w}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!I.design||!I.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){function w(){return p("download")}return w}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Stored design",children:(0,e.createComponentVNode)(2,o.Box,{color:I.design&&(I.compatible?"good":"bad"),children:I.design||"N/A"})})]}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No design disk inserted."})]})))},c=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.sheets,S=Object.assign({},(y(C),C));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,height:"20%",children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,l,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,u,{ore:I},I.id)})]})))})},m=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.alloys,S=Object.assign({},(y(C),C));return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.normalizeProps)((0,e.createComponentVNode)(2,o.Section,Object.assign({fill:!0,scrollable:!0,className:"OreRedemption__Ores",p:"0"},S,{children:[(0,e.createComponentVNode)(2,l,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),V.map(function(I){return(0,e.createComponentVNode)(2,s,{ore:I},I.id)})]})))})},l=function(C,h){var v;return(0,e.createComponentVNode)(2,o.Box,{className:"OreHeader",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:C.title}),(v=C.columns)==null?void 0:v.map(function(p){return(0,e.createComponentVNode)(2,o.Stack.Item,{basis:p[1],textAlign:"center",color:"label",bold:!0,children:p[0]},p)})]})})},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=C.ore;if(!(N.value&&N.amount<=0&&!(["metal","glass"].indexOf(N.id)>-1)))return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"45%",align:"middle",children:(0,e.createComponentVNode)(2,o.Stack,{align:"center",children:[(0,e.createComponentVNode)(2,o.Stack.Item,{className:(0,a.classes)(["materials32x32",N.id])}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:N.name})]})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",children:N.value}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return p(N.value?"sheet":"alloy",{id:N.id,amount:I})}return V}()})})]})})},s=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=C.ore;return(0,e.createComponentVNode)(2,o.Box,{className:"SheetLine",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"7%",align:"middle",children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["alloys32x32",N.id])})}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"30%",textAlign:"middle",align:"center",children:N.name}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"35%",textAlign:"middle",color:N.amount>=1?"good":"gray",align:"center",children:N.description}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"10%",textAlign:"center",color:N.amount>=1?"good":"gray",bold:N.amount>=1,align:"center",children:N.amount.toLocaleString("en-US")}),(0,e.createComponentVNode)(2,o.Stack.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,e.createComponentVNode)(2,o.NumberInput,{width:"40%",value:0,minValue:0,maxValue:Math.min(N.amount,50),stepPixelSize:6,onChange:function(){function V(S,I){return p(N.value?"sheet":"alloy",{id:N.id,amount:I})}return V}()})})]})})}},52754:function(T,r,n){"use strict";r.__esModule=!0,r.PAI=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(71253),b=n(70752),y=function(g){var i;try{i=b("./"+g+".js")}catch(m){if(m.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",g);throw m}var c=i[g];return c||(0,f.routingError)("missingExport",g)},B=r.PAI=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.app_template,s=l.app_icon,d=l.app_title,C=y(u);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{p:1,fill:!0,scrollable:!0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:s,mr:1}),d,u!=="pai_main_menu"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{ml:2,mb:0,content:"Back",icon:"arrow-left",onClick:function(){function h(){return m("Back")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Home",icon:"arrow-up",onClick:function(){function h(){return m("MASTER_back")}return h}()})],4)]}),children:(0,e.createComponentVNode)(2,C)})})})})})}return k}()},85175:function(T,r,n){"use strict";r.__esModule=!0,r.PDA=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(71253),b=n(59395),y=function(c){var m;try{m=b("./"+c+".js")}catch(u){if(u.code==="MODULE_NOT_FOUND")return(0,f.routingError)("notFound",c);throw u}var l=m[c];return l||(0,f.routingError)("missingExport",c)},B=r.PDA=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.app,C=s.owner;if(!C)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var h=y(d.template);return(0,e.createComponentVNode)(2,o.Window,{width:600,height:650,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,k)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,p:1,pb:0,title:(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:d.icon,mr:1}),d.name]}),children:(0,e.createComponentVNode)(2,h)})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:7.5,children:(0,e.createComponentVNode)(2,g)})]})})})}return i}(),k=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.idInserted,C=s.idLink,h=s.stationTime,v=s.cartridge_name;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{ml:.5,children:(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",color:"transparent",onClick:function(){function p(){return u("Authenticate")}return p}(),content:d?C:"No ID Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"sd-card",color:"transparent",onClick:function(){function p(){return u("Eject")}return p}(),content:v?["Eject "+v]:"No Cartridge Inserted"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"right",bold:!0,mr:1,mt:.5,children:h})]})},g=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.app;return(0,e.createComponentVNode)(2,t.Box,{height:"45px",className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[!!d.has_back&&(0,e.createComponentVNode)(2,t.Stack.Item,{basis:"33%",mr:-.5,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:d.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){function C(){return u("Back")}return C}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{basis:d.has_back?"33%":"100%",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:d.is_home?"disabled":"white",icon:"home",onClick:function(){function C(){u("Home")}return C}()})})]})})}},68654:function(T,r,n){"use strict";r.__esModule=!0,r.Pacman=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(49968),b=r.Pacman=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.active,l=c.anchored,u=c.broken,s=c.emagged,d=c.fuel_type,C=c.fuel_usage,h=c.fuel_stored,v=c.fuel_cap,p=c.is_ai,N=c.tmp_current,V=c.tmp_max,S=c.tmp_overheat,I=c.output_max,L=c.power_gen,w=c.output_set,A=c.has_fuel,x=h/v,E=N/V,P=w*L,D=Math.round(h/C*2),M=Math.round(D/60),R=D>120?M+" minutes":D+" seconds";return(0,e.createComponentVNode)(2,o.Window,{width:500,height:225,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(u||!l)&&(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:[!!u&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator is malfunctioning!"}),!u&&!l&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!u&&!!l&&(0,e.createVNode)(1,"div",null,[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:m?"power-off":"times",content:m?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!A,selected:m,onClick:function(){function O(){return i("toggle_power")}return O}()}),children:(0,e.createComponentVNode)(2,t.Flex,{direction:"row",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",className:"ml-1",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power setting",children:[(0,e.createComponentVNode)(2,t.NumberInput,{value:w,minValue:1,maxValue:I*(s?2.5:1),step:1,className:"mt-1",onDrag:function(){function O(F,_){return i("change_power",{change_power:_})}return O}()}),"(",(0,f.formatPower)(P),")"]})})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:E,ranges:{green:[-1/0,.33],orange:[.33,.66],red:[.66,1/0]},children:[N," \u2103"]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:[S>50&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),S>20&&S<=50&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"WARNING: Overheating!"}),S>1&&S<=20&&(0,e.createComponentVNode)(2,t.Box,{color:"orange",children:"Temperature High"}),S===0&&(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Fuel",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:m||p||!A,onClick:function(){function O(){return i("eject_fuel")}return O}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Type",children:d}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel level",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:x,ranges:{red:[-1/0,.33],orange:[.33,.66],green:[.66,1/0]},children:[Math.round(h/1e3)," dm\xB3"]})})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel usage",children:[C/1e3," dm\xB3/s"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fuel depletion",children:[!!A&&(C?R:"N/A"),!A&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}return y}()},1701:function(T,r,n){"use strict";r.__esModule=!0,r.PanDEMIC=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.PanDEMIC=function(){function l(u,s){var d=(0,a.useBackend)(s),C=d.data,h=C.beakerLoaded,v=C.beakerContainsBlood,p=C.beakerContainsVirus,N=C.resistances,V=N===void 0?[]:N,S;return h?v?v&&!p&&(S=(0,e.createFragment)([(0,e.createTextVNode)("No disease detected in provided blood sample.")],4)):S=(0,e.createFragment)([(0,e.createTextVNode)("No blood sample found in the loaded container.")],4):S=(0,e.createFragment)([(0,e.createTextVNode)("No container loaded.")],4),(0,e.createComponentVNode)(2,o.Window,{width:575,height:510,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[S&&!p?(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b,{fill:!0,vertical:!0}),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:S})}):(0,e.createComponentVNode)(2,k),(V==null?void 0:V.length)>0&&(0,e.createComponentVNode)(2,m,{align:"bottom"})]})})})}return l}(),b=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.beakerLoaded;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:"Eject",disabled:!v,onClick:function(){function p(){return C("eject_beaker")}return p}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",confirmIcon:"eraser",content:"Destroy",confirmContent:"Destroy",disabled:!v,onClick:function(){function p(){return C("destroy_eject_beaker")}return p}()})],4)},y=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.beakerContainsVirus,p=u.strain,N=p.commonName,V=p.description,S=p.diseaseAgent,I=p.bloodDNA,L=p.bloodType,w=p.possibleTreatments,A=p.transmissionRoute,x=p.isAdvanced,E=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood DNA",children:I?(0,e.createVNode)(1,"span",null,I,0,{style:{"font-family":"'Courier New', monospace"}}):"Undetectable"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Blood Type",children:(0,e.createVNode)(1,"div",null,null,1,{dangerouslySetInnerHTML:{__html:L!=null?L:"Undetectable"}})})],4);if(!v)return(0,e.createComponentVNode)(2,t.LabeledList,{children:E});var P;return x&&(N!=null&&N!=="Unknown"?P=(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print Release Forms",onClick:function(){function D(){return C("print_release_forms",{strain_index:u.strainIndex})}return D}(),style:{"margin-left":"auto"}}):P=(0,e.createComponentVNode)(2,t.Button,{icon:"pen",content:"Name Disease",onClick:function(){function D(){return C("name_strain",{strain_index:u.strainIndex})}return D}(),style:{"margin-left":"auto"}})),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Common Name",className:"common-name-label",children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,align:"center",children:[N!=null?N:"Unknown",P]})}),V&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:V}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Disease Agent",children:S}),E,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Spread Vector",children:A!=null?A:"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Possible Cures",children:w!=null?w:"None"})]})},B=function(u,s){var d,C=(0,a.useBackend)(s),h=C.act,v=C.data,p=!!v.synthesisCooldown,N=(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:p?"spinner":"clone",iconSpin:p,content:"Clone",disabled:p,onClick:function(){function V(){return h("clone_strain",{strain_index:u.strainIndex})}return V}()}),u.sectionButtons],0);return(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:(d=u.sectionTitle)!=null?d:"Strain Information",buttons:N,children:(0,e.createComponentVNode)(2,y,{strain:u.strain,strainIndex:u.strainIndex})})})},k=function(u,s){var d,C=(0,a.useBackend)(s),h=C.act,v=C.data,p=v.selectedStrainIndex,N=v.strains,V=N[p-1];if(N.length===0)return(0,e.createComponentVNode)(2,t.Section,{title:"Container Information",buttons:(0,e.createComponentVNode)(2,b),children:(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No disease detected in provided blood sample."})});if(N.length===1){var S;return(0,e.createFragment)([(0,e.createComponentVNode)(2,B,{strain:N[0],strainIndex:1,sectionButtons:(0,e.createComponentVNode)(2,b)}),((S=N[0].symptoms)==null?void 0:S.length)>0&&(0,e.createComponentVNode)(2,i,{strain:N[0]})],0)}var I=(0,e.createComponentVNode)(2,b);return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Culture Information",fill:!0,buttons:I,children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",style:{height:"100%"},children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Tabs,{children:N.map(function(L,w){var A;return(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"virus",selected:p-1===w,onClick:function(){function x(){return h("switch_strain",{strain_index:w+1})}return x}(),children:(A=L.commonName)!=null?A:"Unknown"},w)})})}),(0,e.createComponentVNode)(2,B,{strain:V,strainIndex:p}),((d=V.symptoms)==null?void 0:d.length)>0&&(0,e.createComponentVNode)(2,i,{className:"remove-section-bottom-padding",strain:V})]})})})},g=function(u){return u.reduce(function(s,d){return s+d},0)},i=function(u){var s=u.strain.symptoms;return(0,e.createComponentVNode)(2,t.Flex.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{title:"Infection Symptoms",fill:!0,className:u.className,children:(0,e.createComponentVNode)(2,t.Table,{className:"symptoms-table",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stealth"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Resistance"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Stage Speed"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Transmissibility"})]}),s.map(function(d,C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stealth}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.resistance}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.stageSpeed}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d.transmissibility})]},C)}),(0,e.createComponentVNode)(2,t.Table.Row,{className:"table-spacer"}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{"font-weight":"bold"},children:"Total"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.stealth}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.resistance}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.stageSpeed}))}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g(s.map(function(d){return d.transmissibility}))})]})]})})})},c=["flask","vial","eye-dropper"],m=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.synthesisCooldown,p=h.beakerContainsVirus,N=h.resistances;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Antibodies",fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{horizontal:!0,wrap:!0,children:N.map(function(V,S){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:c[S%c.length],disabled:!!v,onClick:function(){function I(){return C("clone_vaccine",{resistance_index:S+1})}return I}(),mr:"0.5em"}),V]},S)})})})})}},67921:function(T,r,n){"use strict";r.__esModule=!0,r.ParticleAccelerator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(25328),f=n(79646),b=n(36352),y=n(98595),B=n(35840),k=n(38307),g=function(u){switch(u){case 1:return"north";case 2:return"south";case 4:return"east";case 8:return"west";case 5:return"northeast";case 6:return"southeast";case 9:return"northwest";case 10:return"southwest"}return""},i=r.ParticleAccelerator=function(){function l(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,y.Window,{width:395,height:v?160:A==="north"||A==="south"?540:465,children:(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Control Panel",buttons:(0,e.createComponentVNode)(2,t.Button,{dmIcon:"sync",content:"Connect",onClick:function(){function x(){return C("scan")}return x}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",mb:"5px",children:(0,e.createComponentVNode)(2,t.Box,{color:v?"good":"bad",children:v?"Operational":"Error: Verify Configuration"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power",children:(0,e.createComponentVNode)(2,t.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:!v,onClick:function(){function x(){return C("power")}return x}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Strength",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:!v||N===0,onClick:function(){function x(){return C("remove_strength")}return x}(),mr:"4px"}),N,(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:!v||N===V,onClick:function(){function x(){return C("add_strength")}return x}(),ml:"4px"})]})]})}),v?"":(0,e.createComponentVNode)(2,t.Section,{title:A?"EM Acceleration Chamber Orientation: "+(0,o.capitalize)(A):"Place EM Acceleration Chamber Next To Console",children:A===0?"":A==="north"||A==="south"?(0,e.createComponentVNode)(2,m):(0,e.createComponentVNode)(2,c)})]})})}return l}(),c=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,b.TableRow,{width:"40px",children:(A==="east"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})},m=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.assembled,p=h.power,N=h.strength,V=h.max_strength,S=h.icon,I=h.layout_1,L=h.layout_2,w=h.layout_3,A=h.orientation;return(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?I:w).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{children:L.slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})}),(0,e.createComponentVNode)(2,f.GridColumn,{width:"40px",children:(A==="north"?w:I).slice().map(function(x){return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,tooltip:x.status,children:(0,e.createComponentVNode)(2,t.Tooltip,{content:(0,e.createVNode)(1,"span",null,[x.name,(0,e.createTextVNode)(" "),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)(" "),"Status: "+x.status,(0,e.createVNode)(1,"br"),"Direction: "+g(x.dir)],0,{style:{wordWrap:"break-word"}}),children:(0,e.createComponentVNode)(2,t.ImageButton,{dmIcon:S,dmIconState:x.icon_state,dmDirection:x.dir,style:{"border-style":"solid","border-width":"2px","border-color":x.status==="good"?"green":x.status==="Incomplete"?"orange":"red",padding:"2px"}})})},x.name)})})]})}},71432:function(T,r,n){"use strict";r.__esModule=!0,r.PdaPainter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.PdaPainter=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.has_pda;return(0,e.createComponentVNode)(2,o.Window,{width:510,height:505,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:l?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,b)})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"silver",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"download",size:5,mb:"10px"}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{width:"160px",textAlign:"center",content:"Insert PDA",onClick:function(){function l(){return m("insert_pda")}return l}()})]})})})},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.pda_colors;return(0,e.createComponentVNode)(2,t.Stack,{fill:!0,horizontal:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,B)}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.Table,{className:"PdaPainter__list",children:Object.keys(u).map(function(s){return(0,e.createComponentVNode)(2,t.Table.Row,{onClick:function(){function d(){return m("choose_pda",{selectedPda:s})}return d}(),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+u[s][0],style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:s})]},s)})})})})]})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.current_appearance,s=l.preview_appearance;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Current PDA",children:[(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+u,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"eject",content:"Eject",color:"green",onClick:function(){function d(){return m("eject_pda")}return d}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",icon:"paint-roller",content:"Paint PDA",onClick:function(){function d(){return m("paint_pda")}return d}()})]}),(0,e.createComponentVNode)(2,t.Section,{title:"Preview",children:(0,e.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+s,style:{"vertical-align":"middle",width:"160px",margin:"0px","margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}})})]})}},33388:function(T,r,n){"use strict";r.__esModule=!0,r.PersonalCrafting=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.PersonalCrafting=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.busy,u=m.category,s=m.display_craftable_only,d=m.display_compact,C=m.prev_cat,h=m.next_cat,v=m.subcategory,p=m.prev_subcat,N=m.next_subcat;return(0,e.createComponentVNode)(2,o.Window,{width:700,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!l&&(0,e.createComponentVNode)(2,t.Dimmer,{fontSize:"32px",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,e.createComponentVNode)(2,t.Section,{title:u,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Show Craftable Only",icon:s?"check-square-o":"square-o",selected:s,onClick:function(){function V(){return c("toggle_recipes")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Compact Mode",icon:d?"check-square-o":"square-o",selected:d,onClick:function(){function V(){return c("toggle_compact")}return V}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:C,icon:"arrow-left",onClick:function(){function V(){return c("backwardCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:h,icon:"arrow-right",onClick:function(){function V(){return c("forwardCat")}return V}()})]}),v&&(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Button,{content:p,icon:"arrow-left",onClick:function(){function V(){return c("backwardSubCat")}return V}()}),(0,e.createComponentVNode)(2,t.Button,{content:N,icon:"arrow-right",onClick:function(){function V(){return c("forwardSubCat")}return V}()})]}),d?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})]})})}return B}(),b=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function C(){return c("make",{make:d.ref})}return C}()}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)}),!l&&s.map(function(d){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:d.name,children:[(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),d.catalyst_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.catalyst_text,content:"Catalysts",color:"transparent"}),(0,e.createComponentVNode)(2,t.Button,{tooltip:d.req_text,content:"Requirements",color:"transparent"}),d.tool_text&&(0,e.createComponentVNode)(2,t.Button,{tooltip:d.tool_text,content:"Tools",color:"transparent"})]},d.name)})]})})},y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.display_craftable_only,u=m.can_craft,s=m.cant_craft;return(0,e.createComponentVNode)(2,t.Box,{mt:1,children:[u.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",onClick:function(){function C(){return c("make",{make:d.ref})}return C}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.name)}),!l&&s.map(function(d){return(0,e.createComponentVNode)(2,t.Section,{title:d.name,buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[d.catalyst_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Catalysts",children:d.catalyst_text}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Requirements",children:d.req_text}),d.tool_text&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tools",children:d.tool_text})]})},d.name)})]})}},56150:function(T,r,n){"use strict";r.__esModule=!0,r.Photocopier=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Photocopier=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:440,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Photocopier",color:"silver",children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Copies:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"2em",bold:!0,children:m.copynumber}),(0,e.createComponentVNode)(2,t.Stack.Item,{float:"right",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"minus",textAlign:"center",content:"",onClick:function(){function l(){return c("minus")}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"plus",textAlign:"center",content:"",onClick:function(){function l(){return c("add")}return l}()})]})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:2,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Toner:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,children:m.toner})]}),(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Document:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.copyitem&&!m.mob,content:m.copyitem?m.copyitem:m.mob?m.mob+"'s ass!":"document",onClick:function(){function l(){return c("removedocument")}return l}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:12,children:"Inserted Folder:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",disabled:!m.folder,content:m.folder?m.folder:"folder",onClick:function(){function l(){return c("removefolder")}return l}()})})]})]}),(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,b)}),(0,e.createComponentVNode)(2,y)]})})})}return B}(),b=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.issilicon;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"copy",float:"center",textAlign:"center",content:"Copy",onClick:function(){function u(){return c("copy")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file-import",float:"center",textAlign:"center",content:"Scan",onClick:function(){function u(){return c("scandocument")}return u}()}),!!l&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"file",color:"green",float:"center",textAlign:"center",content:"Print Text",onClick:function(){function u(){return c("ai_text")}return u}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"image",color:"green",float:"center",textAlign:"center",content:"Print Image",onClick:function(){function u(){return c("ai_pic")}return u}()})],4)],0)},y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data;return(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Scanned Files",children:m.files.map(function(l){return(0,e.createComponentVNode)(2,t.Section,{title:l.name,buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print",disabled:m.toner<=0,onClick:function(){function u(){return c("filecopy",{uid:l.uid})}return u}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash-alt",content:"Delete",color:"bad",onClick:function(){function u(){return c("deletefile",{uid:l.uid})}return u}()})]})},l.name)})})}},84676:function(T,r,n){"use strict";r.__esModule=!0,r.PoolController=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=["tempKey"];function b(g,i){if(g==null)return{};var c={};for(var m in g)if({}.hasOwnProperty.call(g,m)){if(i.includes(m))continue;c[m]=g[m]}return c}var y={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},B=function(i,c){var m=i.tempKey,l=b(i,f),u=y[m];if(!u)return null;var s=(0,a.useBackend)(c),d=s.data,C=s.act,h=d.currentTemp,v=u.label,p=u.icon,N=m===h,V=function(){C("setTemp",{temp:m})};return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Button,Object.assign({color:"transparent",selected:N,onClick:V},l,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:p}),v]})))},k=r.PoolController=function(){function g(i,c){for(var m=(0,a.useBackend)(c),l=m.data,u=l.emagged,s=l.currentTemp,d=y[s]||y.normal,C=d.label,h=d.color,v=[],p=0,N=Object.entries(y);p50?"battery-half":"battery-quarter")||h==="C"&&"bolt"||h==="F"&&"battery-full"||h==="M"&&"slash",color:h==="N"&&(v>50?"yellow":"red")||h==="C"&&"yellow"||h==="F"&&"green"||h==="M"&&"orange"}),(0,e.createComponentVNode)(2,B.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,o.toFixed)(v)+"%"})],4)};u.defaultHooks=f.pureComponentHooks;var s=function(C){var h,v,p=C.status;switch(p){case"AOn":h=!0,v=!0;break;case"AOff":h=!0,v=!1;break;case"On":h=!1,v=!0;break;case"Off":h=!1,v=!1;break}var N=(v?"On":"Off")+(" ["+(h?"auto":"manual")+"]");return(0,e.createComponentVNode)(2,B.ColorBox,{color:v?"good":"bad",content:h?void 0:"M",title:N})};s.defaultHooks=f.pureComponentHooks},50992:function(T,r,n){"use strict";r.__esModule=!0,r.PrisonerImplantManager=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(29319),f=n(3939),b=n(321),y=n(5485),B=n(98595),k=r.PrisonerImplantManager=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.loginState,d=u.prisonerInfo,C=u.chemicalInfo,h=u.trackingInfo,v;if(!s.logged_in)return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,y.LoginScreen)})});var p=[1,5,10];return(0,e.createComponentVNode)(2,B.Window,{theme:"security",width:500,height:850,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.LoginInfo),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Prisoner Points Manager System",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:d.name?"eject":"id-card",selected:d.name,content:d.name?d.name:"-----",tooltip:d.name?"Eject ID":"Insert ID",onClick:function(){function N(){return l("id_card")}return N}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Points",children:[d.points!==null?d.points:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"minus-square",disabled:d.points===null,content:"Reset",onClick:function(){function N(){return l("reset_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Point Goal",children:[d.goal!==null?d.goal:"-/-",(0,e.createComponentVNode)(2,t.Button,{ml:2,icon:"pen",disabled:d.goal===null,content:"Edit",onClick:function(){function N(){return(0,f.modalOpen)(c,"set_points")}return N}()})]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{children:(0,e.createVNode)(1,"box",null,[(0,e.createTextVNode)("1 minute of prison time should roughly equate to 150 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Sentences should not exceed 5000 points."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Permanent prisoners should not be given a point goal."),(0,e.createVNode)(1,"br"),(0,e.createVNode)(1,"br"),(0,e.createTextVNode)("Prisoners who meet their point goal will be able to automatically access their locker and return to the station using the shuttle.")],4,{hidden:d.goal===null})})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Tracking Implants",children:h.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.subject]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Location",children:N.location}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:N.health}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Prisoner",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-triangle",content:"Warn",tooltip:"Broadcast a message to this poor sod",onClick:function(){function V(){return(0,f.modalOpen)(c,"warn",{uid:N.uid})}return V}()})})]})]},N.subject)]}),(0,e.createVNode)(1,"br")],4)})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Chemical Implants",children:C.map(function(N){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{p:1,backgroundColor:"rgba(255, 255, 255, 0.05)",children:[(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:["Subject: ",N.name]}),(0,e.createComponentVNode)(2,t.Box,{children:[" ",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Reagents",children:N.volume})}),p.map(function(V){return(0,e.createComponentVNode)(2,t.Button,{mt:2,disabled:N.volumec;return(0,e.createComponentVNode)(2,t.ImageButton,{fluid:!0,title:N.name,dmIcon:N.icon,dmIconState:N.icon_state,buttonsAlt:(0,e.createComponentVNode)(2,t.Button,{bold:!0,translucent:!0,fontSize:1.5,tooltip:V&&"Not enough tickets",disabled:V,onClick:function(){function S(){return g("purchase",{purchase:N.itemID})}return S}(),children:[N.cost,(0,e.createComponentVNode)(2,t.Icon,{m:0,mt:.25,name:"ticket",color:V?"bad":"good",size:1.6})]}),children:N.desc},N.name)})})})})})})}return b}()},94813:function(T,r,n){"use strict";r.__esModule=!0,r.RCD=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(3939),b=n(49148),y=r.RCD=function(){function l(u,s){return(0,e.createComponentVNode)(2,o.Window,{width:480,height:670,children:[(0,e.createComponentVNode)(2,f.ComplexModal),(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k),(0,e.createComponentVNode)(2,i),(0,e.createComponentVNode)(2,c)]})})]})}return l}(),B=function(u,s){var d=(0,a.useBackend)(s),C=d.data,h=C.matter,v=C.max_matter,p=v*.7,N=v*.25;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Matter Storage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[p,1/0],average:[N,p],bad:[-1/0,N]},value:h,maxValue:v,children:(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:h+" / "+v+" units"})})})})},k=function(){return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Construction Type",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,g,{mode_type:"Floors and Walls"}),(0,e.createComponentVNode)(2,g,{mode_type:"Airlocks"}),(0,e.createComponentVNode)(2,g,{mode_type:"Windows"}),(0,e.createComponentVNode)(2,g,{mode_type:"Deconstruction"})]})})})},g=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=u.mode_type,p=h.mode;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",content:v,selected:p===v?1:0,onClick:function(){function N(){return C("mode",{mode:v})}return N}()})})},i=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.door_name,p=h.electrochromic,N=h.airlock_glass;return(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Airlock Settings",children:(0,e.createComponentVNode)(2,t.Stack,{textAlign:"center",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,color:"transparent",icon:"pen-alt",content:(0,e.createFragment)([(0,e.createTextVNode)("Rename: "),(0,e.createVNode)(1,"b",null,v,0)],0),onClick:function(){function V(){return(0,f.modalOpen)(s,"renameAirlock")}return V}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:N===1&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:p?"toggle-on":"toggle-off",content:"Electrochromic",selected:p,onClick:function(){function V(){return C("electrochromic")}return V}()})})]})})})},c=function(u,s){var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.tab,p=h.locked,N=h.one_access,V=h.selected_accesses,S=h.regions;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Tabs,{fluid:!0,children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"cog",selected:v===1,onClick:function(){function I(){return C("set_tab",{tab:1})}return I}(),children:"Airlock Types"}),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:v===2,icon:"list",onClick:function(){function I(){return C("set_tab",{tab:2})}return I}(),children:"Airlock Access"})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:v===1?(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Types",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m,{check_number:0})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,m,{check_number:1})})]})}):v===2&&p?(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Access",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock-open",content:"Unlock",onClick:function(){function I(){return C("set_lock",{new_lock:"unlock"})}return I}()}),children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",align:"center",color:"label",children:[(0,e.createComponentVNode)(2,t.Icon,{name:"lock",size:"5",mb:3}),(0,e.createVNode)(1,"br"),"Airlock access selection is currently locked."]})})}):(0,e.createComponentVNode)(2,b.AccessList,{sectionButtons:(0,e.createComponentVNode)(2,t.Button,{icon:"lock",content:"Lock",onClick:function(){function I(){return C("set_lock",{new_lock:"lock"})}return I}()}),usedByRcd:1,rcdButtons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:N,content:"One",onClick:function(){function I(){return C("set_one_access",{access:"one"})}return I}()}),(0,e.createComponentVNode)(2,t.Button.Checkbox,{checked:!N,width:4,content:"All",onClick:function(){function I(){return C("set_one_access",{access:"all"})}return I}()})],4),accesses:S,selectedList:V,accessMod:function(){function I(L){return C("set",{access:L})}return I}(),grantAll:function(){function I(){return C("grant_all")}return I}(),denyAll:function(){function I(){return C("clear_all")}return I}(),grantDep:function(){function I(L){return C("grant_region",{region:L})}return I}(),denyDep:function(){function I(L){return C("deny_region",{region:L})}return I}()})})],4)},m=function(u,s){for(var d=(0,a.useBackend)(s),C=d.act,h=d.data,v=h.door_types_ui_list,p=h.door_type,N=u.check_number,V=[],S=0;Sf?w=(0,e.createComponentVNode)(2,t.Box,{color:"red",bold:!0,mb:1,children:"There are new messages"}):w=(0,e.createComponentVNode)(2,t.Box,{color:"label",mb:1,children:"There are no new messages"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Main Menu",buttons:(0,e.createComponentVNode)(2,t.Button,{width:9,content:L?"Speaker Off":"Speaker On",selected:!L,icon:L?"volume-mute":"volume-up",onClick:function(){function A(){return N("toggleSilent")}return A}()}),children:[w,(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Messages",icon:S>f?"envelope-open-text":"envelope",onClick:function(){function A(){return N("setScreen",{setScreen:6})}return A}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Assistance",icon:"hand-paper",onClick:function(){function A(){return N("setScreen",{setScreen:1})}return A}()}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Supplies",icon:"box",onClick:function(){function A(){return N("setScreen",{setScreen:2})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Request Secondary Goal",icon:"clipboard-list",onClick:function(){function A(){return N("setScreen",{setScreen:11})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Relay Anonymous Information",icon:"comment",onClick:function(){function A(){return N("setScreen",{setScreen:3})}return A}()})]})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Print Shipping Label",icon:"tag",onClick:function(){function A(){return N("setScreen",{setScreen:9})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){function A(){return N("setScreen",{setScreen:10})}return A}()})]})}),!!I&&(0,e.createComponentVNode)(2,t.Stack.Item,{mt:1,children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,translucent:!0,lineHeight:3,content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){function A(){return N("setScreen",{setScreen:8})}return A}()})})]})})},i=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.department,I=[],L;switch(h.purpose){case"ASSISTANCE":I=V.assist_dept,L="Request assistance from another department";break;case"SUPPLIES":I=V.supply_dept,L="Request supplies from another department";break;case"INFO":I=V.info_dept,L="Relay information to another department";break}return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:L,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return N("setScreen",{setScreen:0})}return w}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:I.filter(function(w){return w!==S}).map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Message",icon:"envelope",onClick:function(){function A(){return N("writeInput",{write:w,priority:y})}return A}()}),(0,e.createComponentVNode)(2,t.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){function A(){return N("writeInput",{write:w,priority:B})}return A}()})]},w)})})})})},c=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S;switch(h.type){case"SUCCESS":S="Message sent successfully";break;case"FAIL":S="Unable to contact messaging server";break}return(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:S,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function I(){return N("setScreen",{setScreen:0})}return I}()})})},m=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S,I;switch(h.type){case"MESSAGES":S=V.message_log,I="Message Log";break;case"SHIPPING":S=V.shipping_log,I="Shipping label print log";break}return S.reverse(),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:I,buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return N("setScreen",{setScreen:0})}return L}()}),children:S.map(function(L){return(0,e.createComponentVNode)(2,t.Box,{textAlign:"left",children:[L.map(function(w,A){return(0,e.createVNode)(1,"div",null,w,0,null,A)}),(0,e.createVNode)(1,"hr")]},L)})})})},l=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.recipient,I=V.message,L=V.msgVerified,w=V.msgStamped;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Message Authentication",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function A(){return N("setScreen",{setScreen:0})}return A}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Recipient",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Message",children:I}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",color:"green",children:L}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stamped by",color:"blue",children:w})]})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){function A(){return N("department",{department:S})}return A}()})})})],4)},u=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.message,I=V.announceAuth;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Station-Wide Announcement",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return N("setScreen",{setScreen:0})}return L}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Edit Message",icon:"edit",onClick:function(){function L(){return N("writeAnnouncement")}return L}()})],4),children:S})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(I&&S),onClick:function(){function L(){return N("sendAnnouncement")}return L}()})]})})],4)},s=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.shipDest,I=V.msgVerified,L=V.ship_dept;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{textAlign:"center",children:(0,e.createComponentVNode)(2,t.Section,{title:"Print Shipping Label",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function w(){return N("setScreen",{setScreen:0})}return w}()}),children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Destination",children:S}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Validated by",children:I})]}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(S&&I),onClick:function(){function w(){return N("printLabel")}return w}()})]})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Destinations",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:L.map(function(w){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:w,textAlign:"right",className:"candystripe",children:(0,e.createComponentVNode)(2,t.Button,{content:S===w?"Selected":"Select",selected:S===w,onClick:function(){function A(){return N("shipSelect",{shipSelect:w})}return A}()})},w)})})})})],4)},d=function(h,v){var p=(0,a.useBackend)(v),N=p.act,V=p.data,S=V.secondaryGoalAuth,I=V.secondaryGoalEnabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Request Secondary Goal",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Back",icon:"arrow-left",onClick:function(){function L(){return N("setScreen",{setScreen:0})}return L}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:[I?S?(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"green",children:"ID verified. Authentication accepted."}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Swipe your ID card to authenticate yourself"}):(0,e.createComponentVNode)(2,t.Box,{textAlign:"center",color:"label",children:"Complete your current goal first!"}),(0,e.createComponentVNode)(2,t.Button,{fluid:!0,mt:2,textAlign:"center",content:"Request Secondary Goal",icon:"clipboard-list",disabled:!(S&&I),onClick:function(){function L(){return N("requestSecondaryGoal")}return L}()})]})})],4)}},9861:function(T,r,n){"use strict";r.__esModule=!0,r.RndBackupConsole=r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.RndBackupConsole=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.network_name,l=c.has_disk,u=c.disk_name,s=c.linked,d=c.techs,C=c.last_timestamp;return(0,e.createComponentVNode)(2,o.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Device Info",children:[(0,e.createComponentVNode)(2,t.Box,{mb:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Network",children:s?(0,e.createComponentVNode)(2,t.Button,{content:m,icon:"unlink",selected:1,onClick:function(){function h(){return i("unlink")}return h}()}):"None"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Loaded Disk",children:l?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u+" (Last backup: "+C+")",icon:"save",selected:1,onClick:function(){function h(){return i("eject_disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Save all",onClick:function(){function h(){return i("saveall2disk")}return h}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load all",onClick:function(){function h(){return i("saveall2network")}return h}()})],4):"None"})]})}),!!s||(0,e.createComponentVNode)(2,b)]}),(0,e.createComponentVNode)(2,t.Box,{mt:2,children:(0,e.createComponentVNode)(2,t.Section,{title:"Tech Info",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Tech Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Disk Level"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actions"})]}),Object.keys(d).map(function(h){return!(d[h].network_level>0||d[h].disk_level>0)||(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].name}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].network_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:d[h].disk_level||"None"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Load to network",disabled:!l||!s,onClick:function(){function v(){return i("savetech2network",{tech:h})}return v}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Load to disk",disabled:!l||!s,onClick:function(){function v(){return i("savetech2disk",{tech:h})}return v}()})]})]},h)})]})})})]})})}return y}(),b=r.LinkMenu=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.controllers;return(0,e.createComponentVNode)(2,t.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),m.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function u(){return i("linktonetworkcontroller",{target_controller:l.addr})}return u}()})})]},l.addr)})]})})}return y}()},68303:function(T,r,n){"use strict";r.__esModule=!0,r.AnalyzerMenu=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=r.AnalyzerMenu=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.data,c=g.act,m=i.tech_levels,l=i.loaded_item,u=i.linked_analyzer,s=i.can_discover;return u?l?(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Object Analysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{content:"Deconstruct",icon:"microscope",onClick:function(){function d(){c("deconstruct")}return d}()}),(0,e.createComponentVNode)(2,o.Button,{content:"Eject",icon:"eject",onClick:function(){function d(){c("eject_item")}return d}()}),!s||(0,e.createComponentVNode)(2,o.Button,{content:"Discover",icon:"atom",onClick:function(){function d(){c("discover")}return d}()})],0),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:l.name})})}),(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Current Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Object Level"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"New Level"})]}),m.map(function(d){return(0,e.createComponentVNode)(2,b,{techLevel:d},d.id)})]})})],4):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"No item loaded. Standing by..."}):(0,e.createComponentVNode)(2,o.Section,{title:"Analysis Menu",children:"NO SCIENTIFIC ANALYZER LINKED TO CONSOLE"})}return y}(),b=function(B,k){var g=B.techLevel,i=g.name,c=g.desc,m=g.level,l=g.object_level,u=g.ui_icon,s=l!=null,d=s&&l>=m?Math.max(l,m+1):m;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:c})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:u})," ",i]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m}),s?(0,e.createComponentVNode)(2,o.Table.Cell,{children:l}):(0,e.createComponentVNode)(2,o.Table.Cell,{className:"research-level-no-effect",children:"-"}),(0,e.createComponentVNode)(2,o.Table.Cell,{className:(0,a.classes)([d!==m&&"upgraded-level"]),children:d})]})}},37556:function(T,r,n){"use strict";r.__esModule=!0,r.DataDiskMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o="design",f="tech",b=function(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.act,d=u.disk_data;return d?(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:d.name}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Level",children:d.level}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:d.desc})]}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function C(){return s("updt_tech")}return C}()})})]}):null},y=function(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.act,d=u.disk_data;if(!d)return null;var C=d.name,h=d.lathe_types,v=d.materials,p=h.join(", ");return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name",children:C}),p?(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Lathe Types",children:p}):null,(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Required Materials"})]}),v.map(function(N){return(0,e.createComponentVNode)(2,t.Box,{children:["- ",(0,e.createVNode)(1,"span",null,N.name,0,{style:{"text-transform":"capitalize"}})," x ",N.amount]},N.name)}),(0,e.createComponentVNode)(2,t.Box,{mt:"10px",children:(0,e.createComponentVNode)(2,t.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){function N(){return s("updt_design")}return N}()})})]})},B=function(c,m){var l=(0,a.useBackend)(m),u=l.act,s=l.data,d=s.disk_data;return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.Section,Object.assign({buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button.Confirm,{content:"Erase",icon:"eraser",disabled:!d,onClick:function(){function C(){return u("erase_disk")}return C}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",icon:"eject",onClick:function(){function C(){u("eject_disk")}return C}()})],4)},c)))},k=function(c,m){var l=(0,a.useBackend)(m),u=l.data,s=l.act,d=u.disk_type,C=u.to_copy,h=c.title;return(0,e.createComponentVNode)(2,B,{title:h,children:(0,e.createComponentVNode)(2,t.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:C.sort(function(v,p){return v.name.localeCompare(p.name)}).map(function(v){var p=v.name,N=v.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{noColon:!0,label:p,children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){function V(){d===f?s("copy_tech",{id:N}):s("copy_design",{id:N})}return V}()})},N)})})})})},g=r.DataDiskMenu=function(){function i(c,m){var l=(0,a.useBackend)(m),u=l.data,s=u.disk_type,d=u.disk_data;if(!s)return(0,e.createComponentVNode)(2,t.Section,{title:"Data Disk",children:"No disk loaded."});switch(s){case o:return d?(0,e.createComponentVNode)(2,B,{title:"Design Disk",children:(0,e.createComponentVNode)(2,y)}):(0,e.createComponentVNode)(2,k,{title:"Design Disk"});case f:return d?(0,e.createComponentVNode)(2,B,{title:"Technology Disk",children:(0,e.createComponentVNode)(2,b)}):(0,e.createComponentVNode)(2,k,{title:"Technology Disk"});default:return(0,e.createFragment)([(0,e.createTextVNode)("UNRECOGNIZED DISK TYPE")],4)}}return i}()},16830:function(T,r,n){"use strict";r.__esModule=!0,r.LatheCategory=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),f=r.LatheCategory=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.data,i=k.act,c=g.category,m=g.matching_designs,l=g.menu,u=l===4,s=u?"build":"imprint";return(0,e.createComponentVNode)(2,t.Section,{title:c,children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,t.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:m.map(function(d){var C=d.id,h=d.name,v=d.can_build,p=d.materials;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:h,disabled:v<1,onClick:function(){function N(){return i(s,{id:C,amount:1})}return N}()})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=5?(0,e.createComponentVNode)(2,t.Button,{content:"x5",onClick:function(){function N(){return i(s,{id:C,amount:5})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:v>=10?(0,e.createComponentVNode)(2,t.Button,{content:"x10",onClick:function(){function N(){return i(s,{id:C,amount:10})}return N}()}):null}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:p.map(function(N){return(0,e.createFragment)([" | ",(0,e.createVNode)(1,"span",N.is_red?"color-red":null,[N.amount,(0,e.createTextVNode)(" "),N.name],0)],0)})})]},C)})})]})}return b}()},70497:function(T,r,n){"use strict";r.__esModule=!0,r.LatheChemicalStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheChemicalStorage=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=B.act,i=k.loaded_chemicals,c=k.menu===4;return(0,e.createComponentVNode)(2,t.Section,{title:"Chemical Storage",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Purge All",icon:"trash",onClick:function(){function m(){var l=c?"disposeallP":"disposeallI";g(l)}return m}()}),(0,e.createComponentVNode)(2,t.LabeledList,{children:i.map(function(m){var l=m.volume,u=m.name,s=m.id;return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"* "+l+" of "+u,children:(0,e.createComponentVNode)(2,t.Button,{content:"Purge",icon:"trash",onClick:function(){function d(){var C=c?"disposeP":"disposeI";g(C,{id:s})}return d}()})},s)})})]})}return f}()},70864:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMainMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(52662),f=n(68198),b=r.LatheMainMenu=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.data,c=g.act,m=i.menu,l=i.categories,u=m===4?"Protolathe":"Circuit Imprinter";return(0,e.createComponentVNode)(2,t.Section,{title:u+" Menu",children:[(0,e.createComponentVNode)(2,o.LatheMaterials),(0,e.createComponentVNode)(2,f.LatheSearch),(0,e.createComponentVNode)(2,t.Divider),(0,e.createComponentVNode)(2,t.Flex,{wrap:"wrap",children:l.map(function(s){return(0,e.createComponentVNode)(2,t.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-right",content:s,onClick:function(){function d(){c("setCategory",{category:s})}return d}()})},s)})})]})}return y}()},42878:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterialStorage=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterialStorage=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=B.act,i=k.loaded_materials;return(0,e.createComponentVNode)(2,t.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,e.createComponentVNode)(2,t.Table,{children:i.map(function(c){var m=c.id,l=c.amount,u=c.name,s=function(){function v(p){var N=k.menu===4?"lathe_ejectsheet":"imprinter_ejectsheet";g(N,{id:m,amount:p})}return v}(),d=Math.floor(l/2e3),C=l<1,h=d===1?"":"s";return(0,e.createComponentVNode)(2,t.Table.Row,{className:C?"color-grey":"color-yellow",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"210px",children:["* ",l," of ",u]}),(0,e.createComponentVNode)(2,t.Table.Cell,{minWidth:"110px",children:["(",d," sheet",h,")"]}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l>=2e3?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:"1x",icon:"eject",onClick:function(){function v(){return s(1)}return v}()}),(0,e.createComponentVNode)(2,t.Button,{content:"C",icon:"eject",onClick:function(){function v(){return s("custom")}return v}()}),l>=2e3*5?(0,e.createComponentVNode)(2,t.Button,{content:"5x",icon:"eject",onClick:function(){function v(){return s(5)}return v}()}):null,(0,e.createComponentVNode)(2,t.Button,{content:"All",icon:"eject",onClick:function(){function v(){return s(50)}return v}()})],0):null})]},m)})})})}return f}()},52662:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMaterials=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheMaterials=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.data,g=k.total_materials,i=k.max_materials,c=k.max_chemicals,m=k.total_chemicals;return(0,e.createComponentVNode)(2,t.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,e.createComponentVNode)(2,t.Table,{width:"auto",children:[(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:g}),i?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+i}):null]}),(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:m}),c?(0,e.createComponentVNode)(2,t.Table.Cell,{children:" / "+c}):null]})]})})}return f}()},9681:function(T,r,n){"use strict";r.__esModule=!0,r.LatheMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(12644),f=n(70864),b=n(16830),y=n(42878),B=n(70497),k=["menu"];function g(u,s){if(u==null)return{};var d={};for(var C in u)if({}.hasOwnProperty.call(u,C)){if(s.includes(C))continue;d[C]=u[C]}return d}var i=t.Tabs.Tab,c=function(s,d){var C=(0,a.useBackend)(d),h=C.act,v=C.data,p=v.menu===o.MENU.LATHE?["nav_protolathe",v.submenu_protolathe]:["nav_imprinter",v.submenu_imprinter],N=p[0],V=p[1],S=s.menu,I=g(s,k);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,i,Object.assign({selected:V===S,onClick:function(){function L(){return h(N,{menu:S})}return L}()},I)))},m=function(s){switch(s){case o.PRINTER_MENU.MAIN:return(0,e.createComponentVNode)(2,f.LatheMainMenu);case o.PRINTER_MENU.SEARCH:return(0,e.createComponentVNode)(2,b.LatheCategory);case o.PRINTER_MENU.MATERIALS:return(0,e.createComponentVNode)(2,y.LatheMaterialStorage);case o.PRINTER_MENU.CHEMICALS:return(0,e.createComponentVNode)(2,B.LatheChemicalStorage)}},l=r.LatheMenu=function(){function u(s,d){var C=(0,a.useBackend)(d),h=C.data,v=h.menu,p=h.linked_lathe,N=h.linked_imprinter;return v===o.MENU.LATHE&&!p?(0,e.createComponentVNode)(2,t.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"}):v===o.MENU.IMPRINTER&&!N?(0,e.createComponentVNode)(2,t.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MAIN,icon:"bars",children:"Main Menu"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.MATERIALS,icon:"layer-group",children:"Materials"}),(0,e.createComponentVNode)(2,c,{menu:o.PRINTER_MENU.CHEMICALS,icon:"flask-vial",children:"Chemicals"})]}),m(h.menu===o.MENU.LATHE?h.submenu_protolathe:h.submenu_imprinter)]})}return u}()},68198:function(T,r,n){"use strict";r.__esModule=!0,r.LatheSearch=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LatheSearch=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act;return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Input,{placeholder:"Search...",onEnter:function(){function g(i,c){return k("search",{to_search:c})}return g}()})})}return f}()},81421:function(T,r,n){"use strict";r.__esModule=!0,r.LinkMenu=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),f=r.LinkMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.controllers;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{title:"Setup Linkage",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),c.map(function(m){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.addr}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:m.net_id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function l(){return g("linktonetworkcontroller",{target_controller:m.addr})}return l}()})})]},m.addr)})]})})})})}return b}()},6256:function(T,r,n){"use strict";r.__esModule=!0,r.SettingsMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.SettingsMenu=function(){function y(B,k){return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,f),(0,e.createComponentVNode)(2,b)]})}return y}(),f=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.sync,l=c.admin;return(0,e.createComponentVNode)(2,t.Section,{title:"Settings",children:(0,e.createComponentVNode)(2,t.Flex,{direction:"column",align:"flex-start",children:(0,e.createComponentVNode)(2,t.Button,{color:"red",icon:"unlink",content:"Disconnect from Research Network",onClick:function(){function u(){i("unlink")}return u}()})})})},b=function(B,k){var g=(0,a.useBackend)(k),i=g.data,c=g.act,m=i.linked_analyzer,l=i.linked_lathe,u=i.linked_imprinter;return(0,e.createComponentVNode)(2,t.Section,{title:"Linked Devices",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){function s(){return c("find_device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Scientific Analyzer",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!m,content:m?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"analyze"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Protolathe",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!l,content:l?"Unlink":"Undetected",onClick:function(){function s(){c("disconnect",{item:"lathe"})}return s}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Circuit Imprinter",children:(0,e.createComponentVNode)(2,t.Button,{icon:"unlink",disabled:!u,content:u?"Unlink":"Undetected",onClick:function(){function s(){return c("disconnect",{item:"imprinter"})}return s}()})})]})})}},12644:function(T,r,n){"use strict";r.__esModule=!0,r.RndConsole=r.PRINTER_MENU=r.MENU=void 0;var e=n(89005),a=n(72253),t=n(98595),o=n(36036),f=n(35840),b=n(37556),y=n(9681),B=n(81421),k=n(6256),g=n(68303),i=["menu"];function c(p,N){if(p==null)return{};var V={};for(var S in p)if({}.hasOwnProperty.call(p,S)){if(N.includes(S))continue;V[S]=p[S]}return V}var m=o.Tabs.Tab,l=r.MENU={MAIN:0,DISK:2,ANALYZE:3,LATHE:4,IMPRINTER:5,SETTINGS:6},u=r.PRINTER_MENU={MAIN:0,SEARCH:1,MATERIALS:2,CHEMICALS:3},s=function(N){switch(N){case l.MAIN:return(0,e.createComponentVNode)(2,v);case l.DISK:return(0,e.createComponentVNode)(2,b.DataDiskMenu);case l.ANALYZE:return(0,e.createComponentVNode)(2,g.AnalyzerMenu);case l.LATHE:case l.IMPRINTER:return(0,e.createComponentVNode)(2,y.LatheMenu);case l.SETTINGS:return(0,e.createComponentVNode)(2,k.SettingsMenu);default:return"UNKNOWN MENU"}},d=function(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data,w=L.menu,A=N.menu,x=c(N,i);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,m,Object.assign({selected:w===A,onClick:function(){function E(){return I("nav",{menu:A})}return E}()},x)))},C=r.RndConsole=function(){function p(N,V){var S=(0,a.useBackend)(V),I=S.act,L=S.data;if(!L.linked)return(0,e.createComponentVNode)(2,B.LinkMenu);var w=L.menu,A=L.linked_analyzer,x=L.linked_lathe,E=L.linked_imprinter,P=L.wait_message;return(0,e.createComponentVNode)(2,t.Window,{width:800,height:550,children:(0,e.createComponentVNode)(2,t.Window.Content,{children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,d,{icon:"flask",menu:l.MAIN,children:"Research"}),!!A&&(0,e.createComponentVNode)(2,d,{icon:"microscope",menu:l.ANALYZE,children:"Analyze"}),!!x&&(0,e.createComponentVNode)(2,d,{icon:"print",menu:l.LATHE,children:"Protolathe"}),!!E&&(0,e.createComponentVNode)(2,d,{icon:"memory",menu:l.IMPRINTER,children:"Imprinter"}),(0,e.createComponentVNode)(2,d,{icon:"floppy-disk",menu:l.DISK,children:"Disk"}),(0,e.createComponentVNode)(2,d,{icon:"cog",menu:l.SETTINGS,children:"Settings"})]}),s(w),(0,e.createComponentVNode)(2,h)]})})})}return p}(),h=function(N,V){var S=(0,a.useBackend)(V),I=S.data,L=I.wait_message;return L?(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay",children:(0,e.createComponentVNode)(2,o.Box,{className:"RndConsole__Overlay__Wrapper",children:(0,e.createComponentVNode)(2,o.NoticeBox,{color:"black",children:L})})}):null},v=function(N,V){var S=(0,a.useBackend)(V),I=S.data,L=I.tech_levels;return(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.Table,{id:"research-levels",children:[(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Research Field"}),(0,e.createComponentVNode)(2,o.Table.Cell,{header:!0,children:"Level"})]}),L.map(function(w){var A=w.id,x=w.name,E=w.desc,P=w.level,D=w.ui_icon;return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{icon:"circle-info",tooltip:E})}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:D})," ",x]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:P})]},A)})]})})}},29205:function(T,r,n){"use strict";r.__esModule=!0,r.RndNetController=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=r.RndNetController=function(){function k(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=l.ion,s=(0,t.useLocalState)(i,"mainTabIndex",0),d=s[0],C=s[1],h=function(){function v(p){switch(p){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return v}();return(0,e.createComponentVNode)(2,f.Window,{width:900,height:600,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"wrench",selected:d===0,onClick:function(){function v(){return C(0)}return v}(),children:"Network Management"},"ConfigPage"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"floppy-disk",selected:d===1,onClick:function(){function v(){return C(1)}return v}(),children:"Design Management"},"DesignPage")]}),h(d)]})})}return k}(),y=function(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=(0,t.useLocalState)(i,"filterType","ALL"),s=u[0],d=u[1],C=l.network_password,h=l.network_name,v=l.devices,p=[];p.push(s),s==="MSC"&&(p.push("BCK"),p.push("PGN"));var N=s==="ALL"?v:v.filter(function(V){return p.indexOf(V.dclass)>-1});return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Section,{title:"Network Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Name",children:(0,e.createComponentVNode)(2,o.Button,{content:h||"Unset",selected:h,icon:"edit",onClick:function(){function V(){return m("network_name")}return V}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Network Password",children:(0,e.createComponentVNode)(2,o.Button,{content:C||"Unset",selected:C,icon:"lock",onClick:function(){function V(){return m("network_password")}return V}()})})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Connected Devices",children:[(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="ALL",onClick:function(){function V(){return d("ALL")}return V}(),icon:"network-wired",children:"All Devices"},"AllDevices"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="SRV",onClick:function(){function V(){return d("SRV")}return V}(),icon:"server",children:"R&D Servers"},"RNDServers"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="RDC",onClick:function(){function V(){return d("RDC")}return V}(),icon:"desktop",children:"R&D Consoles"},"RDConsoles"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MFB",onClick:function(){function V(){return d("MFB")}return V}(),icon:"industry",children:"Exosuit Fabricators"},"Mechfabs"),(0,e.createComponentVNode)(2,o.Tabs.Tab,{selected:s==="MSC",onClick:function(){function V(){return d("MSC")}return V}(),icon:"microchip",children:"Miscellaneous Devices"},"Misc")]}),(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device Name"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Device ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Unlink"})]}),N.map(function(V){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.name}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:V.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function S(){return m("unlink_device",{dclass:V.dclass,uid:V.id})}return S}()})})]},V.id)})]})]})],4)},B=function(g,i){var c=(0,t.useBackend)(i),m=c.act,l=c.data,u=l.designs,s=(0,t.useLocalState)(i,"searchText",""),d=s[0],C=s[1];return(0,e.createComponentVNode)(2,o.Section,{title:"Design Management",children:[(0,e.createComponentVNode)(2,o.Input,{fluid:!0,placeholder:"Search for designs",mb:2,onInput:function(){function h(v,p){return C(p)}return h}()}),u.filter((0,a.createSearch)(d,function(h){return h.name})).map(function(h){return(0,e.createComponentVNode)(2,o.Button.Checkbox,{fluid:!0,content:h.name,checked:!h.blacklisted,onClick:function(){function v(){return m(h.blacklisted?"unblacklist_design":"blacklist_design",{d_uid:h.uid})}return v}()},h.name)})]})}},63315:function(T,r,n){"use strict";r.__esModule=!0,r.RndServer=void 0;var e=n(89005),a=n(72253),t=n(44879),o=n(36036),f=n(98595),b=r.RndServer=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.active,s=l.network_name;return(0,e.createComponentVNode)(2,f.Window,{width:600,height:500,resizable:!0,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,o.Section,{title:"Server Configuration",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Machine power",children:(0,e.createComponentVNode)(2,o.Button,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return m("toggle_active")}return d}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Link status",children:s===null?(0,e.createComponentVNode)(2,o.Box,{color:"red",children:"Unlinked"}):(0,e.createComponentVNode)(2,o.Box,{color:"green",children:"Linked"})})]})}),s===null?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)]})})}return k}(),y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.network_name;return(0,e.createComponentVNode)(2,o.Section,{title:"Network Info",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Connected network ID",children:u}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,o.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function s(){return m("unlink")}return s}()})})]})})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.controllers;return(0,e.createComponentVNode)(2,o.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,o.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,o.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:"Link"})]}),u.map(function(s){return(0,e.createComponentVNode)(2,o.Table.Row,{children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:s.netname}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{content:"Link",icon:"link",onClick:function(){function d(){return m("link",{addr:s.addr})}return d}()})})]},s.addr)})]})})}},26109:function(T,r,n){"use strict";r.__esModule=!0,r.RobotSelfDiagnosis=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(25328),b=function(k,g){var i=k/g;return i<=.2?"good":i<=.5?"average":"bad"},y=r.RobotSelfDiagnosis=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.data,m=c.component_data;return(0,e.createComponentVNode)(2,o.Window,{width:280,height:480,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:m.map(function(l,u){return(0,e.createComponentVNode)(2,t.Section,{title:(0,f.capitalize)(l.name),children:l.installed<=0?(0,e.createComponentVNode)(2,t.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",children:(0,e.createComponentVNode)(2,t.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:l.installed===-1?"Destroyed":"Missing"})})}):(0,e.createComponentVNode)(2,t.Flex,{children:[(0,e.createComponentVNode)(2,t.Flex.Item,{width:"72%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Brute Damage",color:b(l.brute_damage,l.max_damage),children:l.brute_damage}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Burn Damage",color:b(l.electronic_damage,l.max_damage),children:l.electronic_damage})]})}),(0,e.createComponentVNode)(2,t.Flex.Item,{width:"50%",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Powered",color:l.powered?"good":"bad",children:l.powered?"Yes":"No"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Enabled",color:l.status?"good":"bad",children:l.status?"Yes":"No"})]})})]})},u)})})})}return B}()},97997:function(T,r,n){"use strict";r.__esModule=!0,r.RoboticsControlConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.RoboticsControlConsole=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.can_hack,l=c.safety,u=c.show_lock_all,s=c.cyborgs,d=s===void 0?[]:s;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:460,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[!!u&&(0,e.createComponentVNode)(2,t.Section,{title:"Emergency Lock Down",children:[(0,e.createComponentVNode)(2,t.Button,{icon:l?"lock":"unlock",content:l?"Disable Safety":"Enable Safety",selected:l,onClick:function(){function C(){return i("arm",{})}return C}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"lock",disabled:l,content:"Lock ALL Cyborgs",color:"bad",onClick:function(){function C(){return i("masslock",{})}return C}()})]}),(0,e.createComponentVNode)(2,b,{cyborgs:d,can_hack:m})]})})}return y}(),b=function(B,k){var g=B.cyborgs,i=B.can_hack,c=(0,a.useBackend)(k),m=c.act,l=c.data,u="Detonate";return l.detonate_cooldown>0&&(u+=" ("+l.detonate_cooldown+"s)"),g.length?g.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,buttons:(0,e.createFragment)([!!s.hackable&&!s.emagged&&(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){function d(){return m("hackbot",{uid:s.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:s.locked_down?"unlock":"lock",color:s.locked_down?"good":"default",content:s.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){function d(){return m("stopbot",{uid:s.uid})}return d}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"bomb",content:u,disabled:!l.auth||l.detonate_cooldown>0,color:"bad",onClick:function(){function d(){return m("killbot",{uid:s.uid})}return d}()})],0),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Box,{color:s.status?"bad":s.locked_down?"average":"good",children:s.status?"Not Responding":s.locked_down?"Locked Down":"Nominal"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:(0,e.createComponentVNode)(2,t.Box,{children:s.locstring})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.health>50?"good":"bad",value:s.health/100})}),typeof s.charge=="number"&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Charge",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:s.charge>30?"good":"bad",value:s.charge/100})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell Capacity",children:(0,e.createComponentVNode)(2,t.Box,{color:s.cell_capacity<3e4?"average":"good",children:s.cell_capacity})})],4)||(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cell",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"No Power Cell"})}),!!s.is_hacked&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safeties",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"DISABLED"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Module",children:s.module}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Master AI",children:(0,e.createComponentVNode)(2,t.Box,{color:s.synchronization?"default":"average",children:s.synchronization||"None"})})]})},s.uid)}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No cyborg units detected within access parameters."})}},54431:function(T,r,n){"use strict";r.__esModule=!0,r.Safe=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Safe=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.dial,s=l.open,d=l.locked,C=l.contents;return(0,e.createComponentVNode)(2,o.Window,{theme:"safe",width:600,height:800,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving",children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,e.createComponentVNode)(2,t.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,e.createVNode)(1,"br"),s?(0,e.createComponentVNode)(2,y):(0,e.createComponentVNode)(2,t.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*u+"deg)","z-index":0}})]}),!s&&(0,e.createComponentVNode)(2,B)]})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.dial,s=l.open,d=l.locked,C=function(v,p){return(0,e.createComponentVNode)(2,t.Button,{disabled:s||p&&!d,icon:"arrow-"+(p?"right":"left"),content:(p?"Right":"Left")+" "+v,iconRight:p,onClick:function(){function N(){return m(p?"turnleft":"turnright",{num:v})}return N}(),style:{"z-index":10}})};return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer",children:[(0,e.createComponentVNode)(2,t.Button,{disabled:d,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){function h(){return m("open")}return h}()}),(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Box,{position:"absolute",children:[C(50),C(10),C(1)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[C(1,!0),C(10,!0),C(50,!0)]}),(0,e.createComponentVNode)(2,t.Box,{className:"Safe--dialer--number",children:u})]})},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.contents;return(0,e.createComponentVNode)(2,t.Box,{className:"Safe--contents",overflow:"auto",children:u.map(function(s,d){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{mb:"0.5rem",onClick:function(){function C(){return m("retrieve",{index:d+1})}return C}(),children:[(0,e.createComponentVNode)(2,t.Box,{as:"img",src:s.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),s.name]}),(0,e.createVNode)(1,"br")],4,s)})})},B=function(g,i){return(0,e.createComponentVNode)(2,t.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,e.createComponentVNode)(2,t.Box,{children:["1. Turn the dial left to the first number.",(0,e.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,e.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,e.createVNode)(1,"br"),"4. Open the safe."]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},29740:function(T,r,n){"use strict";r.__esModule=!0,r.SatelliteControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SatelliteControl=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.satellites,m=i.notice,l=i.meteor_shield,u=i.meteor_shield_coverage,s=i.meteor_shield_coverage_max,d=i.meteor_shield_coverage_percentage;return(0,e.createComponentVNode)(2,o.Window,{width:475,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[l&&(0,e.createComponentVNode)(2,t.Section,{title:"Station Shield Coverage",children:(0,e.createComponentVNode)(2,t.ProgressBar,{color:d>=100?"good":"average",value:u,maxValue:s,children:[d," %"]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Satellite Network Control",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Alert",color:"red",children:i.notice}),c.map(function(C){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"#"+C.id,children:[C.mode," ",(0,e.createComponentVNode)(2,t.Button,{content:C.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){function h(){return g("toggle",{id:C.id})}return h}()})]},C.id)})]})})]})})}return b}()},44162:function(T,r,n){"use strict";r.__esModule=!0,r.SecureStorage=void 0;var e=n(89005),a=n(35840),t=n(72253),o=n(36036),f=n(98595),b=n(36352),y=n(92986),B=r.SecureStorage=function(){function c(m,l){return(0,e.createComponentVNode)(2,f.Window,{theme:"securestorage",height:500,width:280,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,g)})})})})}return c}(),k=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=window.event?m.which:m.keyCode;if(d===y.KEY_ENTER){m.preventDefault(),s("keypad",{digit:"E"});return}if(d===y.KEY_ESCAPE){m.preventDefault(),s("keypad",{digit:"C"});return}if(d===y.KEY_BACKSPACE){m.preventDefault(),s("backspace");return}if(d>=y.KEY_0&&d<=y.KEY_9){m.preventDefault(),s("keypad",{digit:d-y.KEY_0});return}if(d>=y.KEY_NUMPAD_0&&d<=y.KEY_NUMPAD_9){m.preventDefault(),s("keypad",{digit:d-y.KEY_NUMPAD_0});return}},g=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=d.locked,h=d.no_passcode,v=d.emagged,p=d.user_entered_code,N=[["1","2","3"],["4","5","6"],["7","8","9"],["C","0","E"]],V=h?"":C?"bad":"good";return(0,e.createComponentVNode)(2,o.Section,{fill:!0,onKeyDown:function(){function S(I){return k(I,l)}return S}(),children:[(0,e.createComponentVNode)(2,o.Stack.Item,{height:7.3,children:(0,e.createComponentVNode)(2,o.Box,{className:(0,a.classes)(["SecureStorage__displayBox","SecureStorage__displayBox--"+V]),height:"100%",children:v?"ERROR":p})}),(0,e.createComponentVNode)(2,o.Table,{children:N.map(function(S){return(0,e.createComponentVNode)(2,b.TableRow,{children:S.map(function(I){return(0,e.createComponentVNode)(2,b.TableCell,{children:(0,e.createComponentVNode)(2,i,{number:I})},I)})},S[0])})})]})},i=function(m,l){var u=(0,t.useBackend)(l),s=u.act,d=u.data,C=m.number;return(0,e.createComponentVNode)(2,o.Button,{fluid:!0,bold:!0,mb:"6px",content:C,textAlign:"center",fontSize:"60px",lineHeight:1.25,width:"80px",className:(0,a.classes)(["SecureStorage__Button","SecureStorage__Button--keypad","SecureStorage__Button--"+C]),onClick:function(){function h(){return s("keypad",{digit:C})}return h}()})}},6272:function(T,r,n){"use strict";r.__esModule=!0,r.SecurityRecords=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(3939),y=n(321),B=n(5485),k=n(22091),g={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},i=function(p,N){(0,b.modalOpen)(p,"edit",{field:N.edit,value:N.value})},c=r.SecurityRecords=function(){function v(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.loginState,w=I.currentPage,A;if(L.logged_in)w===1?A=(0,e.createComponentVNode)(2,l):w===2&&(A=(0,e.createComponentVNode)(2,d));else return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,B.LoginScreen)})});return(0,e.createComponentVNode)(2,f.Window,{theme:"security",width:800,height:900,children:[(0,e.createComponentVNode)(2,b.ComplexModal),(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,y.LoginInfo),(0,e.createComponentVNode)(2,k.TemporaryNotice),(0,e.createComponentVNode)(2,m),A]})})]})}return v}(),m=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.currentPage,w=I.general;return(0,e.createComponentVNode)(2,o.Stack.Item,{m:0,children:(0,e.createComponentVNode)(2,o.Tabs,{children:[(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"list",selected:L===1,onClick:function(){function A(){return S("page",{page:1})}return A}(),children:"List Records"}),L===2&&w&&!w.empty&&(0,e.createComponentVNode)(2,o.Tabs.Tab,{icon:"file",selected:L===2,children:["Record: ",w.fields[0].value]})]})})},l=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.records,w=(0,t.useLocalState)(N,"searchText",""),A=w[0],x=w[1],E=(0,t.useLocalState)(N,"sortId","name"),P=E[0],D=E[1],M=(0,t.useLocalState)(N,"sortOrder",!0),R=M[0],O=M[1];return(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,s)}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,mt:.5,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,o.Table,{className:"SecurityRecords__list",children:[(0,e.createComponentVNode)(2,o.Table.Row,{bold:!0,children:[(0,e.createComponentVNode)(2,u,{id:"name",children:"Name"}),(0,e.createComponentVNode)(2,u,{id:"id",children:"ID"}),(0,e.createComponentVNode)(2,u,{id:"rank",children:"Assignment"}),(0,e.createComponentVNode)(2,u,{id:"fingerprint",children:"Fingerprint"}),(0,e.createComponentVNode)(2,u,{id:"status",children:"Criminal Status"})]}),L.filter((0,a.createSearch)(A,function(F){return F.name+"|"+F.id+"|"+F.rank+"|"+F.fingerprint+"|"+F.status})).sort(function(F,_){var U=R?1:-1;return F[P].localeCompare(_[P])*U}).map(function(F){return(0,e.createComponentVNode)(2,o.Table.Row,{className:"SecurityRecords__listRow--"+g[F.status],onClick:function(){function _(){return S("view",{uid_gen:F.uid_gen,uid_sec:F.uid_sec})}return _}(),children:[(0,e.createComponentVNode)(2,o.Table.Cell,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user"})," ",F.name]}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.id}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.rank}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.fingerprint}),(0,e.createComponentVNode)(2,o.Table.Cell,{children:F.status})]},F.id)})]})})})],4)},u=function(p,N){var V=(0,t.useLocalState)(N,"sortId","name"),S=V[0],I=V[1],L=(0,t.useLocalState)(N,"sortOrder",!0),w=L[0],A=L[1],x=p.id,E=p.children;return(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Table.Cell,{children:(0,e.createComponentVNode)(2,o.Button,{color:S!==x&&"transparent",fluid:!0,onClick:function(){function P(){S===x?A(!w):(I(x),A(!0))}return P}(),children:[E,S===x&&(0,e.createComponentVNode)(2,o.Icon,{name:w?"sort-up":"sort-down",ml:"0.25rem;"})]})})})},s=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.isPrinting,w=(0,t.useLocalState)(N,"searchText",""),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{ml:"0.25rem",content:"New Record",icon:"plus",onClick:function(){function E(){return S("new_general")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Cell Log",onClick:function(){function E(){return(0,b.modalOpen)(N,"print_cell_log")}return E}()})}),(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",fluid:!0,onInput:function(){function E(P,D){return x(D)}return E}()})})]})},d=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.isPrinting,w=I.general,A=I.security;return!w||!w.fields?(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:"General records lost!"}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"General Data",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:L,icon:L?"spinner":"print",iconSpin:!!L,content:"Print Record",onClick:function(){function x(){return S("print_record")}return x}()}),(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated with this crew member!",tooltipPosition:"bottom-start",content:"Delete Record",onClick:function(){function x(){return S("delete_general")}return x}()})],4),children:(0,e.createComponentVNode)(2,C)})}),!A||!A.fields?(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"pen",content:"Create New Record",onClick:function(){function x(){return S("new_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{bold:!0,grow:!0,textAlign:"center",fontSize:1.75,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon.Stack,{children:[(0,e.createComponentVNode)(2,o.Icon,{name:"scroll",size:5,color:"gray"}),(0,e.createComponentVNode)(2,o.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"Security records lost!"]})})})}):(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Security Data",buttons:(0,e.createComponentVNode)(2,o.Button.Confirm,{icon:"trash",disabled:A.empty,content:"Delete Record",onClick:function(){function x(){return S("delete_security")}return x}()}),children:(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:A.fields.map(function(x,E){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:x.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(x.value),!!x.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:x.line_break?"1rem":"initial",onClick:function(){function P(){return i(N,x)}return P}()})]},E)})})})})}),(0,e.createComponentVNode)(2,h)],4)],0)},C=function(p,N){var V=(0,t.useBackend)(N),S=V.data,I=S.general;return!I||!I.fields?(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,color:"bad",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,children:"General records lost!"})})}):(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,o.LabeledList,{children:I.fields.map(function(L,w){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:L.field,preserveWhitespace:!0,children:[(0,a.decodeHtmlEntities)(""+L.value),!!L.edit&&(0,e.createComponentVNode)(2,o.Button,{icon:"pen",ml:"0.5rem",mb:L.line_break?"1rem":"initial",onClick:function(){function A(){return i(N,L)}return A}()})]},w)})})}),!!I.has_photos&&I.photos.map(function(L,w){return(0,e.createComponentVNode)(2,o.Stack.Item,{inline:!0,textAlign:"center",color:"label",ml:0,children:[(0,e.createVNode)(1,"img",null,null,1,{src:L,style:{width:"96px","margin-top":"5rem","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor","image-rendering":"pixelated"}}),(0,e.createVNode)(1,"br"),"Photo #",w+1]},w)})]})},h=function(p,N){var V=(0,t.useBackend)(N),S=V.act,I=V.data,L=I.security;return(0,e.createComponentVNode)(2,o.Stack.Item,{height:"150px",children:(0,e.createComponentVNode)(2,o.Section,{fill:!0,scrollable:!0,title:"Comments/Log",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:"comment",content:"Add Entry",onClick:function(){function w(){return(0,b.modalOpen)(N,"comment_add")}return w}()}),children:L.comments.length===0?(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No comments found."}):L.comments.map(function(w,A){return(0,e.createComponentVNode)(2,o.Box,{preserveWhitespace:!0,children:[(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:w.header||"Auto-generated"}),(0,e.createVNode)(1,"br"),w.text||w,(0,e.createComponentVNode)(2,o.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){function x(){return S("comment_delete",{id:A+1})}return x}()})]},A)})})})}},5099:function(T,r,n){"use strict";r.__esModule=!0,r.SeedExtractor=void 0;var e=n(89005),a=n(25328),t=n(72253),o=n(36036),f=n(98595),b=n(3939);function y(u,s){var d=typeof Symbol!="undefined"&&u[Symbol.iterator]||u["@@iterator"];if(d)return(d=d.call(u)).next.bind(d);if(Array.isArray(u)||(d=B(u))||s&&u&&typeof u.length=="number"){d&&(u=d);var C=0;return function(){return C>=u.length?{done:!0}:{done:!1,value:u[C++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function B(u,s){if(u){if(typeof u=="string")return k(u,s);var d={}.toString.call(u).slice(8,-1);return d==="Object"&&u.constructor&&(d=u.constructor.name),d==="Map"||d==="Set"?Array.from(u):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?k(u,s):void 0}}function k(u,s){(s==null||s>u.length)&&(s=u.length);for(var d=0,C=Array(s);d=A},h=function(w,A){return w<=A},v=s.split(" "),p=[],N=function(){var w=I.value,A=w.split(":");if(A.length===0)return 0;if(A.length===1)return p.push(function(P){return(P.name+" ("+P.variant+")").toLocaleLowerCase().includes(A[0].toLocaleLowerCase())}),0;if(A.length>2)return{v:function(){function P(D){return!1}return P}()};var x,E=d;if(A[1][A[1].length-1]==="-"?(E=h,x=Number(A[1].substring(0,A[1].length-1))):A[1][A[1].length-1]==="+"?(E=C,x=Number(A[1].substring(0,A[1].length-1))):x=Number(A[1]),isNaN(x))return{v:function(){function P(D){return!1}return P}()};switch(A[0].toLocaleLowerCase()){case"l":case"life":case"lifespan":p.push(function(P){return E(P.lifespan,x)});break;case"e":case"end":case"endurance":p.push(function(P){return E(P.endurance,x)});break;case"m":case"mat":case"maturation":p.push(function(P){return E(P.maturation,x)});break;case"pr":case"prod":case"production":p.push(function(P){return E(P.production,x)});break;case"y":case"yield":p.push(function(P){return E(P.yield,x)});break;case"po":case"pot":case"potency":p.push(function(P){return E(P.potency,x)});break;case"s":case"stock":case"c":case"count":case"a":case"amount":p.push(function(P){return E(P.amount,x)});break;default:return{v:function(){function P(D){return!1}return P}()}}},V,S=y(v),I;!(I=S()).done;)if(V=N(),V!==0&&V)return V.v;return function(L){for(var w=0,A=p;w=1?Number(E):1)}return A}()})]})]})}},2916:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ShuttleConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:150,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Location",children:i.status?i.status:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Missing"})}),!!i.shuttle&&(!!i.docking_ports_len&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Send to ",children:i.docking_ports.map(function(c){return(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-right",content:c.name,onClick:function(){function m(){return g("move",{move:c.id})}return m}()},c.name)})})||(0,e.createFragment)([(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",color:"red",children:(0,e.createComponentVNode)(2,t.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!i.admin_controlled&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Authorization",children:(0,e.createComponentVNode)(2,t.Button,{icon:"exclamation-circle",content:"Request Authorization",disabled:!i.status,onClick:function(){function c(){return g("request")}return c}()})})],0))]})})})})}return b}()},39401:function(T,r,n){"use strict";r.__esModule=!0,r.ShuttleManipulator=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.ShuttleManipulator=function(){function k(g,i){var c=(0,a.useLocalState)(i,"tabIndex",0),m=c[0],l=c[1],u=function(){function s(d){switch(d){case 0:return(0,e.createComponentVNode)(2,b);case 1:return(0,e.createComponentVNode)(2,y);case 2:return(0,e.createComponentVNode)(2,B);default:return"WE SHOULDN'T BE HERE!"}}return s}();return(0,e.createComponentVNode)(2,o.Window,{width:650,height:700,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Box,{fillPositionedParent:!0,children:[(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===0,onClick:function(){function s(){return l(0)}return s}(),icon:"info-circle",children:"Status"},"Status"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===1,onClick:function(){function s(){return l(1)}return s}(),icon:"file-import",children:"Templates"},"Templates"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:m===2,onClick:function(){function s(){return l(2)}return s}(),icon:"tools",children:"Modification"},"Modification")]}),u(m)]})})})}return k}(),b=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.shuttles;return(0,e.createComponentVNode)(2,t.Box,{children:u.map(function(s){return(0,e.createComponentVNode)(2,t.Section,{title:s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"ID",children:s.id}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Timer",children:s.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Mode",children:s.mode}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shuttle Status",children:s.status}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function d(){return m("jump_to",{type:"mobile",id:s.id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){function d(){return m("fast_travel",{id:s.id})}return d}()})]})]})},s.name)})})},y=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.templates_tabs,s=l.existing_shuttle,d=l.templates;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Tabs,{children:u.map(function(C){return(0,e.createComponentVNode)(2,t.Tabs.Tab,{selected:C===s.id,icon:"file",onClick:function(){function h(){return m("select_template_category",{cat:C})}return h}(),children:C},C)})}),!!s&&d[s.id].templates.map(function(C){return(0,e.createComponentVNode)(2,t.Section,{title:C.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[C.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:C.description}),C.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:C.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Load Template",icon:"download",onClick:function(){function h(){return m("select_template",{shuttle_id:C.shuttle_id})}return h}()})})]})},C.name)})]})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.existing_shuttle,s=l.selected;return(0,e.createComponentVNode)(2,t.Box,{children:[u?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: "+u.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:u.status}),u.timer&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Timer",children:u.timeleft}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:(0,e.createComponentVNode)(2,t.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){function d(){return m("jump_to",{type:"mobile",id:u.id})}return d}()})})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Shuttle: None"}),s?(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: "+s.name,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[s.description&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Description",children:s.description}),s.admin_notes&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Admin Notes",children:s.admin_notes}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Preview",icon:"eye",onClick:function(){function d(){return m("preview",{shuttle_id:s.shuttle_id})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Load",icon:"download",onClick:function(){function d(){return m("load",{shuttle_id:s.shuttle_id})}return d}()})]})]})}):(0,e.createComponentVNode)(2,t.Section,{title:"Selected Template: None"})]})}},86013:function(T,r,n){"use strict";r.__esModule=!0,r.SingularityMonitor=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(44879),f=n(72253),b=n(36036),y=n(76910),B=n(98595),k=n(36352),g=r.SingularityMonitor=function(){function l(u,s){var d=(0,f.useBackend)(s),C=d.act,h=d.data;return h.active===0?(0,e.createComponentVNode)(2,c):(0,e.createComponentVNode)(2,m)}return l}(),i=function(u){return Math.log2(16+Math.max(0,u))-4},c=function(u,s){var d=(0,f.useBackend)(s),C=d.act,h=d.data,v=h.singularities,p=v===void 0?[]:v;return(0,e.createComponentVNode)(2,B.Window,{width:450,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,title:"Detected Singularities",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"sync",content:"Refresh",onClick:function(){function N(){return C("refresh")}return N}()}),children:(0,e.createComponentVNode)(2,b.Table,{children:p.map(function(N){return(0,e.createComponentVNode)(2,b.Table.Row,{children:[(0,e.createComponentVNode)(2,b.Table.Cell,{children:N.singularity_id+". "+N.area_name}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,color:"label",children:"Stage:"}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,width:"120px",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N.stage,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(N.stage)})}),(0,e.createComponentVNode)(2,b.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,b.Button,{content:"Details",onClick:function(){function V(){return C("view",{view:N.singularity_id})}return V}()})})]},N.singularity_id)})})})})})},m=function(u,s){var d=(0,f.useBackend)(s),C=d.act,h=d.data,v=h.active,p=h.singulo_stage,N=h.singulo_potential_stage,V=h.singulo_energy,S=h.singulo_high,I=h.singulo_low,L=h.generators,w=L===void 0?[]:L;return(0,e.createComponentVNode)(2,B.Window,{width:550,height:185,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:p,minValue:0,maxValue:6,ranges:{good:[1,2],average:[3,4],bad:[5,6]},children:(0,o.toFixed)(p)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Potential Stage",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N,minValue:0,maxValue:6,ranges:{good:[1,p+.5],average:[p+.5,p+1.5],bad:[p+1.5,p+2]},children:(0,o.toFixed)(N)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Energy",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:V,minValue:I,maxValue:S,ranges:{good:[.67*S+.33*I,S],average:[.33*S+.67*I,.67*S+.33*I],bad:[I,.33*S+.67*I]},children:(0,o.toFixed)(V)+"MJ"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Field Generators",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function A(){return C("back")}return A}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(A){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Remaining Charge",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:A.charge,minValue:0,maxValue:125,ranges:{good:[80,125],average:[30,80],bad:[0,30]},children:(0,o.toFixed)(A.charge)})},A.gen_index)})})})})]})})})}},88284:function(T,r,n){"use strict";r.__esModule=!0,r.Sleeper=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=[["good","Alive"],["average","Critical"],["bad","DEAD"]],y=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],B={average:[.25,.5],bad:[.5,1/0]},k=["bad","average","average","good","average","average","bad"],g=r.Sleeper=function(){function d(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.hasOccupant,S=V?(0,e.createComponentVNode)(2,i):(0,e.createComponentVNode)(2,s);return(0,e.createComponentVNode)(2,f.Window,{width:550,height:760,children:(0,e.createComponentVNode)(2,f.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:S}),(0,e.createComponentVNode)(2,o.Stack.Item,{children:(0,e.createComponentVNode)(2,l)})]})})})}return d}(),i=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.occupant;return(0,e.createFragment)([(0,e.createComponentVNode)(2,c),(0,e.createComponentVNode)(2,m),(0,e.createComponentVNode)(2,u)],4)},c=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.occupant,S=N.auto_eject_dead;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Box,{color:"label",inline:!0,children:"Auto-eject if dead:\xA0"}),(0,e.createComponentVNode)(2,o.Button,{icon:S?"toggle-on":"toggle-off",selected:S,content:S?"On":"Off",onClick:function(){function I(){return p("auto_eject_dead_"+(S?"off":"on"))}return I}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"user-slash",content:"Eject",onClick:function(){function I(){return p("ejectify")}return I}()})],4),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Name",children:V.name}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Health",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxHealth,value:V.health/V.maxHealth,ranges:{good:[.5,1/0],average:[0,.5],bad:[-1/0,0]},children:(0,a.round)(V.health,0)})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Status",color:b[V.stat][0],children:b[V.stat][1]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.maxTemp,value:V.bodyTemperature/V.maxTemp,color:k[V.temperatureSuitability+3],children:[(0,a.round)(V.btCelsius,0),"\xB0C,",(0,a.round)(V.btFaren,0),"\xB0F"]})}),!!V.hasBlood&&(0,e.createFragment)([(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Blood Level",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:V.bloodMax,value:V.bloodLevel/V.bloodMax,ranges:{bad:[-1/0,.6],average:[.6,.9],good:[.6,1/0]},children:[V.bloodPercent,"%, ",V.bloodLevel,"cl"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[V.pulse," BPM"]})],4)]})})},m=function(C,h){var v=(0,t.useBackend)(h),p=v.data,N=p.occupant;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Damage",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:y.map(function(V,S){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:V[0],children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:"100",value:N[V[1]]/100,ranges:B,children:(0,a.round)(N[V[1]],0)},S)},S)})})})},l=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.hasOccupant,S=N.isBeakerLoaded,I=N.beakerMaxSpace,L=N.beakerFreeSpace,w=N.dialysis,A=w&&L>0;return(0,e.createComponentVNode)(2,o.Section,{title:"Dialysis",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,o.Button,{disabled:!S||L<=0||!V,selected:A,icon:A?"toggle-on":"toggle-off",content:A?"Active":"Inactive",onClick:function(){function x(){return p("togglefilter")}return x}()}),(0,e.createComponentVNode)(2,o.Button,{disabled:!S,icon:"eject",content:"Eject",onClick:function(){function x(){return p("removebeaker")}return x}()})],4),children:S?(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Remaining Space",children:(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:L/I,ranges:{good:[.5,1/0],average:[.25,.5],bad:[-1/0,.25]},children:[L,"u"]})})}):(0,e.createComponentVNode)(2,o.Box,{color:"label",children:"No beaker loaded."})})},u=function(C,h){var v=(0,t.useBackend)(h),p=v.act,N=v.data,V=N.occupant,S=N.chemicals,I=N.maxchem,L=N.amounts;return(0,e.createComponentVNode)(2,o.Section,{title:"Occupant Chemicals",children:S.map(function(w,A){var x="",E;return w.overdosing?(x="bad",E=(0,e.createComponentVNode)(2,o.Box,{color:"bad",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-circle"}),"\xA0 Overdosing!"]})):w.od_warning&&(x="average",E=(0,e.createComponentVNode)(2,o.Box,{color:"average",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"exclamation-triangle"}),"\xA0 Close to overdosing"]})),(0,e.createComponentVNode)(2,o.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,e.createComponentVNode)(2,o.Section,{title:w.title,level:"3",mx:"0",lineHeight:"18px",buttons:E,children:(0,e.createComponentVNode)(2,o.Stack,{children:[(0,e.createComponentVNode)(2,o.ProgressBar,{min:"0",max:I,value:w.occ_amount/I,color:x,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[w.pretty_amount,"/",I,"u"]}),L.map(function(P,D){return(0,e.createComponentVNode)(2,o.Button,{disabled:!w.injectable||w.occ_amount+P>I||V.stat===2,icon:"syringe",content:"Inject "+P+"u",title:"Inject "+P+"u of "+w.title+" into the occupant",mb:"0",height:"19px",onClick:function(){function M(){return p("chemical",{chemid:w.id,amount:P})}return M}()},D)})]})})},A)})})},s=function(C,h){return(0,e.createComponentVNode)(2,o.Section,{fill:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,o.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,o.Stack.Item,{grow:!0,align:"center",color:"label",children:[(0,e.createComponentVNode)(2,o.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,e.createVNode)(1,"br"),"No occupant detected."]})})})}},21597:function(T,r,n){"use strict";r.__esModule=!0,r.SlotMachine=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SlotMachine=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;if(i.money===null)return(0,e.createComponentVNode)(2,o.Window,{width:350,height:90,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:"Could not scan your card or could not find account!"}),(0,e.createComponentVNode)(2,t.Box,{children:"Please wear or hold your ID and try again."})]})})});var c;return i.plays===1?c=i.plays+" player has tried their luck today!":c=i.plays+" players have tried their luck today!",(0,e.createComponentVNode)(2,o.Window,{width:300,height:151,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{lineHeight:2,children:c}),(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Credits Remaining",children:(0,e.createComponentVNode)(2,t.AnimatedNumber,{value:i.money})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"10 credits to spin",children:(0,e.createComponentVNode)(2,t.Button,{icon:"coins",disabled:i.working,content:i.working?"Spinning...":"Spin",onClick:function(){function m(){return g("spin")}return m}()})})]}),(0,e.createComponentVNode)(2,t.Box,{bold:!0,lineHeight:2,color:i.resultlvl,children:i.result})]})})})}return b}()},46348:function(T,r,n){"use strict";r.__esModule=!0,r.Smartfridge=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Smartfridge=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.secure,m=i.can_dry,l=i.drying,u=i.contents;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!c&&(0,e.createComponentVNode)(2,t.NoticeBox,{children:"Secure Access: Please have your identification ready."}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m?"Drying rack":"Contents",buttons:!!m&&(0,e.createComponentVNode)(2,t.Button,{width:4,icon:l?"power-off":"times",content:l?"On":"Off",selected:l,onClick:function(){function s(){return g("drying")}return s}()}),children:[!u&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{bold:!0,grow:!0,textAlign:"center",align:"center",color:"average",children:[(0,e.createComponentVNode)(2,t.Icon.Stack,{children:[(0,e.createComponentVNode)(2,t.Icon,{name:"cookie-bite",size:5,color:"brown"}),(0,e.createComponentVNode)(2,t.Icon,{name:"slash",size:5,color:"red"})]}),(0,e.createVNode)(1,"br"),"No products loaded."]})}),!!u&&u.slice().sort(function(s,d){return s.display_name.localeCompare(d.display_name)}).map(function(s){return(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:"55%",children:s.display_name}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:"25%",children:["(",s.quantity," in stock)"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{width:13,children:[(0,e.createComponentVNode)(2,t.Button,{width:3,icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){function d(){return g("vend",{index:s.vend,amount:1})}return d}()}),(0,e.createComponentVNode)(2,t.NumberInput,{width:"40px",minValue:0,value:0,maxValue:s.quantity,step:1,stepPixelSize:3,onChange:function(){function d(C,h){return g("vend",{index:s.vend,amount:h})}return d}()}),(0,e.createComponentVNode)(2,t.Button,{width:4,icon:"arrow-down",content:"All",tooltip:"Dispense all.",tooltipPosition:"bottom-start",onClick:function(){function d(){return g("vend",{index:s.vend,amount:s.quantity})}return d}()})]})]},s)})]})]})})})}return b}()},86162:function(T,r,n){"use strict";r.__esModule=!0,r.Smes=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),f=n(98595),b=1e3,y=r.Smes=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.capacityPercent,u=m.capacity,s=m.charge,d=m.inputAttempt,C=m.inputting,h=m.inputLevel,v=m.inputLevelMax,p=m.inputAvailable,N=m.outputPowernet,V=m.outputAttempt,S=m.outputting,I=m.outputLevel,L=m.outputLevelMax,w=m.outputUsed,A=l>=100&&"good"||C&&"average"||"bad",x=S&&"good"||s>0&&"average"||"bad";return(0,e.createComponentVNode)(2,f.Window,{width:340,height:345,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Stored Energy",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:l*.01,ranges:{good:[.5,1/0],average:[.15,.5],bad:[-1/0,.15]}})}),(0,e.createComponentVNode)(2,t.Section,{title:"Input",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Charge Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:d?"sync-alt":"times",selected:d,onClick:function(){function E(){return c("tryinput")}return E}(),children:d?"Auto":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:A,children:l>=100&&"Fully Charged"||C&&"Charging"||"Not Charging"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Input",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:h===0,onClick:function(){function E(){return c("input",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:h===0,onClick:function(){function E(){return c("input",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:h/b,fillValue:p/b,minValue:0,maxValue:v/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,D){return c("input",{target:D*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:h===v,onClick:function(){function E(){return c("input",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:h===v,onClick:function(){function E(){return c("input",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Available",children:(0,o.formatPower)(p)})]})}),(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Output",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Output Mode",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:V?"power-off":"times",selected:V,onClick:function(){function E(){return c("tryoutput")}return E}(),children:V?"On":"Off"}),children:(0,e.createComponentVNode)(2,t.Box,{color:x,children:N?S?"Sending":s>0?"Not Sending":"No Charge":"Not Connected"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Output",children:(0,e.createComponentVNode)(2,t.Stack,{inline:!0,width:"100%",children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:I===0,onClick:function(){function E(){return c("output",{target:"min"})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"backward",disabled:I===0,onClick:function(){function E(){return c("output",{adjust:-1e4})}return E}()})]}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Slider,{value:I/b,minValue:0,maxValue:L/b,step:5,stepPixelSize:4,format:function(){function E(P){return(0,o.formatPower)(P*b,1)}return E}(),onChange:function(){function E(P,D){return c("output",{target:D*b})}return E}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"forward",disabled:I===L,onClick:function(){function E(){return c("output",{adjust:1e4})}return E}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:I===L,onClick:function(){function E(){return c("output",{target:"max"})}return E}()})]})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Outputting",children:(0,o.formatPower)(w)})]})})]})})})}return B}()},63584:function(T,r,n){"use strict";r.__esModule=!0,r.SolarControl=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SolarControl=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=0,m=1,l=2,u=i.generated,s=i.generated_ratio,d=i.tracking_state,C=i.tracking_rate,h=i.connected_panels,v=i.connected_tracker,p=i.cdir,N=i.direction,V=i.rotating_direction;return(0,e.createComponentVNode)(2,o.Window,{width:490,height:277,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){function S(){return g("refresh")}return S}()}),children:(0,e.createComponentVNode)(2,t.Grid,{children:[(0,e.createComponentVNode)(2,t.Grid.Column,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar tracker",color:v?"good":"bad",children:v?"OK":"N/A"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Solar panels",color:h>0?"good":"bad",children:h})]})}),(0,e.createComponentVNode)(2,t.Grid.Column,{size:2,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power output",children:(0,e.createComponentVNode)(2,t.ProgressBar,{ranges:{good:[.66,1/0],average:[.33,.66],bad:[-1/0,.33]},minValue:0,maxValue:1,value:s,children:u+" W"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[p,"\xB0 (",N,")"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===l&&(0,e.createComponentVNode)(2,t.Box,{children:" Automated "}),d===m&&(0,e.createComponentVNode)(2,t.Box,{children:[" ",C,"\xB0/h (",V,")"," "]}),d===c&&(0,e.createComponentVNode)(2,t.Box,{children:" Tracker offline "})]})]})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Controls",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Panel orientation",children:[d!==l&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:p,onDrag:function(){function S(I,L){return g("cdir",{cdir:L})}return S}()}),d===l&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker status",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Off",selected:d===c,onClick:function(){function S(){return g("track",{track:c})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"clock-o",content:"Timed",selected:d===m,onClick:function(){function S(){return g("track",{track:m})}return S}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sync",content:"Auto",selected:d===l,disabled:!v,onClick:function(){function S(){return g("track",{track:l})}return S}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tracker rotation",children:[d===m&&(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:C,format:function(){function S(I){var L=Math.sign(I)>0?"+":"-";return L+Math.abs(I)}return S}(),onDrag:function(){function S(I,L){return g("tdir",{tdir:L})}return S}()}),d===c&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Tracker offline "}),d===l&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}return b}()},38096:function(T,r,n){"use strict";r.__esModule=!0,r.SpawnersMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SpawnersMenu=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.spawners||[];return(0,e.createComponentVNode)(2,o.Window,{width:700,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Section,{children:c.map(function(m){return(0,e.createComponentVNode)(2,t.Section,{mb:.5,title:m.name+" ("+m.amount_left+" left)",level:2,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){function l(){return g("jump",{ID:m.uids})}return l}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){function l(){return g("spawn",{ID:m.uids})}return l}()})],4),children:[(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:m.desc}),!!m.fluff&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:m.fluff}),!!m.important_info&&(0,e.createComponentVNode)(2,t.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:m.important_info})]},m.name)})})})})}return b}()},30586:function(T,r,n){"use strict";r.__esModule=!0,r.SpecMenu=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SpecMenu=function(){function g(i,c){return(0,e.createComponentVNode)(2,o.Window,{width:1100,height:600,theme:"nologo",children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,y),(0,e.createComponentVNode)(2,B),(0,e.createComponentVNode)(2,k)]})})})}return g}(),b=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Hemomancer",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("hemomancer")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Vampiric claws",16),(0,e.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood Barrier",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood tendrils",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Sanguine pool",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Predator senses",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood eruption",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"The blood bringers rite",16),(0,e.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4)]})})},y=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Umbrae",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("umbrae")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Cloak of darkness",16),(0,e.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow anchor",16),(0,e.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you will do a fake recall, causing a clone to appear at the anchor and making yourself invisible. It will not teleport you between Z levels.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Shadow snare",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensnares the victim. This trap is hard to see, but withers in the light.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Dark passage",16),(0,e.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Extinguish",16),(0,e.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,e.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Eternal darkness",16),(0,e.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. Inside the radius, nearby creatures will freeze and energy projectiles will deal less damage.")],4),(0,e.createVNode)(1,"p",null,"In addition, you also gain permanent X-ray vision.",16)]})})},B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Gargantua",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("gargantua")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rejuvenate",16),(0,e.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell",16),(0,e.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Seismic stomp",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood rush",16),(0,e.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood swell II",16),(0,e.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Overwhelming force",16),(0,e.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you do not have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Demonic grasp",16),(0,e.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Charge",16),(0,e.createTextVNode)(": Unlocked at 800 blood, you gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Desecrated Duel",16),(0,e.createTextVNode)(": Leap towards a visible enemy, creating an arena upon landing, infusing you with increased regeneration, and granting you resistance to internal damages.")],4)]})})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.subclasses;return(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,basis:"25%",children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Dantalion",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Choose",onClick:function(){function d(){return l("dantalion")}return d}()}),children:[(0,e.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Enthrall",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall cap",16),(0,e.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Thrall commune",16),(0,e.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Subspace swap",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Pacify",16),(0,e.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Decoy",16),(0,e.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Rally thralls",16),(0,e.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Blood bond",16),(0,e.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,e.createVNode)(1,"p",null,[(0,e.createVNode)(1,"b",null,"Full Power",16),(0,e.createComponentVNode)(2,t.Divider),(0,e.createVNode)(1,"b",null,"Mass Hysteria",16),(0,e.createTextVNode)(": Casts a powerful illusion that blinds and then makes everyone nearby perceive others as random animals.")],4)]})})}},95152:function(T,r,n){"use strict";r.__esModule=!0,r.StackCraft=void 0;var e=n(89005),a=n(72253),t=n(88510),o=n(64795),f=n(25328),b=n(98595),y=n(36036),B=r.StackCraft=function(){function s(){return(0,e.createComponentVNode)(2,b.Window,{width:350,height:500,children:(0,e.createComponentVNode)(2,b.Window.Content,{children:(0,e.createComponentVNode)(2,k)})})}return s}(),k=function(d,C){var h=(0,a.useBackend)(C),v=h.data,p=v.amount,N=v.recipes,V=(0,a.useLocalState)(C,"searchText",""),S=V[0],I=V[1],L=g(N,(0,f.createSearch)(S)),w=(0,a.useLocalState)(C,"",!1),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,y.Section,{fill:!0,scrollable:!0,title:"Amount: "+p,buttons:(0,e.createFragment)([A&&(0,e.createComponentVNode)(2,y.Input,{width:12.5,value:S,placeholder:"Find recipe",onInput:function(){function E(P,D){return I(D)}return E}()}),(0,e.createComponentVNode)(2,y.Button,{ml:.5,tooltip:"Search",tooltipPosition:"bottom-end",icon:"magnifying-glass",selected:A,onClick:function(){function E(){return x(!A)}return E}()})],0),children:L?(0,e.createComponentVNode)(2,l,{recipes:L}):(0,e.createComponentVNode)(2,y.NoticeBox,{children:"No recipes found!"})})},g=function s(d,C){var h=(0,o.flow)([(0,t.map)(function(v){var p=v[0],N=v[1];return i(N)?C(p)?v:[p,s(N,C)]:C(p)?v:[p,void 0]}),(0,t.filter)(function(v){var p=v[0],N=v[1];return N!==void 0}),(0,t.sortBy)(function(v){var p=v[0],N=v[1];return p}),(0,t.sortBy)(function(v){var p=v[0],N=v[1];return!i(N)}),(0,t.reduce)(function(v,p){var N=p[0],V=p[1];return v[N]=V,v},{})])(Object.entries(d));return Object.keys(h).length?h:void 0},i=function(d){return d.uid===void 0},c=function(d,C){return d.required_amount>C?0:Math.floor(C/d.required_amount)},m=function(d,C){for(var h=(0,a.useBackend)(C),v=h.act,p=d.recipe,N=d.max_possible_multiplier,V=Math.min(N,Math.floor(p.max_result_amount/p.result_amount)),S=[5,10,25],I=[],L=function(){var E=A[w];V>=E&&I.push((0,e.createComponentVNode)(2,y.Button,{bold:!0,translucent:!0,fontSize:.85,width:"32px",content:E*p.result_amount+"x",onClick:function(){function P(){return v("make",{recipe_uid:p.uid,multiplier:E})}return P}()}))},w=0,A=S;w1?I+"x ":"",M=L>1?"s":"",R=""+D+V,O=L+" sheet"+M,F=c(S,N);return(0,e.createComponentVNode)(2,y.ImageButton,{fluid:!0,base64:P,dmIcon:x,dmIconState:E,imageSize:32,disabled:!F,tooltip:O,buttons:w>1&&F>1&&(0,e.createComponentVNode)(2,m,{recipe:S,max_possible_multiplier:F}),onClick:function(){function _(){return v("make",{recipe_uid:A,multiplier:1})}return _}(),children:R})}},38307:function(T,r,n){"use strict";r.__esModule=!0,r.StationAlertConsoleContent=r.StationAlertConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.StationAlertConsole=function(){function y(){return(0,e.createComponentVNode)(2,o.Window,{width:325,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b)})})}return y}(),b=r.StationAlertConsoleContent=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.data,c=i.alarms||[],m=c.Fire||[],l=c.Atmosphere||[],u=c.Power||[];return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Fire Alarms",children:(0,e.createVNode)(1,"ul",null,[m.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),m.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Atmospherics Alarms",children:(0,e.createVNode)(1,"ul",null,[l.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),l.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Alarms",children:(0,e.createVNode)(1,"ul",null,[u.length===0&&(0,e.createVNode)(1,"li","color-good","Systems Nominal",16),u.map(function(s){return(0,e.createVNode)(1,"li","color-average",s,0,null,s)})],0)})],4)}return y}()},96091:function(T,r,n){"use strict";r.__esModule=!0,r.StationTraitsPanel=void 0;var e=n(89005),a=n(88510),t=n(42127),o=n(72253),f=n(36036),b=n(98595),y=function(i){return i[i.SetupFutureStationTraits=0]="SetupFutureStationTraits",i[i.ViewStationTraits=1]="ViewStationTraits",i}(y||{}),B=function(c,m){var l=(0,o.useBackend)(m),u=l.act,s=l.data,d=s.future_station_traits,C=(0,o.useLocalState)(m,"selectedFutureTrait",null),h=C[0],v=C[1],p=Object.fromEntries(s.valid_station_traits.map(function(V){return[V.name,V.path]})),N=Object.keys(p);return N.sort(),(0,e.createComponentVNode)(2,f.Box,{children:[(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,f.Dropdown,{displayText:!h&&"Select trait to add...",onSelected:v,options:N,selected:h,width:"100%"})}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"green",icon:"plus",onClick:function(){function V(){if(h){var S=p[h],I=[S];if(d){var L,w=d.map(function(A){return A.path});if(w.indexOf(S)!==-1)return;I=(L=I).concat.apply(L,w)}u("setup_future_traits",{station_traits:I})}}return V}(),children:"Add"})})]}),(0,e.createComponentVNode)(2,f.Divider),Array.isArray(d)?d.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:d.map(function(V){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:V.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button,{color:"red",icon:"times",onClick:function(){function S(){u("setup_future_traits",{station_traits:(0,a.filterMap)(d,function(I){if(I.path!==V.path)return I.path})})}return S}(),children:"Delete"})})]})},V.path)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No station traits will run next round."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"good",icon:"times",tooltip:"The next round will roll station traits randomly, just like normal",onClick:function(){function V(){return u("clear_future_traits")}return V}(),children:"Run Station Traits Normally"})]}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:[(0,e.createComponentVNode)(2,f.Box,{children:"No future station traits are planned."}),(0,e.createComponentVNode)(2,f.Button,{mt:1,fluid:!0,color:"red",icon:"times",onClick:function(){function V(){return u("setup_future_traits",{station_traits:[]})}return V}(),children:"Prevent station traits from running next round"})]})]})},k=function(c,m){var l=(0,o.useBackend)(m),u=l.act,s=l.data;return s.current_traits.length>0?(0,e.createComponentVNode)(2,f.Stack,{vertical:!0,fill:!0,children:s.current_traits.map(function(d){return(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{grow:!0,children:d.name}),(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Button.Confirm,{content:"Revert",color:"red",disabled:s.too_late_to_revert||!d.can_revert,tooltip:!d.can_revert&&"This trait is not revertable."||s.too_late_to_revert&&"It's too late to revert station traits, the round has already started.",icon:"times",onClick:function(){function C(){return u("revert",{ref:d.ref})}return C}()})})]})},d.ref)})}):(0,e.createComponentVNode)(2,f.Box,{textAlign:"center",children:"There are no active station traits."})},g=r.StationTraitsPanel=function(){function i(c,m){var l=(0,o.useLocalState)(m,"station_traits_tab",y.ViewStationTraits),u=l[0],s=l[1],d;switch(u){case y.SetupFutureStationTraits:d=(0,e.createComponentVNode)(2,B);break;case y.ViewStationTraits:d=(0,e.createComponentVNode)(2,k);break;default:(0,t.exhaustiveCheck)(u)}return(0,e.createComponentVNode)(2,b.Window,{title:"Modify Station Traits",height:350,width:350,children:(0,e.createComponentVNode)(2,b.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,f.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,f.Stack.Item,{children:(0,e.createComponentVNode)(2,f.Tabs,{children:[(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"eye",selected:u===y.ViewStationTraits,onClick:function(){function C(){return s(y.ViewStationTraits)}return C}(),children:"View"}),(0,e.createComponentVNode)(2,f.Tabs.Tab,{icon:"edit",selected:u===y.SetupFutureStationTraits,onClick:function(){function C(){return s(y.SetupFutureStationTraits)}return C}(),children:"Edit"})]})}),(0,e.createComponentVNode)(2,f.Stack.Item,{m:0,children:[(0,e.createComponentVNode)(2,f.Divider),d]})]})})})}return i}()},39409:function(T,r,n){"use strict";r.__esModule=!0,r.StripMenu=void 0;var e=n(89005),a=n(88510),t=n(79140),o=n(72253),f=n(36036),b=n(98595),y=5,B=9,k=function(h){return h===0?5:9},g="64px",i=function(h){return h[0]+"/"+h[1]},c=function(h){var v=h.align,p=h.children;return(0,e.createComponentVNode)(2,f.Box,{style:{position:"absolute",left:v==="left"?"6px":"48px","text-align":v,"text-shadow":"2px 2px 2px #000",top:"2px"},children:p})},m={enable_internals:{icon:"lungs",text:"Enable internals"},disable_internals:{icon:"lungs",text:"Disable internals"},enable_lock:{icon:"lock",text:"Enable lock"},disable_lock:{icon:"unlock",text:"Disable lock"},suit_sensors:{icon:"tshirt",text:"Adjust suit sensors"},remove_accessory:{icon:"medal",text:"Remove accessory"},dislodge_headpocket:{icon:"head-side-virus",text:"Dislodge headpocket"}},l={eyes:{displayName:"eyewear",gridSpot:i([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:i([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([2,3]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([2,4]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([3,4]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([3,3]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,4]),image:"inventory-pda.png"}},u={eyes:{displayName:"eyewear",gridSpot:i([0,0]),image:"inventory-glasses.png"},head:{displayName:"headwear",gridSpot:i([0,1]),image:"inventory-head.png"},mask:{displayName:"mask",gridSpot:i([1,1]),image:"inventory-mask.png"},neck:{displayName:"neck",gridSpot:i([1,0]),image:"inventory-neck.png"},pet_collar:{displayName:"collar",gridSpot:i([1,1]),image:"inventory-collar.png"},right_ear:{displayName:"right ear",gridSpot:i([0,2]),image:"inventory-ears.png"},left_ear:{displayName:"left ear",gridSpot:i([1,2]),image:"inventory-ears.png"},parrot_headset:{displayName:"headset",gridSpot:i([1,2]),image:"inventory-ears.png"},handcuffs:{displayName:"handcuffs",gridSpot:i([1,3])},legcuffs:{displayName:"legcuffs",gridSpot:i([1,4])},jumpsuit:{displayName:"uniform",gridSpot:i([2,0]),image:"inventory-uniform.png"},suit:{displayName:"suit",gridSpot:i([2,1]),image:"inventory-suit.png"},gloves:{displayName:"gloves",gridSpot:i([2,2]),image:"inventory-gloves.png"},right_hand:{displayName:"right hand",gridSpot:i([4,4]),image:"inventory-hand_r.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"left",children:"R"})},left_hand:{displayName:"left hand",gridSpot:i([4,5]),image:"inventory-hand_l.png",additionalComponent:(0,e.createComponentVNode)(2,c,{align:"right",children:"L"})},shoes:{displayName:"shoes",gridSpot:i([3,1]),image:"inventory-shoes.png"},suit_storage:{displayName:"suit storage",gridSpot:i([4,0]),image:"inventory-suit_storage.png"},id:{displayName:"ID",gridSpot:i([4,1]),image:"inventory-id.png"},belt:{displayName:"belt",gridSpot:i([4,2]),image:"inventory-belt.png"},back:{displayName:"backpack",gridSpot:i([4,3]),image:"inventory-back.png"},left_pocket:{displayName:"left pocket",gridSpot:i([4,7]),image:"inventory-pocket.png"},right_pocket:{displayName:"right pocket",gridSpot:i([4,6]),image:"inventory-pocket.png"},pda:{displayName:"PDA",gridSpot:i([4,8]),image:"inventory-pda.png"}},s=function(C){return C[C.Completely=1]="Completely",C[C.Hidden=2]="Hidden",C}(s||{}),d=r.StripMenu=function(){function C(h,v){var p=(0,o.useBackend)(v),N=p.act,V=p.data,S=new Map;if(V.show_mode===0)for(var I=0,L=Object.keys(V.items);I=.01})},(0,a.sortBy)(function(x){return-x.amount})])(h.gases||[]),A=Math.max.apply(Math,[1].concat(w.map(function(x){return x.portion})));return(0,e.createComponentVNode)(2,B.Window,{width:550,height:250,children:(0,e.createComponentVNode)(2,B.Window.Content,{children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"270px",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Metrics",children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Integrity",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:p/100,ranges:{good:[.9,1/0],average:[.5,.9],bad:[-1/0,.5]}})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Relative EER",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:N,minValue:0,maxValue:5e3,ranges:{good:[-1/0,5e3],average:[5e3,7e3],bad:[7e3,1/0]},children:(0,o.toFixed)(N)+" MeV/cm3"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Gas Coefficient",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:L,minValue:1,maxValue:5.25,ranges:{bad:[1,1.55],average:[1.55,5.25],good:[5.25,1/0]},children:L.toFixed(2)})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Temperature",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(V),minValue:0,maxValue:i(1e4),ranges:{teal:[-1/0,i(80)],good:[i(80),i(373)],average:[i(373),i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(V)+" K"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mole Per Tile",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:I,minValue:0,maxValue:12e3,ranges:{teal:[-1/0,100],average:[100,11333],good:[11333,12e3],bad:[12e3,1/0]},children:(0,o.toFixed)(I)+" mol"})}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Pressure",children:(0,e.createComponentVNode)(2,b.ProgressBar,{value:i(S),minValue:0,maxValue:i(5e4),ranges:{good:[i(1),i(300)],average:[-1/0,i(1e3)],bad:[i(1e3),1/0]},children:(0,o.toFixed)(S)+" kPa"})})]})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,basis:0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Gases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"arrow-left",content:"Back",onClick:function(){function x(){return C("back")}return x}()}),children:(0,e.createComponentVNode)(2,b.LabeledList,{children:w.map(function(x){return(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:(0,y.getGasLabel)(x.name),children:(0,e.createComponentVNode)(2,b.ProgressBar,{color:(0,y.getGasColor)(x.name),value:x.portion,minValue:0,maxValue:A,children:(0,o.toFixed)(x.amount)+" mol ("+x.portion+"%)"})},x.name)})})})})]})})})}},46029:function(T,r,n){"use strict";r.__esModule=!0,r.SyndicateComputerSimple=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.SyndicateComputerSimple=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data;return(0,e.createComponentVNode)(2,o.Window,{theme:"syndicate",width:400,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:i.rows.map(function(c){return(0,e.createComponentVNode)(2,t.Section,{title:c.title,buttons:(0,e.createComponentVNode)(2,t.Button,{content:c.buttontitle,disabled:c.buttondisabled,tooltip:c.buttontooltip,tooltipPosition:"left",onClick:function(){function m(){return g(c.buttonact)}return m}()}),children:[c.status,!!c.bullets&&(0,e.createComponentVNode)(2,t.Box,{children:c.bullets.map(function(m){return(0,e.createComponentVNode)(2,t.Box,{children:m},m)})})]},c.title)})})})}return b}()},36372:function(T,r,n){"use strict";r.__esModule=!0,r.TEG=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(B){return B.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},b=r.TEG=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data;return c.error?(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Error",children:[c.error,(0,e.createComponentVNode)(2,t.Button,{icon:"circle",content:"Recheck",onClick:function(){function m(){return i("check")}return m}()})]})})}):(0,e.createComponentVNode)(2,o.Window,{width:500,height:400,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Cold Loop ("+c.cold_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Inlet",children:[f(c.cold_inlet_temp)," K, ",f(c.cold_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Cold Outlet",children:[f(c.cold_outlet_temp)," K, ",f(c.cold_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Hot Loop ("+c.hot_dir+")",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Inlet",children:[f(c.hot_inlet_temp)," K, ",f(c.hot_inlet_pressure)," kPa"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hot Outlet",children:[f(c.hot_outlet_temp)," K, ",f(c.hot_outlet_pressure)," kPa"]})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Power Output",children:[f(c.output_power)," W",!!c.warning_switched&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold inlet temperature exceeds hot inlet temperature."}),!!c.warning_cold_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Cold circulator inlet pressure is under 1,000 kPa."}),!!c.warning_hot_pressure&&(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Warning: Hot circulator inlet pressure is under 1,000 kPa."})]})]})})}return y}()},56441:function(T,r,n){"use strict";r.__esModule=!0,r.TachyonArrayContent=r.TachyonArray=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TachyonArray=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.records,l=m===void 0?[]:m,u=c.explosion_target,s=c.toxins_tech,d=c.printing;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:600,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Shift's Target",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Toxins Level",children:s}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Administration",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"print",content:"Print All Logs",disabled:!l.length||d,align:"center",onClick:function(){function C(){return i("print_logs")}return C}()}),(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!l.length,color:"bad",align:"center",onClick:function(){function C(){return i("delete_logs")}return C}()})]})]})}),l.length?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,t.NoticeBox,{children:"No Records"})]})})}return y}(),b=r.TachyonArrayContent=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.records,l=m===void 0?[]:m;return(0,e.createComponentVNode)(2,t.Section,{title:"Logged Explosions",children:(0,e.createComponentVNode)(2,t.Flex,{children:(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Time"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Epicenter"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Actual Size"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Theoretical Size"})]}),l.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.logged_time}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.epicenter}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.actual_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.theoretical_size_message}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){function s(){return i("delete_record",{index:u.index})}return s}()})})]},u.index)})]})})})})}return y}()},1754:function(T,r,n){"use strict";r.__esModule=!0,r.Tank=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Tank=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c;return i.has_mask?c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,width:"76%",icon:i.connected?"check":"times",content:i.connected?"Internals On":"Internals Off",selected:i.connected,onClick:function(){function m(){return g("internals")}return m}()})}):c=(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,e.createComponentVNode)(2,o.Window,{width:325,height:135,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Tank Pressure",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:i.tankPressure/1013,ranges:{good:[.35,1/0],average:[.15,.35],bad:[-1/0,.15]},children:i.tankPressure+" kPa"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Release Pressure",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"fast-backward",disabled:i.ReleasePressure===i.minReleasePressure,tooltip:"Min",onClick:function(){function m(){return g("pressure",{pressure:"min"})}return m}()}),(0,e.createComponentVNode)(2,t.NumberInput,{animated:!0,value:parseFloat(i.releasePressure),width:"65px",unit:"kPa",minValue:i.minReleasePressure,maxValue:i.maxReleasePressure,onChange:function(){function m(l,u){return g("pressure",{pressure:u})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"fast-forward",disabled:i.ReleasePressure===i.maxReleasePressure,tooltip:"Max",onClick:function(){function m(){return g("pressure",{pressure:"max"})}return m}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"undo",content:"",disabled:i.ReleasePressure===i.defaultReleasePressure,tooltip:"Reset",onClick:function(){function m(){return g("pressure",{pressure:"reset"})}return m}()})]}),c]})})})})}return b}()},7579:function(T,r,n){"use strict";r.__esModule=!0,r.TankDispenser=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TankDispenser=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.o_tanks,m=i.p_tanks;return(0,e.createComponentVNode)(2,o.Window,{width:250,height:105,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{children:[(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Dispense Oxygen Tank ("+c+")",disabled:c===0,icon:"arrow-circle-down",onClick:function(){function l(){return g("oxygen")}return l}()})}),(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mt:1,fluid:!0,content:"Dispense Plasma Tank ("+m+")",disabled:m===0,icon:"arrow-circle-down",onClick:function(){function l(){return g("plasma")}return l}()})})]})})})}return b}()},16136:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsCore=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TcommsCore=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.ion,d=(0,a.useLocalState)(c,"tabIndex",0),C=d[0],h=d[1],v=function(){function p(N){switch(N){case 0:return(0,e.createComponentVNode)(2,y);case 1:return(0,e.createComponentVNode)(2,B);case 2:return(0,e.createComponentVNode)(2,k);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}return p}();return(0,e.createComponentVNode)(2,o.Window,{width:900,height:520,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[s===1&&(0,e.createComponentVNode)(2,b),(0,e.createComponentVNode)(2,t.Tabs,{children:[(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"wrench",selected:C===0,onClick:function(){function p(){return h(0)}return p}(),children:"Configuration"},"ConfigPage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"link",selected:C===1,onClick:function(){function p(){return h(1)}return p}(),children:"Device Linkage"},"LinkagePage"),(0,e.createComponentVNode)(2,t.Tabs.Tab,{icon:"user-times",selected:C===2,onClick:function(){function p(){return h(2)}return p}(),children:"User Filtering"},"FilterPage")]}),v(C)]})})}return g}(),b=function(){return(0,e.createComponentVNode)(2,t.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},y=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.active,d=u.sectors_available,C=u.nttc_toggle_jobs,h=u.nttc_toggle_job_color,v=u.nttc_toggle_name_color,p=u.nttc_toggle_command_bold,N=u.nttc_job_indicator_type,V=u.nttc_setting_language,S=u.network_id;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"On":"Off",selected:s,icon:"power-off",onClick:function(){function I(){return l("toggle_active")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Sector Coverage",children:d})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Radio Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcements",children:(0,e.createComponentVNode)(2,t.Button,{content:C?"On":"Off",selected:C,icon:"user-tag",onClick:function(){function I(){return l("nttc_toggle_jobs")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:h?"On":"Off",selected:h,icon:"clipboard-list",onClick:function(){function I(){return l("nttc_toggle_job_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Name Departmentalisation",children:(0,e.createComponentVNode)(2,t.Button,{content:v?"On":"Off",selected:v,icon:"user-tag",onClick:function(){function I(){return l("nttc_toggle_name_color")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Command Amplification",children:(0,e.createComponentVNode)(2,t.Button,{content:p?"On":"Off",selected:p,icon:"volume-up",onClick:function(){function I(){return l("nttc_toggle_command_bold")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Advanced",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Job Announcement Format",children:(0,e.createComponentVNode)(2,t.Button,{content:N||"Unset",selected:N,icon:"pencil-alt",onClick:function(){function I(){return l("nttc_job_indicator_type")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Language Conversion",children:(0,e.createComponentVNode)(2,t.Button,{content:V||"Unset",selected:V,icon:"globe",onClick:function(){function I(){return l("nttc_setting_language")}return I}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:S||"Unset",selected:S,icon:"server",onClick:function(){function I(){return l("network_id")}return I}()})})]})}),(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){function I(){return l("import")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){function I(){return l("export")}return I}()})]})],4)},B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.link_password,d=u.relay_entries;return(0,e.createComponentVNode)(2,t.Section,{title:"Device Linkage",children:[(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linkage Password",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"lock",onClick:function(){function C(){return l("change_password")}return C}()})})}),(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Status"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Unlink"})]}),d.map(function(C){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:C.status===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Online"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Offline"})}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",onClick:function(){function h(){return l("unlink",{addr:C.addr})}return h}()})})]},C.addr)})]})]})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=m.data,s=u.filtered_users;return(0,e.createComponentVNode)(2,t.Section,{title:"User Filtering",buttons:(0,e.createComponentVNode)(2,t.Button,{content:"Add User",icon:"user-plus",onClick:function(){function d(){return l("add_filter")}return d}()}),children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"90%"},children:"User"}),(0,e.createComponentVNode)(2,t.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),s.map(function(d){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:d}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Remove",icon:"user-times",onClick:function(){function C(){return l("remove_filter",{user:d})}return C}()})})]},d)})]})})}},88046:function(T,r,n){"use strict";r.__esModule=!0,r.TcommsRelay=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TcommsRelay=function(){function B(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.linked,u=m.active,s=m.network_id;return(0,e.createComponentVNode)(2,o.Window,{width:600,height:292,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Relay Configuration",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Machine Power",children:(0,e.createComponentVNode)(2,t.Button,{content:u?"On":"Off",selected:u,icon:"power-off",onClick:function(){function d(){return c("toggle_active")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Network ID",children:(0,e.createComponentVNode)(2,t.Button,{content:s||"Unset",selected:s,icon:"server",onClick:function(){function d(){return c("network_id")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Link Status",children:l===1?(0,e.createComponentVNode)(2,t.Box,{color:"green",children:"Linked"}):(0,e.createComponentVNode)(2,t.Box,{color:"red",children:"Unlinked"})})]})}),l===1?(0,e.createComponentVNode)(2,b):(0,e.createComponentVNode)(2,y)]})})}return B}(),b=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.linked_core_id,u=m.linked_core_addr,s=m.hidden_link;return(0,e.createComponentVNode)(2,t.Section,{title:"Link Status",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Linked Core Address",children:u}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hidden Link",children:(0,e.createComponentVNode)(2,t.Button,{content:s?"Yes":"No",icon:s?"eye-slash":"eye",selected:s,onClick:function(){function d(){return c("toggle_hidden_link")}return d}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Unlink",children:(0,e.createComponentVNode)(2,t.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){function d(){return c("unlink")}return d}()})})]})})},y=function(k,g){var i=(0,a.useBackend)(g),c=i.act,m=i.data,l=m.cores;return(0,e.createComponentVNode)(2,t.Section,{title:"Detected Cores",children:(0,e.createComponentVNode)(2,t.Table,{m:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network Address"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Network ID"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Sector"}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:"Link"})]}),l.map(function(u){return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.addr}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.net_id}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:u.sector}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,e.createComponentVNode)(2,t.Button,{content:"Link",icon:"link",onClick:function(){function s(){return c("link",{addr:u.addr})}return s}()})})]},u.addr)})]})})}},20802:function(T,r,n){"use strict";r.__esModule=!0,r.Teleporter=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Teleporter=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.targetsTeleport?i.targetsTeleport:{},m=0,l=1,u=2,s=i.calibrated,d=i.calibrating,C=i.powerstation,h=i.regime,v=i.teleporterhub,p=i.target,N=i.locked,V=i.adv_beacon_allowed,S=i.advanced_beacon_locking;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:270,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:[(!C||!v)&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,title:"Error",children:[v,!C&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Powerstation not linked "}),C&&!v&&(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:" Teleporter hub not linked "})]}),C&&v&&(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Status",buttons:(0,e.createFragment)(!!V&&(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{inline:!0,color:"label",children:"Advanced Beacon Locking:\xA0"}),(0,e.createComponentVNode)(2,t.Button,{selected:S,icon:S?"toggle-on":"toggle-off",content:S?"Enabled":"Disabled",onClick:function(){function I(){return g("advanced_beacon_locking",{on:S?0:1})}return I}()})],4),0),children:[(0,e.createComponentVNode)(2,t.Stack,{mb:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Teleport target:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[h===m&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),h===l&&(0,e.createComponentVNode)(2,t.Dropdown,{width:18.2,selected:p,disabled:d,options:Object.keys(c),color:p!=="None"?"default":"bad",onSelected:function(){function I(L){return g("settarget",{x:c[L].x,y:c[L].y,z:c[L].z,tptarget:c[L].pretarget})}return I}()}),h===u&&(0,e.createComponentVNode)(2,t.Box,{children:p})]})]}),(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Regime:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Gate",tooltip:"Teleport to another teleport hub.",tooltipPosition:"top",color:h===l?"good":null,onClick:function(){function I(){return g("setregime",{regime:l})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"Teleporter",tooltip:"One-way teleport.",tooltipPosition:"top",color:h===m?"good":null,onClick:function(){function I(){return g("setregime",{regime:m})}return I}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,content:"GPS",tooltip:"Teleport to a location stored in a GPS device.",tooltipPosition:"top-end",color:h===u?"good":null,disabled:!N,onClick:function(){function I(){return g("setregime",{regime:u})}return I}()})})]}),(0,e.createComponentVNode)(2,t.Stack,{label:"Calibration",mt:1,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:8.5,color:"label",children:"Calibration:"}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[p!=="None"&&(0,e.createComponentVNode)(2,t.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{width:15.8,textAlign:"center",mt:.5,children:d&&(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"In Progress"})||s&&(0,e.createComponentVNode)(2,t.Box,{color:"good",children:"Optimal"})||(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Sub-Optimal"})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",tooltipPosition:"bottom-end",disabled:!!(s||d),onClick:function(){function I(){return g("calibrate")}return I}()})})]}),p==="None"&&(0,e.createComponentVNode)(2,t.Box,{lineHeight:"21px",children:"No target set"})]})]})]}),!!(N&&C&&v&&h===u)&&(0,e.createComponentVNode)(2,t.Section,{title:"GPS",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){function I(){return g("load")}return I}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){function I(){return g("eject")}return I}()})]})})]})})})})}return b}()},48517:function(T,r,n){"use strict";r.__esModule=!0,r.TelescienceConsole=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TelescienceConsole=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.last_msg,m=i.linked_pad,l=i.held_gps,u=i.lastdata,s=i.power_levels,d=i.current_max_power,C=i.current_power,h=i.current_bearing,v=i.current_elevation,p=i.current_sector,N=i.working,V=i.max_z,S=(0,a.useLocalState)(B,"dummyrot",h),I=S[0],L=S[1];return(0,e.createComponentVNode)(2,o.Window,{width:400,height:500,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:[(0,e.createComponentVNode)(2,t.Section,{title:"Status",children:(0,e.createFragment)([c,!(u.length>0)||(0,e.createVNode)(1,"ul",null,u.map(function(w){return(0,e.createVNode)(1,"li",null,w,0,null,w)}),0)],0)}),(0,e.createComponentVNode)(2,t.Section,{title:"Telepad Status",children:m===1?(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Bearing",children:(0,e.createComponentVNode)(2,t.Box,{inline:!0,position:"relative",children:[(0,e.createComponentVNode)(2,t.NumberInput,{unit:"\xB0",width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:360,disabled:N,value:h,onDrag:function(){function w(A,x){return L(x)}return w}(),onChange:function(){function w(A,x){return g("setbear",{bear:x})}return w}()}),(0,e.createComponentVNode)(2,t.Icon,{ml:1,size:1,name:"arrow-up",rotation:I})]})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Current Elevation",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:.1,minValue:0,maxValue:100,disabled:N,value:v,onChange:function(){function w(A,x){return g("setelev",{elev:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Power Level",children:s.map(function(w,A){return(0,e.createComponentVNode)(2,t.Button,{content:w,selected:C===w,disabled:A>=d-1||N,onClick:function(){function x(){return g("setpwr",{pwr:A+1})}return x}()},w)})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Target Sector",children:(0,e.createComponentVNode)(2,t.NumberInput,{width:6.1,lineHeight:1.5,step:1,minValue:2,maxValue:V,value:p,disabled:N,onChange:function(){function w(A,x){return g("setz",{newz:x})}return w}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Telepad Actions",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Send",disabled:N,onClick:function(){function w(){return g("pad_send")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Receive",disabled:N,onClick:function(){function w(){return g("pad_receive")}return w}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Crystal Maintenance",children:[(0,e.createComponentVNode)(2,t.Button,{content:"Recalibrate Crystals",disabled:N,onClick:function(){function w(){return g("recal_crystals")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Eject Crystals",disabled:N,onClick:function(){function w(){return g("eject_crystals")}return w}()})]})]}):(0,e.createFragment)([(0,e.createTextVNode)("No pad linked to console. Please use a multitool to link a pad.")],4)}),(0,e.createComponentVNode)(2,t.Section,{title:"GPS Actions",children:l===1?(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{disabled:l===0||N,content:"Eject GPS",onClick:function(){function w(){return g("eject_gps")}return w}()}),(0,e.createComponentVNode)(2,t.Button,{disabled:l===0||N,content:"Store Coordinates",onClick:function(){function w(){return g("store_to_gps")}return w}()})],4):(0,e.createFragment)([(0,e.createTextVNode)("Please insert a GPS to store coordinates to it.")],4)})]})})}return b}()},21800:function(T,r,n){"use strict";r.__esModule=!0,r.TempGun=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.TempGun=function(){function g(i,c){var m=(0,t.useBackend)(c),l=m.act,u=m.data,s=u.target_temperature,d=u.temperature,C=u.max_temp,h=u.min_temp;return(0,e.createComponentVNode)(2,f.Window,{width:250,height:121,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:(0,e.createComponentVNode)(2,o.Section,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:10,stepPixelSize:6,minValue:h,maxValue:C,value:s,format:function(){function v(p){return(0,a.toFixed)(p,2)}return v}(),width:"50px",onDrag:function(){function v(p,N){return l("target_temperature",{target_temperature:N})}return v}()}),"\xB0C"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Current Temperature",children:(0,e.createComponentVNode)(2,o.Box,{color:y(d),bold:d>500-273.15,children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:(0,a.round)(d,2)}),"\xB0C"]})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Power Cost",children:(0,e.createComponentVNode)(2,o.Box,{color:k(d),children:B(d)})})]})})})})}return g}(),y=function(i){return i<=-100?"blue":i<=0?"teal":i<=100?"green":i<=200?"orange":"red"},B=function(i){return i<=100-273.15?"High":i<=250-273.15?"Medium":i<=300-273.15?"Low":i<=400-273.15?"Medium":"High"},k=function(i){return i<=100-273.15?"red":i<=250-273.15?"orange":i<=300-273.15?"green":i<=400-273.15?"orange":"red"}},24410:function(T,r,n){"use strict";r.__esModule=!0,r.sanitizeMultiline=r.removeAllSkiplines=r.TextInputModal=void 0;var e=n(89005),a=n(51057),t=n(19203),o=n(72253),f=n(92986),b=n(36036),y=n(98595),B=r.sanitizeMultiline=function(){function c(m){return m.replace(/(\n|\r\n){3,}/,"\n\n")}return c}(),k=r.removeAllSkiplines=function(){function c(m){return m.replace(/[\r\n]+/,"")}return c}(),g=r.TextInputModal=function(){function c(m,l){var u=(0,o.useBackend)(l),s=u.act,d=u.data,C=d.max_length,h=d.message,v=h===void 0?"":h,p=d.multiline,N=d.placeholder,V=d.timeout,S=d.title,I=(0,o.useLocalState)(l,"input",N||""),L=I[0],w=I[1],A=function(){function P(D){if(D!==L){var M=p?B(D):k(D);w(M)}}return P}(),x=p||L.length>=40,E=130+(v.length>40?Math.ceil(v.length/4):0)+(x?80:0);return(0,e.createComponentVNode)(2,y.Window,{title:S,width:325,height:E,children:[V&&(0,e.createComponentVNode)(2,a.Loader,{value:V}),(0,e.createComponentVNode)(2,y.Window.Content,{onKeyDown:function(){function P(D){var M=window.event?D.which:D.keyCode;M===f.KEY_ENTER&&(!x||!D.shiftKey)&&s("submit",{entry:L}),M===f.KEY_ESCAPE&&s("cancel")}return P}(),children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Box,{color:"label",children:v})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,i,{input:L,onType:A})}),(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,t.InputButtons,{input:L,message:L.length+"/"+C})})]})})})]})}return c}(),i=function(m,l){var u=(0,o.useBackend)(l),s=u.act,d=u.data,C=d.max_length,h=d.multiline,v=m.input,p=m.onType,N=h||v.length>=40;return(0,e.createComponentVNode)(2,b.TextArea,{autoFocus:!0,autoSelect:!0,height:h||v.length>=40?"100%":"1.8rem",maxLength:C,onEscape:function(){function V(){return s("cancel")}return V}(),onEnter:function(){function V(S){N&&S.shiftKey||(S.preventDefault(),s("submit",{entry:v}))}return V}(),onInput:function(){function V(S,I){return p(I)}return V}(),placeholder:"Type something...",value:v})}},25036:function(T,r,n){"use strict";r.__esModule=!0,r.ThermoMachine=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=n(98595),b=r.ThermoMachine=function(){function y(B,k){var g=(0,t.useBackend)(k),i=g.act,c=g.data;return(0,e.createComponentVNode)(2,f.Window,{width:300,height:225,children:(0,e.createComponentVNode)(2,f.Window.Content,{children:[(0,e.createComponentVNode)(2,o.Section,{title:"Status",children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Temperature",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.temperature,format:function(){function m(l){return(0,a.toFixed)(l,2)}return m}()})," K"]}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Pressure",children:[(0,e.createComponentVNode)(2,o.AnimatedNumber,{value:c.pressure,format:function(){function m(l){return(0,a.toFixed)(l,2)}return m}()})," kPa"]})]})}),(0,e.createComponentVNode)(2,o.Section,{title:"Controls",buttons:(0,e.createComponentVNode)(2,o.Button,{icon:c.on?"power-off":"times",content:c.on?"On":"Off",selected:c.on,onClick:function(){function m(){return i("power")}return m}()}),children:(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Setting",textAlign:"center",children:(0,e.createComponentVNode)(2,o.Button,{fluid:!0,icon:c.cooling?"temperature-low":"temperature-high",content:c.cooling?"Cooling":"Heating",selected:c.cooling,onClick:function(){function m(){return i("cooling")}return m}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Target Temperature",children:[(0,e.createComponentVNode)(2,o.Button,{icon:"fast-backward",disabled:c.target===c.min,title:"Minimum temperature",onClick:function(){function m(){return i("target",{target:c.min})}return m}()}),(0,e.createComponentVNode)(2,o.NumberInput,{animated:!0,value:Math.round(c.target),unit:"K",width:5.4,lineHeight:1.4,minValue:Math.round(c.min),maxValue:Math.round(c.max),step:5,stepPixelSize:3,onDrag:function(){function m(l,u){return i("target",{target:u})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"fast-forward",disabled:c.target===c.max,title:"Maximum Temperature",onClick:function(){function m(){return i("target",{target:c.max})}return m}()}),(0,e.createComponentVNode)(2,o.Button,{icon:"sync",disabled:c.target===c.initial,title:"Room Temperature",onClick:function(){function m(){return i("target",{target:c.initial})}return m}()})]})]})})]})})}return y}()},20035:function(T,r,n){"use strict";r.__esModule=!0,r.TransferValve=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.TransferValve=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.tank_one,m=i.tank_two,l=i.attached_device,u=i.valve;return(0,e.createComponentVNode)(2,o.Window,{width:460,height:285,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Valve Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:u?"unlock":"lock",content:u?"Open":"Closed",disabled:!c||!m,onClick:function(){function s(){return g("toggle")}return s}()})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Assembly",buttons:(0,e.createComponentVNode)(2,t.Button,{icon:"cog",content:"Configure Assembly",disabled:!l,onClick:function(){function s(){return g("device")}return s}()}),children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:l?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:l,disabled:!l,onClick:function(){function s(){return g("remove_device")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Assembly"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment One",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:c?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:c,disabled:!c,onClick:function(){function s(){return g("tankone")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})}),(0,e.createComponentVNode)(2,t.Section,{title:"Attachment Two",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Attachment",children:m?(0,e.createComponentVNode)(2,t.Button,{icon:"eject",content:m,disabled:!m,onClick:function(){function s(){return g("tanktwo")}return s}()}):(0,e.createComponentVNode)(2,t.Box,{color:"average",children:"No Tank"})})})})]})})}return b}()},78166:function(T,r,n){"use strict";r.__esModule=!0,r.TurbineComputer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=n(44879),b=r.TurbineComputer=function(){function k(g,i){var c=(0,a.useBackend)(i),m=c.act,l=c.data,u=l.compressor,s=l.compressor_broken,d=l.turbine,C=l.turbine_broken,h=l.online,v=!!(u&&!s&&d&&!C);return(0,e.createComponentVNode)(2,o.Window,{width:400,height:200,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Status",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{icon:h?"power-off":"times",content:h?"Online":"Offline",selected:h,disabled:!v,onClick:function(){function p(){return m("toggle_power")}return p}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:"Disconnect",onClick:function(){function p(){return m("disconnect")}return p}()})],4),children:v?(0,e.createComponentVNode)(2,B):(0,e.createComponentVNode)(2,y)})})})}return k}(),y=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.compressor,u=m.compressor_broken,s=m.turbine,d=m.turbine_broken,C=m.online;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Compressor Status",color:!l||u?"bad":"good",children:u?l?"Offline":"Missing":"Online"}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Status",color:!s||d?"bad":"good",children:d?s?"Offline":"Missing":"Online"})]})},B=function(g,i){var c=(0,a.useBackend)(i),m=c.data,l=m.rpm,u=m.temperature,s=m.power,d=m.bearing_heat;return(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Turbine Speed",children:[l," RPM"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Internal Temp",children:[u," K"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Generated Power",children:[s," W"]}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Bearing Heat",children:(0,e.createComponentVNode)(2,t.ProgressBar,{value:d,minValue:0,maxValue:100,ranges:{good:[-1/0,60],average:[60,90],bad:[90,1/0]},children:(0,f.toFixed)(d)+"%"})})]})}},52847:function(T,r,n){"use strict";r.__esModule=!0,r.Uplink=void 0;var e=n(89005),a=n(88510),t=n(64795),o=n(25328),f=n(72253),b=n(36036),y=n(98595),B=n(3939),k=function(h){switch(h){case 0:return(0,e.createComponentVNode)(2,i);case 1:return(0,e.createComponentVNode)(2,c);case 2:return(0,e.createComponentVNode)(2,d);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}},g=r.Uplink=function(){function C(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.cart,I=(0,f.useLocalState)(v,"tabIndex",0),L=I[0],w=I[1],A=(0,f.useLocalState)(v,"searchText",""),x=A[0],E=A[1];return(0,e.createComponentVNode)(2,y.Window,{width:900,height:600,theme:"syndicate",children:[(0,e.createComponentVNode)(2,B.ComplexModal),(0,e.createComponentVNode)(2,y.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Tabs,{children:[(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===0,onClick:function(){function P(){w(0),E("")}return P}(),icon:"store",children:"View Market"},"PurchasePage"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===1,onClick:function(){function P(){w(1),E("")}return P}(),icon:"shopping-cart",children:["View Shopping Cart ",S&&S.length?"("+S.length+")":""]},"Cart"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:L===2,onClick:function(){function P(){w(2),E("")}return P}(),icon:"user",children:"Exploitable Information"},"ExploitableInfo"),(0,e.createComponentVNode)(2,b.Tabs.Tab,{onClick:function(){function P(){return N("lock")}return P}(),icon:"lock",children:"Lock Uplink"},"LockUplink")]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:k(L)})]})})]})}return C}(),i=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.crystals,I=V.cats,L=(0,f.useLocalState)(v,"uplinkItems",I[0].items),w=L[0],A=L[1],x=(0,f.useLocalState)(v,"searchText",""),E=x[0],P=x[1],D=function(U,z){z===void 0&&(z="");var $=(0,o.createSearch)(z,function(G){var X=G.hijack_only===1?"|hijack":"";return G.name+"|"+G.desc+"|"+G.cost+"tc"+X});return(0,t.flow)([(0,a.filter)(function(G){return G==null?void 0:G.name}),z&&(0,a.filter)($),(0,a.sortBy)(function(G){return G==null?void 0:G.name})])(U)},M=function(U){if(P(U),U==="")return A(I[0].items);A(D(I.map(function(z){return z.items}).flat(),U))},R=(0,f.useLocalState)(v,"showDesc",1),O=R[0],F=R[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:(0,e.createComponentVNode)(2,b.Stack.Item,{children:(0,e.createComponentVNode)(2,b.Section,{title:"Current Balance: "+S+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:O,onClick:function(){function _(){return F(!O)}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Random Item",icon:"question",onClick:function(){function _(){return N("buyRandom")}return _}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Refund Currently Held Item",icon:"undo",onClick:function(){function _(){return N("refund")}return _}()})],4),children:(0,e.createComponentVNode)(2,b.Input,{fluid:!0,placeholder:"Search Equipment",onInput:function(){function _(U,z){M(z)}return _}(),value:E})})})}),(0,e.createComponentVNode)(2,b.Stack,{fill:!0,mt:.3,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:I.map(function(_){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:E!==""?!1:_.items===w,onClick:function(){function U(){A(_.items),P("")}return U}(),children:_.cat},_)})})})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:w.map(function(_){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,l,{i:_,showDecription:O},(0,o.decodeHtmlEntities)(_.name))},(0,o.decodeHtmlEntities)(_.name))})})})})]})]})},c=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.cart,I=V.crystals,L=V.cart_price,w=(0,f.useLocalState)(v,"showDesc",0),A=w[0],x=w[1];return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Current Balance: "+I+"TC",buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button.Checkbox,{content:"Show Descriptions",checked:A,onClick:function(){function E(){return x(!A)}return E}()}),(0,e.createComponentVNode)(2,b.Button,{content:"Empty Cart",icon:"trash",onClick:function(){function E(){return N("empty_cart")}return E}(),disabled:!S}),(0,e.createComponentVNode)(2,b.Button,{content:"Purchase Cart ("+L+"TC)",icon:"shopping-cart",onClick:function(){function E(){return N("purchase_cart")}return E}(),disabled:!S||L>I})],4),children:(0,e.createComponentVNode)(2,b.Stack,{vertical:!0,children:S?S.map(function(E){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mr:1,backgroundColor:"rgba(255, 0, 0, 0.1)",children:(0,e.createComponentVNode)(2,l,{i:E,showDecription:A,buttons:(0,e.createComponentVNode)(2,s,{i:E})})},(0,o.decodeHtmlEntities)(E.name))}):(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:"Your Shopping Cart is empty!"})})})}),(0,e.createComponentVNode)(2,m)]})},m=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.cats,I=V.lucky_numbers;return(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Suggested Purchases",buttons:(0,e.createComponentVNode)(2,b.Button,{icon:"dice",content:"See more suggestions",onClick:function(){function L(){return N("shuffle_lucky_numbers")}return L}()}),children:(0,e.createComponentVNode)(2,b.Stack,{wrap:!0,children:I.map(function(L){return S[L.cat].items[L.item]}).filter(function(L){return L!=null}).map(function(L,w){return(0,e.createComponentVNode)(2,b.Stack.Item,{p:1,mb:1,ml:1,width:34,backgroundColor:"rgba(255, 0, 0, 0.15)",children:(0,e.createComponentVNode)(2,l,{grow:!0,i:L})},w)})})})})},l=function(h,v){var p=h.i,N=h.showDecription,V=N===void 0?1:N,S=h.buttons,I=S===void 0?(0,e.createComponentVNode)(2,u,{i:p}):S;return(0,e.createComponentVNode)(2,b.Section,{title:(0,o.decodeHtmlEntities)(p.name),showBottom:V,buttons:I,children:V?(0,e.createComponentVNode)(2,b.Box,{italic:!0,children:(0,o.decodeHtmlEntities)(p.desc)}):null})},u=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=h.i,I=V.crystals;return(0,e.createFragment)([(0,e.createComponentVNode)(2,b.Button,{icon:"shopping-cart",color:S.hijack_only===1&&"red",tooltip:"Add to cart.",tooltipPosition:"left",onClick:function(){function L(){return N("add_to_cart",{item:S.obj_path})}return L}(),disabled:S.cost>I}),(0,e.createComponentVNode)(2,b.Button,{content:"Buy ("+S.cost+"TC)"+(S.refundable?" [Refundable]":""),color:S.hijack_only===1&&"red",tooltip:S.hijack_only===1&&"Hijack Agents Only!",tooltipPosition:"left",onClick:function(){function L(){return N("buyItem",{item:S.obj_path})}return L}(),disabled:S.cost>I})],4)},s=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=h.i,I=V.exploitable;return(0,e.createComponentVNode)(2,b.Stack,{children:[(0,e.createComponentVNode)(2,b.Button,{icon:"times",content:"("+S.cost*S.amount+"TC)",tooltip:"Remove from cart.",tooltipPosition:"left",onClick:function(){function L(){return N("remove_from_cart",{item:S.obj_path})}return L}()}),(0,e.createComponentVNode)(2,b.Button,{icon:"minus",tooltip:S.limit===0&&"Discount already redeemed!",ml:"5px",onClick:function(){function L(){return N("set_cart_item_quantity",{item:S.obj_path,quantity:--S.amount})}return L}(),disabled:S.amount<=0}),(0,e.createComponentVNode)(2,b.Button.Input,{content:S.amount,width:"45px",tooltipPosition:"bottom-end",tooltip:S.limit===0&&"Discount already redeemed!",onCommit:function(){function L(w,A){return N("set_cart_item_quantity",{item:S.obj_path,quantity:A})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit&&S.amount<=0}),(0,e.createComponentVNode)(2,b.Button,{mb:.3,icon:"plus",tooltipPosition:"bottom-start",tooltip:S.limit===0&&"Discount already redeemed!",onClick:function(){function L(){return N("set_cart_item_quantity",{item:S.obj_path,quantity:++S.amount})}return L}(),disabled:S.limit!==-1&&S.amount>=S.limit})]})},d=function(h,v){var p=(0,f.useBackend)(v),N=p.act,V=p.data,S=V.exploitable,I=(0,f.useLocalState)(v,"selectedRecord",S[0]),L=I[0],w=I[1],A=(0,f.useLocalState)(v,"searchText",""),x=A[0],E=A[1],P=function(R,O){O===void 0&&(O="");var F=(0,o.createSearch)(O,function(_){return _.name});return(0,t.flow)([(0,a.filter)(function(_){return _==null?void 0:_.name}),O&&(0,a.filter)(F),(0,a.sortBy)(function(_){return _.name})])(R)},D=P(S,x);return(0,e.createComponentVNode)(2,b.Stack,{fill:!0,children:[(0,e.createComponentVNode)(2,b.Stack.Item,{width:"30%",children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:"Exploitable Records",children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(){function M(R,O){return E(O)}return M}()}),(0,e.createComponentVNode)(2,b.Tabs,{vertical:!0,children:D.map(function(M){return(0,e.createComponentVNode)(2,b.Tabs.Tab,{selected:M===L,onClick:function(){function R(){return w(M)}return R}(),children:M.name},M)})})]})}),(0,e.createComponentVNode)(2,b.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,b.Section,{fill:!0,scrollable:!0,title:L.name,children:(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:L.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:L.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:L.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:L.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:L.species})]})})})]})}},12261:function(T,r,n){"use strict";r.__esModule=!0,r.Vending=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=function(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=B.product,l=B.productStock,u=B.productIcon,s=B.productIconState,d=c.chargesMoney,C=c.user,h=c.usermoney,v=c.inserted_cash,p=c.vend_ready,N=c.inserted_item_name,V=!d||m.price===0,S="ERROR!",I="";V?(S="FREE",I="arrow-circle-down"):(S=m.price,I="shopping-cart");var L=!p||l===0||!V&&m.price>h&&m.price>v;return(0,e.createComponentVNode)(2,t.Table.Row,{children:[(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,children:(0,e.createComponentVNode)(2,t.DmIcon,{verticalAlign:"middle",icon:u,icon_state:s,fallback:(0,e.createComponentVNode)(2,t.Icon,{p:.66,name:"spinner",size:2,spin:!0})})}),(0,e.createComponentVNode)(2,t.Table.Cell,{bold:!0,children:m.name}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Box,{color:l<=0&&"bad"||l<=m.max_amount/2&&"average"||"good",children:[l," in stock"]})}),(0,e.createComponentVNode)(2,t.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,e.createComponentVNode)(2,t.Button,{fluid:!0,disabled:L,icon:I,content:S,textAlign:"left",onClick:function(){function w(){return i("vend",{inum:m.inum})}return w}()})})]})},b=r.Vending=function(){function y(B,k){var g=(0,a.useBackend)(k),i=g.act,c=g.data,m=c.user,l=c.usermoney,u=c.inserted_cash,s=c.chargesMoney,d=c.product_records,C=d===void 0?[]:d,h=c.hidden_records,v=h===void 0?[]:h,p=c.stock,N=c.vend_ready,V=c.inserted_item_name,S=c.panel_open,I=c.speaker,L;return L=[].concat(C),c.extended_inventory&&(L=[].concat(L,v)),L=L.filter(function(w){return!!w}),(0,e.createComponentVNode)(2,o.Window,{title:"Vending Machine",width:450,height:Math.min((s?171:89)+L.length*32,585),children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[!!s&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"User",buttons:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{children:!!V&&(0,e.createComponentVNode)(2,t.Button,{fluid:!0,icon:"eject",content:(0,e.createVNode)(1,"span",null,V,0,{style:{"text-transform":"capitalize"}}),onClick:function(){function w(){return i("eject_item",{})}return w}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{disabled:!u,icon:"money-bill-wave-alt",content:u?(0,e.createFragment)([(0,e.createVNode)(1,"b",null,u,0),(0,e.createTextVNode)(" credits")],0):"Dispense Change",tooltip:u?"Dispense Change":null,textAlign:"left",onClick:function(){function w(){return i("change")}return w}()})})]}),children:m&&(0,e.createComponentVNode)(2,t.Box,{children:["Welcome, ",(0,e.createVNode)(1,"b",null,m.name,0),", ",(0,e.createVNode)(1,"b",null,m.job||"Unemployed",0),"!",(0,e.createVNode)(1,"br"),"Your balance is ",(0,e.createVNode)(1,"b",null,[l,(0,e.createTextVNode)(" credits")],0),".",(0,e.createVNode)(1,"br")]})})}),!!S&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{title:"Maintenance",children:(0,e.createComponentVNode)(2,t.Button,{icon:I?"check":"volume-mute",selected:I,content:"Speaker",textAlign:"left",onClick:function(){function w(){return i("toggle_voice",{})}return w}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:"Products",children:(0,e.createComponentVNode)(2,t.Table,{children:L.map(function(w){return(0,e.createComponentVNode)(2,f,{product:w,productStock:p[w.name],productIcon:w.icon,productIconState:w.icon_state},w.name)})})})})]})})})}return y}()},68971:function(T,r,n){"use strict";r.__esModule=!0,r.VolumeMixer=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.VolumeMixer=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.channels;return(0,e.createComponentVNode)(2,o.Window,{width:350,height:Math.min(95+c.length*50,565),children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:c.map(function(m,l){return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.25rem",color:"label",mt:l>0&&"0.5rem",children:m.name}),(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{mr:.5,children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){function u(){return g("volume",{channel:m.num,volume:0})}return u}()})})}),(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mx:"0.5rem",children:(0,e.createComponentVNode)(2,t.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:m.volume,onChange:function(){function u(s,d){return g("volume",{channel:m.num,volume:d})}return u}()})}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{width:"24px",color:"transparent",children:(0,e.createComponentVNode)(2,t.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){function u(){return g("volume",{channel:m.num,volume:100})}return u}()})})})]})})],4,m.num)})})})})}return b}()},2510:function(T,r,n){"use strict";r.__esModule=!0,r.VotePanel=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.VotePanel=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.remaining,m=i.question,l=i.choices,u=i.user_vote,s=i.counts,d=i.show_counts;return(0,e.createComponentVNode)(2,o.Window,{width:400,height:360,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,title:m,children:[(0,e.createComponentVNode)(2,t.Box,{mb:1.5,ml:.5,children:["Time remaining: ",Math.round(c/10),"s"]}),l.map(function(C){return(0,e.createComponentVNode)(2,t.Box,{children:(0,e.createComponentVNode)(2,t.Button,{mb:1,fluid:!0,translucent:!0,lineHeight:3,multiLine:C,content:C+(d?" ("+(s[C]||0)+")":""),onClick:function(){function h(){return g("vote",{target:C})}return h}(),selected:C===u})},C)})]})})})}return b}()},30138:function(T,r,n){"use strict";r.__esModule=!0,r.Wires=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.Wires=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.wires||[],m=i.status||[],l=56+c.length*23+(status?0:15+m.length*17);return(0,e.createComponentVNode)(2,o.Window,{width:350,height:l,children:(0,e.createComponentVNode)(2,o.Window.Content,{children:(0,e.createComponentVNode)(2,t.Stack,{fill:!0,vertical:!0,children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,children:(0,e.createComponentVNode)(2,t.Section,{fill:!0,scrollable:!0,children:(0,e.createComponentVNode)(2,t.LabeledList,{children:c.map(function(u){return(0,e.createComponentVNode)(2,t.LabeledList.Item,{className:"candystripe",label:u.color_name,labelColor:u.seen_color,color:u.seen_color,buttons:(0,e.createFragment)([(0,e.createComponentVNode)(2,t.Button,{content:u.cut?"Mend":"Cut",onClick:function(){function s(){return g("cut",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:"Pulse",onClick:function(){function s(){return g("pulse",{wire:u.color})}return s}()}),(0,e.createComponentVNode)(2,t.Button,{content:u.attached?"Detach":"Attach",onClick:function(){function s(){return g("attach",{wire:u.color})}return s}()})],4),children:!!u.wire&&(0,e.createVNode)(1,"i",null,[(0,e.createTextVNode)("("),u.wire,(0,e.createTextVNode)(")")],0)},u.seen_color)})})})}),!!m.length&&(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Section,{children:m.map(function(u){return(0,e.createComponentVNode)(2,t.Box,{color:"lightgray",children:u},u)})})})]})})})}return b}()},21400:function(T,r,n){"use strict";r.__esModule=!0,r.WizardApprenticeContract=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(98595),f=r.WizardApprenticeContract=function(){function b(y,B){var k=(0,a.useBackend)(B),g=k.act,i=k.data,c=i.used;return(0,e.createComponentVNode)(2,o.Window,{width:500,height:555,children:(0,e.createComponentVNode)(2,o.Window.Content,{scrollable:!0,children:[(0,e.createComponentVNode)(2,t.Section,{title:"Contract of Apprenticeship",children:["Using this contract, you may summon an apprentice to aid you on your mission.",(0,e.createVNode)(1,"p",null,"If you are unable to establish contact with your apprentice, you can feed the contract back to the spellbook to refund your points.",16),c?(0,e.createComponentVNode)(2,t.Box,{bold:!0,color:"red",children:"You've already summoned an apprentice or you are in process of summoning one."}):""]}),(0,e.createComponentVNode)(2,t.Section,{title:"Which school of magic is your apprentice studying?",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Fire",children:["Your apprentice is skilled in bending fire. ",(0,e.createVNode)(1,"br"),"They know Fireball, Sacred Flame, and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("fire")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Translocation",children:["Your apprentice is able to defy physics, learning how to move through bluespace. ",(0,e.createVNode)(1,"br"),"They know Teleport, Blink and Ethereal Jaunt.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("translocation")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Restoration",children:["Your apprentice is dedicated to supporting your magical prowess.",(0,e.createVNode)(1,"br"),"They come equipped with a Staff of Healing, have the unique ability to teleport back to you, and know Charge and Knock.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("restoration")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Stealth",children:["Your apprentice is learning the art of infiltrating mundane facilities. ",(0,e.createVNode)(1,"br"),"They know Mindswap, Knock, Homing Toolbox, and Disguise Self, all of which can be cast without robes. They also join you in a Maintenance Dweller disguise, complete with Gloves of Shock Immunity and a Belt of Tools.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("stealth")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Honk",children:["Your apprentice is here to spread the Honkmother's blessings.",(0,e.createVNode)(1,"br"),"They know Banana Touch, Instant Summons, Ethereal Jaunt, and come equipped with a Staff of Slipping."," ",(0,e.createVNode)(1,"br"),"While under your tutelage, they have been 'blessed' with clown shoes that are impossible to remove.",(0,e.createVNode)(1,"br"),(0,e.createComponentVNode)(2,t.Button,{content:"Select",disabled:c,onClick:function(){function m(){return g("honk")}return m}()})]}),(0,e.createComponentVNode)(2,t.LabeledList.Divider)]})})]})})}return b}()},49148:function(T,r,n){"use strict";r.__esModule=!0,r.AccessList=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036);function f(g,i){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(c)return(c=c.call(g)).next.bind(c);if(Array.isArray(g)||(c=b(g))||i&&g&&typeof g.length=="number"){c&&(g=c);var m=0;return function(){return m>=g.length?{done:!0}:{done:!1,value:g[m++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(g,i){if(g){if(typeof g=="string")return y(g,i);var c={}.toString.call(g).slice(8,-1);return c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set"?Array.from(g):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?y(g,i):void 0}}function y(g,i){(i==null||i>g.length)&&(i=g.length);for(var c=0,m=Array(i);c0&&!V.includes(O.ref)&&!p.includes(O.ref),checked:p.includes(O.ref),onClick:function(){function F(){return S(O.ref)}return F}()},O.desc)})]})]})})}return g}()},26991:function(T,r,n){"use strict";r.__esModule=!0,r.AtmosScan=void 0;var e=n(89005),a=n(88510),t=n(72253),o=n(36036),f=function(B,k,g,i,c){return Bi?"average":B>c?"bad":"good"},b=r.AtmosScan=function(){function y(B,k){var g=B.data.aircontents;return(0,e.createComponentVNode)(2,o.Box,{children:(0,e.createComponentVNode)(2,o.LabeledList,{children:(0,a.filter)(function(i){return i.val!=="0"||i.entry==="Pressure"||i.entry==="Temperature"})(g).map(function(i){return(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:i.entry,color:f(i.val,i.bad_low,i.poor_low,i.poor_high,i.bad_high),children:[i.val,i.units]},i.entry)})})})}return y}()},85870:function(T,r,n){"use strict";r.__esModule=!0,r.BeakerContents=void 0;var e=n(89005),a=n(36036),t=n(15964),o=function(y){return y+" unit"+(y===1?"":"s")},f=r.BeakerContents=function(){function b(y){var B=y.beakerLoaded,k=y.beakerContents,g=k===void 0?[]:k,i=y.buttons;return(0,e.createComponentVNode)(2,a.Stack,{vertical:!0,children:[!B&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"No beaker loaded."})||g.length===0&&(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",children:"Beaker is empty."}),g.map(function(c,m){return(0,e.createComponentVNode)(2,a.Stack,{children:[(0,e.createComponentVNode)(2,a.Stack.Item,{color:"label",grow:!0,children:[o(c.volume)," of ",c.name]},c.name),!!i&&(0,e.createComponentVNode)(2,a.Stack.Item,{children:i(c,m)})]},c.name)})]})}return b}();f.propTypes={beakerLoaded:t.bool,beakerContents:t.array,buttons:t.arrayOf(t.element)}},92963:function(T,r,n){"use strict";r.__esModule=!0,r.BotStatus=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.BotStatus=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=g.locked,c=g.noaccess,m=g.maintpanel,l=g.on,u=g.autopatrol,s=g.canhack,d=g.emagged,C=g.remote_disabled;return(0,e.createFragment)([(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe an ID card to ",i?"unlock":"lock"," this interface."]}),(0,e.createComponentVNode)(2,t.Section,{title:"General Settings",children:(0,e.createComponentVNode)(2,t.LabeledList,{children:[(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Status",children:(0,e.createComponentVNode)(2,t.Button,{icon:l?"power-off":"times",content:l?"On":"Off",selected:l,disabled:c,onClick:function(){function h(){return k("power")}return h}()})}),u!==null&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Patrol",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:u,content:"Auto Patrol",disabled:c,onClick:function(){function h(){return k("autopatrol")}return h}()})}),!!m&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Maintenance Panel",children:(0,e.createComponentVNode)(2,t.Box,{color:"bad",children:"Panel Open!"})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Safety System",children:(0,e.createComponentVNode)(2,t.Box,{color:d?"bad":"good",children:d?"DISABLED!":"Enabled"})}),!!s&&(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Hacking",children:(0,e.createComponentVNode)(2,t.Button,{icon:"terminal",content:d?"Restore Safties":"Hack",disabled:c,color:"bad",onClick:function(){function h(){return k("hack")}return h}()})}),(0,e.createComponentVNode)(2,t.LabeledList.Item,{label:"Remote Access",children:(0,e.createComponentVNode)(2,t.Button.Checkbox,{fluid:!0,checked:!C,content:"AI Remote Control",disabled:c,onClick:function(){function h(){return k("disableremote")}return h}()})})]})})],4)}return f}()},3939:function(T,r,n){"use strict";r.__esModule=!0,r.modalRegisterBodyOverride=r.modalOpen=r.modalClose=r.modalAnswer=r.ComplexModal=void 0;var e=n(89005),a=n(72253),t=n(36036),o={},f=r.modalOpen=function(){function g(i,c,m){var l=(0,a.useBackend)(i),u=l.act,s=l.data,d=Object.assign(s.modal?s.modal.args:{},m||{});u("modal_open",{id:c,arguments:JSON.stringify(d)})}return g}(),b=r.modalRegisterBodyOverride=function(){function g(i,c){o[i]=c}return g}(),y=r.modalAnswer=function(){function g(i,c,m,l){var u=(0,a.useBackend)(i),s=u.act,d=u.data;if(d.modal){var C=Object.assign(d.modal.args||{},l||{});s("modal_answer",{id:c,answer:m,arguments:JSON.stringify(C)})}}return g}(),B=r.modalClose=function(){function g(i,c){var m=(0,a.useBackend)(i),l=m.act;l("modal_close",{id:c})}return g}(),k=r.ComplexModal=function(){function g(i,c){var m=(0,a.useBackend)(c),l=m.data;if(l.modal){var u=l.modal,s=u.id,d=u.text,C=u.type,h,v=(0,e.createComponentVNode)(2,t.Button,{className:"Button--modal",icon:"arrow-left",content:"Cancel",onClick:function(){function L(){return B(c)}return L}()}),p,N,V="auto";if(o[s])p=o[s](l.modal,c);else if(C==="input"){var S=l.modal.value;h=function(){function L(w){return y(c,s,S)}return L}(),p=(0,e.createComponentVNode)(2,t.Input,{value:l.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(){function L(w,A){S=A}return L}()}),N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){function L(){return B(c)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,S)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]})}else if(C==="choice"){var I=typeof l.modal.choices=="object"?Object.values(l.modal.choices):l.modal.choices;p=(0,e.createComponentVNode)(2,t.Dropdown,{options:I,selected:l.modal.value,width:"100%",my:"0.5rem",onSelected:function(){function L(w){return y(c,s,w)}return L}()}),V="initial"}else C==="bento"?p=(0,e.createComponentVNode)(2,t.Stack,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:l.modal.choices.map(function(L,w){return(0,e.createComponentVNode)(2,t.Stack.Item,{flex:"1 1 auto",children:(0,e.createComponentVNode)(2,t.Button,{selected:w+1===parseInt(l.modal.value,10),onClick:function(){function A(){return y(c,s,w+1)}return A}(),children:(0,e.createVNode)(1,"img",null,null,1,{src:L})})},w)})}):C==="boolean"&&(N=(0,e.createComponentVNode)(2,t.Box,{mt:"0.5rem",children:[(0,e.createComponentVNode)(2,t.Button,{icon:"times",content:l.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){function L(){return y(c,s,0)}return L}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"check",content:l.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){function L(){return y(c,s,1)}return L}()}),(0,e.createComponentVNode)(2,t.Box,{clear:"both"})]}));return(0,e.createComponentVNode)(2,t.Modal,{maxWidth:i.maxWidth||window.innerWidth/2+"px",maxHeight:i.maxHeight||window.innerHeight/2+"px",onEnter:h,mx:"auto",overflowY:V,"padding-bottom":"5px",children:[d&&(0,e.createComponentVNode)(2,t.Box,{inline:!0,children:d}),o[s]&&v,p,N]})}}return g}()},41874:function(T,r,n){"use strict";r.__esModule=!0,r.CrewManifest=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(25328),f=n(76910),b=f.COLORS.department,y=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel","Quartermaster"],B=function(m){return y.indexOf(m)!==-1?"green":"orange"},k=function(m){if(y.indexOf(m)!==-1)return!0},g=function(m){return m.length>0&&(0,e.createComponentVNode)(2,t.Table,{children:[(0,e.createComponentVNode)(2,t.Table.Row,{header:!0,color:"white",children:[(0,e.createComponentVNode)(2,t.Table.Cell,{width:"50%",children:"Name"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"35%",children:"Rank"}),(0,e.createComponentVNode)(2,t.Table.Cell,{width:"15%",children:"Active"})]}),m.map(function(l){return(0,e.createComponentVNode)(2,t.Table.Row,{color:B(l.rank),bold:k(l.rank),children:[(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(l.name)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:(0,o.decodeHtmlEntities)(l.rank)}),(0,e.createComponentVNode)(2,t.Table.Cell,{children:l.active})]},l.name+l.rank)})]})},i=r.CrewManifest=function(){function c(m,l){var u=(0,a.useBackend)(l),s=u.act,d;if(m.data)d=m.data;else{var C=(0,a.useBackend)(l),h=C.data;d=h}var v=d,p=v.manifest,N=p.heads,V=p.sec,S=p.eng,I=p.med,L=p.sci,w=p.ser,A=p.sup,x=p.misc;return(0,e.createComponentVNode)(2,t.Box,{children:[(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.command,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:g(N)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.security,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:g(V)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.engineering,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:g(S)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.medical,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:g(I)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.science,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:g(L)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.service,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:g(w)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{backgroundColor:b.supply,m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:g(A)}),(0,e.createComponentVNode)(2,t.Section,{title:(0,e.createComponentVNode)(2,t.Box,{m:-1,pt:1,pb:1,children:(0,e.createComponentVNode)(2,t.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:g(x)})]})}return c}()},19203:function(T,r,n){"use strict";r.__esModule=!0,r.InputButtons=void 0;var e=n(89005),a=n(36036),t=n(72253),o=r.InputButtons=function(){function f(b,y){var B=(0,t.useBackend)(y),k=B.act,g=B.data,i=g.large_buttons,c=g.swapped_buttons,m=b.input,l=b.message,u=b.disabled,s=(0,e.createComponentVNode)(2,a.Button,{color:"good",content:"Submit",bold:!!i,fluid:!!i,onClick:function(){function C(){return k("submit",{entry:m})}return C}(),textAlign:"center",tooltip:i&&l,disabled:u,width:!i&&6}),d=(0,e.createComponentVNode)(2,a.Button,{color:"bad",content:"Cancel",bold:!!i,fluid:!!i,onClick:function(){function C(){return k("cancel")}return C}(),textAlign:"center",width:!i&&6});return(0,e.createComponentVNode)(2,a.Flex,{fill:!0,align:"center",direction:c?"row-reverse":"row",justify:"space-around",children:[i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,ml:c?.5:0,mr:c?0:.5,children:d}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:d}),!i&&l&&(0,e.createComponentVNode)(2,a.Flex.Item,{children:(0,e.createComponentVNode)(2,a.Box,{color:"label",textAlign:"center",children:l})}),i?(0,e.createComponentVNode)(2,a.Flex.Item,{grow:!0,mr:c?.5:0,ml:c?0:.5,children:s}):(0,e.createComponentVNode)(2,a.Flex.Item,{children:s})]})}return f}()},195:function(T,r,n){"use strict";r.__esModule=!0,r.InterfaceLockNoticeBox=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.InterfaceLockNoticeBox=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=b.siliconUser,c=i===void 0?g.siliconUser:i,m=b.locked,l=m===void 0?g.locked:m,u=b.normallyLocked,s=u===void 0?g.normallyLocked:u,d=b.onLockStatusChange,C=d===void 0?function(){return k("lock")}:d,h=b.accessText,v=h===void 0?"an ID card":h;return c?(0,e.createComponentVNode)(2,t.NoticeBox,{color:c&&"grey",children:(0,e.createComponentVNode)(2,t.Flex,{align:"center",children:[(0,e.createComponentVNode)(2,t.Flex.Item,{children:"Interface lock status:"}),(0,e.createComponentVNode)(2,t.Flex.Item,{grow:"1"}),(0,e.createComponentVNode)(2,t.Flex.Item,{children:(0,e.createComponentVNode)(2,t.Button,{m:"0",color:s?"red":"green",icon:s?"lock":"unlock",content:s?"Locked":"Unlocked",onClick:function(){function p(){C&&C(!l)}return p}()})})]})}):(0,e.createComponentVNode)(2,t.NoticeBox,{children:["Swipe ",v," to ",l?"unlock":"lock"," this interface."]})}return f}()},51057:function(T,r,n){"use strict";r.__esModule=!0,r.Loader=void 0;var e=n(89005),a=n(44879),t=n(36036),o=r.Loader=function(){function f(b){var y=b.value;return(0,e.createVNode)(1,"div","AlertModal__Loader",(0,e.createComponentVNode)(2,t.Box,{className:"AlertModal__LoaderProgress",style:{width:(0,a.clamp01)(y)*100+"%"}}),2)}return f}()},321:function(T,r,n){"use strict";r.__esModule=!0,r.LoginInfo=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginInfo=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=g.loginState;if(g)return(0,e.createComponentVNode)(2,t.NoticeBox,{info:!0,children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:["Logged in as: ",i.name," (",i.rank,")"]}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:[(0,e.createComponentVNode)(2,t.Button,{icon:"eject",disabled:!i.id,content:"Eject ID",color:"good",onClick:function(){function c(){return k("login_eject")}return c}()}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-out-alt",content:"Logout",color:"good",onClick:function(){function c(){return k("login_logout")}return c}()})]})]})})}return f}()},5485:function(T,r,n){"use strict";r.__esModule=!0,r.LoginScreen=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.LoginScreen=function(){function f(b,y){var B=(0,a.useBackend)(y),k=B.act,g=B.data,i=g.loginState,c=g.isAI,m=g.isRobot,l=g.isAdmin;return(0,e.createComponentVNode)(2,t.Section,{title:"Welcome",fill:!0,stretchContents:!0,children:(0,e.createComponentVNode)(2,t.Flex,{height:"100%",align:"center",justify:"center",children:(0,e.createComponentVNode)(2,t.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,e.createComponentVNode)(2,t.Box,{fontSize:"1.5rem",bold:!0,children:[(0,e.createComponentVNode)(2,t.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,e.createComponentVNode)(2,t.Box,{color:"label",my:"1rem",children:["ID:",(0,e.createComponentVNode)(2,t.Button,{icon:"id-card",content:i.id?i.id:"----------",ml:"0.5rem",onClick:function(){function u(){return k("login_insert")}return u}()})]}),(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",disabled:!i.id,content:"Login",onClick:function(){function u(){return k("login_login",{login_type:1})}return u}()}),!!c&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){function u(){return k("login_login",{login_type:2})}return u}()}),!!m&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){function u(){return k("login_login",{login_type:3})}return u}()}),!!l&&(0,e.createComponentVNode)(2,t.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){function u(){return k("login_login",{login_type:4})}return u}()})]})})})}return f}()},62411:function(T,r,n){"use strict";r.__esModule=!0,r.Operating=void 0;var e=n(89005),a=n(36036),t=n(15964),o=r.Operating=function(){function f(b){var y=b.operating,B=b.name;if(y)return(0,e.createComponentVNode)(2,a.Dimmer,{children:(0,e.createComponentVNode)(2,a.Flex,{mb:"30px",children:(0,e.createComponentVNode)(2,a.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,e.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,e.createVNode)(1,"br"),"The ",B," is processing..."]})})})}return f}();o.propTypes={operating:t.bool,name:t.string}},13545:function(T,r,n){"use strict";r.__esModule=!0,r.Signaler=void 0;var e=n(89005),a=n(44879),t=n(72253),o=n(36036),f=r.Signaler=function(){function b(y,B){var k=(0,t.useBackend)(B),g=k.act,i=y.data,c=i.code,m=i.frequency,l=i.minFrequency,u=i.maxFrequency;return(0,e.createComponentVNode)(2,o.Section,{children:[(0,e.createComponentVNode)(2,o.LabeledList,{children:[(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Frequency",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:l/10,maxValue:u/10,value:m/10,format:function(){function s(d){return(0,a.toFixed)(d,1)}return s}(),width:"80px",onDrag:function(){function s(d,C){return g("freq",{freq:C})}return s}()})}),(0,e.createComponentVNode)(2,o.LabeledList.Item,{label:"Code",children:(0,e.createComponentVNode)(2,o.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:c,width:"80px",onDrag:function(){function s(d,C){return g("code",{code:C})}return s}()})})]}),(0,e.createComponentVNode)(2,o.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){function s(){return g("signal")}return s}()})]})}return b}()},41984:function(T,r,n){"use strict";r.__esModule=!0,r.SimpleRecords=void 0;var e=n(89005),a=n(72253),t=n(25328),o=n(64795),f=n(88510),b=n(36036),y=r.SimpleRecords=function(){function g(i,c){var m=i.data.records;return(0,e.createComponentVNode)(2,b.Box,{children:m?(0,e.createComponentVNode)(2,k,{data:i.data,recordType:i.recordType}):(0,e.createComponentVNode)(2,B,{data:i.data})})}return g}(),B=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=i.data.recordsList,s=(0,a.useLocalState)(c,"searchText",""),d=s[0],C=s[1],h=function(N,V){V===void 0&&(V="");var S=(0,t.createSearch)(V,function(I){return I.Name});return(0,o.flow)([(0,f.filter)(function(I){return I==null?void 0:I.Name}),V&&(0,f.filter)(S),(0,f.sortBy)(function(I){return I.Name})])(u)},v=h(u,d);return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(){function p(N,V){return C(V)}return p}()}),v.map(function(p){return(0,e.createComponentVNode)(2,b.Box,{children:(0,e.createComponentVNode)(2,b.Button,{mb:.5,content:p.Name,icon:"user",onClick:function(){function N(){return l("Records",{target:p.uid})}return N}()})},p)})]})},k=function(i,c){var m=(0,a.useBackend)(c),l=m.act,u=i.data.records,s=u.general,d=u.medical,C=u.security,h;switch(i.recordType){case"MED":h=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Medical Data",children:d?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Blood Type",children:d.blood_type}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Disabilities",children:d.mi_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.mi_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Disabilities",children:d.ma_dis}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.ma_dis_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Allergies",children:d.alg}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.alg_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Current Diseases",children:d.cdi}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:d.cdi_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:d.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":h=(0,e.createComponentVNode)(2,b.Section,{level:2,title:"Security Data",children:C?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Criminal Status",children:C.criminal}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Minor Crimes",children:C.mi_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:C.mi_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Major Crimes",children:C.ma_crim}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Details",children:C.ma_crim_d}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Important Notes",preserveWhitespace:!0,children:C.notes})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"Security record lost!"})});break}return(0,e.createComponentVNode)(2,b.Box,{children:[(0,e.createComponentVNode)(2,b.Section,{title:"General Data",children:s?(0,e.createComponentVNode)(2,b.LabeledList,{children:[(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Name",children:s.name}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Sex",children:s.sex}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Species",children:s.species}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Age",children:s.age}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Rank",children:s.rank}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Fingerprint",children:s.fingerprint}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Physical Status",children:s.p_stat}),(0,e.createComponentVNode)(2,b.LabeledList.Item,{label:"Mental Status",children:s.m_stat})]}):(0,e.createComponentVNode)(2,b.Box,{color:"red",bold:!0,children:"General record lost!"})}),h]})}},22091:function(T,r,n){"use strict";r.__esModule=!0,r.TemporaryNotice=void 0;var e=n(89005),a=n(72253),t=n(36036),o=r.TemporaryNotice=function(){function f(b,y){var B,k=(0,a.useBackend)(y),g=k.act,i=k.data,c=i.temp;if(c){var m=(B={},B[c.style]=!0,B);return(0,e.normalizeProps)((0,e.createComponentVNode)(2,t.NoticeBox,Object.assign({},m,{children:(0,e.createComponentVNode)(2,t.Stack,{children:[(0,e.createComponentVNode)(2,t.Stack.Item,{grow:!0,mt:.5,children:c.text}),(0,e.createComponentVNode)(2,t.Stack.Item,{children:(0,e.createComponentVNode)(2,t.Button,{icon:"times-circle",onClick:function(){function l(){return g("cleartemp")}return l}()})})]})})))}}return f}()},95213:function(T,r,n){"use strict";r.__esModule=!0,r.goonstation_PTL=void 0;var e=n(89005),a=n(72253),t=n(36036),o=n(49968),f=n(98595);/**
* @file
* @copyright 2020
* @author Sovexe (https://github.com/Sovexe)
diff --git a/tools/UpdatePaths/Scripts/27682_legacy_random_spawners.txt b/tools/UpdatePaths/Scripts/27682_legacy_random_spawners.txt
new file mode 100644
index 000000000000..5130792700bf
--- /dev/null
+++ b/tools/UpdatePaths/Scripts/27682_legacy_random_spawners.txt
@@ -0,0 +1,9 @@
+/obj/random/toolbox : /obj/effect/spawner/random/engineering/toolbox
+/obj/random/tool : /obj/effect/spawner/random/engineering/tools
+/obj/random/technology_scanner : @DELETE
+/obj/random/tech_supply : @DELETE
+/obj/random/bomb_supply : @DELETE
+/obj/random/powercell : /obj/item/stock_parts/cell, /obj/item/stock_parts/cell/high, /obj/item/stock_parts/cell/super, /obj/item/stock_parts/cell/hyper
+/obj/random/plushie : /obj/effect/spawner/random/plushies
+/obj/random/mech : /obj/effect/spawner/random/toy/mech_figure
+/obj/random/carp_plushie : /obj/effect/spawner/random/toy/carp_plushie
diff --git a/tools/ci/check_grep2.py b/tools/ci/check_grep2.py
index e20a8de822e9..2ed127bae2b9 100644
--- a/tools/ci/check_grep2.py
+++ b/tools/ci/check_grep2.py
@@ -139,12 +139,12 @@ def check_tgui_ui_new_argument(idx, line):
FOR_ALL_NOT_DATUMS = re.compile(r"for\s*\(\s*var\/((?:atom|area|turf|obj|mob)(?:\/\w+))\)")
def check_datum_loops(idx, line):
if FOR_ALL_DATUMS.search(line) or FOR_ALL_NOT_DATUMS.search(line):
- return Failure(
+ return [(
idx + 1,
# yes this will concatenate the strings, don't look too hard
"Found a for loop without explicit contents. If you're trying to loop over everything in the world, first double check that you truly need to, and if so specify \'in world\'.\n"
"If you're trying to check bare datums, please ensure that your value is only cast to /datum, and please make sure you use \'as anything\', or use a global list instead."
- )
+ )]
HREF_OLD_STYLE = re.compile(r"href[\s='\"\\]*\?")
def check_href_styles(idx, line):
diff --git a/tools/ci/check_legacy_attack_chain.py b/tools/ci/check_legacy_attack_chain.py
index b56a1027affb..92a8d30067d7 100644
--- a/tools/ci/check_legacy_attack_chain.py
+++ b/tools/ci/check_legacy_attack_chain.py
@@ -35,6 +35,14 @@ def format_error(self):
return f"{self.source_info.file_path}:{self.source_info.line}: {RED}{self.make_error_message()}{NC}"
+def make_error_from_procdecl(proc_decl: ProcDecl, msg) -> str:
+ if os.getenv("GITHUB_ACTIONS") == "true":
+ return f"::error file={proc_decl.source_info.file_path},line={proc_decl.source_info.line},title=Attack Chain::{proc_decl.source_info.file_path}:{proc_decl.source_info.line}: {RED}{msg}{NC}"
+
+ else:
+ return f"{proc_decl.source_info.file_path}:{proc_decl.source_info.line}: {RED}{msg}{NC}"
+
+
# Walker for determining if a proc contains any calls to a legacy attack chain
# proc on an object that is in the type tree of our migrating type.
#
@@ -149,11 +157,10 @@ def visit_Expr(self, node, source_info):
start = time.time()
CALLS = defaultdict(set)
+ ERROR_STRINGS = list()
+ LEGACY_PROCS = defaultdict(list)
+ MODERN_PROCS = defaultdict(list)
SETTING_CACHE = dict()
- LEGACY_PROCS = dict()
- MODERN_PROCS = dict()
- BAD_TREES = dict()
- PROCS = dict()
dme = DME.from_file("paradise.dme", parse_procs=True)
@@ -171,44 +178,57 @@ def visit_Expr(self, node, source_info):
)
except:
SETTING_CACHE[pth] = False
- LEGACY_PROCS[pth] = {
- x for x in td.proc_names(modified=True) if "__legacy__attackchain" in x
- }
- MODERN_PROCS[pth] = {x for x in td.proc_names(modified=True) if x in NEW_PROCS}
+ for proc_name in td.proc_names(modified=True):
+ if "__legacy__attackchain" in proc_name:
+ for proc_decl in td.proc_decls(proc_name):
+ LEGACY_PROCS[pth].append(proc_decl)
+ elif proc_name in NEW_PROCS:
+ for proc_decl in td.proc_decls(proc_name):
+ MODERN_PROCS[pth].append(proc_decl)
for proc_decl in td.proc_decls():
walker = AttackChainCallWalker(td, proc_decl)
proc_decl.walk(walker)
- for pth, new_attack_chain in SETTING_CACHE.items():
+ for pth in sorted(SETTING_CACHE.keys()):
+ new_attack_chain = SETTING_CACHE[pth]
cursor = pth
if new_attack_chain:
if LEGACY_PROCS[pth]:
exit_code = 1
- print(f"new_attack_chain on {pth} still has legacy procs:")
- for proc in sorted(LEGACY_PROCS[pth]):
- print(f"\t{proc}")
+ for proc_decl in sorted(LEGACY_PROCS[pth], key=lambda x: x.name):
+ ERROR_STRINGS.append(
+ make_error_from_procdecl(
+ proc_decl,
+ f"migrated type with legacy proc {pth}/{proc_decl.name}(...)",
+ )
+ )
while cursor not in ASSISTED_TYPES and not cursor.is_root:
if LEGACY_PROCS[cursor] and not SETTING_CACHE[cursor]:
exit_code = 1
print(f"new_attack_chain on {pth} but related type {cursor} is not")
cursor = cursor.parent
if pth in CALLS and any([x.legacy for x in CALLS[pth]]):
- print("Legacy sites requiring migration:")
for call in CALLS[pth]:
if call.legacy:
- print(call.format_error())
+ ERROR_STRINGS.append(call.format_error())
elif pth not in ASSISTED_TYPES:
if MODERN_PROCS[pth]:
exit_code = 1
- print(f"new_attack_chain not on {pth} using new procs:")
- for proc in sorted(MODERN_PROCS[pth]):
- print(f"\t{proc}")
+ for proc_decl in sorted(MODERN_PROCS[pth], key=lambda x: x.name):
+ ERROR_STRINGS.append(
+ make_error_from_procdecl(
+ proc_decl,
+ f"legacy type with migrated proc {pth}/{proc_decl.name}(...)",
+ )
+ )
if pth in CALLS and any([not x.legacy for x in CALLS[pth]]):
exit_code = 1
- print("Unexpected new call sites:")
for call in CALLS[pth]:
if not call.legacy:
- print(call.format_error())
+ ERROR_STRINGS.append(call.format_error())
+
+ for legacy_proc_error in sorted(ERROR_STRINGS):
+ print(legacy_proc_error)
end = time.time()
print(f"check_legacy_attack_chain tests completed in {end - start:.2f}s\n")
diff --git a/tools/ci/librustlibs_ci.so b/tools/ci/librustlibs_ci.so
index 32ff2a40325b..c118a9c4a6fd 100644
Binary files a/tools/ci/librustlibs_ci.so and b/tools/ci/librustlibs_ci.so differ
diff --git a/tools/ci/unticked_files.py b/tools/ci/unticked_files.py
index 5ab3f6d41ba9..1ee042b30aa6 100644
--- a/tools/ci/unticked_files.py
+++ b/tools/ci/unticked_files.py
@@ -21,7 +21,7 @@
INCLUDER_FILES = [
'paradise.dme',
'code/modules/tgs/includes.dm',
- 'code/modules/unit_tests/_unit_tests.dm',
+ 'code/tests/game_tests.dm',
]
IGNORE_FILES = {
diff --git a/tools/maplint/lints/stack_tile.yml b/tools/maplint/lints/stack_tile.yml
new file mode 100644
index 000000000000..568dbed394ec
--- /dev/null
+++ b/tools/maplint/lints/stack_tile.yml
@@ -0,0 +1,2 @@
+=/obj/item/stack/tile:
+ banned: true
diff --git a/tools/maplint/lints/tile_mineral.yml b/tools/maplint/lints/tile_mineral.yml
new file mode 100644
index 000000000000..271dde768fc9
--- /dev/null
+++ b/tools/maplint/lints/tile_mineral.yml
@@ -0,0 +1,2 @@
+=/obj/item/stack/tile/mineral:
+ banned: true
diff --git a/tools/pr_sql/27474/neckconvert.py b/tools/pr_sql/27474/neckconvert.py
new file mode 100644
index 000000000000..5815a9276975
--- /dev/null
+++ b/tools/pr_sql/27474/neckconvert.py
@@ -0,0 +1,46 @@
+import mysql.connector, argparse, json
+
+parser = argparse.ArgumentParser()
+parser.add_argument("address", help="MySQL server address (use localhost for the current computer)")
+parser.add_argument("username", help="MySQL login username")
+parser.add_argument("password", help="MySQL login password")
+parser.add_argument("database", help="Database name")
+
+args = parser.parse_args()
+db = mysql.connector.connect(host=args.address, user=args.username, passwd=args.password, db=args.database)
+cursor = db.cursor()
+print("Connected to {}".format(args.database))
+
+paths_to_nuke = ["/datum/gear/accessory/scarf", "/datum/gear/accessory/scarf/red", "/datum/gear/accessory/scarf/green", "/datum/gear/accessory/scarf/darkblue", "/datum/gear/accessory/scarf/purple", "/datum/gear/accessory/scarf/yellow", "/datum/gear/accessory/scarf/orange", "/datum/gear/accessory/scarf/lightblue", "/datum/gear/accessory/scarf/white", "/datum/gear/accessory/scarf/black", "/datum/gear/accessory/scarf/zebra", "/datum/gear/accessory/scarf/christmas", "/datum/gear/accessory/scarf/stripedred", "/datum/gear/accessory/scarf/stripedgreen", "/datum/gear/accessory/scarf/stripedblue", "/datum/gear/accessory/tieblue", "/datum/gear/accessory/tiered", "/datum/gear/accessory/tieblack", "/datum/gear/accessory/tiehorrible", "/datum/gear/accessory/stethoscope", "/datum/gear/accessory/locket/silver", "/datum/gear/accessory/locket", "/datum/gear/accessory/necklace/long", "/datum/gear/accessory/necklace", "/datum/gear/suit/mantle", "/datum/gear/suit/old_scarf", "/datum/gear/suit/regal_shawl", "/datum/gear/suit/mantle/job", "/datum/gear/suit/mantle/job/captain", "/datum/gear/suit/mantle/job/ce", "/datum/gear/suit/mantle/job/cmo", "/datum/gear/suit/mantle/job/hos", "/datum/gear/suit/mantle/job/hop", "/datum/gear/suit/mantle/job/rd"]
+
+print("Loading data...")
+load_qry = "SELECT id, gear FROM characters"
+cur.execute(load_qry)
+res = cur.fetchall()
+
+to_replace = []
+
+for row in res:
+ row_id = row[0]
+ loadout = json.loads(row[1])
+
+ edited = False
+ for entry in paths_to_nuke:
+ if entry in loadout:
+ loadout.remove(entry)
+ edited = True
+
+ if edited:
+ to_replace.append([row_id, loadout])
+
+print("Loaded {} rows to update".format(len(to_replace)))
+
+update_qry = "UPDATE characters SET gear=%s WHERE id=%s"
+for entry in to_replace:
+ cur.execute(update_qry, entry)
+
+print("Updates complete")
+cursor.close()
+print("Saving...")
+db.commit()
+print("Done!")