diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm
index a77fcf1bd5..75158aab48 100644
--- a/_maps/map_files/BoxStation/BoxStation.dmm
+++ b/_maps/map_files/BoxStation/BoxStation.dmm
@@ -6471,6 +6471,12 @@
},
/turf/open/floor/plasteel/white,
/area/science/xenobiology)
+"alX" = (
+/obj/structure/disposalpipe/segment{
+ dir = 6
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/chemistry)
"alY" = (
/obj/structure/cable{
icon_state = "1-2"
@@ -8073,6 +8079,13 @@
},
/turf/open/floor/plasteel/showroomfloor,
/area/security/warden)
+"apI" = (
+/obj/structure/disposalpipe/segment{
+ dir = 6
+ },
+/obj/structure/closet/secure_closet/medical1,
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"apJ" = (
/turf/closed/wall,
/area/construction/mining/aux_base)
@@ -9385,6 +9398,13 @@
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
/area/construction/mining/aux_base)
+"asG" = (
+/obj/structure/disposalpipe/trunk{
+ dir = 1
+ },
+/obj/machinery/disposal/bin,
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
"asH" = (
/obj/structure/closet/toolcloset,
/obj/effect/turf_decal/tile/yellow{
@@ -9428,6 +9448,35 @@
},
/turf/open/floor/plating,
/area/maintenance/port/fore)
+"asL" = (
+/obj/machinery/light{
+ dir = 8
+ },
+/obj/machinery/firealarm{
+ dir = 4;
+ pixel_x = -24
+ },
+/obj/item/reagent_containers/spray/cleaner,
+/obj/item/crowbar,
+/obj/item/clothing/neck/stethoscope,
+/obj/item/storage/box/gloves{
+ pixel_x = 3;
+ pixel_y = 4
+ },
+/obj/item/storage/box/masks,
+/obj/structure/table,
+/turf/open/floor/plasteel/white,
+/area/medical/sleeper)
+"asM" = (
+/obj/structure/table,
+/obj/item/crowbar,
+/obj/item/clothing/neck/stethoscope,
+/obj/item/reagent_containers/spray/cleaner,
+/obj/structure/sign/warning/nosmoking{
+ pixel_y = 30
+ },
+/turf/open/floor/plasteel/dark,
+/area/medical/sleeper)
"asN" = (
/obj/machinery/airalarm{
dir = 4;
@@ -9457,12 +9506,66 @@
/obj/structure/closet/firecloset,
/turf/open/floor/plating,
/area/maintenance/fore)
+"asT" = (
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/blue,
+/obj/effect/turf_decal/tile/blue{
+ dir = 4
+ },
+/turf/open/floor/plasteel,
+/area/medical/medbay/central)
+"asU" = (
+/obj/structure/sign/warning/nosmoking{
+ pixel_y = 30
+ },
+/obj/machinery/atmospherics/pipe/simple/supply/hidden{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/yellow{
+ dir = 4
+ },
+/obj/machinery/door/airlock/medical/glass{
+ id_tag = "MedbayFoyer";
+ name = "Medbay";
+ req_access_txt = "5"
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
+"asV" = (
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/blue,
+/obj/effect/turf_decal/tile/blue{
+ dir = 4
+ },
+/turf/open/floor/plasteel,
+/area/medical/medbay/central)
"asW" = (
/obj/machinery/light/small{
dir = 8
},
/turf/open/floor/plasteel/grimy,
/area/security/detectives_office)
+"asX" = (
+/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
+ dir = 4
+ },
+/obj/machinery/door/airlock/medical/glass{
+ id_tag = "MedbayFoyer";
+ name = "Medbay";
+ req_access_txt = "5"
+ },
+/turf/open/floor/plasteel/white,
+/area/medical/medbay/central)
+"asY" = (
+/obj/structure/sign/warning/nosmoking{
+ pixel_y = 30
+ },
+/turf/open/floor/plasteel,
+/area/hallway/primary/central)
"ata" = (
/turf/open/floor/wood,
/area/lawoffice)
@@ -24471,12 +24574,6 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/closed/wall/r_wall,
/area/engine/gravity_generator)
-"bgP" = (
-/obj/structure/disposalpipe/segment{
- dir = 6
- },
-/turf/open/floor/plasteel/white,
-/area/medical/chemistry)
"bgQ" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
dir = 8
@@ -28214,12 +28311,6 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
-"bpy" = (
-/obj/structure/disposalpipe/segment{
- dir = 6
- },
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
"bpz" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
dir = 8
@@ -28708,13 +28799,6 @@
/obj/structure/disposalpipe/segment,
/turf/open/floor/plasteel,
/area/hallway/primary/central)
-"bqM" = (
-/obj/effect/spawner/structure/window/reinforced,
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/turf/open/floor/plating,
-/area/medical/medbay/central)
"bqN" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 5
@@ -28747,22 +28831,6 @@
},
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
-"bqR" = (
-/obj/structure/table,
-/obj/item/crowbar,
-/obj/item/clothing/neck/stethoscope,
-/obj/item/reagent_containers/spray/cleaner,
-/obj/structure/sign/warning/nosmoking{
- pixel_y = 30
- },
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
-/obj/effect/turf_decal/tile/yellow{
- dir = 4
- },
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
"bqS" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -29265,13 +29333,6 @@
/obj/effect/spawner/structure/window/reinforced,
/turf/open/floor/plating,
/area/crew_quarters/heads/hop)
-"brV" = (
-/obj/effect/spawner/structure/window/reinforced,
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 4
- },
-/turf/open/floor/plating,
-/area/medical/medbay/central)
"brW" = (
/obj/structure/cable{
icon_state = "4-8"
@@ -29279,18 +29340,6 @@
/obj/machinery/vending/cart,
/turf/open/floor/plasteel,
/area/crew_quarters/heads/hop)
-"brX" = (
-/obj/structure/table,
-/obj/item/storage/box/masks,
-/obj/item/storage/box/gloves{
- pixel_x = 3;
- pixel_y = 4
- },
-/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
- dir = 4
- },
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
"brY" = (
/obj/structure/disposalpipe/segment{
dir = 6
@@ -31215,23 +31264,10 @@
/obj/effect/turf_decal/delivery,
/turf/open/floor/plasteel,
/area/medical/medbay/central)
-"bwy" = (
-/obj/structure/disposalpipe/segment{
- dir = 5
- },
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
"bwz" = (
/obj/structure/disposalpipe/segment,
/turf/open/floor/plasteel/white,
/area/medical/medbay/central)
-"bwA" = (
-/obj/machinery/disposal/bin,
-/obj/structure/disposalpipe/trunk{
- dir = 8
- },
-/turf/open/floor/plasteel/white,
-/area/medical/medbay/central)
"bwB" = (
/obj/structure/chair,
/obj/machinery/atmospherics/components/unary/vent_scrubber/on{
@@ -32971,17 +33007,6 @@
},
/turf/open/floor/plating,
/area/maintenance/port/aft)
-"bAp" = (
-/obj/structure/closet/secure_closet/medical1,
-/obj/machinery/light{
- dir = 8
- },
-/obj/machinery/firealarm{
- dir = 4;
- pixel_x = -24
- },
-/turf/open/floor/plasteel/white,
-/area/medical/sleeper)
"bAq" = (
/obj/machinery/sleeper{
dir = 8
@@ -92215,7 +92240,7 @@ btJ
buV
bws
bqH
-aJq
+asY
aJq
byW
bCv
@@ -94266,8 +94291,8 @@ bfF
bfF
bfF
bfF
-bqM
-brV
+asT
+asV
bof
bwv
bvj
@@ -94523,8 +94548,8 @@ bmF
bob
bnB
bfF
-bqR
-brX
+asU
+asX
bof
bwx
bvj
@@ -95031,7 +95056,7 @@ aYV
bfF
bhc
bip
-bgP
+alX
bjL
bkL
bmT
@@ -95297,7 +95322,7 @@ bpF
bqS
brY
bwz
-bwy
+asG
bvj
bza
bxb
@@ -95553,10 +95578,10 @@ bpt
bfF
bqV
bEe
+bhh
bBL
-bwA
bvj
-bAl
+asM
bAl
bvh
bzS
@@ -96071,7 +96096,7 @@ bvh
ajv
bxN
bze
-bAp
+asL
bvh
bCG
bBd
@@ -98119,7 +98144,7 @@ bjX
blp
bmO
bhi
-bpy
+apI
bwz
brg
btZ
diff --git a/_maps/map_files/Mafia/mafia_ayylmao.dmm b/_maps/map_files/Mafia/mafia_ayylmao.dmm
new file mode 100644
index 0000000000..5d6f2aec5f
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_ayylmao.dmm
@@ -0,0 +1,768 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"b" = (
+/turf/closed/indestructible{
+ desc = "A wall with alien alloy plating.";
+ icon = 'icons/turf/walls/abductor_wall.dmi';
+ icon_state = "abductor";
+ name = "alien wall";
+ smooth = 5
+ },
+/area/mafia)
+"g" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"h" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/plating,
+/area/mafia)
+"i" = (
+/turf/open/floor/fakespace,
+/area/mafia)
+"j" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien22"
+ },
+/area/mafia)
+"k" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating,
+/area/mafia)
+"l" = (
+/obj/structure/closet/abductor,
+/turf/open/floor/plating/abductor,
+/area/mafia)
+"m" = (
+/obj/effect/landmark/mafia,
+/obj/structure/bed/abductor,
+/turf/open/floor/plating/abductor,
+/area/mafia)
+"n" = (
+/obj/effect/landmark/mafia,
+/obj/structure/bed/abductor,
+/turf/open/floor/plating/abductor2,
+/area/mafia)
+"o" = (
+/obj/structure/closet/abductor,
+/turf/open/floor/plating/abductor2,
+/area/mafia)
+"p" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/turf/closed/indestructible/fakeglass,
+/area/mafia)
+"q" = (
+/turf/open/floor/plating/abductor,
+/area/mafia)
+"r" = (
+/turf/open/floor/plating/abductor2,
+/area/mafia)
+"t" = (
+/turf/open/floor/light/colour_cycle/dancefloor_a,
+/area/mafia)
+"u" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/turf/open/floor/light/colour_cycle/dancefloor_b,
+/area/mafia)
+"v" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"x" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/obj/effect/spawner/structure/window/plastitanium,
+/turf/open/floor/plating/abductor2,
+/area/mafia)
+"z" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/fakespace,
+/area/mafia)
+"B" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien2"
+ },
+/area/mafia)
+"D" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien15"
+ },
+/area/mafia)
+"E" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien7"
+ },
+/area/mafia)
+"F" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien12"
+ },
+/area/mafia)
+"G" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien17"
+ },
+/area/mafia)
+"H" = (
+/turf/open/space/basic,
+/area/mafia)
+"I" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien24"
+ },
+/area/mafia)
+"J" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien18"
+ },
+/area/mafia)
+"K" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien11"
+ },
+/area/mafia)
+"L" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien14"
+ },
+/area/mafia)
+"M" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien4"
+ },
+/area/mafia)
+"N" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien21"
+ },
+/area/mafia)
+"P" = (
+/turf/closed/indestructible/abductor,
+/area/mafia)
+"Q" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien5"
+ },
+/area/mafia)
+"S" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien3"
+ },
+/area/mafia)
+"U" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien23"
+ },
+/area/mafia)
+"V" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien13"
+ },
+/area/mafia)
+"W" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien20"
+ },
+/area/mafia)
+"Y" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien8"
+ },
+/area/mafia)
+"Z" = (
+/turf/closed/indestructible/abductor{
+ icon_state = "alien10"
+ },
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+a
+"}
+(3,1,1) = {"
+a
+b
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+b
+a
+"}
+(4,1,1) = {"
+a
+b
+i
+i
+g
+z
+i
+i
+i
+i
+i
+i
+i
+i
+i
+H
+i
+z
+k
+i
+i
+b
+a
+"}
+(5,1,1) = {"
+a
+b
+i
+i
+z
+i
+i
+i
+W
+L
+F
+F
+F
+Z
+P
+i
+i
+i
+h
+i
+i
+b
+a
+"}
+(6,1,1) = {"
+a
+b
+i
+i
+i
+W
+L
+Z
+G
+l
+q
+b
+r
+o
+E
+L
+Z
+P
+i
+i
+i
+b
+a
+"}
+(7,1,1) = {"
+a
+b
+i
+i
+i
+N
+o
+r
+p
+m
+q
+x
+r
+n
+x
+q
+l
+B
+i
+i
+i
+b
+a
+"}
+(8,1,1) = {"
+a
+b
+i
+i
+i
+U
+n
+r
+b
+b
+q
+b
+r
+b
+b
+q
+m
+M
+i
+i
+i
+b
+a
+"}
+(9,1,1) = {"
+a
+b
+i
+i
+W
+G
+x
+r
+r
+x
+q
+x
+r
+x
+q
+q
+x
+E
+P
+i
+i
+b
+a
+"}
+(10,1,1) = {"
+a
+b
+i
+i
+N
+l
+x
+b
+x
+x
+x
+x
+x
+x
+x
+b
+x
+o
+B
+i
+i
+b
+a
+"}
+(11,1,1) = {"
+a
+b
+i
+i
+j
+m
+q
+q
+q
+x
+t
+t
+t
+x
+r
+r
+r
+n
+S
+i
+i
+b
+a
+"}
+(12,1,1) = {"
+a
+b
+i
+i
+j
+b
+x
+b
+x
+x
+t
+u
+t
+x
+x
+b
+x
+b
+S
+i
+i
+b
+a
+"}
+(13,1,1) = {"
+a
+b
+i
+i
+j
+n
+r
+r
+r
+x
+t
+t
+t
+x
+q
+q
+q
+m
+S
+i
+i
+b
+a
+"}
+(14,1,1) = {"
+a
+b
+i
+i
+U
+o
+x
+b
+x
+x
+x
+x
+x
+x
+x
+b
+x
+l
+M
+i
+i
+b
+a
+"}
+(15,1,1) = {"
+a
+b
+i
+i
+I
+J
+x
+q
+q
+x
+r
+x
+q
+x
+r
+r
+x
+Y
+Q
+i
+i
+b
+a
+"}
+(16,1,1) = {"
+a
+b
+i
+i
+i
+N
+m
+q
+b
+b
+r
+b
+q
+b
+b
+r
+n
+B
+i
+i
+i
+b
+a
+"}
+(17,1,1) = {"
+a
+b
+i
+i
+i
+U
+l
+q
+x
+n
+r
+x
+q
+m
+x
+r
+o
+M
+i
+i
+i
+b
+a
+"}
+(18,1,1) = {"
+a
+b
+i
+i
+i
+I
+D
+K
+J
+o
+r
+b
+q
+l
+Y
+D
+K
+Q
+i
+i
+i
+b
+a
+"}
+(19,1,1) = {"
+a
+b
+i
+i
+z
+i
+i
+i
+I
+D
+V
+V
+V
+K
+Q
+i
+i
+i
+z
+i
+i
+b
+a
+"}
+(20,1,1) = {"
+a
+b
+i
+i
+k
+z
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+z
+v
+i
+i
+b
+a
+"}
+(21,1,1) = {"
+a
+b
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+i
+b
+a
+"}
+(22,1,1) = {"
+a
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/Mafia/mafia_ball.dmm b/_maps/map_files/Mafia/mafia_ball.dmm
new file mode 100644
index 0000000000..6ca955726b
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_ball.dmm
@@ -0,0 +1,675 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"c" = (
+/turf/closed/wall/rust,
+/area/mafia)
+"d" = (
+/turf/open/floor/plating,
+/area/mafia)
+"e" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"f" = (
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"g" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"h" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/plating,
+/area/mafia)
+"i" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg1"
+ },
+/area/mafia)
+"j" = (
+/obj/machinery/door/airlock/maintenance_hatch{
+ max_integrity = 99999;
+ name = "Maintenance"
+ },
+/obj/effect/mapping_helpers/airlock/locked,
+/turf/open/floor/plating,
+/area/mafia)
+"k" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating,
+/area/mafia)
+"l" = (
+/obj/structure/closet/cabinet{
+ anchored = 1
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"m" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"n" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/plasteel,
+/area/mafia)
+"o" = (
+/obj/structure/closet/cabinet{
+ anchored = 1
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"p" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/turf/closed/indestructible/fakeglass,
+/area/mafia)
+"q" = (
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"r" = (
+/turf/open/floor/plasteel,
+/area/mafia)
+"s" = (
+/turf/open/floor/fakespace,
+/area/mafia)
+"t" = (
+/turf/open/floor/plasteel/solarpanel,
+/area/mafia)
+"u" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/turf/open/floor/plasteel/solarpanel,
+/area/mafia)
+"v" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(3,1,1) = {"
+a
+a
+a
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+a
+a
+a
+"}
+(4,1,1) = {"
+a
+a
+a
+c
+g
+h
+d
+d
+d
+d
+d
+e
+d
+d
+d
+d
+d
+h
+k
+c
+a
+a
+a
+"}
+(5,1,1) = {"
+a
+a
+a
+c
+h
+d
+d
+e
+a
+a
+j
+a
+j
+a
+a
+d
+d
+i
+h
+c
+a
+a
+a
+"}
+(6,1,1) = {"
+a
+a
+a
+c
+i
+a
+a
+j
+a
+l
+q
+a
+r
+o
+a
+j
+a
+a
+d
+c
+a
+a
+a
+"}
+(7,1,1) = {"
+a
+a
+c
+c
+d
+a
+o
+r
+p
+m
+q
+p
+r
+n
+p
+q
+l
+a
+d
+c
+c
+a
+a
+"}
+(8,1,1) = {"
+a
+a
+c
+d
+d
+a
+n
+r
+a
+a
+q
+a
+r
+a
+a
+q
+m
+a
+d
+d
+c
+a
+a
+"}
+(9,1,1) = {"
+a
+a
+c
+d
+a
+a
+p
+r
+r
+p
+q
+p
+r
+p
+q
+q
+p
+a
+a
+d
+c
+a
+a
+"}
+(10,1,1) = {"
+a
+a
+c
+d
+a
+l
+p
+a
+p
+p
+p
+p
+p
+p
+p
+a
+p
+o
+a
+d
+c
+a
+a
+"}
+(11,1,1) = {"
+a
+a
+c
+d
+j
+m
+q
+q
+q
+p
+s
+t
+s
+p
+r
+r
+r
+n
+j
+e
+c
+a
+a
+"}
+(12,1,1) = {"
+a
+a
+c
+e
+a
+a
+p
+a
+p
+p
+t
+u
+t
+p
+p
+a
+p
+a
+a
+d
+c
+a
+a
+"}
+(13,1,1) = {"
+a
+a
+c
+d
+j
+n
+r
+r
+r
+p
+s
+t
+s
+p
+q
+q
+q
+m
+j
+d
+c
+a
+a
+"}
+(14,1,1) = {"
+a
+a
+c
+d
+a
+o
+p
+a
+p
+p
+p
+p
+p
+p
+p
+a
+p
+l
+a
+i
+c
+a
+a
+"}
+(15,1,1) = {"
+a
+a
+c
+d
+a
+a
+p
+q
+q
+p
+r
+p
+q
+p
+r
+r
+p
+a
+a
+d
+c
+a
+a
+"}
+(16,1,1) = {"
+a
+a
+c
+f
+d
+a
+m
+q
+a
+a
+r
+a
+q
+a
+a
+r
+n
+a
+d
+d
+c
+a
+a
+"}
+(17,1,1) = {"
+a
+a
+c
+c
+d
+a
+l
+q
+p
+n
+r
+p
+q
+m
+p
+r
+o
+a
+d
+c
+c
+a
+a
+"}
+(18,1,1) = {"
+a
+a
+a
+c
+d
+a
+a
+j
+a
+o
+r
+a
+q
+l
+a
+j
+a
+a
+d
+c
+a
+a
+a
+"}
+(19,1,1) = {"
+a
+a
+a
+c
+h
+i
+d
+d
+a
+a
+j
+a
+j
+a
+a
+d
+e
+d
+h
+c
+a
+a
+a
+"}
+(20,1,1) = {"
+a
+a
+a
+c
+k
+h
+d
+d
+e
+d
+d
+d
+d
+d
+d
+d
+d
+h
+v
+c
+a
+a
+a
+"}
+(21,1,1) = {"
+a
+a
+a
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+a
+a
+a
+"}
+(22,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/Mafia/mafia_gothic.dmm b/_maps/map_files/Mafia/mafia_gothic.dmm
new file mode 100644
index 0000000000..a3c19fee85
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_gothic.dmm
@@ -0,0 +1,724 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"b" = (
+/turf/closed/wall/mineral/iron,
+/area/mafia)
+"c" = (
+/turf/closed/wall/rust,
+/area/mafia)
+"d" = (
+/turf/open/floor/plating,
+/area/mafia)
+"e" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"f" = (
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"g" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"h" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/plating,
+/area/mafia)
+"i" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg1"
+ },
+/area/mafia)
+"j" = (
+/turf/closed/indestructible/fakedoor,
+/area/mafia)
+"k" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating,
+/area/mafia)
+"l" = (
+/obj/structure/closet/crate/coffin,
+/turf/open/floor/carpet/red,
+/area/mafia)
+"m" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/carpet/red,
+/area/mafia)
+"n" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/plasteel/chapel{
+ dir = 1
+ },
+/area/mafia)
+"o" = (
+/obj/structure/closet/crate/coffin,
+/turf/open/floor/plasteel/chapel{
+ dir = 4
+ },
+/area/mafia)
+"p" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/obj/effect/spawner/structure/window/plastitanium,
+/turf/open/space/basic,
+/area/mafia)
+"q" = (
+/turf/open/floor/carpet/red,
+/area/mafia)
+"r" = (
+/turf/open/floor/plasteel/chapel{
+ dir = 8
+ },
+/area/mafia)
+"t" = (
+/turf/open/floor/carpet/royalblack,
+/area/mafia)
+"u" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/turf/open/floor/carpet/royalblack,
+/area/mafia)
+"v" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"D" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/plasteel/chapel{
+ dir = 4
+ },
+/area/mafia)
+"E" = (
+/turf/open/floor/plasteel/chapel{
+ dir = 4
+ },
+/area/mafia)
+"H" = (
+/obj/structure/closet/cabinet{
+ anchored = 1
+ },
+/turf/open/floor/carpet/red,
+/area/mafia)
+"J" = (
+/obj/structure/closet/crate/coffin,
+/turf/open/floor/plasteel/chapel{
+ dir = 1
+ },
+/area/mafia)
+"M" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/plasteel/chapel{
+ dir = 8
+ },
+/area/mafia)
+"N" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/plasteel/chapel,
+/area/mafia)
+"O" = (
+/turf/open/floor/plasteel/chapel,
+/area/mafia)
+"P" = (
+/obj/structure/closet/crate/coffin,
+/turf/open/floor/plasteel/chapel,
+/area/mafia)
+"Q" = (
+/obj/structure/closet/crate/coffin,
+/turf/open/floor/plasteel/chapel{
+ dir = 8
+ },
+/area/mafia)
+"X" = (
+/turf/open/floor/plasteel/chapel{
+ dir = 1
+ },
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+a
+"}
+(3,1,1) = {"
+a
+b
+b
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+b
+b
+a
+"}
+(4,1,1) = {"
+a
+b
+b
+c
+g
+h
+d
+d
+d
+d
+d
+e
+d
+d
+d
+d
+d
+h
+k
+c
+b
+b
+a
+"}
+(5,1,1) = {"
+a
+b
+b
+c
+h
+d
+d
+e
+b
+b
+j
+b
+j
+b
+b
+d
+d
+i
+h
+c
+b
+b
+a
+"}
+(6,1,1) = {"
+a
+b
+b
+c
+i
+b
+b
+j
+b
+l
+q
+b
+X
+Q
+b
+j
+b
+b
+d
+c
+b
+b
+a
+"}
+(7,1,1) = {"
+a
+b
+c
+c
+d
+b
+J
+r
+p
+m
+q
+p
+E
+N
+p
+q
+l
+b
+d
+c
+c
+b
+a
+"}
+(8,1,1) = {"
+a
+b
+c
+d
+d
+b
+D
+O
+b
+b
+q
+b
+r
+b
+b
+q
+m
+b
+d
+d
+c
+b
+a
+"}
+(9,1,1) = {"
+a
+b
+c
+d
+b
+b
+p
+X
+r
+p
+q
+p
+O
+p
+q
+q
+p
+b
+b
+d
+c
+b
+a
+"}
+(10,1,1) = {"
+a
+b
+c
+d
+b
+l
+p
+b
+p
+p
+p
+p
+p
+p
+p
+b
+p
+Q
+b
+d
+c
+b
+a
+"}
+(11,1,1) = {"
+a
+b
+c
+d
+j
+m
+q
+q
+q
+p
+t
+t
+t
+p
+X
+r
+E
+N
+j
+e
+c
+b
+a
+"}
+(12,1,1) = {"
+a
+b
+c
+e
+b
+b
+p
+b
+p
+p
+t
+u
+t
+p
+p
+b
+p
+b
+b
+d
+c
+b
+a
+"}
+(13,1,1) = {"
+a
+b
+c
+d
+j
+n
+r
+E
+O
+p
+t
+t
+t
+p
+q
+q
+q
+m
+j
+d
+c
+b
+a
+"}
+(14,1,1) = {"
+a
+b
+c
+d
+b
+o
+p
+b
+p
+p
+p
+p
+p
+p
+p
+b
+p
+l
+b
+i
+c
+b
+a
+"}
+(15,1,1) = {"
+a
+b
+c
+d
+b
+b
+p
+q
+q
+p
+X
+p
+q
+p
+E
+O
+p
+b
+b
+d
+c
+b
+a
+"}
+(16,1,1) = {"
+a
+b
+c
+f
+d
+b
+m
+q
+b
+b
+E
+b
+q
+b
+b
+X
+M
+b
+d
+d
+c
+b
+a
+"}
+(17,1,1) = {"
+a
+b
+c
+c
+d
+b
+l
+q
+p
+n
+r
+p
+q
+m
+p
+E
+P
+b
+d
+c
+c
+b
+a
+"}
+(18,1,1) = {"
+a
+b
+b
+c
+d
+b
+b
+j
+b
+o
+O
+b
+q
+H
+b
+j
+b
+b
+d
+c
+b
+b
+a
+"}
+(19,1,1) = {"
+a
+b
+b
+c
+h
+i
+d
+d
+b
+b
+j
+b
+j
+b
+b
+d
+e
+d
+h
+c
+b
+b
+a
+"}
+(20,1,1) = {"
+a
+b
+b
+c
+k
+h
+d
+d
+e
+d
+d
+d
+d
+d
+d
+d
+d
+h
+v
+c
+b
+b
+a
+"}
+(21,1,1) = {"
+a
+b
+b
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+b
+b
+a
+"}
+(22,1,1) = {"
+a
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/Mafia/mafia_lavaland.dmm b/_maps/map_files/Mafia/mafia_lavaland.dmm
new file mode 100644
index 0000000000..8c58fb9054
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_lavaland.dmm
@@ -0,0 +1,976 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"c" = (
+/turf/closed/wall/rust,
+/area/mafia)
+"d" = (
+/turf/open/floor/plating,
+/area/mafia)
+"e" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"f" = (
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"g" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"h" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/plating,
+/area/mafia)
+"i" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg1"
+ },
+/area/mafia)
+"j" = (
+/obj/machinery/door/airlock/external{
+ max_integrity = 99999;
+ name = "Maintenance"
+ },
+/obj/effect/mapping_helpers/airlock/locked,
+/turf/open/floor/plating,
+/area/mafia)
+"k" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating,
+/area/mafia)
+"l" = (
+/obj/structure/closet{
+ desc = "It's a storage unit. For mining stuff. Y'know.";
+ icon_state = "mining";
+ name = "miner equipment locker"
+ },
+/obj/item/clothing/under/rank/cargo/miner/lavaland,
+/turf/open/floor/grass/fakebasalt,
+/area/mafia)
+"m" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/grass/fakebasalt,
+/area/mafia)
+"n" = (
+/obj/effect/landmark/mafia,
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 9
+ },
+/obj/effect/turf_decal/trimline/brown/filled/corner,
+/turf/open/floor/plasteel,
+/area/mafia)
+"o" = (
+/obj/effect/turf_decal/trimline/brown/filled/end{
+ icon_state = "trimline_end_fill";
+ dir = 4
+ },
+/obj/structure/closet{
+ desc = "It's a storage unit. For mining stuff. Y'know.";
+ icon_state = "mining";
+ name = "miner equipment locker"
+ },
+/obj/item/clothing/under/rank/cargo/miner/lavaland,
+/turf/open/floor/plasteel,
+/area/mafia)
+"p" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/turf/closed/indestructible/fakeglass,
+/area/mafia)
+"q" = (
+/turf/open/floor/grass/fakebasalt,
+/area/mafia)
+"r" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 9
+ },
+/obj/structure/closet{
+ desc = "It's a storage unit. For mining stuff. Y'know.";
+ icon_state = "mining";
+ name = "miner equipment locker"
+ },
+/obj/item/clothing/under/rank/cargo/miner/lavaland,
+/turf/open/floor/plasteel,
+/area/mafia)
+"s" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 9
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"t" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"u" = (
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red,
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"v" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"w" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 1
+ },
+/obj/effect/turf_decal/trimline/brown/filled/corner,
+/turf/open/floor/plasteel,
+/area/mafia)
+"x" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 1
+ },
+/obj/effect/turf_decal/trimline/brown/filled/line,
+/turf/open/floor/plasteel,
+/area/mafia)
+"y" = (
+/obj/effect/turf_decal/trimline/brown/filled/end{
+ icon_state = "trimline_end_fill";
+ dir = 4
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"z" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 5
+ },
+/obj/structure/closet{
+ desc = "It's a storage unit. For mining stuff. Y'know.";
+ icon_state = "mining";
+ name = "miner equipment locker"
+ },
+/obj/item/clothing/under/rank/cargo/miner/lavaland,
+/turf/open/floor/plasteel,
+/area/mafia)
+"A" = (
+/obj/effect/landmark/mafia,
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 6
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"B" = (
+/obj/effect/turf_decal/trimline/brown/filled/end{
+ icon_state = "trimline_end_fill";
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"C" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 4
+ },
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 8
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"D" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 10
+ },
+/obj/effect/turf_decal/trimline/brown/filled/corner{
+ icon_state = "trimline_corner_fill";
+ dir = 4
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"E" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 1
+ },
+/obj/effect/turf_decal/trimline/brown/filled/corner{
+ icon_state = "trimline_corner_fill";
+ dir = 8
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"F" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 5
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"G" = (
+/obj/effect/landmark/mafia,
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 10
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"H" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 10
+ },
+/obj/structure/closet{
+ desc = "It's a storage unit. For mining stuff. Y'know.";
+ icon_state = "mining";
+ name = "miner equipment locker"
+ },
+/obj/item/clothing/under/rank/cargo/miner/lavaland,
+/turf/open/floor/plasteel,
+/area/mafia)
+"I" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 6
+ },
+/obj/structure/closet{
+ desc = "It's a storage unit. For mining stuff. Y'know.";
+ icon_state = "mining";
+ name = "miner equipment locker"
+ },
+/obj/item/clothing/under/rank/cargo/miner/lavaland,
+/turf/open/floor/plasteel,
+/area/mafia)
+"J" = (
+/obj/effect/landmark/mafia,
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 6
+ },
+/obj/effect/turf_decal/trimline/brown/filled/corner{
+ icon_state = "trimline_corner_fill";
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"K" = (
+/obj/effect/turf_decal/trimline/brown/filled/end{
+ icon_state = "trimline_end_fill";
+ dir = 8
+ },
+/obj/structure/closet{
+ desc = "It's a storage unit. For mining stuff. Y'know.";
+ icon_state = "mining";
+ name = "miner equipment locker"
+ },
+/obj/item/clothing/under/rank/cargo/miner/lavaland,
+/turf/open/floor/plasteel,
+/area/mafia)
+"L" = (
+/obj/effect/landmark/mafia,
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 5
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"M" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 10
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"N" = (
+/obj/effect/turf_decal/trimline/brown/filled/line,
+/obj/effect/turf_decal/trimline/brown/filled/corner{
+ icon_state = "trimline_corner_fill";
+ dir = 4
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"O" = (
+/obj/effect/turf_decal/trimline/brown/filled/corner{
+ icon_state = "trimline_corner_fill";
+ dir = 8
+ },
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 5
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"P" = (
+/obj/effect/turf_decal/trimline/brown/filled/end,
+/turf/open/floor/plasteel,
+/area/mafia)
+"Q" = (
+/obj/effect/landmark/mafia,
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 9
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"R" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"S" = (
+/obj/effect/turf_decal/trimline/brown/filled/end{
+ icon_state = "trimline_end_fill";
+ dir = 8
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"T" = (
+/obj/effect/turf_decal/trimline/brown/filled/line,
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"U" = (
+/obj/effect/turf_decal/trimline/brown/filled/line,
+/obj/effect/turf_decal/trimline/brown/filled/corner{
+ icon_state = "trimline_corner_fill";
+ dir = 1
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"V" = (
+/obj/effect/turf_decal/trimline/brown/filled/line{
+ icon_state = "trimline_fill";
+ dir = 6
+ },
+/turf/open/floor/plasteel,
+/area/mafia)
+"W" = (
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"X" = (
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"Y" = (
+/turf/closed/indestructible{
+ icon = 'icons/turf/walls/reinforced_wall.dmi';
+ icon_state = "r_wall";
+ name = "reinforced wall"
+ },
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+a
+"}
+(3,1,1) = {"
+a
+Y
+Y
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+Y
+Y
+a
+"}
+(4,1,1) = {"
+a
+Y
+Y
+c
+g
+h
+d
+d
+d
+d
+d
+e
+d
+d
+d
+d
+d
+h
+k
+c
+Y
+Y
+a
+"}
+(5,1,1) = {"
+a
+Y
+Y
+c
+h
+d
+d
+e
+Y
+Y
+j
+Y
+j
+Y
+Y
+d
+d
+i
+h
+c
+Y
+Y
+a
+"}
+(6,1,1) = {"
+a
+Y
+Y
+c
+i
+Y
+Y
+j
+Y
+l
+q
+Y
+s
+H
+Y
+j
+Y
+Y
+d
+c
+Y
+Y
+a
+"}
+(7,1,1) = {"
+a
+Y
+c
+c
+d
+Y
+r
+M
+p
+m
+q
+p
+w
+A
+p
+q
+l
+Y
+d
+c
+c
+Y
+a
+"}
+(8,1,1) = {"
+a
+Y
+c
+d
+d
+Y
+L
+N
+Y
+Y
+q
+Y
+x
+Y
+Y
+q
+m
+Y
+d
+d
+c
+Y
+a
+"}
+(9,1,1) = {"
+a
+Y
+c
+d
+Y
+Y
+p
+O
+P
+p
+q
+p
+y
+p
+q
+q
+p
+Y
+Y
+d
+c
+Y
+a
+"}
+(10,1,1) = {"
+a
+Y
+c
+d
+Y
+l
+p
+Y
+p
+p
+p
+p
+p
+p
+p
+Y
+p
+K
+Y
+d
+c
+Y
+a
+"}
+(11,1,1) = {"
+a
+Y
+c
+d
+j
+m
+q
+q
+q
+p
+q
+u
+q
+p
+B
+C
+C
+J
+j
+e
+c
+Y
+a
+"}
+(12,1,1) = {"
+a
+Y
+c
+e
+Y
+Y
+p
+Y
+p
+p
+t
+R
+X
+p
+p
+Y
+p
+Y
+Y
+d
+c
+Y
+a
+"}
+(13,1,1) = {"
+a
+Y
+c
+d
+j
+n
+C
+C
+P
+p
+q
+W
+q
+p
+q
+q
+q
+m
+j
+d
+c
+Y
+a
+"}
+(14,1,1) = {"
+a
+Y
+c
+d
+Y
+o
+p
+Y
+p
+p
+p
+p
+p
+p
+p
+Y
+p
+l
+Y
+i
+c
+Y
+a
+"}
+(15,1,1) = {"
+a
+Y
+c
+d
+Y
+Y
+p
+q
+q
+p
+S
+p
+q
+p
+B
+D
+p
+Y
+Y
+d
+c
+Y
+a
+"}
+(16,1,1) = {"
+a
+Y
+c
+f
+d
+Y
+m
+q
+Y
+Y
+T
+Y
+q
+Y
+Y
+E
+G
+Y
+d
+d
+c
+Y
+a
+"}
+(17,1,1) = {"
+a
+Y
+c
+c
+d
+Y
+l
+q
+p
+Q
+U
+p
+q
+m
+p
+F
+I
+Y
+d
+c
+c
+Y
+a
+"}
+(18,1,1) = {"
+a
+Y
+Y
+c
+d
+Y
+Y
+j
+Y
+z
+V
+Y
+q
+l
+Y
+j
+Y
+Y
+d
+c
+Y
+Y
+a
+"}
+(19,1,1) = {"
+a
+Y
+Y
+c
+h
+i
+d
+d
+Y
+Y
+j
+Y
+j
+Y
+Y
+d
+e
+d
+h
+c
+Y
+Y
+a
+"}
+(20,1,1) = {"
+a
+Y
+Y
+c
+k
+h
+d
+d
+e
+d
+d
+d
+d
+d
+d
+d
+d
+h
+v
+c
+Y
+Y
+a
+"}
+(21,1,1) = {"
+a
+Y
+Y
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+Y
+Y
+a
+"}
+(22,1,1) = {"
+a
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+Y
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/Mafia/mafia_reebe.dmm b/_maps/map_files/Mafia/mafia_reebe.dmm
new file mode 100644
index 0000000000..e82174ff93
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_reebe.dmm
@@ -0,0 +1,658 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"b" = (
+/turf/open/indestructible/reebe_void,
+/area/mafia)
+"c" = (
+/turf/open/indestructible/reebe_void/spawning/lattices,
+/area/mafia)
+"d" = (
+/obj/mafia_game_board,
+/turf/open/indestructible/reebe_void/spawning/lattices,
+/area/mafia)
+"e" = (
+/turf/closed/wall/clockwork,
+/area/mafia)
+"f" = (
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"g" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"h" = (
+/obj/structure/window/reinforced/clockwork/fulltile,
+/obj/structure/grille/ratvar,
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"i" = (
+/obj/structure/bed,
+/obj/item/bedsheet/orange,
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"j" = (
+/obj/structure/chair/brass{
+ dir = 4
+ },
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"k" = (
+/obj/structure/chair/brass,
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"l" = (
+/obj/structure/chair/brass{
+ dir = 8
+ },
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"m" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/obj/structure/chair/brass,
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"n" = (
+/obj/structure/chair/brass{
+ icon_state = "brass_chair";
+ dir = 1
+ },
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"o" = (
+/obj/item/toy/plush/plushvar,
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"p" = (
+/obj/structure/window/reinforced/clockwork/fulltile,
+/obj/structure/grille/ratvar,
+/turf/open/floor/clockwork/reebe,
+/area/mafia)
+"q" = (
+/obj/item/toy/plush/plushvar,
+/turf/open/indestructible/reebe_void/spawning/lattices,
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+a
+"}
+(3,1,1) = {"
+a
+b
+b
+c
+c
+c
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+c
+c
+c
+b
+b
+a
+"}
+(4,1,1) = {"
+a
+b
+b
+c
+d
+c
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+q
+d
+c
+b
+b
+a
+"}
+(5,1,1) = {"
+a
+b
+b
+c
+c
+c
+c
+b
+e
+e
+p
+e
+p
+e
+e
+b
+b
+c
+c
+c
+b
+b
+a
+"}
+(6,1,1) = {"
+a
+b
+b
+b
+b
+p
+p
+e
+e
+i
+f
+e
+f
+i
+e
+e
+p
+p
+c
+b
+b
+b
+a
+"}
+(7,1,1) = {"
+a
+b
+b
+b
+b
+p
+i
+f
+h
+g
+f
+h
+f
+g
+h
+f
+i
+p
+b
+b
+b
+b
+a
+"}
+(8,1,1) = {"
+a
+b
+b
+b
+b
+e
+g
+f
+e
+e
+f
+e
+f
+e
+e
+f
+g
+e
+b
+b
+b
+b
+a
+"}
+(9,1,1) = {"
+a
+b
+b
+b
+e
+e
+h
+f
+j
+h
+j
+h
+j
+h
+j
+f
+h
+e
+e
+b
+b
+b
+a
+"}
+(10,1,1) = {"
+a
+b
+b
+b
+e
+i
+h
+e
+h
+h
+h
+h
+h
+h
+h
+e
+h
+i
+e
+b
+b
+b
+a
+"}
+(11,1,1) = {"
+a
+b
+b
+b
+p
+g
+f
+f
+k
+h
+f
+f
+o
+h
+n
+f
+f
+g
+p
+b
+b
+b
+a
+"}
+(12,1,1) = {"
+a
+b
+b
+b
+e
+e
+h
+e
+h
+h
+f
+m
+f
+h
+h
+e
+h
+e
+e
+b
+b
+b
+a
+"}
+(13,1,1) = {"
+a
+b
+b
+b
+p
+g
+f
+f
+k
+h
+f
+f
+f
+h
+n
+f
+f
+g
+p
+b
+b
+b
+a
+"}
+(14,1,1) = {"
+a
+b
+b
+b
+e
+i
+h
+e
+h
+h
+h
+h
+h
+h
+h
+e
+h
+i
+e
+b
+b
+b
+a
+"}
+(15,1,1) = {"
+a
+b
+b
+b
+e
+e
+h
+f
+l
+h
+l
+h
+l
+h
+l
+f
+h
+e
+e
+b
+b
+b
+a
+"}
+(16,1,1) = {"
+a
+b
+b
+b
+b
+e
+g
+f
+e
+e
+f
+e
+f
+e
+e
+f
+g
+e
+b
+b
+b
+b
+a
+"}
+(17,1,1) = {"
+a
+b
+b
+b
+b
+p
+i
+f
+h
+g
+f
+h
+f
+g
+h
+f
+i
+p
+b
+b
+b
+b
+a
+"}
+(18,1,1) = {"
+a
+b
+b
+b
+b
+p
+p
+e
+e
+f
+i
+e
+i
+f
+e
+e
+p
+p
+c
+b
+b
+b
+a
+"}
+(19,1,1) = {"
+a
+b
+b
+c
+c
+c
+c
+b
+e
+e
+p
+e
+p
+e
+e
+b
+b
+c
+c
+c
+b
+b
+a
+"}
+(20,1,1) = {"
+a
+b
+b
+c
+d
+c
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+c
+d
+c
+b
+b
+a
+"}
+(21,1,1) = {"
+a
+b
+b
+c
+c
+c
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+c
+c
+c
+b
+b
+a
+"}
+(22,1,1) = {"
+a
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+b
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/Mafia/mafia_snow.dmm b/_maps/map_files/Mafia/mafia_snow.dmm
new file mode 100644
index 0000000000..a47440f00e
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_snow.dmm
@@ -0,0 +1,755 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"d" = (
+/turf/open/floor/plating,
+/area/mafia)
+"e" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"f" = (
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"g" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"h" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/plating,
+/area/mafia)
+"i" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg1"
+ },
+/area/mafia)
+"j" = (
+/obj/machinery/door/airlock/maintenance_hatch{
+ max_integrity = 99999;
+ name = "Maintenance"
+ },
+/obj/effect/mapping_helpers/airlock/locked,
+/turf/open/floor/plating,
+/area/mafia)
+"k" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating,
+/area/mafia)
+"l" = (
+/obj/item/bedsheet/brown,
+/obj/structure/bed,
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"m" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"n" = (
+/obj/item/bedsheet/green,
+/obj/structure/bed,
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"o" = (
+/obj/item/bedsheet/blue,
+/obj/structure/bed,
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"p" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/turf/closed/indestructible/fakeglass,
+/area/mafia)
+"q" = (
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"r" = (
+/turf/open/floor/plasteel,
+/area/mafia)
+"s" = (
+/turf/closed/wall/ice,
+/area/mafia)
+"t" = (
+/turf/open/floor/holofloor/snow,
+/area/mafia)
+"u" = (
+/obj/structure/statue/plasma/scientist{
+ anchored = 1
+ },
+/turf/open/floor/holofloor/snow,
+/area/mafia)
+"v" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/turf/open/floor/holofloor/snow,
+/area/mafia)
+"w" = (
+/turf/open/lava/plasma,
+/area/mafia)
+"x" = (
+/obj/machinery/door/airlock/external{
+ max_integrity = 9999;
+ opacity = 0
+ },
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/obj/effect/mapping_helpers/airlock/locked,
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"y" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/holofloor/snow,
+/area/mafia)
+"z" = (
+/obj/structure/lattice/catwalk,
+/turf/open/lava/plasma,
+/area/mafia)
+"A" = (
+/obj/machinery/door/airlock/external{
+ max_integrity = 9999
+ },
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/obj/effect/mapping_helpers/airlock/locked,
+/turf/open/floor/plasteel,
+/area/mafia)
+"B" = (
+/obj/effect/landmark/mafia,
+/obj/structure/lattice/catwalk,
+/turf/open/lava/plasma,
+/area/mafia)
+"C" = (
+/obj/mafia_game_board,
+/turf/open/floor/holofloor/snow,
+/area/mafia)
+"D" = (
+/obj/structure/closet/crate/science,
+/obj/item/clothing/suit/hooded/wintercoat,
+/obj/item/clothing/shoes/winterboots,
+/turf/open/floor/holofloor/snow,
+/area/mafia)
+"E" = (
+/obj/structure/lattice/catwalk,
+/obj/structure/closet/crate/critter,
+/obj/item/clothing/suit/hooded/wintercoat/miner,
+/obj/item/clothing/shoes/winterboots,
+/turf/open/lava/plasma,
+/area/mafia)
+"F" = (
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"G" = (
+/obj/item/bedsheet/orange,
+/obj/structure/bed,
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"H" = (
+/obj/item/bedsheet/black,
+/obj/structure/bed,
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"I" = (
+/obj/item/bedsheet/red,
+/obj/structure/bed,
+/turf/open/floor/holofloor/wood,
+/area/mafia)
+"J" = (
+/turf/open/floor/plating/snowed/smoothed,
+/area/mafia)
+"K" = (
+/turf/closed/indestructible/rock/snow,
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+s
+K
+K
+K
+K
+K
+K
+K
+K
+K
+K
+a
+"}
+(3,1,1) = {"
+a
+a
+a
+s
+s
+s
+s
+s
+s
+s
+s
+s
+w
+w
+t
+w
+w
+w
+w
+w
+w
+K
+a
+"}
+(4,1,1) = {"
+a
+a
+a
+s
+g
+h
+d
+d
+d
+d
+d
+s
+t
+w
+w
+w
+w
+w
+C
+w
+w
+K
+a
+"}
+(5,1,1) = {"
+a
+a
+a
+s
+h
+d
+d
+e
+s
+s
+j
+s
+p
+p
+p
+w
+w
+w
+w
+w
+w
+K
+a
+"}
+(6,1,1) = {"
+a
+a
+a
+s
+i
+s
+s
+j
+s
+H
+F
+s
+t
+D
+p
+p
+p
+p
+w
+w
+w
+K
+a
+"}
+(7,1,1) = {"
+a
+a
+s
+s
+d
+s
+o
+F
+p
+m
+q
+p
+t
+y
+p
+z
+E
+p
+w
+t
+w
+K
+a
+"}
+(8,1,1) = {"
+a
+a
+s
+d
+d
+s
+m
+r
+s
+s
+q
+s
+t
+p
+p
+z
+B
+p
+w
+w
+w
+K
+a
+"}
+(9,1,1) = {"
+a
+a
+s
+d
+s
+s
+p
+r
+r
+p
+q
+p
+t
+p
+z
+z
+p
+p
+p
+w
+w
+K
+a
+"}
+(10,1,1) = {"
+a
+a
+s
+d
+s
+l
+p
+s
+p
+p
+p
+p
+p
+p
+p
+p
+p
+D
+p
+w
+w
+K
+a
+"}
+(11,1,1) = {"
+a
+a
+s
+d
+j
+m
+F
+q
+q
+x
+J
+t
+t
+p
+t
+t
+t
+y
+p
+w
+t
+K
+a
+"}
+(12,1,1) = {"
+a
+a
+s
+e
+s
+a
+p
+s
+p
+p
+u
+v
+t
+p
+p
+p
+p
+p
+p
+w
+w
+K
+a
+"}
+(13,1,1) = {"
+a
+a
+s
+d
+j
+m
+F
+r
+r
+A
+J
+t
+t
+p
+t
+t
+t
+y
+p
+w
+w
+K
+a
+"}
+(14,1,1) = {"
+a
+a
+s
+d
+s
+n
+p
+s
+p
+p
+p
+p
+p
+p
+p
+p
+p
+D
+p
+w
+w
+K
+a
+"}
+(15,1,1) = {"
+a
+a
+s
+d
+s
+s
+p
+q
+q
+p
+r
+p
+t
+p
+z
+z
+p
+p
+p
+w
+w
+K
+a
+"}
+(16,1,1) = {"
+a
+a
+s
+f
+d
+s
+m
+q
+s
+s
+r
+s
+t
+p
+p
+z
+B
+p
+w
+w
+w
+K
+a
+"}
+(17,1,1) = {"
+a
+a
+s
+s
+d
+s
+G
+F
+p
+m
+r
+p
+t
+y
+p
+z
+E
+p
+w
+w
+w
+K
+a
+"}
+(18,1,1) = {"
+a
+a
+a
+s
+d
+s
+s
+j
+s
+I
+F
+s
+t
+D
+p
+p
+p
+p
+w
+t
+w
+K
+a
+"}
+(19,1,1) = {"
+a
+a
+a
+s
+h
+i
+d
+d
+s
+s
+j
+s
+p
+p
+p
+t
+w
+w
+w
+w
+w
+K
+a
+"}
+(20,1,1) = {"
+a
+a
+a
+s
+k
+h
+d
+d
+e
+d
+d
+s
+t
+w
+w
+w
+w
+w
+C
+w
+w
+K
+a
+"}
+(21,1,1) = {"
+a
+a
+a
+s
+s
+s
+s
+s
+s
+s
+s
+s
+w
+w
+w
+w
+w
+w
+w
+w
+w
+K
+a
+"}
+(22,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+s
+K
+K
+K
+K
+K
+K
+K
+K
+K
+K
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/Mafia/mafia_spiderclan.dmm b/_maps/map_files/Mafia/mafia_spiderclan.dmm
new file mode 100644
index 0000000000..89771212b8
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_spiderclan.dmm
@@ -0,0 +1,690 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"b" = (
+/obj/structure/closet/cabinet{
+ anchored = 1
+ },
+/obj/item/reagent_containers/food/snacks/sashimi,
+/turf/open/floor/carpet/black,
+/area/mafia)
+"c" = (
+/turf/closed/wall/rust,
+/area/mafia)
+"d" = (
+/turf/open/floor/plating,
+/area/mafia)
+"e" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"f" = (
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"g" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"h" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/plating,
+/area/mafia)
+"i" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg1"
+ },
+/area/mafia)
+"j" = (
+/turf/closed/wall/mineral/wood{
+ desc = "A door that goes nowhere. How kafkaesque.";
+ icon = 'icons/obj/doors/mineral_doors.dmi';
+ icon_state = "paperframe";
+ name = "Door"
+ },
+/area/mafia)
+"k" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating,
+/area/mafia)
+"m" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/wood,
+/area/mafia)
+"n" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/carpet/black,
+/area/mafia)
+"o" = (
+/obj/structure/closet/cabinet{
+ anchored = 1
+ },
+/obj/item/reagent_containers/food/snacks/sashimi,
+/turf/open/floor/wood,
+/area/mafia)
+"p" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/turf/closed/indestructible/fakeglass{
+ icon = 'icons/obj/smooth_structures/paperframes.dmi';
+ icon_state = "paper"
+ },
+/area/mafia)
+"q" = (
+/turf/open/floor/wood,
+/area/mafia)
+"r" = (
+/turf/open/floor/carpet/black,
+/area/mafia)
+"t" = (
+/turf/open/floor/plating/beach/sand,
+/area/mafia)
+"u" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/turf/open/floor/plating/beach/sand,
+/area/mafia)
+"v" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"B" = (
+/obj/structure/showcase{
+ density = 0;
+ desc = "Welp, only one way to recover your honour.";
+ icon = 'icons/obj/items_and_weapons.dmi';
+ icon_state = "katana";
+ name = "seppuku katana"
+ },
+/turf/open/floor/plating/beach/sand,
+/area/mafia)
+"S" = (
+/turf/closed/wall/mineral/wood,
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+a
+"}
+(3,1,1) = {"
+a
+S
+S
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+S
+S
+a
+"}
+(4,1,1) = {"
+a
+S
+S
+c
+g
+h
+d
+d
+d
+d
+d
+e
+d
+d
+d
+d
+d
+h
+k
+c
+S
+S
+a
+"}
+(5,1,1) = {"
+a
+S
+S
+c
+h
+d
+d
+e
+S
+S
+j
+S
+j
+S
+S
+d
+d
+i
+h
+c
+S
+S
+a
+"}
+(6,1,1) = {"
+a
+S
+S
+c
+i
+S
+S
+j
+S
+o
+q
+S
+r
+b
+S
+j
+S
+S
+d
+c
+S
+S
+a
+"}
+(7,1,1) = {"
+a
+S
+c
+c
+d
+S
+b
+r
+p
+m
+q
+p
+r
+n
+p
+q
+o
+S
+d
+c
+c
+S
+a
+"}
+(8,1,1) = {"
+a
+S
+c
+d
+d
+S
+n
+r
+S
+S
+q
+S
+r
+S
+S
+q
+m
+S
+d
+d
+c
+S
+a
+"}
+(9,1,1) = {"
+a
+S
+c
+d
+S
+S
+p
+r
+r
+p
+q
+p
+r
+p
+q
+q
+p
+S
+S
+d
+c
+S
+a
+"}
+(10,1,1) = {"
+a
+S
+c
+d
+S
+o
+p
+S
+p
+p
+p
+p
+p
+p
+p
+S
+p
+b
+S
+d
+c
+S
+a
+"}
+(11,1,1) = {"
+a
+S
+c
+d
+j
+m
+q
+q
+q
+p
+t
+t
+t
+p
+r
+r
+r
+n
+j
+e
+c
+S
+a
+"}
+(12,1,1) = {"
+a
+S
+c
+e
+S
+S
+p
+S
+p
+p
+t
+u
+B
+p
+p
+S
+p
+S
+S
+d
+c
+S
+a
+"}
+(13,1,1) = {"
+a
+S
+c
+d
+j
+n
+r
+r
+r
+p
+t
+t
+t
+p
+q
+q
+q
+m
+j
+d
+c
+S
+a
+"}
+(14,1,1) = {"
+a
+S
+c
+d
+S
+b
+p
+S
+p
+p
+p
+p
+p
+p
+p
+S
+p
+o
+S
+i
+c
+S
+a
+"}
+(15,1,1) = {"
+a
+S
+c
+d
+S
+S
+p
+q
+q
+p
+r
+p
+q
+p
+r
+r
+p
+S
+S
+d
+c
+S
+a
+"}
+(16,1,1) = {"
+a
+S
+c
+f
+d
+S
+m
+q
+S
+S
+r
+S
+q
+S
+S
+r
+n
+S
+d
+d
+c
+S
+a
+"}
+(17,1,1) = {"
+a
+S
+c
+c
+d
+S
+o
+q
+p
+n
+r
+p
+q
+m
+p
+r
+b
+S
+d
+c
+c
+S
+a
+"}
+(18,1,1) = {"
+a
+S
+S
+c
+d
+S
+S
+j
+S
+b
+r
+S
+q
+o
+S
+j
+S
+S
+d
+c
+S
+S
+a
+"}
+(19,1,1) = {"
+a
+S
+S
+c
+h
+i
+d
+d
+S
+S
+j
+S
+j
+S
+S
+d
+e
+d
+h
+c
+S
+S
+a
+"}
+(20,1,1) = {"
+a
+S
+S
+c
+k
+h
+d
+d
+e
+d
+d
+d
+d
+d
+d
+d
+d
+h
+v
+c
+S
+S
+a
+"}
+(21,1,1) = {"
+a
+S
+S
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+S
+S
+a
+"}
+(22,1,1) = {"
+a
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+S
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/Mafia/mafia_syndie.dmm b/_maps/map_files/Mafia/mafia_syndie.dmm
new file mode 100644
index 0000000000..d56c3cc0c6
--- /dev/null
+++ b/_maps/map_files/Mafia/mafia_syndie.dmm
@@ -0,0 +1,869 @@
+//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE
+"a" = (
+/turf/closed/indestructible/riveted,
+/area/mafia)
+"b" = (
+/obj/structure/closet/syndicate{
+ desc = "A storage closet for syndicate conflict resolution operatives.";
+ name = "red closet"
+ },
+/obj/item/clothing/under/syndicate/tacticool,
+/obj/item/clothing/under/syndicate/tacticool/skirt,
+/turf/open/floor/mineral/plastitanium,
+/area/mafia)
+"c" = (
+/turf/closed/wall/rust,
+/area/mafia)
+"d" = (
+/turf/open/floor/plating,
+/area/mafia)
+"e" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"f" = (
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"g" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "platingdmg3"
+ },
+/area/mafia)
+"h" = (
+/obj/structure/grille/indestructable,
+/turf/open/floor/plating,
+/area/mafia)
+"i" = (
+/turf/open/floor/plating{
+ icon_state = "platingdmg1"
+ },
+/area/mafia)
+"j" = (
+/obj/machinery/door/airlock/maintenance_hatch{
+ max_integrity = 99999;
+ name = "Maintenance"
+ },
+/obj/effect/mapping_helpers/airlock/locked,
+/turf/open/floor/plating,
+/area/mafia)
+"k" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating,
+/area/mafia)
+"l" = (
+/obj/structure/closet/syndicate{
+ desc = "A storage closet for syndicate conflict resolution operatives.";
+ name = "red closet"
+ },
+/obj/item/clothing/under/syndicate/tacticool,
+/obj/item/clothing/under/syndicate/tacticool/skirt,
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"m" = (
+/obj/structure/closet/syndicate{
+ desc = "A storage closet for syndicate conflict resolution operatives.";
+ name = "red closet"
+ },
+/obj/item/clothing/under/syndicate/tacticool,
+/obj/item/clothing/under/syndicate/tacticool/skirt,
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"n" = (
+/obj/effect/landmark/mafia,
+/turf/open/floor/mineral/plastitanium,
+/area/mafia)
+"o" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"p" = (
+/obj/machinery/door/poddoor/preopen{
+ desc = "When it's time to sleep, the lights will go out. Remember - no one in space can hear you scream.";
+ id = "mafia";
+ max_integrity = 99999;
+ name = "Station Night Shutters"
+ },
+/obj/effect/spawner/structure/window/plastitanium,
+/turf/open/space/basic,
+/area/mafia)
+"q" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/structure/chair/office{
+ dir = 1;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"r" = (
+/turf/open/floor/mineral/plastitanium,
+/area/mafia)
+"s" = (
+/turf/open/floor/mineral/plastitanium/red,
+/area/mafia)
+"t" = (
+/turf/open/floor/circuit/red,
+/area/mafia)
+"u" = (
+/obj/effect/baseturf_helper/asteroid,
+/obj/effect/landmark/mafia/town_center,
+/obj/structure/chair,
+/turf/open/floor/circuit/red,
+/area/mafia)
+"v" = (
+/obj/mafia_game_board,
+/turf/open/floor/plating{
+ icon_state = "panelscorched"
+ },
+/area/mafia)
+"w" = (
+/turf/closed/indestructible/syndicate,
+/area/mafia)
+"x" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/structure/chair/office{
+ dir = 4;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"y" = (
+/obj/structure/chair/office{
+ dir = 2;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/mineral/plastitanium,
+/area/mafia)
+"z" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/structure/chair/office{
+ dir = 2;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"A" = (
+/obj/structure/chair/office{
+ dir = 8;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/mineral/plastitanium,
+/area/mafia)
+"B" = (
+/obj/structure/chair/office{
+ dir = 4;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/mineral/plastitanium,
+/area/mafia)
+"C" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/structure/chair/office{
+ dir = 8;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"E" = (
+/obj/structure/chair/office{
+ dir = 1;
+ name = "tactical swivel chair"
+ },
+/turf/open/floor/mineral/plastitanium,
+/area/mafia)
+"F" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/structure/closet/syndicate{
+ desc = "A storage closet for syndicate conflict resolution operatives.";
+ name = "red closet"
+ },
+/obj/item/clothing/under/syndicate/tacticool,
+/obj/item/clothing/under/syndicate/tacticool/skirt,
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"G" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/item/clothing/under/syndicate/tacticool,
+/obj/structure/closet/syndicate{
+ desc = "A storage closet for syndicate conflict resolution operatives.";
+ name = "red closet"
+ },
+/obj/item/clothing/under/syndicate/tacticool/skirt,
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+"H" = (
+/obj/effect/turf_decal/tile/red,
+/obj/effect/turf_decal/tile/red{
+ dir = 4
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 8
+ },
+/obj/effect/turf_decal/tile/red{
+ dir = 1
+ },
+/obj/effect/landmark/mafia,
+/turf/open/floor/plasteel/dark,
+/area/mafia)
+
+(1,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
+(2,1,1) = {"
+a
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+a
+"}
+(3,1,1) = {"
+a
+w
+w
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+w
+w
+a
+"}
+(4,1,1) = {"
+a
+w
+w
+c
+g
+h
+d
+d
+d
+d
+d
+e
+d
+d
+d
+d
+d
+h
+k
+c
+w
+w
+a
+"}
+(5,1,1) = {"
+a
+w
+w
+c
+h
+d
+d
+e
+w
+w
+j
+w
+j
+w
+w
+d
+d
+i
+h
+c
+w
+w
+a
+"}
+(6,1,1) = {"
+a
+w
+w
+c
+i
+w
+w
+j
+w
+b
+r
+w
+o
+F
+w
+j
+w
+w
+d
+c
+w
+w
+a
+"}
+(7,1,1) = {"
+a
+w
+c
+c
+d
+w
+l
+o
+p
+n
+r
+p
+o
+H
+p
+r
+b
+w
+d
+c
+c
+w
+a
+"}
+(8,1,1) = {"
+a
+w
+c
+d
+d
+w
+H
+o
+w
+w
+r
+w
+o
+w
+w
+r
+n
+w
+d
+d
+c
+w
+a
+"}
+(9,1,1) = {"
+a
+w
+c
+d
+w
+w
+p
+o
+x
+p
+B
+p
+x
+p
+B
+r
+p
+w
+w
+d
+c
+w
+a
+"}
+(10,1,1) = {"
+a
+w
+c
+d
+w
+b
+p
+w
+p
+p
+p
+p
+p
+p
+p
+w
+p
+m
+w
+d
+c
+w
+a
+"}
+(11,1,1) = {"
+a
+w
+c
+d
+j
+n
+r
+r
+y
+p
+s
+t
+s
+p
+q
+o
+o
+H
+j
+e
+c
+w
+a
+"}
+(12,1,1) = {"
+a
+w
+c
+e
+w
+w
+p
+w
+p
+p
+t
+u
+t
+p
+p
+w
+p
+w
+w
+d
+c
+w
+a
+"}
+(13,1,1) = {"
+a
+w
+c
+d
+j
+H
+o
+o
+z
+p
+s
+t
+s
+p
+E
+r
+r
+n
+j
+d
+c
+w
+a
+"}
+(14,1,1) = {"
+a
+w
+c
+d
+w
+l
+p
+w
+p
+p
+p
+p
+p
+p
+p
+w
+p
+b
+w
+i
+c
+w
+a
+"}
+(15,1,1) = {"
+a
+w
+c
+d
+w
+w
+p
+r
+A
+p
+C
+p
+A
+p
+C
+o
+p
+w
+w
+d
+c
+w
+a
+"}
+(16,1,1) = {"
+a
+w
+c
+f
+d
+w
+n
+r
+w
+w
+o
+w
+r
+w
+w
+o
+H
+w
+d
+d
+c
+w
+a
+"}
+(17,1,1) = {"
+a
+w
+c
+c
+d
+w
+b
+r
+p
+H
+o
+p
+r
+n
+p
+o
+G
+w
+d
+c
+c
+w
+a
+"}
+(18,1,1) = {"
+a
+w
+w
+c
+d
+w
+w
+j
+w
+F
+o
+w
+r
+b
+w
+j
+w
+w
+d
+c
+w
+w
+a
+"}
+(19,1,1) = {"
+a
+w
+w
+c
+h
+i
+d
+d
+w
+w
+j
+w
+j
+w
+w
+d
+e
+d
+h
+c
+w
+w
+a
+"}
+(20,1,1) = {"
+a
+w
+w
+c
+k
+h
+d
+d
+e
+d
+d
+d
+d
+d
+d
+d
+d
+h
+v
+c
+w
+w
+a
+"}
+(21,1,1) = {"
+a
+w
+w
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+c
+w
+w
+a
+"}
+(22,1,1) = {"
+a
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+w
+a
+"}
+(23,1,1) = {"
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+a
+"}
diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm
index 5a14eb9041..a123ccab55 100644
--- a/_maps/map_files/generic/CentCom.dmm
+++ b/_maps/map_files/generic/CentCom.dmm
@@ -17249,6 +17249,10 @@
},
/turf/open/floor/mineral/titanium,
/area/centcom/evac)
+"Qc" = (
+/obj/effect/landmark/mafia_game_area,
+/turf/open/space/basic,
+/area/space)
"Qe" = (
/turf/open/ai_visible,
/area/ai_multicam_room)
@@ -58911,7 +58915,7 @@ aa
aa
aa
aa
-aa
+Qc
aa
aa
aa
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index 3e5b27d376..e8f584cf75 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -178,6 +178,7 @@
#define TRAIT_FREERUNNING "freerunning"
#define TRAIT_SKITTISH "skittish"
#define TRAIT_POOR_AIM "poor_aim"
+#define TRAIT_INSANE_AIM "insane_aim" //they don't miss. they never miss. it was all part of their immaculate plan.
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
#define TRAIT_DRUNK_HEALING "drunk_healing"
#define TRAIT_TAGGER "tagger"
@@ -202,7 +203,7 @@
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
#define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing.
#define TRAIT_FAST_PUMP "fast_pump"
-#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good....
+#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good...
// mobility flag traits
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)
diff --git a/code/datums/components/crafting/recipes/recipes_misc.dm b/code/datums/components/crafting/recipes/recipes_misc.dm
index 214c1b1427..0cb0547978 100644
--- a/code/datums/components/crafting/recipes/recipes_misc.dm
+++ b/code/datums/components/crafting/recipes/recipes_misc.dm
@@ -126,7 +126,7 @@
/datum/crafting_recipe/brute_pack
name = "Suture Pack"
- result = /obj/item/stack/medical/suture/one
+ result = /obj/item/stack/medical/suture/five
time = 1
reqs = list(/obj/item/stack/medical/gauze = 1,
/datum/reagent/medicine/styptic_powder = 10)
@@ -135,7 +135,7 @@
/datum/crafting_recipe/burn_pack
name = "Regenerative Mesh"
- result = /obj/item/stack/medical/mesh/one
+ result = /obj/item/stack/medical/mesh/five
time = 1
reqs = list(/obj/item/stack/medical/gauze = 1,
/datum/reagent/medicine/silver_sulfadiazine = 10)
diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm
index 3faf6d5727..50c08a5dcd 100644
--- a/code/game/machinery/_machinery.dm
+++ b/code/game/machinery/_machinery.dm
@@ -92,6 +92,7 @@ Class Procs:
pressure_resistance = 15
max_integrity = 200
layer = BELOW_OBJ_LAYER //keeps shit coming out of the machine from ending up underneath it.
+ flags_1 = DEFAULT_RICOCHET_1
flags_ricochet = RICOCHET_HARD
ricochet_chance_mod = 0.3
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 4248e1684f..d4ba70bb6c 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -11,7 +11,7 @@
max_integrity = 350
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70)
CanAtmosPass = ATMOS_PASS_DENSITY
- flags_1 = PREVENT_CLICK_UNDER_1
+ flags_1 = PREVENT_CLICK_UNDER_1|DEFAULT_RICOCHET_1
ricochet_chance_mod = 0.8
interaction_flags_atom = INTERACT_ATOM_UI_INTERACT
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 2d41575e70..228c2e1f52 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -298,7 +298,7 @@
/obj/machinery/door/firedoor/border_only
icon = 'icons/obj/doors/edge_Doorfire.dmi'
- flags_1 = ON_BORDER_1
+ flags_1 = ON_BORDER_1|DEFAULT_RICOCHET_1
CanAtmosPass = ATMOS_PASS_PROC
/obj/machinery/door/firedoor/border_only/closed
@@ -320,7 +320,7 @@
to_chat(M, "You pull [M.pulling] through [src] right as it closes")
M.pulling.forceMove(T1)
M.start_pulling(M2)
-
+
for(var/mob/living/M in T2)
if(M.stat == CONSCIOUS && M.pulling && M.pulling.loc == T1 && !M.pulling.anchored && M.pulling.move_resist <= M.move_force)
var/mob/living/M2 = M.pulling
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index c9c577231e..22bacf6aa1 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -11,7 +11,7 @@
integrity_failure = 0
armor = list("melee" = 20, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 70, "acid" = 100)
visible = FALSE
- flags_1 = ON_BORDER_1
+ flags_1 = ON_BORDER_1|DEFAULT_RICOCHET_1
opacity = 0
CanAtmosPass = ATMOS_PASS_PROC
interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_REQUIRES_SILICON | INTERACT_MACHINE_OPEN
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 11df83230c..9ea8c9c689 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -239,6 +239,9 @@
/obj/item/stack/medical/suture/one
amount = 1
+/obj/item/stack/medical/suture/five
+ amount = 5
+
/obj/item/stack/medical/suture/medicated
name = "medicated suture"
icon_state = "suture_purp"
@@ -319,6 +322,9 @@
/obj/item/stack/medical/mesh/one
amount = 1
+/obj/item/stack/medical/mesh/five
+ amount = 5
+
/obj/item/stack/medical/mesh/advanced
name = "advanced regenerative mesh"
desc = "An advanced mesh made with aloe extracts and sterilizing chemicals, used to treat burns."
diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm
index 939b9e4905..f9ede407ca 100644
--- a/code/game/objects/items/teleportation.dm
+++ b/code/game/objects/items/teleportation.dm
@@ -122,11 +122,14 @@
return TRUE
return ..()
-/obj/item/hand_tele/proc/try_dispel_portal(atom/target, mob/user)
- if(is_parent_of_portal(target))
+/obj/item/hand_tele/proc/try_dispel_portal(atom/target, mob/user, delay = 30)
+ var/datum/beam/B = user.Beam(target, icon_state = "rped_upgrade", maxdistance = 50)
+ if(is_parent_of_portal(target) && (!delay || do_after(user, delay, target = target)))
qdel(target)
to_chat(user, "You dispel [target] with \the [src]!")
+ qdel(B)
return TRUE
+ qdel(B)
return FALSE
/obj/item/hand_tele/afterattack(atom/target, mob/user)
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index b1f8eac1da..e7dc636cf3 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -252,6 +252,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/katana/timestop
name = "temporal katana"
desc = "Delicately balanced, this finely-crafted blade hums with barely-restrained potential."
+ block_chance = 0 // oops
+ force = 27.5 // oops
item_flags = ITEM_CAN_PARRY
block_parry_data = /datum/block_parry_data/bokken/quick_parry/proj
@@ -259,7 +261,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
if(ishuman(owner))
var/mob/living/carbon/human/flynn = owner
flynn.emote("smirk")
- new /obj/effect/timestop(get_turf(owner), 2, 50, list(owner))
+ new /obj/effect/timestop/magic(get_turf(owner), 1, 50, list(owner)) // null roddies counter
/obj/item/melee/bokken // parrying stick
name = "bokken"
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 39f2d276a1..b758317fe2 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -9,8 +9,10 @@
var/mob/living/structureclimber
var/broken = 0 //similar to machinery's stat BROKEN
layer = BELOW_OBJ_LAYER
- flags_ricochet = RICOCHET_HARD
- ricochet_chance_mod = 0.5
+ //ricochets on structures commented out for now because there's a lot of structures that /shouldnt/ be ricocheting and those need to be reviewed first
+ //flags_1 = DEFAULT_RICOCHET_1
+ //flags_ricochet = RICOCHET_HARD
+ //ricochet_chance_mod = 0.5
/obj/structure/Initialize()
if (!armor)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 6aae4955f1..3373278c0c 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -17,7 +17,6 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
layer = ABOVE_OBJ_LAYER //Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = TRUE //initially is 0 for tile smoothing
- flags_1 = ON_BORDER_1
max_integrity = 25
var/ini_dir = null
var/state = WINDOW_OUT_OF_FRAME
@@ -38,7 +37,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
var/hitsound = 'sound/effects/Glasshit.ogg'
rad_insulation = RAD_VERY_LIGHT_INSULATION
rad_flags = RAD_PROTECT_CONTENTS
- flags_ricochet = RICOCHET_HARD
+ flags_1 = ON_BORDER_1|DEFAULT_RICOCHET_1
+ flags_ricochet = RICOCHET_HARD
ricochet_chance_mod = 0.4
attack_hand_speed = CLICK_CD_MELEE
attack_hand_is_action = TRUE
diff --git a/code/game/turfs/simulated/wall/mineral_walls.dm b/code/game/turfs/simulated/wall/mineral_walls.dm
index 4466511acd..ed48c24462 100644
--- a/code/game/turfs/simulated/wall/mineral_walls.dm
+++ b/code/game/turfs/simulated/wall/mineral_walls.dm
@@ -192,6 +192,7 @@
icon_state = "map-shuttle"
explosion_block = 3
flags_1 = CAN_BE_DIRTY_1 | DEFAULT_RICOCHET_1
+ flags_ricochet = RICOCHET_SHINY | RICOCHET_HARD
sheet_type = /obj/item/stack/sheet/mineral/titanium
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
canSmoothWith = list(/turf/closed/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/shuttle, /obj/structure/shuttle/engine/heater, /obj/structure/falsewall/titanium)
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 0623f2b9d2..b020ab87c9 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -6,7 +6,8 @@
icon = 'icons/turf/walls/wall.dmi'
icon_state = "wall"
explosion_block = 1
-
+ flags_1 = DEFAULT_RICOCHET_1
+ flags_ricochet = RICOCHET_HARD
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
heat_capacity = 312500 //a little over 5 cm thick , 312500 for 1 m by 2.5 m by 0.25 m plasteel wall
attack_hand_speed = 8
diff --git a/code/modules/antagonists/blob/blob/blobs/shield.dm b/code/modules/antagonists/blob/blob/blobs/shield.dm
index a2a6ce94d3..a3a1403e58 100644
--- a/code/modules/antagonists/blob/blob/blobs/shield.dm
+++ b/code/modules/antagonists/blob/blob/blobs/shield.dm
@@ -45,11 +45,8 @@
desc = "A solid wall of slightly twitching tendrils with a reflective glow."
damaged_desc = "A wall of twitching tendrils with a reflective glow."
icon_state = "blob_glow"
+ flags_ricochet = RICOCHET_SHINY
point_return = 8
max_integrity = 100
brute_resist = 1
explosion_block = 2
-
-/obj/structure/blob/shield/reflective/check_projectile_ricochet(obj/item/projectile/P)
- return PROJECTILE_RICOCHET_FORCE
-
diff --git a/code/modules/arousal/genitals.dm b/code/modules/arousal/genitals.dm
index 4d2e5e6fef..8f88076af9 100644
--- a/code/modules/arousal/genitals.dm
+++ b/code/modules/arousal/genitals.dm
@@ -232,23 +232,6 @@
/obj/item/organ/genital/proc/get_features(mob/living/carbon/human/H)
return
-
-//procs to handle sprite overlays being applied to humans
-
-/mob/living/carbon/human/equip_to_slot(obj/item/I, slot)
- . = ..()
- if(!. && I && slot && !(slot in GLOB.no_genitals_update_slots)) //the item was successfully equipped, and the chosen slot wasn't merely storage, hands or cuffs.
- update_genitals()
-
-/mob/living/carbon/human/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE)
- var/no_update = FALSE
- if(!I || I == l_store || I == r_store || I == s_store || I == handcuffed || I == legcuffed || get_held_index_of_item(I)) //stops storages, cuffs and held items from triggering it.
- no_update = TRUE
- . = ..()
- if(!. || no_update)
- return
- update_genitals()
-
/mob/living/carbon/human/proc/update_genitals()
if(QDELETED(src))
return
diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm
index d4ab7b5648..a8b4c93764 100644
--- a/code/modules/asset_cache/asset_list_items.dm
+++ b/code/modules/asset_cache/asset_list_items.dm
@@ -388,3 +388,9 @@
Insert("polycrystal", 'icons/obj/telescience.dmi', "polycrystal")
..()
+/datum/asset/spritesheet/mafia
+ name = "mafia"
+
+/datum/asset/spritesheet/mafia/register()
+ InsertAll("", 'icons/obj/mafia.dmi')
+ ..()
diff --git a/code/modules/cargo/packs/armory.dm b/code/modules/cargo/packs/armory.dm
index 835457536f..2ef0abb000 100644
--- a/code/modules/cargo/packs/armory.dm
+++ b/code/modules/cargo/packs/armory.dm
@@ -223,3 +223,10 @@
/obj/item/ammo_box/magazine/wt550m9/wtrubber,
/obj/item/ammo_box/magazine/wt550m9/wtrubber)
crate_name = "auto rifle ammo crate"
+
+/datum/supply_pack/security/armory/hell_single
+ name = "Hellgun Single-Pack"
+ crate_name = "hellgun crate"
+ desc = "Contains one hellgun, an old pattern of laser gun infamous for its ability to horribly disfigure targets with burns. Technically violates the Space Geneva Convention when used on humanoids."
+ cost = 1500
+ contains = list(/obj/item/gun/energy/laser/hellgun)
diff --git a/code/modules/cargo/packs/goodies.dm b/code/modules/cargo/packs/goodies.dm
index 86a7c73a34..5d07e85bac 100644
--- a/code/modules/cargo/packs/goodies.dm
+++ b/code/modules/cargo/packs/goodies.dm
@@ -76,12 +76,6 @@
cost = 200
contains = list(/obj/item/toy/beach_ball)
-/datum/supply_pack/goody/hell_single
- name = "Hellgun Single-Pack"
- desc = "Contains one hellgun, an old pattern of laser gun infamous for its ability to horribly disfigure targets with burns. Technically violates the Space Geneva Convention when used on humanoids."
- cost = 1500
- contains = list(/obj/item/gun/energy/laser/hellgun)
-
/datum/supply_pack/goody/medipen_twopak
name = "Medipen Two-Pak"
desc = "Contains one standard epinephrine medipen and one standard emergency first-aid kit medipen. For when you want to prepare for the worst."
diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm
index 350a577fb1..3f6d21bcd2 100644
--- a/code/modules/clothing/glasses/_glasses.dm
+++ b/code/modules/clothing/glasses/_glasses.dm
@@ -149,6 +149,30 @@
icon_state = "eyepatch"
item_state = "eyepatch"
+/obj/item/clothing/glasses/eyepatch/syndicate
+ name = "cybernetic eyepatch"
+ desc = "An eyepatch used to enhance one's aim with guns."
+ icon_state = "syndicatepatch"
+ item_state = "syndicatepatch"
+ resistance_flags = ACID_PROOF
+
+/obj/item/clothing/glasses/eyepatch/syndicate/equipped(mob/living/carbon/human/user, slot)
+ . = ..()
+ if(slot == SLOT_GLASSES)
+ user.visible_message("Circuitry from the eyepatch links itself to your brain as you put on the eyepatch.")
+ if(HAS_TRAIT(user, TRAIT_POOR_AIM))
+ user.visible_message("You hear a fizzing noise from the circuit. That can't be good.")
+ ADD_TRAIT(user, TRAIT_INSANE_AIM, "SYNDICATE_EYEPATCH_AIM")
+ ADD_TRAIT(src, TRAIT_NODROP, "SYNDICATE_EYEPATCH_NODROP")
+
+/obj/item/clothing/glasses/eyepatch/syndicate/dropped(mob/living/carbon/human/user)
+ . = ..()
+ REMOVE_TRAIT(user, TRAIT_INSANE_AIM, "SYNDICATE_EYEPATCH_AIM")
+ var/obj/item/organ/eyes/eyes = user.getorganslot(ORGAN_SLOT_EYES)
+ if(eyes)
+ eyes.applyOrganDamage(30)
+ user.visible_message("Your eye stings as the circuitry is removed from your eye!")
+
/obj/item/clothing/glasses/monocle
name = "monocle"
desc = "Such a dapper eyepiece!"
diff --git a/code/modules/clothing/gloves/ring.dm b/code/modules/clothing/gloves/ring.dm
index 8354f13bd2..daca843c45 100644
--- a/code/modules/clothing/gloves/ring.dm
+++ b/code/modules/clothing/gloves/ring.dm
@@ -21,7 +21,7 @@
desc = "An expensive ring, studded with a diamond. Cultures have used these rings in courtship for a millenia."
icon_state = "ringdiamond"
item_state = "dring"
-
+
/obj/item/clothing/gloves/ring/diamond/attack_self(mob/user)
user.visible_message("\The [user] gets down on one knee, presenting \the [src].","You get down on one knee, presenting \the [src].")
@@ -30,3 +30,12 @@
desc = "A tiny silver ring, sized to wrap around a finger."
icon_state = "ringsilver"
item_state = "sring"
+
+/obj/item/clothing/gloves/ring/custom
+ name = "ring"
+ desc = "A ring."
+ gender = NEUTER
+ w_class = WEIGHT_CLASS_TINY
+ obj_flags = UNIQUE_RENAME
+ icon_state = "ringsilver"
+ item_state = "sring"
diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm
index 40797b97ed..12829ed0e7 100644
--- a/code/modules/clothing/spacesuits/hardsuit.dm
+++ b/code/modules/clothing/spacesuits/hardsuit.dm
@@ -214,7 +214,7 @@
name = "advanced hardsuit"
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
item_state = "ce_hardsuit"
- armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 50, "bio" = 100, "rad" = 95, "fire" = 100, "acid" = 90, "wound" = 10)
+ armor = list("melee" = 40, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 90, "wound" = 10)
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/engine/elite
diff --git a/code/modules/clothing/under/accessories.dm b/code/modules/clothing/under/accessories.dm
index cb173f3bde..ee7e4c48e1 100644
--- a/code/modules/clothing/under/accessories.dm
+++ b/code/modules/clothing/under/accessories.dm
@@ -369,3 +369,12 @@
icon_state = "plastics"
armor = list("melee" = 0, "bullet" = 0, "laser" = 20, "energy" = 10, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 20, "acid" = -40)
flags_inv = HIDEACCESSORY
+
+//necklace
+/obj/item/clothing/accessory/necklace
+ name = "necklace"
+ desc = "A necklace."
+ icon_state = "locket"
+ obj_flags = UNIQUE_RENAME
+ custom_materials = list(/datum/material/iron=100)
+ resistance_flags = FIRE_PROOF
diff --git a/code/modules/emoji/emoji_parse.dm b/code/modules/emoji/emoji_parse.dm
index 33d32227e1..3fd83899c9 100644
--- a/code/modules/emoji/emoji_parse.dm
+++ b/code/modules/emoji/emoji_parse.dm
@@ -16,11 +16,16 @@
search = findtext(text, ":", pos + length(text[pos]))
if(search)
emoji = lowertext(copytext(text, pos + length(text[pos]), search))
+ var/isthisapath = (emoji[1] == "/") && text2path(emoji)
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/goonchat)
var/tag = sheet.icon_tag("emoji-[emoji]")
if(tag)
parsed += "[tag]" //evil way of enforcing 16x16
pos = search + length(text[pos])
+ else if(ispath(isthisapath, /atom)) //path
+ var/atom/thisisanatom = isthisapath
+ parsed += "[icon2html(initial(thisisanatom.icon), world, initial(thisisanatom.icon_state))]"
+ pos = search + length(text[pos])
else
parsed += copytext(text, pos, search)
pos = search
diff --git a/code/modules/food_and_drinks/food/snacks_pie.dm b/code/modules/food_and_drinks/food/snacks_pie.dm
index 03f4640718..81805f5529 100644
--- a/code/modules/food_and_drinks/food/snacks_pie.dm
+++ b/code/modules/food_and_drinks/food/snacks_pie.dm
@@ -113,6 +113,27 @@
tastes = list("pie" = 1, "meat" = 1)
foodtype = GRAIN | MEAT
+/obj/item/reagent_containers/food/snacks/pie/burek
+ name = "Burek"
+ icon = 'icons/obj/food/piecake.dmi'
+ icon_state = "burek"
+ desc = "If you know, you know."
+ slice_path = /obj/item/reagent_containers/food/snacks/pie/burekslice
+ slices_num = 4
+ bonus_reagents = list(/datum/reagent/consumable/nutriment = 4, /datum/reagent/consumable/nutriment/vitamin = 6)
+ list_reagents = list(/datum/reagent/consumable/nutriment= 20, /datum/reagent/consumable/nutriment/vitamin = 6)
+ bitesize = 12
+ tastes = list("meat" = 1, "oil" = 1)
+ foodtype = GRAIN | MEAT
+
+/obj/item/reagent_containers/food/snacks/pie/burekslice
+ name = "Burek Slice"
+ icon = 'icons/obj/food/piecake.dmi'
+ icon_state = "burekslice"
+ desc = "A slice of Burek, watch out for oil stains!"
+ tastes = list("meat" = 1, "oil" = 1)
+ foodtype = GRAIN | MEAT
+
/obj/item/reagent_containers/food/snacks/pie/tofupie
name = "tofu-pie"
diff --git a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pies_sweets.dm b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pies_sweets.dm
index 52becf81df..289c698b9a 100644
--- a/code/modules/food_and_drinks/recipes/tablecraft/recipes_pies_sweets.dm
+++ b/code/modules/food_and_drinks/recipes/tablecraft/recipes_pies_sweets.dm
@@ -130,6 +130,18 @@
result = /obj/item/reagent_containers/food/snacks/pie/dulcedebatata
subcategory = CAT_PIE
+/datum/crafting_recipe/food/burek
+ name = "Burek"
+ reqs = list(
+ /datum/reagent/consumable/blackpepper = 3,
+ /datum/reagent/consumable/sodiumchloride = 3,
+ /obj/item/reagent_containers/food/snacks/pizzabread = 2,
+ /obj/item/reagent_containers/food/snacks/meat/cutlet/plain = 6,
+ /obj/item/reagent_containers/food/snacks/butter = 1,
+ )
+ result = /obj/item/reagent_containers/food/snacks/pie/burek
+ subcategory = CAT_PIE
+
/datum/crafting_recipe/food/meatpie
name = "Meat pie"
reqs = list(
@@ -302,4 +314,4 @@
/obj/item/reagent_containers/food/snacks/spiderling = 1
)
result = /obj/item/reagent_containers/food/snacks/spiderlollipop
- subcategory = CAT_PIE
\ No newline at end of file
+ subcategory = CAT_PIE
diff --git a/code/modules/mafia/_defines.dm b/code/modules/mafia/_defines.dm
new file mode 100644
index 0000000000..194851beed
--- /dev/null
+++ b/code/modules/mafia/_defines.dm
@@ -0,0 +1,65 @@
+///how many people can play mafia without issues (running out of spawns, procs not expecting more than this amount of people, etc)
+#define MAFIA_MAX_PLAYER_COUNT 12
+
+#define MAFIA_TEAM_TOWN "town"
+#define MAFIA_TEAM_MAFIA "mafia"
+#define MAFIA_TEAM_SOLO "solo"
+
+//types of town roles for random setup gen
+/// assistants it's just assistants filling up the rest of the roles
+#define TOWN_OVERFLOW "overflow"
+/// roles that learn info about others in the game (chaplain, detective, psych)
+#define TOWN_INVEST "invest"
+/// roles that keep other roles safe (doctor, and weirdly enough lawyer counts)
+#define TOWN_PROTECT "protect"
+/// roles that don't fit into anything else (hop)
+#define TOWN_MISC "misc"
+
+//other types (mafia team, neutrals)
+/// normal vote kill changelings
+#define MAFIA_REGULAR "regular"
+/// every other changeling role that has extra abilities
+#define MAFIA_SPECIAL "special"
+/// role that wins solo that nobody likes
+#define NEUTRAL_KILL "kill"
+/// role that upsets the game aka obsessed, usually worse for town than mafia but they can vote against mafia
+#define NEUTRAL_DISRUPT "disrupt"
+
+#define MAFIA_PHASE_SETUP 1
+#define MAFIA_PHASE_DAY 2
+#define MAFIA_PHASE_VOTING 3
+#define MAFIA_PHASE_JUDGEMENT 4
+#define MAFIA_PHASE_NIGHT 5
+#define MAFIA_PHASE_VICTORY_LAP 6
+
+#define MAFIA_ALIVE 1
+#define MAFIA_DEAD 2
+
+#define COMSIG_MAFIA_ON_KILL "mafia_onkill"
+#define MAFIA_PREVENT_KILL 1
+
+#define COMSIG_MAFIA_CAN_PERFORM_ACTION "mafia_can_perform_action"
+#define MAFIA_PREVENT_ACTION 1
+
+//in order of events + game end
+
+/// when the shutters fall, before the 45 second wait and night event resolution
+#define COMSIG_MAFIA_SUNDOWN "sundown"
+/// after the 45 second wait, for actions that must go first
+#define COMSIG_MAFIA_NIGHT_START "night_start"
+/// most night actions now resolve
+#define COMSIG_MAFIA_NIGHT_ACTION_PHASE "night_actions"
+/// now killing happens from the roles that do that. the reason this is post action phase is to ensure doctors can protect and lawyers can block
+#define COMSIG_MAFIA_NIGHT_KILL_PHASE "night_kill"
+/// now undoing states like protection, actions that must happen last, etc. right before shutters raise and the day begins
+#define COMSIG_MAFIA_NIGHT_END "night_end"
+
+/// signal sent to roles when the game is confirmed ending
+#define COMSIG_MAFIA_GAME_END "game_end"
+
+/// list of ghosts who want to play mafia, every time someone enters the list it checks to see if enough are in
+GLOBAL_LIST_EMPTY(mafia_signup)
+/// list of ghosts who want to play mafia that have since disconnected. They are kept in the lobby, but not counted for starting a game.
+GLOBAL_LIST_EMPTY(mafia_bad_signup)
+/// the current global mafia game running.
+GLOBAL_VAR(mafia_game)
diff --git a/code/modules/mafia/controller.dm b/code/modules/mafia/controller.dm
new file mode 100644
index 0000000000..5873decb8f
--- /dev/null
+++ b/code/modules/mafia/controller.dm
@@ -0,0 +1,947 @@
+
+
+/**
+ * The mafia controller handles the mafia minigame in progress.
+ * It is first created when the first ghost signs up to play.
+ */
+/datum/mafia_controller
+ ///list of observers that should get game updates.
+ var/list/spectators = list()
+ ///all roles in the game, dead or alive. check their game status if you only want living or dead.
+ var/list/all_roles = list()
+ ///exists to speed up role retrieval, it's a dict. player_role_lookup[player ckey] will give you the role they play
+ var/list/player_role_lookup = list()
+ ///what part of the game you're playing in. day phases, night phases, judgement phases, etc.
+ var/phase = MAFIA_PHASE_SETUP
+ ///how long the game has gone on for, changes with every sunrise. day one, night one, day two, etc.
+ var/turn = 0
+ ///for debugging and testing a full game, or adminbuse. If this is not null, it will use this as a setup. clears when game is over
+ var/list/custom_setup = list()
+ ///first day has no voting, and thus is shorter
+ var/first_day_phase_period = 20 SECONDS
+ ///talk with others about the last night
+ var/day_phase_period = 1 MINUTES
+ ///vote someone to get put on trial
+ var/voting_phase_period = 30 SECONDS
+ ///defend yourself! don't get lynched! sometimes skipped if nobody votes.
+ var/judgement_phase_period = 30 SECONDS
+ ///guilty or innocent, we want a bit of time for players to process the outcome of the vote
+ var/judgement_lynch_period = 5 SECONDS
+ ///mafia talk at night and pick someone to kill, some town roles use their actions, etc etc.
+ var/night_phase_period = 45 SECONDS
+ ///like the lynch period, players need to see what the other players in the game's roles were
+ var/victory_lap_period = 20 SECONDS
+
+ ///template picked when the game starts. used for the name and desc reading
+ var/datum/map_template/mafia/current_map
+ ///map generation tool that deletes the current map after the game finishes
+ var/datum/mapGenerator/massdelete/map_deleter
+
+ ///Readable list of roles in current game, sent to the tgui panel for roles list > list("Psychologist x1", "Clown x2")
+ var/list/current_setup_text
+
+ ///starting outfit for all mafia players. it's just a grey jumpsuit.
+ var/player_outfit = /datum/outfit/mafia
+
+ ///spawn points for players, each one has a house
+ var/list/landmarks = list()
+ ///town center for when people get put on trial
+ var/town_center_landmark
+
+ ///group voting on one person, like putting people to trial or choosing who to kill as mafia
+ var/list/votes = list()
+ ///and these (judgement_innocent_votes, judgement_abstain_votes and judgement_guilty_votes) are the judgement phase votes, aka people sorting themselves into guilty and innocent, and "eh, i don't really care" lists. whichever has more inno or guilty wins!
+ var/list/judgement_abstain_votes = list()
+ var/list/judgement_innocent_votes = list()
+ var/list/judgement_guilty_votes = list()
+ ///current role on trial for the judgement phase, will die if guilty is greater than innocent
+ var/datum/mafia_role/on_trial
+
+ ///current timer for phase
+ var/next_phase_timer
+
+ ///used for debugging in testing (doesn't put people out of the game, some other shit i forgot, who knows just don't set this in live) honestly kinda deprecated
+ var/debug = FALSE
+
+ ///Max player count
+ var/max_player = MAFIA_MAX_PLAYER_COUNT
+ ///Required player count
+ var/required_player = 5
+
+/datum/mafia_controller/New()
+ . = ..()
+ GLOB.mafia_game = src
+ map_deleter = new
+
+/datum/mafia_controller/Destroy(force, ...)
+ . = ..()
+ GLOB.mafia_game = null
+ end_game()
+ qdel(map_deleter)
+
+/**
+ * Triggers at beginning of the game when there is a confirmed list of valid, ready players.
+ * Creates a 100% ready game that has NOT started (no players in bodies)
+ * Followed by start game
+ *
+ * Does the following:
+ * * Picks map, and loads it
+ * * Grabs landmarks if it is the first time it's loading
+ * * Sets up the role list
+ * * Puts players in each role randomly
+ * Arguments:
+ * * setup_list: list of all the datum setups (fancy list of roles) that would work for the game
+ * * ready_players: list of filtered, sane players (so not playing or disconnected) for the game to put into roles
+ */
+/datum/mafia_controller/proc/prepare_game(setup_list,ready_players)
+
+ var/list/possible_maps = subtypesof(/datum/map_template/mafia)
+ var/turf/spawn_area = get_turf(locate(/obj/effect/landmark/mafia_game_area) in GLOB.landmarks_list)
+
+ current_map = pick(possible_maps)
+ current_map = new current_map
+
+ if(!spawn_area)
+ CRASH("No spawn area detected for Mafia!")
+ var/list/bounds = current_map.load(spawn_area)
+ if(!bounds)
+ CRASH("Loading mafia map failed!")
+ map_deleter.defineRegion(spawn_area, locate(spawn_area.x + 23,spawn_area.y + 23,spawn_area.z), replace = TRUE) //so we're ready to mass delete when round ends
+
+ if(!landmarks.len)//we grab town center when we grab landmarks, if there is none (the first game signed up for let's grab them post load)
+ for(var/obj/effect/landmark/mafia/possible_spawn in GLOB.landmarks_list)
+ if(istype(possible_spawn, /obj/effect/landmark/mafia/town_center))
+ town_center_landmark = possible_spawn
+ else
+ landmarks += possible_spawn
+
+ current_setup_text = list()
+ for(var/rtype in setup_list)
+ for(var/i in 1 to setup_list[rtype])
+ all_roles += new rtype(src)
+ var/datum/mafia_role/rp = rtype
+ current_setup_text += "[initial(rp.name)] x[setup_list[rtype]]"
+ var/list/spawnpoints = landmarks.Copy()
+ for(var/datum/mafia_role/role in all_roles)
+ role.assigned_landmark = pick_n_take(spawnpoints)
+ if(!debug)
+ role.player_key = pick_n_take(ready_players)
+ else
+ role.player_key = pop(ready_players)
+
+/datum/mafia_controller/proc/send_message(msg,team)
+ for(var/datum/mafia_role/R in all_roles)
+ if(team && R.team != team)
+ continue
+ to_chat(R.body,msg)
+ var/team_suffix = team ? "([uppertext(team)] CHAT)" : ""
+ for(var/M in GLOB.dead_mob_list)
+ var/mob/spectator = M
+ if(spectator.ckey in spectators) //was in current game, or spectatin' (won't send to living)
+ var/link = FOLLOW_LINK(M, town_center_landmark)
+ to_chat(M, "[link] MAFIA: [msg] [team_suffix]")
+
+/**
+ * The game by this point is now all set up, and so we can put people in their bodies and start the first phase.
+ *
+ * Does the following:
+ * * Creates bodies for all of the roles with the first proc
+ * * Starts the first day manually (so no timer) with the second proc
+ */
+/datum/mafia_controller/proc/start_game()
+ create_bodies()
+ start_day()
+
+/**
+ * How every day starts.
+ *
+ * What players do in this phase:
+ * * If day one, just a small starting period to see who is in the game and check role, leading to the night phase.
+ * * Otherwise, it's a longer period used to discuss events that happened during the night, leading to the voting phase.
+ */
+/datum/mafia_controller/proc/start_day()
+ turn += 1
+ phase = MAFIA_PHASE_DAY
+ if(!check_victory())
+ if(turn == 1)
+ send_message("The selected map is [current_map.name]![current_map.description]")
+ send_message("Day [turn] started! There is no voting on the first day. Say hello to everybody!")
+ next_phase_timer = addtimer(CALLBACK(src,.proc/check_trial, FALSE),first_day_phase_period,TIMER_STOPPABLE) //no voting period = no votes = instant night
+ else
+ send_message("Day [turn] started! Voting will start in 1 minute.")
+ next_phase_timer = addtimer(CALLBACK(src,.proc/start_voting_phase),day_phase_period,TIMER_STOPPABLE)
+
+ SStgui.update_uis(src)
+
+/**
+ * Players have finished the discussion period, and now must put up someone to the chopping block.
+ *
+ * What players do in this phase:
+ * * Vote on which player to put up for lynching, leading to the judgement phase.
+ * * If no votes are case, the judgement phase is skipped, leading to the night phase.
+ */
+/datum/mafia_controller/proc/start_voting_phase()
+ phase = MAFIA_PHASE_VOTING
+ next_phase_timer = addtimer(CALLBACK(src, .proc/check_trial, TRUE),voting_phase_period,TIMER_STOPPABLE) //be verbose!
+ send_message("Voting started! Vote for who you want to see on trial today.")
+ SStgui.update_uis(src)
+
+/**
+ * Players have voted someone up, and now the person must defend themselves while the town votes innocent or guilty.
+ *
+ * What players do in this phase:
+ * * Vote innocent or guilty, if they are not on trial.
+ * * Defend themselves and wait for judgement, if they are.
+ * * Leads to the lynch phase.
+ * Arguments:
+ * * verbose: boolean, announces whether there were votes or not. after judgement it goes back here with no voting period to end the day.
+ */
+/datum/mafia_controller/proc/check_trial(verbose = TRUE)
+ var/datum/mafia_role/loser = get_vote_winner("Day")//, majority_of_town = TRUE)
+ // var/loser_votes = get_vote_count(loser,"Day")
+ if(loser)
+ // if(loser_votes > 12)
+ // loser.body.client?.give_award(/datum/award/achievement/mafia/universally_hated, loser.body)
+ send_message("[loser.body.real_name] wins the day vote, Listen to their defense and vote \"INNOCENT\" or \"GUILTY\"!")
+ //refresh the lists
+ judgement_abstain_votes = list()
+ judgement_innocent_votes = list()
+ judgement_guilty_votes = list()
+ for(var/i in all_roles)
+ var/datum/mafia_role/abstainee = i
+ if(abstainee.game_status == MAFIA_ALIVE && abstainee != loser)
+ judgement_abstain_votes += abstainee
+ on_trial = loser
+ on_trial.body.forceMove(get_turf(town_center_landmark))
+ phase = MAFIA_PHASE_JUDGEMENT
+ next_phase_timer = addtimer(CALLBACK(src, .proc/lynch),judgement_phase_period,TIMER_STOPPABLE)
+ reset_votes("Day")
+ else
+ if(verbose)
+ send_message("Not enough people have voted to put someone on trial, nobody will be lynched today.")
+ if(!check_victory())
+ lockdown()
+ SStgui.update_uis(src)
+
+/**
+ * Players have voted innocent or guilty on the person on trial, and that person is now killed or returned home.
+ *
+ * What players do in this phase:
+ * * r/watchpeopledie
+ * * If the accused is killed, their true role is revealed to the rest of the players.
+ */
+/datum/mafia_controller/proc/lynch()
+ for(var/i in judgement_innocent_votes)
+ var/datum/mafia_role/role = i
+ send_message("[role.body.real_name] voted innocent.")
+ for(var/ii in judgement_abstain_votes)
+ var/datum/mafia_role/role = ii
+ send_message("[role.body.real_name] abstained.")
+ for(var/iii in judgement_guilty_votes)
+ var/datum/mafia_role/role = iii
+ send_message("[role.body.real_name] voted guilty.")
+ if(judgement_guilty_votes.len > judgement_innocent_votes.len) //strictly need majority guilty to lynch
+ send_message("Guilty wins majority, [on_trial.body.real_name] has been lynched.")
+ on_trial.kill(src, lynch = TRUE)
+ addtimer(CALLBACK(src, .proc/send_home, on_trial),judgement_lynch_period)
+ else
+ send_message("Innocent wins majority, [on_trial.body.real_name] has been spared.")
+ on_trial.body.forceMove(get_turf(on_trial.assigned_landmark))
+ on_trial = null
+ //day votes are already cleared, so this will skip the trial and check victory/lockdown/whatever else
+ next_phase_timer = addtimer(CALLBACK(src, .proc/check_trial, FALSE),judgement_lynch_period,TIMER_STOPPABLE)// small pause to see the guy dead, no verbosity since we already did this
+
+/**
+ * Teenie helper proc to move players back to their home.
+ * Used in the above, but also used in the debug button "send all players home"
+ * Arguments:
+ * * role: mafia role that is getting sent back to the game.
+ */
+/datum/mafia_controller/proc/send_home(datum/mafia_role/role)
+ role.body.forceMove(get_turf(role.assigned_landmark))
+
+/**
+ * Checks to see if a faction (or solo antagonist) has won.
+ *
+ * Calculates in this order:
+ * * counts up town, mafia, and solo
+ * * solos can count as town members for the purposes of mafia winning
+ * * sends the amount of living people to the solo antagonists, and see if they won OR block the victory of the teams
+ * * checks if solos won from above, then if town, then if mafia
+ * * starts the end of the game if a faction won
+ * * returns TRUE if someone won the game, halting other procs from continuing in the case of a victory
+ */
+/datum/mafia_controller/proc/check_victory()
+ //needed for achievements
+ var/list/total_town = list()
+ var/list/total_mafia = list()
+
+ var/alive_town = 0
+ var/alive_mafia = 0
+ var/list/solos_to_ask = list() //need to ask after because first round is counting team sizes
+ var/list/total_victors = list() //if this list gets filled with anyone, they win. list because side antags can with with people
+ var/blocked_victory = FALSE //if a solo antagonist is stopping the town or mafia from finishing the game.
+
+ ///PHASE ONE: TALLY UP ALL NUMBERS OF PEOPLE STILL ALIVE
+
+ for(var/datum/mafia_role/R in all_roles)
+ switch(R.team)
+ if(MAFIA_TEAM_MAFIA)
+ total_mafia += R
+ if(R.game_status == MAFIA_ALIVE)
+ alive_mafia += R.vote_power
+ if(MAFIA_TEAM_TOWN)
+ total_town += R
+ if(R.game_status == MAFIA_ALIVE)
+ alive_town += R.vote_power
+ if(MAFIA_TEAM_SOLO)
+ if(R.game_status == MAFIA_ALIVE)
+ if(R.solo_counts_as_town)
+ alive_town += R.vote_power
+ solos_to_ask += R
+
+ ///PHASE TWO: SEND STATS TO SOLO ANTAGS, SEE IF THEY WON OR TEAMS CANNOT WIN
+
+ for(var/datum/mafia_role/solo in solos_to_ask)
+ if(solo.check_total_victory(alive_town, alive_mafia))
+ total_victors += solo
+ if(solo.block_team_victory(alive_town, alive_mafia))
+ blocked_victory = TRUE
+
+ //solo victories!
+ var/solo_end = FALSE
+ for(var/datum/mafia_role/winner in total_victors)
+ send_message("!! [uppertext(winner.name)] VICTORY !!")
+ // var/client/winner_client = GLOB.directory[winner.player_key]
+ // winner_client?.give_award(winner.winner_award, winner.body)
+ solo_end = TRUE
+ if(solo_end)
+ start_the_end()
+ return TRUE
+ if(blocked_victory)
+ return FALSE
+ if(alive_mafia == 0)
+ // for(var/datum/mafia_role/townie in total_town)
+ // var/client/townie_client = GLOB.directory[townie.player_key]
+ // townie_client?.give_award(townie.winner_award, townie.body)
+ start_the_end("!! TOWN VICTORY !!")
+ return TRUE
+ else if(alive_mafia >= alive_town) //guess could change if town nightkill is added
+ start_the_end("!! MAFIA VICTORY !!")
+ // for(var/datum/mafia_role/changeling in total_mafia)
+ // var/client/changeling_client = GLOB.directory[changeling.player_key]
+ // changeling_client?.give_award(changeling.winner_award, changeling.body)
+ return TRUE
+
+/**
+ * The end of the game is in two procs, because we want a bit of time for players to see eachothers roles.
+ * Because of how check_victory works, the game is halted in other places by this point.
+ *
+ * What players do in this phase:
+ * * See everyone's role postgame
+ * * See who won the game
+ * Arguments:
+ * * message: string, if non-null it sends it to all players. used to announce team victories while solos are handled in check victory
+ */
+/datum/mafia_controller/proc/start_the_end(message)
+ SEND_SIGNAL(src,COMSIG_MAFIA_GAME_END)
+ if(message)
+ send_message(message)
+ for(var/datum/mafia_role/R in all_roles)
+ R.reveal_role(src)
+ phase = MAFIA_PHASE_VICTORY_LAP
+ next_phase_timer = addtimer(CALLBACK(src,.proc/end_game),victory_lap_period,TIMER_STOPPABLE)
+
+/**
+ * Cleans up the game, resetting variables back to the beginning and removing the map with the generator.
+ */
+/datum/mafia_controller/proc/end_game()
+ map_deleter.generate() //remove the map, it will be loaded at the start of the next one
+ QDEL_LIST(all_roles)
+ current_setup_text = null
+ custom_setup = list()
+ turn = 0
+ votes = list()
+ //map gen does not deal with landmarks
+ QDEL_LIST(landmarks)
+ QDEL_NULL(town_center_landmark)
+ phase = MAFIA_PHASE_SETUP
+
+/**
+ * After the voting and judgement phases, the game goes to night shutting the windows and beginning night with a proc.
+ */
+/datum/mafia_controller/proc/lockdown()
+ toggle_night_curtains(close=TRUE)
+ start_night()
+
+/**
+ * Shuts poddoors attached to mafia.
+ * Arguments:
+ * * close: boolean, the state you want the curtains in.
+ */
+/datum/mafia_controller/proc/toggle_night_curtains(close)
+ for(var/obj/machinery/door/poddoor/D in GLOB.machines) //I really dislike pathing of these
+ if(D.id != "mafia") //so as to not trigger shutters on station, lol
+ continue
+ if(close)
+ INVOKE_ASYNC(D, /obj/machinery/door/poddoor.proc/close)
+ else
+ INVOKE_ASYNC(D, /obj/machinery/door/poddoor.proc/open)
+
+/**
+ * The actual start of night for players. Mostly info is given at the start of the night as the end of the night is when votes and actions are submitted and tried.
+ *
+ * What players do in this phase:
+ * * Mafia are told to begin voting on who to kill
+ * * Powers that are picked during the day announce themselves right now
+ */
+/datum/mafia_controller/proc/start_night()
+ phase = MAFIA_PHASE_NIGHT
+ send_message("Night [turn] started! Lockdown will end in 45 seconds.")
+ SEND_SIGNAL(src,COMSIG_MAFIA_SUNDOWN)
+ next_phase_timer = addtimer(CALLBACK(src, .proc/resolve_night),night_phase_period,TIMER_STOPPABLE)
+ SStgui.update_uis(src)
+
+/**
+ * The end of the night, and a series of signals for the order of events on a night.
+ *
+ * Order of events, and what they mean:
+ * * Start of resolve (NIGHT_START) is for activating night abilities that MUST go first
+ * * Action phase (NIGHT_ACTION_PHASE) is for non-lethal day abilities
+ * * Mafia then tallies votes and kills the highest voted person (note: one random voter visits that person for the purposes of roleblocking)
+ * * Killing phase (NIGHT_KILL_PHASE) is for lethal night abilities
+ * * End of resolve (NIGHT_END) is for cleaning up abilities that went off and i guess doing some that must go last
+ * * Finally opens the curtains and calls the start of day phase, completing the cycle until check victory returns TRUE
+ */
+/datum/mafia_controller/proc/resolve_night()
+ SEND_SIGNAL(src,COMSIG_MAFIA_NIGHT_START)
+ SEND_SIGNAL(src,COMSIG_MAFIA_NIGHT_ACTION_PHASE)
+ //resolve mafia kill, todo unsnowflake this
+ var/datum/mafia_role/R = get_vote_winner("Mafia")
+ if(R)
+ var/datum/mafia_role/killer = get_random_voter("Mafia")
+ if(SEND_SIGNAL(killer,COMSIG_MAFIA_CAN_PERFORM_ACTION,src,"mafia killing",R) & MAFIA_PREVENT_ACTION)
+ send_message("[killer.body.real_name] was unable to attack [R.body.real_name] tonight!",MAFIA_TEAM_MAFIA)
+ else
+ send_message("[killer.body.real_name] has attacked [R.body.real_name]!",MAFIA_TEAM_MAFIA)
+ R.kill(src)
+ reset_votes("Mafia")
+ SEND_SIGNAL(src,COMSIG_MAFIA_NIGHT_KILL_PHASE)
+ SEND_SIGNAL(src,COMSIG_MAFIA_NIGHT_END)
+ toggle_night_curtains(close=FALSE)
+ start_day()
+ SStgui.update_uis(src)
+
+/**
+ * Proc that goes off when players vote for something with their mafia panel.
+ *
+ * If teams, it hides the tally overlay and only sends the vote messages to the team that is voting
+ * Arguments:
+ * * voter: the mafia role that is trying to vote for...
+ * * target: the mafia role that is getting voted for
+ * * vote_type: type of vote submitted (is this the day vote? is this the mafia night vote?)
+ * * teams: see mafia team defines for what to put in, makes the messages only send to a specific team (so mafia night votes only sending messages to mafia at night)
+ */
+/datum/mafia_controller/proc/vote_for(datum/mafia_role/voter,datum/mafia_role/target,vote_type, teams)
+ if(!votes[vote_type])
+ votes[vote_type] = list()
+ var/old_vote = votes[vote_type][voter]
+ if(old_vote && old_vote == target)
+ votes[vote_type] -= voter
+ else
+ votes[vote_type][voter] = target
+ if(old_vote && old_vote == target)
+ send_message("[voter.body.real_name] retracts their vote for [target.body.real_name]!", team = teams)
+ else
+ send_message("[voter.body.real_name] voted for [target.body.real_name]!",team = teams)
+ if(!teams)
+ target.body.update_icon() //Update the vote display if it's a public vote
+ var/datum/mafia_role/old = old_vote
+ if(old)
+ old.body.update_icon()
+
+/**
+ * Clears out the votes of a certain type (day votes, mafia kill votes) while leaving others untouched
+ */
+/datum/mafia_controller/proc/reset_votes(vote_type)
+ var/list/bodies_to_update = list()
+ for(var/vote in votes[vote_type])
+ var/datum/mafia_role/R = votes[vote_type][vote]
+ bodies_to_update += R.body
+ votes[vote_type] = list()
+ for(var/mob/M in bodies_to_update)
+ M.update_icon()
+
+/**
+ * Returns how many people voted for the role, in whatever vote (day vote, night kill vote)
+ * Arguments:
+ * * role: the mafia role the proc tries to get the amount of votes for
+ * * vote_type: the vote type (getting how many day votes were for the role, or mafia night votes for the role)
+ */
+/datum/mafia_controller/proc/get_vote_count(role,vote_type)
+ . = 0
+ for(var/v in votes[vote_type])
+ var/datum/mafia_role/votee = v
+ if(votes[vote_type][votee] == role)
+ . += votee.vote_power
+
+/**
+ * Returns whichever role got the most votes, in whatever vote (day vote, night kill vote)
+ * returns null if no votes
+ * Arguments:
+ * * vote_type: the vote type (getting the role that got the most day votes, or the role that got the most mafia votes)
+ */
+/datum/mafia_controller/proc/get_vote_winner(vote_type)
+ var/list/tally = list()
+ for(var/votee in votes[vote_type])
+ if(!tally[votes[vote_type][votee]])
+ tally[votes[vote_type][votee]] = 1
+ else
+ tally[votes[vote_type][votee]] += 1
+ sortTim(tally,/proc/cmp_numeric_dsc,associative=TRUE)
+ return length(tally) ? tally[1] : null
+
+/**
+ * Returns a random person who voted for whatever vote (day vote, night kill vote)
+ * Arguments:
+ * * vote_type: vote type (getting a random day voter, or mafia night voter)
+ */
+/datum/mafia_controller/proc/get_random_voter(vote_type)
+ if(length(votes[vote_type]))
+ return pick(votes[vote_type])
+
+/**
+ * Adds mutable appearances to people who get publicly voted on (so not night votes) showing how many people are picking them
+ * Arguments:
+ * * source: the body of the role getting the overlays
+ * * overlay_list: signal var passing the overlay list of the mob
+ */
+/datum/mafia_controller/proc/display_votes(atom/source, list/overlay_list)
+ if(phase != MAFIA_PHASE_VOTING)
+ return
+ var/v = get_vote_count(player_role_lookup[source],"Day")
+ var/mutable_appearance/MA = mutable_appearance('icons/obj/mafia.dmi',"vote_[v > 12 ? "over_12" : v]")
+ overlay_list += MA
+
+/**
+ * Called when the game is setting up, AFTER map is loaded but BEFORE the phase timers start. Creates and places each role's body and gives the correct player key
+ *
+ * Notably:
+ * * Toggles godmode so the mafia players cannot kill themselves
+ * * Adds signals for voting overlays, see display_votes proc
+ * * gives mafia panel
+ * * sends the greeting text (goals, role name, etc)
+ */
+/datum/mafia_controller/proc/create_bodies()
+ for(var/datum/mafia_role/role in all_roles)
+ var/mob/living/carbon/human/H = new(get_turf(role.assigned_landmark))
+ H.equipOutfit(player_outfit)
+ H.status_flags |= GODMODE
+ RegisterSignal(H,COMSIG_ATOM_UPDATE_OVERLAYS,.proc/display_votes)
+ var/datum/action/innate/mafia_panel/mafia_panel = new(null,src)
+ mafia_panel.Grant(H)
+ var/client/player_client = GLOB.directory[role.player_key]
+ if(player_client)
+ player_client.prefs.copy_to(H)
+ if(H.dna.species.outfit_important_for_life) //plasmamen
+ H.set_species(/datum/species/human)
+ role.body = H
+ player_role_lookup[H] = role
+ H.key = role.player_key
+ role.greet()
+
+/datum/mafia_controller/ui_data(mob/user)
+ . = ..()
+ switch(phase)
+ if(MAFIA_PHASE_DAY,MAFIA_PHASE_VOTING,MAFIA_PHASE_JUDGEMENT)
+ .["phase"] = "Day [turn]"
+ if(MAFIA_PHASE_NIGHT)
+ .["phase"] = "Night [turn]"
+ else
+ .["phase"] = "No Game"
+ if(user.client?.holder)
+ .["admin_controls"] = TRUE //show admin buttons to start/setup/stop
+ if(phase == MAFIA_PHASE_JUDGEMENT)
+ .["judgement_phase"] = TRUE //show judgement section
+ else
+ .["judgement_phase"] = FALSE
+ var/datum/mafia_role/user_role = player_role_lookup[user]
+ if(user_role)
+ .["roleinfo"] = list("role" = user_role.name,"desc" = user_role.desc, "action_log" = user_role.role_notes, "hud_icon" = user_role.hud_icon, "revealed_icon" = user_role.revealed_icon)
+ var/actions = list()
+ for(var/action in user_role.actions)
+ if(user_role.validate_action_target(src,action,null))
+ actions += action
+ .["actions"] = actions
+ .["role_theme"] = user_role.special_theme
+ else
+ var/list/lobby_data = list()
+ for(var/key in GLOB.mafia_signup + GLOB.mafia_bad_signup)
+ var/list/lobby_member = list()
+ lobby_member["name"] = key
+ lobby_member["status"] = "Ready"
+ if(key in GLOB.mafia_bad_signup)
+ lobby_member["status"] = "Disconnected"
+ lobby_member["spectating"] = "Ghost"
+ if(key in spectators)
+ lobby_member["spectating"] = "Spectator"
+ lobby_data += list(lobby_member)
+ .["lobbydata"] = lobby_data
+ var/list/player_data = list()
+ for(var/datum/mafia_role/R in all_roles)
+ var/list/player_info = list()
+ var/list/actions = list()
+ if(user_role) //not observer
+ for(var/action in user_role.targeted_actions)
+ if(user_role.validate_action_target(src,action,R))
+ actions += action
+ //Awful snowflake, could use generalizing
+ if(phase == MAFIA_PHASE_VOTING)
+ player_info["votes"] = get_vote_count(R,"Day")
+ if(R.game_status == MAFIA_ALIVE && R != user_role)
+ actions += "Vote"
+ if(phase == MAFIA_PHASE_NIGHT && user_role.team == MAFIA_TEAM_MAFIA && R.game_status == MAFIA_ALIVE && R.team != MAFIA_TEAM_MAFIA)
+ actions += "Kill Vote"
+ player_info["name"] = R.body.real_name
+ player_info["ref"] = REF(R)
+ player_info["actions"] = actions
+ player_info["alive"] = R.game_status == MAFIA_ALIVE
+ player_data += list(player_info)
+ .["players"] = player_data
+ .["timeleft"] = next_phase_timer ? timeleft(next_phase_timer) : 0
+
+ //Not sure on this, should this info be visible
+ .["all_roles"] = current_setup_text
+
+/datum/mafia_controller/ui_assets(mob/user)
+ return list(
+ get_asset_datum(/datum/asset/spritesheet/mafia),
+ )
+
+/datum/mafia_controller/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
+ . = ..()
+ if(.)
+ return
+ var/datum/mafia_role/user_role = player_role_lookup[usr]
+ //Admin actions
+ if(usr.client?.holder)
+ switch(action)
+ if("new_game")
+ end_game()
+ basic_setup()
+ if("nuke")
+ end_game()
+ qdel(src)
+ if("next_phase")
+ var/datum/timedevent/timer = SStimer.timer_id_dict[next_phase_timer]
+ if(!timer.spent)
+ var/datum/callback/tc = timer.callBack
+ deltimer(next_phase_timer)
+ tc.InvokeAsync()
+ return TRUE
+ if("players_home")
+ var/list/failed = list()
+ for(var/datum/mafia_role/player in all_roles)
+ if(!player.body)
+ failed += player
+ continue
+ player.body.forceMove(get_turf(player.assigned_landmark))
+ if(failed.len)
+ to_chat(usr, "List of players who no longer had a body (if you see this, the game is runtiming anyway so just hit \"New Game\" to end it)")
+ for(var/i in failed)
+ var/datum/mafia_role/fail = i
+ to_chat(usr, fail.player_key)
+ if("debug_setup")
+ var/list/debug_setup = list()
+ var/list/rolelist_dict = list()
+ var/done = FALSE
+ for(var/p in typesof(/datum/mafia_role))
+ var/datum/mafia_role/path = p
+ rolelist_dict[initial(path.name) + " ([uppertext(initial(path.team))])"] = path
+ rolelist_dict = list("CANCEL", "FINISH") + rolelist_dict
+ while(!done)
+ to_chat(usr, "You have a total player count of [assoc_value_sum(debug_setup)] in this setup.")
+ var/chosen_role_name = input(usr,"Select a role!","Custom Setup Creation",rolelist_dict[1]) as null|anything in rolelist_dict
+ if(chosen_role_name == "CANCEL")
+ return
+ if(chosen_role_name == "FINISH")
+ break
+ var/found_path = rolelist_dict[chosen_role_name]
+ var/role_count = input(usr,"How many? Zero to cancel.","Custom Setup Creation",0) as null|num
+ if(role_count > 0)
+ debug_setup[found_path] = role_count
+ custom_setup = debug_setup
+ if("cancel_setup")
+ custom_setup = list()
+ switch(action) //both living and dead
+ if("mf_lookup")
+ var/role_lookup = params["atype"]
+ var/datum/mafia_role/helper
+ for(var/datum/mafia_role/role in all_roles)
+ if(role_lookup == role.name)
+ helper = role
+ break
+ helper.show_help(usr)
+ if(!user_role)//just the dead
+ var/client/C = ui.user.client
+ switch(action)
+ if("mf_signup")
+ if(!SSticker.HasRoundStarted())
+ to_chat(usr, "Wait for the round to start.")
+ return
+ if(GLOB.mafia_signup[C.ckey])
+ GLOB.mafia_signup -= C.ckey
+ to_chat(usr, "You unregister from Mafia.")
+ return
+ else
+ GLOB.mafia_signup[C.ckey] = C
+ to_chat(usr, "You sign up for Mafia.")
+ if(phase == MAFIA_PHASE_SETUP)
+ check_signups()
+ try_autostart()
+ if("mf_spectate")
+ if(C.ckey in spectators)
+ to_chat(usr, "You will no longer get messages from the game.")
+ spectators -= C.ckey
+ else
+ to_chat(usr, "You will now get messages from the game.")
+ spectators += C.ckey
+ if(user_role.game_status == MAFIA_DEAD)
+ return
+ //User actions (just living)
+ switch(action)
+ if("mf_action")
+ if(!user_role.actions.Find(params["atype"]))
+ return
+ user_role.handle_action(src,params["atype"],null)
+ return TRUE //vals for self-ui update
+ if("mf_targ_action")
+ var/datum/mafia_role/target = locate(params["target"]) in all_roles
+ if(!istype(target))
+ return
+ switch(params["atype"])
+ if("Vote")
+ if(phase != MAFIA_PHASE_VOTING)
+ return
+ vote_for(user_role,target,vote_type="Day")
+ if("Kill Vote")
+ if(phase != MAFIA_PHASE_NIGHT || user_role.team != MAFIA_TEAM_MAFIA)
+ return
+ vote_for(user_role,target,"Mafia", MAFIA_TEAM_MAFIA)
+ to_chat(user_role.body,"You will vote for [target.body.real_name] for tonights killing.")
+ else
+ if(!user_role.targeted_actions.Find(params["atype"]))
+ return
+ if(!user_role.validate_action_target(src,params["atype"],target))
+ return
+ user_role.handle_action(src,params["atype"],target)
+ return TRUE
+ if(user_role != on_trial)
+ switch(action)
+ if("vote_abstain")
+ if(phase != MAFIA_PHASE_JUDGEMENT || (user_role in judgement_abstain_votes))
+ return
+ to_chat(user_role.body,"You have decided to abstain.")
+ judgement_innocent_votes -= user_role
+ judgement_guilty_votes -= user_role
+ judgement_abstain_votes += user_role
+ if("vote_innocent")
+ if(phase != MAFIA_PHASE_JUDGEMENT || (user_role in judgement_innocent_votes))
+ return
+ to_chat(user_role.body,"Your vote on [on_trial.body.real_name] submitted as INNOCENT!")
+ judgement_abstain_votes -= user_role//no fakers, and...
+ judgement_guilty_votes -= user_role//no radical centrism
+ judgement_innocent_votes += user_role
+ if("vote_guilty")
+ if(phase != MAFIA_PHASE_JUDGEMENT || (user_role in judgement_guilty_votes))
+ return
+ to_chat(user_role.body,"Your vote on [on_trial.body.real_name] submitted as GUILTY!")
+ judgement_abstain_votes -= user_role//no fakers, and...
+ judgement_innocent_votes -= user_role//no radical centrism
+ judgement_guilty_votes += user_role
+
+/datum/mafia_controller/ui_state(mob/user)
+ return GLOB.always_state
+
+/datum/mafia_controller/ui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, null)
+ if(!ui)
+ ui = new(user, src, "MafiaPanel")
+ ui.set_autoupdate(FALSE)
+ ui.open()
+
+/proc/assoc_value_sum(list/L)
+ . = 0
+ for(var/key in L)
+ . += L[key]
+
+/**
+ * Returns a semirandom setup, with...
+ * Town, Two invest roles, one protect role, sometimes a misc role, and the rest assistants for town.
+ * Mafia, 2 normal mafia and one special.
+ * Neutral, two disruption roles, sometimes one is a killing.
+ *
+ * See _defines.dm in the mafia folder for a rundown on what these groups of roles include.
+ */
+/datum/mafia_controller/proc/generate_random_setup()
+ var/invests_left = 2
+ var/protects_left = 1
+ var/miscs_left = prob(35)
+ var/mafiareg_left = 2
+ var/mafiaspe_left = 1
+ var/killing_role = prob(50)
+ var/disruptors = killing_role ? 1 : 2 //still required to calculate overflow
+ var/overflow_left = max_player - (invests_left + protects_left + miscs_left + mafiareg_left + mafiaspe_left + killing_role + disruptors)
+
+ var/list/random_setup = list()
+ for(var/i in 1 to max_player) //should match the number of roles to add
+ if(overflow_left)
+ add_setup_role(random_setup, TOWN_OVERFLOW)
+ overflow_left--
+ else if(invests_left)
+ add_setup_role(random_setup, TOWN_INVEST)
+ invests_left--
+ else if(protects_left)
+ add_setup_role(random_setup, TOWN_PROTECT)
+ protects_left--
+ else if(miscs_left)
+ add_setup_role(random_setup, TOWN_MISC)
+ miscs_left--
+ else if(mafiareg_left)
+ add_setup_role(random_setup, MAFIA_REGULAR)
+ mafiareg_left--
+ else if(mafiaspe_left)
+ add_setup_role(random_setup, MAFIA_SPECIAL)
+ mafiaspe_left--
+ else if(killing_role)
+ add_setup_role(random_setup, NEUTRAL_KILL)
+ killing_role--
+ else
+ add_setup_role(random_setup, NEUTRAL_DISRUPT)
+ return random_setup
+
+/**
+ * Helper proc that adds a random role of a type to a setup. if it doesn't exist in the setup, it adds the path to the list and otherwise bumps the path in the list up one
+ */
+/datum/mafia_controller/proc/add_setup_role(setup_list, wanted_role_type)
+ var/list/role_type_paths = list()
+ for(var/path in typesof(/datum/mafia_role))
+ var/datum/mafia_role/instance = path
+ if(initial(instance.role_type) == wanted_role_type)
+ role_type_paths += instance
+
+ var/mafia_path = pick(role_type_paths)
+ var/datum/mafia_role/mafia_path_type = mafia_path
+ var/found_role
+ for(var/searched_path in setup_list)
+ var/datum/mafia_role/searched_path_type = searched_path
+ if(initial(mafia_path_type.name) == initial(searched_path_type.name))
+ found_role = searched_path
+ break
+ if(found_role)
+ setup_list[found_role] += 1
+ return
+ setup_list[mafia_path] = 1
+
+/**
+ * Called when enough players have signed up to fill a setup. DOESN'T NECESSARILY MEAN THE GAME WILL START.
+ *
+ * Checks for a custom setup, if so gets the required players from that and if not it sets the player requirement to required_player(max_player) and generates one IF basic setup starts a game.
+ * Checks if everyone signed up is an observer, and is still connected. If people aren't, they're removed from the list.
+ * If there aren't enough players post sanity, it aborts. otherwise, it selects enough people for the game and starts preparing the game for real.
+ */
+/datum/mafia_controller/proc/basic_setup()
+ var/req_players
+ var/list/setup = custom_setup
+ if(!setup.len)
+ req_players = required_player //max_player
+ else
+ req_players = assoc_value_sum(setup)
+
+ //final list for all the players who will be in this game
+ var/list/filtered_keys = list()
+ //cuts invalid players from signups (disconnected/not a ghost)
+ var/list/possible_keys = list()
+ for(var/key in GLOB.mafia_signup)
+ if(GLOB.directory[key])
+ var/client/C = GLOB.directory[key]
+ if(isobserver(C.mob))
+ possible_keys += key
+ continue
+ GLOB.mafia_signup -= key //not valid to play when we checked so remove them from signups
+
+ //if there were not enough players, don't start. we already trimmed the list to now hold only valid signups
+ if(length(possible_keys) < req_players)
+ return
+ else //hacky implementation of max players
+ req_players = clamp(length(possible_keys), 1, max_player)
+
+ //if there were too many players, still start but only make filtered keys as big as it needs to be (cut excess)
+ //also removes people who do get into final player list from the signup so they have to sign up again when game ends
+ for(var/i in 1 to req_players)
+ var/chosen_key = pick_n_take(possible_keys)
+ filtered_keys += chosen_key
+ GLOB.mafia_signup -= chosen_key
+ //small message about not getting into this game for clarity on why they didn't get in
+ for(var/unpicked in possible_keys)
+ var/client/unpicked_client = GLOB.directory[unpicked]
+ to_chat(unpicked_client, "Sorry, the starting mafia game has too many players and you were not picked.")
+ to_chat(unpicked_client, "You're still signed up, getting messages from the current round, and have another chance to join when the one starting now finishes.")
+
+ if(!setup.len) //don't actually have one yet, so generate a max player random setup. it's good to do this here instead of above so it doesn't generate one every time a game could possibly start.
+ setup = generate_random_setup()
+ prepare_game(setup,filtered_keys)
+ start_game()
+
+/**
+ * Called when someone signs up, and sees if there are enough people in the signup list to begin.
+ *
+ * Only checks if everyone is actually valid to start (still connected and an observer) if there are enough players (basic_setup)
+ */
+/datum/mafia_controller/proc/try_autostart()
+ if(phase != MAFIA_PHASE_SETUP) // || !(GLOB.ghost_role_flags & GHOSTROLE_MINIGAME))
+ return
+ if(GLOB.mafia_signup.len >= max_player || GLOB.mafia_signup.len >= required_player|| custom_setup.len)//enough people to try and make something (or debug mode)
+ basic_setup()
+
+/**
+ * Filters inactive player into a different list until they reconnect, and removes players who are no longer ghosts.
+ *
+ * If a disconnected player gets a non-ghost mob and reconnects, they will be first put back into mafia_signup then filtered by that.
+ */
+/datum/mafia_controller/proc/check_signups()
+ for(var/bad_key in GLOB.mafia_bad_signup)
+ if(GLOB.directory[bad_key])//they have reconnected if we can search their key and get a client
+ GLOB.mafia_bad_signup -= bad_key
+ GLOB.mafia_signup += bad_key
+ for(var/key in GLOB.mafia_signup)
+ var/client/C = GLOB.directory[key]
+ if(!C)//vice versa but in a variable we use later
+ GLOB.mafia_signup -= key
+ GLOB.mafia_bad_signup += key
+ if(!isobserver(C.mob))
+ //they are back to playing the game, remove them from the signups
+ GLOB.mafia_signup -= key
+
+/datum/action/innate/mafia_panel
+ name = "Mafia Panel"
+ desc = "Use this to play."
+ icon_icon = 'icons/obj/mafia.dmi'
+ button_icon_state = "board"
+ var/datum/mafia_controller/parent
+
+/datum/action/innate/mafia_panel/New(Target,mf)
+ . = ..()
+ parent = mf
+
+/datum/action/innate/mafia_panel/Activate()
+ parent.ui_interact(owner)
+
+/**
+ * Creates the global datum for playing mafia games, destroys the last if that's required and returns the new.
+ */
+/proc/create_mafia_game()
+ if(GLOB.mafia_game)
+ QDEL_NULL(GLOB.mafia_game)
+ var/datum/mafia_controller/MF = new()
+ return MF
diff --git a/code/modules/mafia/map_pieces.dm b/code/modules/mafia/map_pieces.dm
new file mode 100644
index 0000000000..3459603f3c
--- /dev/null
+++ b/code/modules/mafia/map_pieces.dm
@@ -0,0 +1,79 @@
+/obj/effect/landmark/mafia_game_area //locations where mafia will be loaded by the datum
+ name = "Mafia Area Spawn"
+ var/game_id = "mafia"
+
+/obj/effect/landmark/mafia
+ name = "Mafia Player Spawn"
+ var/game_id = "mafia"
+
+/obj/effect/landmark/mafia/town_center
+ name = "Mafia Town Center"
+
+//for ghosts/admins
+/obj/mafia_game_board
+ name = "Mafia Game Board"
+ icon = 'icons/obj/mafia.dmi'
+ icon_state = "board"
+ anchored = TRUE
+ var/game_id = "mafia"
+ var/datum/mafia_controller/MF
+
+/obj/mafia_game_board/attack_ghost(mob/user)
+ . = ..()
+ if(!MF)
+ MF = GLOB.mafia_game
+ if(!MF)
+ MF = create_mafia_game()
+ MF.ui_interact(user)
+
+/area/mafia
+ name = "Mafia Minigame"
+ icon_state = "mafia"
+ dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
+ requires_power = FALSE
+ has_gravity = STANDARD_GRAVITY
+ flags_1 = NONE
+ // block_suicide = TRUE
+
+/datum/map_template/mafia
+ var/description = ""
+
+/datum/map_template/mafia/summerball
+ name = "Summerball 2020"
+ description = "The original, the OG. The 2020 Summer ball was where mafia came from, with this map."
+ mappath = "_maps/map_files/Mafia/mafia_ball.dmm"
+
+/datum/map_template/mafia/syndicate
+ name = "Syndicate Megastation"
+ description = "Yes, it's a very confusing day at the Megastation. Will the syndicate conflict resolution operatives succeed?"
+ mappath = "_maps/map_files/Mafia/mafia_syndie.dmm"
+
+/datum/map_template/mafia/lavaland
+ name = "Lavaland Excursion"
+ description = "The station has no idea what's going down on lavaland right now, we got changelings... traitors, and worst of all... lawyers roleblocking you every night."
+ mappath = "_maps/map_files/Mafia/mafia_lavaland.dmm"
+
+/datum/map_template/mafia/ufo
+ name = "Alien Mothership"
+ description = "The haunted ghost UFO tour has gone south and now it's up to our fine townies and scare seekers to kill the actual real alien changelings..."
+ mappath = "_maps/map_files/Mafia/mafia_ayylmao.dmm"
+
+/datum/map_template/mafia/spider_clan
+ name = "Spider Clan Kidnapping"
+ description = "New and improved spider clan kidnappings are a lot less boring and have a lot more lynching. Damn westaboos!"
+ mappath = "_maps/map_files/Mafia/mafia_spiderclan.dmm"
+
+/datum/map_template/mafia/snowy
+ name = "Snowdin"
+ description = "Based off of the icey moon map of the same name, the guy who reworked it pretty much did it for nothing since away missions are disabled but at least he'll get this...?"
+ mappath = "_maps/map_files/Mafia/mafia_snow.dmm"
+
+/datum/map_template/mafia/gothic
+ name = "Vampire's Castle"
+ description = "Vampires and changelings clash to find out who's the superior bloodsucking monster in this creepy castle map."
+ mappath = "_maps/map_files/Mafia/mafia_gothic.dmm"
+
+/datum/map_template/mafia/gothic
+ name = "Reebe"
+ description = "Trouble in Reebe station! Copypaste guranteed by ClockCo™"
+ mappath = "_maps/map_files/Mafia/mafia_reebe.dmm"
\ No newline at end of file
diff --git a/code/modules/mafia/outfits.dm b/code/modules/mafia/outfits.dm
new file mode 100644
index 0000000000..bbc72bd120
--- /dev/null
+++ b/code/modules/mafia/outfits.dm
@@ -0,0 +1,108 @@
+
+//what people wear unrevealed
+
+/datum/outfit/mafia
+ name = "Mafia Game Outfit"
+ uniform = /obj/item/clothing/under/color/grey
+ shoes = /obj/item/clothing/shoes/sneakers/black
+
+//town
+
+/datum/outfit/mafia/assistant
+ name = "Mafia Assistant"
+
+ uniform = /obj/item/clothing/under/color/rainbow
+
+/datum/outfit/mafia/detective
+ name = "Mafia Detective"
+
+ uniform = /obj/item/clothing/under/rank/security/detective
+ // neck = /obj/item/clothing/neck/tie/detective
+ shoes = /obj/item/clothing/shoes/sneakers/brown
+ suit = /obj/item/clothing/suit/det_suit
+ gloves = /obj/item/clothing/gloves/color/black
+ head = /obj/item/clothing/head/fedora/det_hat
+ mask = /obj/item/clothing/mask/cigarette
+
+/datum/outfit/mafia/psychologist
+ name = "Mafia Psychologist"
+
+ uniform = /obj/item/clothing/under/suit/black
+ shoes = /obj/item/clothing/shoes/laceup
+
+/datum/outfit/mafia/md
+ name = "Mafia Medical Doctor"
+
+ uniform = /obj/item/clothing/under/rank/medical/doctor
+ shoes = /obj/item/clothing/shoes/sneakers/white
+ suit = /obj/item/clothing/suit/toggle/labcoat
+
+/datum/outfit/mafia/chaplain
+ name = "Mafia Chaplain"
+
+ uniform = /obj/item/clothing/under/rank/civilian/chaplain
+
+/datum/outfit/mafia/lawyer
+ name = "Mafia Lawyer"
+
+ uniform = /obj/item/clothing/under/rank/civilian/lawyer/bluesuit
+ suit = /obj/item/clothing/suit/toggle/lawyer
+ shoes = /obj/item/clothing/shoes/laceup
+
+/datum/outfit/mafia/hop
+ name = "Mafia Head of Personnel"
+
+ uniform = /obj/item/clothing/under/rank/civilian/head_of_personnel
+ suit = /obj/item/clothing/suit/armor/vest/alt
+ shoes = /obj/item/clothing/shoes/sneakers/brown
+ head = /obj/item/clothing/head/hopcap
+ glasses = /obj/item/clothing/glasses/sunglasses
+
+//mafia
+
+/datum/outfit/mafia/changeling
+ name = "Mafia Changeling"
+
+ head = /obj/item/clothing/head/helmet/changeling
+ suit = /obj/item/clothing/suit/armor/changeling
+
+//solo
+
+/datum/outfit/mafia/fugitive
+ name = "Mafia Fugitive"
+
+ uniform = /obj/item/clothing/under/rank/prisoner
+ shoes = /obj/item/clothing/shoes/sneakers/orange
+
+/datum/outfit/mafia/obsessed
+ name = "Mafia Obsessed"
+ uniform = /obj/item/clothing/under/misc/overalls
+ shoes = /obj/item/clothing/shoes/sneakers/white
+ gloves = /obj/item/clothing/gloves/color/latex
+ mask = /obj/item/clothing/mask/surgical
+ suit = /obj/item/clothing/suit/apron
+
+/datum/outfit/mafia/obsessed/post_equip(mob/living/carbon/human/H)
+ for(var/obj/item/carried_item in H.get_equipped_items(TRUE))
+ carried_item.add_mob_blood(H)//Oh yes, there will be blood...
+ H.regenerate_icons()
+
+/datum/outfit/mafia/clown
+ name = "Mafia Clown"
+
+ uniform = /obj/item/clothing/under/rank/civilian/clown
+ shoes = /obj/item/clothing/shoes/clown_shoes
+ mask = /obj/item/clothing/mask/gas/clown_hat
+
+/datum/outfit/mafia/traitor
+ name = "Mafia Traitor"
+
+ mask = /obj/item/clothing/mask/gas/syndicate
+ uniform = /obj/item/clothing/under/syndicate/tacticool
+ shoes = /obj/item/clothing/shoes/jackboots
+
+/datum/outfit/mafia/nightmare
+ name = "Mafia Nightmare"
+
+ uniform = null
+ shoes = null
diff --git a/code/modules/mafia/roles.dm b/code/modules/mafia/roles.dm
new file mode 100644
index 0000000000..2461a93976
--- /dev/null
+++ b/code/modules/mafia/roles.dm
@@ -0,0 +1,705 @@
+/datum/mafia_role
+ var/name = "Assistant"
+ var/desc = "You are a crewmember without any special abilities."
+ var/win_condition = "kill all mafia and solo killing roles."
+ var/team = MAFIA_TEAM_TOWN
+ ///how the random setup chooses which roles get put in
+ var/role_type = TOWN_OVERFLOW
+
+ var/player_key
+ var/mob/living/carbon/human/body
+ var/obj/effect/landmark/mafia/assigned_landmark
+
+ ///how many votes submitted when you vote.
+ var/vote_power = 1
+ var/detect_immune = FALSE
+ var/revealed = FALSE
+ var/datum/outfit/revealed_outfit = /datum/outfit/mafia/assistant //the assistants need a special path to call out they were in fact assistant, everything else can just use job equipment
+ //action = uses
+ var/list/actions = list()
+ var/list/targeted_actions = list()
+ //what the role gets when it wins a game
+ // var/winner_award = /datum/award/achievement/mafia/assistant
+
+ //so mafia have to also kill them to have a majority
+ var/solo_counts_as_town = FALSE //(don't set this for town)
+ var/game_status = MAFIA_ALIVE
+
+ ///icon state in the mafia dmi of the hud of the role, used in the mafia ui
+ var/hud_icon = "hudassistant"
+ ///icon state in the mafia dmi of the hud of the role, used in the mafia ui
+ var/revealed_icon = "assistant"
+ ///set this to something cool for antagonists and their window will look different
+ var/special_theme
+
+ var/list/role_notes = list()
+
+
+/datum/mafia_role/New(datum/mafia_controller/game)
+ . = ..()
+
+/datum/mafia_role/proc/kill(datum/mafia_controller/game,lynch=FALSE)
+ if(SEND_SIGNAL(src,COMSIG_MAFIA_ON_KILL,game,lynch) & MAFIA_PREVENT_KILL)
+ return FALSE
+ game_status = MAFIA_DEAD
+ body.death()
+ if(lynch)
+ reveal_role(game, verbose = TRUE)
+ if(!(player_key in game.spectators)) //people who played will want to see the end of the game more often than not
+ game.spectators += player_key
+ return TRUE
+
+/datum/mafia_role/Destroy(force, ...)
+ QDEL_NULL(body)
+ . = ..()
+
+/datum/mafia_role/proc/greet()
+ SEND_SOUND(body, 'sound/ambience/ambifailure.ogg')
+ to_chat(body,"You are the [name].")
+ to_chat(body,"[desc]")
+ switch(team)
+ if(MAFIA_TEAM_MAFIA)
+ to_chat(body,"You and your co-conspirators win if you outnumber crewmembers.")
+ if(MAFIA_TEAM_TOWN)
+ to_chat(body,"You are a crewmember. Find out and lynch the changelings!")
+ if(MAFIA_TEAM_SOLO)
+ to_chat(body,"You are not aligned to town or mafia. Accomplish your own objectives!")
+ to_chat(body, "Be sure to read the wiki page to learn more, if you have no idea what's going on.")
+
+/datum/mafia_role/proc/reveal_role(datum/mafia_controller/game, verbose = FALSE)
+ if(revealed)
+ return
+ if(verbose)
+ game.send_message("It is revealed that the true role of [body] [game_status == MAFIA_ALIVE ? "is" : "was"] [name]!")
+ var/list/oldoutfit = body.get_equipped_items()
+ for(var/thing in oldoutfit)
+ qdel(thing)
+ special_reveal_equip(game)
+ body.equipOutfit(revealed_outfit)
+ revealed = TRUE
+
+/datum/mafia_role/proc/special_reveal_equip(datum/mafia_controller/game)
+ return
+
+/datum/mafia_role/proc/handle_action(datum/mafia_controller/game,action,datum/mafia_role/target)
+ return
+
+/datum/mafia_role/proc/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
+ if(SEND_SIGNAL(src,COMSIG_MAFIA_CAN_PERFORM_ACTION,game,action,target) & MAFIA_PREVENT_ACTION)
+ return FALSE
+ return TRUE
+
+/datum/mafia_role/proc/add_note(note)
+ role_notes += note
+
+/datum/mafia_role/proc/check_total_victory(alive_town, alive_mafia) //solo antags can win... solo.
+ return FALSE
+
+/datum/mafia_role/proc/block_team_victory(alive_town, alive_mafia) //solo antags can also block team wins.
+ return FALSE
+
+/datum/mafia_role/proc/show_help(clueless)
+ var/list/result = list()
+ var/team_desc = ""
+ var/team_span = ""
+ var/the = TRUE
+ switch(team)
+ if(MAFIA_TEAM_TOWN)
+ team_desc = "Town"
+ team_span = "nicegreen"
+ if(MAFIA_TEAM_MAFIA)
+ team_desc = "Mafia"
+ team_span = "red"
+ if(MAFIA_TEAM_SOLO)
+ team_desc = "Nobody"
+ team_span = "comradio"
+ the = FALSE
+ result += "The [name] is aligned with [the ? "the " : ""][team_desc]"
+ result += "\"[desc]\""
+ result += "[name] wins when they [win_condition]"
+ to_chat(clueless, result.Join(""))
+
+/datum/mafia_role/detective
+ name = "Detective"
+ desc = "You can investigate a single person each night to learn their team."
+ revealed_outfit = /datum/outfit/mafia/detective
+ role_type = TOWN_INVEST
+ // winner_award = /datum/award/achievement/mafia/detective
+
+ hud_icon = "huddetective"
+ revealed_icon = "detective"
+
+ targeted_actions = list("Investigate")
+
+ var/datum/mafia_role/current_investigation
+
+/datum/mafia_role/detective/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/investigate)
+
+/datum/mafia_role/detective/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
+ . = ..()
+ if(!.)
+ return
+ return game.phase == MAFIA_PHASE_NIGHT && target.game_status == MAFIA_ALIVE && target != src
+
+/datum/mafia_role/detective/handle_action(datum/mafia_controller/game,action,datum/mafia_role/target)
+ if(!target || target.game_status != MAFIA_ALIVE)
+ to_chat(body,"You can only investigate alive people.")
+ return
+ to_chat(body,"You will investigate [target.body.real_name] tonight.")
+ current_investigation = target
+
+/datum/mafia_role/detective/proc/investigate(datum/mafia_controller/game)
+ var/datum/mafia_role/target = current_investigation
+ if(target)
+ if(target.detect_immune)
+ to_chat(body,"Your investigations reveal that [target.body.real_name] is a true member of the station.")
+ add_note("N[game.turn] - [target.body.real_name] - Town")
+ else
+ var/team_text
+ var/fluff
+ switch(target.team)
+ if(MAFIA_TEAM_TOWN)
+ team_text = "Town"
+ fluff = "a true member of the station."
+ if(MAFIA_TEAM_MAFIA)
+ team_text = "Mafia"
+ fluff = "an unfeeling, hideous changeling!"
+ if(MAFIA_TEAM_SOLO)
+ team_text = "Solo"
+ fluff = "a rogue, with their own objectives..."
+ to_chat(body,"Your investigations reveal that [target.body.real_name] is [fluff]")
+ add_note("N[game.turn] - [target.body.real_name] - [team_text]")
+ current_investigation = null
+
+/datum/mafia_role/psychologist
+ name = "Psychologist"
+ desc = "You can visit someone ONCE PER GAME to reveal their true role in the morning!"
+ revealed_outfit = /datum/outfit/mafia/psychologist
+ role_type = TOWN_INVEST
+ // winner_award = /datum/award/achievement/mafia/psychologist
+
+ hud_icon = "hudpsychologist"
+ revealed_icon = "psychologist"
+
+ targeted_actions = list("Reveal")
+ var/datum/mafia_role/current_target
+ var/can_use = TRUE
+
+/datum/mafia_role/psychologist/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/therapy_reveal)
+
+/datum/mafia_role/psychologist/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(!. || !can_use || game.phase == MAFIA_PHASE_NIGHT || target.game_status != MAFIA_ALIVE || target.revealed || target == src)
+ return FALSE
+
+/datum/mafia_role/psychologist/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ to_chat(body,"You will reveal [target.body.real_name] tonight.")
+ current_target = target
+
+/datum/mafia_role/psychologist/proc/therapy_reveal(datum/mafia_controller/game)
+ if(SEND_SIGNAL(src,COMSIG_MAFIA_CAN_PERFORM_ACTION,game,"reveal",current_target) & MAFIA_PREVENT_ACTION || game_status != MAFIA_ALIVE) //Got lynched or roleblocked by a lawyer.
+ current_target = null
+ if(current_target)
+ add_note("N[game.turn] - [current_target.body.real_name] - Revealed true identity")
+ to_chat(body,"You have revealed the true nature of the [current_target]!")
+ current_target.reveal_role(game, verbose = TRUE)
+ current_target = null
+ can_use = FALSE
+
+/datum/mafia_role/chaplain
+ name = "Chaplain"
+ desc = "You can communicate with spirits of the dead each night to discover dead crewmember roles."
+ revealed_outfit = /datum/outfit/mafia/chaplain
+ role_type = TOWN_INVEST
+ hud_icon = "hudchaplain"
+ revealed_icon = "chaplain"
+ // winner_award = /datum/award/achievement/mafia/chaplain
+
+ targeted_actions = list("Pray")
+ var/current_target
+
+/datum/mafia_role/chaplain/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/commune)
+
+/datum/mafia_role/chaplain/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(!.)
+ return
+ return game.phase == MAFIA_PHASE_NIGHT && target.game_status == MAFIA_DEAD && target != src && !target.revealed
+
+/datum/mafia_role/chaplain/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
+ to_chat(body,"You will commune with the spirit of [target.body.real_name] tonight.")
+ current_target = target
+
+/datum/mafia_role/chaplain/proc/commune(datum/mafia_controller/game)
+ var/datum/mafia_role/target = current_target
+ if(target)
+ to_chat(body,"You invoke spirit of [target.body.real_name] and learn their role was [target.name].")
+ add_note("N[game.turn] - [target.body.real_name] - [target.name]")
+ current_target = null
+
+/datum/mafia_role/md
+ name = "Medical Doctor"
+ desc = "You can protect a single person each night from killing."
+ revealed_outfit = /datum/outfit/mafia/md // /mafia <- outfit must be readded (just make a new mafia outfits file for all of these)
+ role_type = TOWN_PROTECT
+ hud_icon = "hudmedicaldoctor"
+ revealed_icon = "medicaldoctor"
+ // winner_award = /datum/award/achievement/mafia/md
+
+ targeted_actions = list("Protect")
+ var/datum/mafia_role/current_protected
+
+/datum/mafia_role/md/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/protect)
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/end_protection)
+
+/datum/mafia_role/md/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
+ . = ..()
+ if(!.)
+ return
+ if(target.name == "Head of Personnel" && target.revealed)
+ return FALSE
+ return game.phase == MAFIA_PHASE_NIGHT && target.game_status == MAFIA_ALIVE && target != src
+
+/datum/mafia_role/md/handle_action(datum/mafia_controller/game,action,datum/mafia_role/target)
+ if(!target || target.game_status != MAFIA_ALIVE)
+ to_chat(body,"You can only protect alive people.")
+ return
+ to_chat(body,"You will protect [target.body.real_name] tonight.")
+ current_protected = target
+
+/datum/mafia_role/md/proc/protect(datum/mafia_controller/game)
+ if(current_protected)
+ RegisterSignal(current_protected,COMSIG_MAFIA_ON_KILL,.proc/prevent_kill)
+ add_note("N[game.turn] - Protected [current_protected.body.real_name]")
+
+/datum/mafia_role/md/proc/prevent_kill(datum/source)
+ to_chat(body,"The person you protected tonight was attacked!")
+ to_chat(current_protected.body,"You were attacked last night, but someone nursed you back to life!")
+ return MAFIA_PREVENT_KILL
+
+/datum/mafia_role/md/proc/end_protection(datum/mafia_controller/game)
+ if(current_protected)
+ UnregisterSignal(current_protected,COMSIG_MAFIA_ON_KILL)
+ current_protected = null
+
+/datum/mafia_role/lawyer
+ name = "Lawyer"
+ desc = "You can choose a person during the day to provide extensive legal advice to during the night, preventing night actions."
+ revealed_outfit = /datum/outfit/mafia/lawyer
+ role_type = TOWN_PROTECT
+ hud_icon = "hudlawyer"
+ revealed_icon = "lawyer"
+ // winner_award = /datum/award/achievement/mafia/lawyer
+
+ targeted_actions = list("Advise")
+ var/datum/mafia_role/current_target
+
+/datum/mafia_role/lawyer/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/roleblock_text)
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_START,.proc/try_to_roleblock)
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/release)
+
+/datum/mafia_role/lawyer/proc/roleblock_text(datum/mafia_controller/game)
+ if(SEND_SIGNAL(src,COMSIG_MAFIA_CAN_PERFORM_ACTION,game,"roleblock",current_target) & MAFIA_PREVENT_ACTION || game_status != MAFIA_ALIVE) //Got lynched or roleblocked by another lawyer.
+ current_target = null
+ if(current_target)
+ to_chat(current_target.body,"YOU HAVE BEEN BLOCKED! YOU CANNOT PERFORM ANY ACTIONS TONIGHT.")
+ add_note("N[game.turn] - [current_target.body.real_name] - Blocked")
+
+/datum/mafia_role/lawyer/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(!.)
+ return FALSE
+ if(game.phase == MAFIA_PHASE_NIGHT)
+ return FALSE
+ if(target.game_status != MAFIA_ALIVE)
+ return FALSE
+
+/datum/mafia_role/lawyer/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(target == current_target)
+ current_target = null
+ to_chat(body,"You have decided against blocking anyone tonight.")
+ else
+ current_target = target
+ to_chat(body,"You will block [target.body.real_name] tonight.")
+
+/datum/mafia_role/lawyer/proc/try_to_roleblock(datum/mafia_controller/game)
+ if(current_target)
+ RegisterSignal(current_target,COMSIG_MAFIA_CAN_PERFORM_ACTION, .proc/prevent_action)
+
+/datum/mafia_role/lawyer/proc/release(datum/mafia_controller/game)
+ . = ..()
+ if(current_target)
+ UnregisterSignal(current_target, COMSIG_MAFIA_CAN_PERFORM_ACTION)
+ current_target = null
+
+/datum/mafia_role/lawyer/proc/prevent_action(datum/source)
+ if(game_status == MAFIA_ALIVE) //in case we got killed while imprisoning sk - bad luck edge
+ return MAFIA_PREVENT_ACTION
+
+/datum/mafia_role/hop
+ name = "Head of Personnel"
+ desc = "You can reveal yourself once per game, tripling your vote power but becoming unable to be protected!"
+ revealed_outfit = /datum/outfit/mafia/hop
+ role_type = TOWN_MISC
+ hud_icon = "hudheadofpersonnel"
+ revealed_icon = "headofpersonnel"
+ // winner_award = /datum/award/achievement/mafia/hop
+
+ targeted_actions = list("Reveal")
+
+/datum/mafia_role/hop/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(!. || game.phase == MAFIA_PHASE_NIGHT || game.turn == 1 || target.game_status != MAFIA_ALIVE || target != src || revealed)
+ return FALSE
+
+/datum/mafia_role/hop/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ reveal_role(game, TRUE)
+ vote_power = 2
+
+///MAFIA ROLES/// only one until i rework this to allow more, they're the "anti-town" working to kill off townies to win
+
+/datum/mafia_role/mafia
+ name = "Changeling"
+ desc = "You're a member of the changeling hive. Use ':j' talk prefix to talk to your fellow lings."
+ team = MAFIA_TEAM_MAFIA
+ role_type = MAFIA_REGULAR
+ hud_icon = "hudchangeling"
+ revealed_icon = "changeling"
+ // winner_award = /datum/award/achievement/mafia/changeling
+
+ revealed_outfit = /datum/outfit/mafia/changeling
+ special_theme = "syndicate"
+ win_condition = "become majority over the town and no solo killing role can stop them."
+
+/datum/mafia_role/mafia/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/mafia_text)
+
+/datum/mafia_role/mafia/proc/mafia_text(datum/mafia_controller/source)
+ to_chat(body,"Vote for who to kill tonight. The killer will be chosen randomly from voters.")
+
+//better detective for mafia
+/datum/mafia_role/mafia/thoughtfeeder
+ name = "Thoughtfeeder"
+ desc = "You're a changeling variant that feeds on the memories of others. Use ':j' talk prefix to talk to your fellow lings, and visit people at night to learn their role."
+ role_type = MAFIA_SPECIAL
+ hud_icon = "hudthoughtfeeder"
+ revealed_icon = "thoughtfeeder"
+ // winner_award = /datum/award/achievement/mafia/thoughtfeeder
+
+ targeted_actions = list("Learn Role")
+ var/datum/mafia_role/current_investigation
+
+/datum/mafia_role/mafia/thoughtfeeder/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_ACTION_PHASE,.proc/investigate)
+
+/datum/mafia_role/mafia/thoughtfeeder/validate_action_target(datum/mafia_controller/game,action,datum/mafia_role/target)
+ . = ..()
+ if(!.)
+ return
+ return game.phase == MAFIA_PHASE_NIGHT && target.game_status == MAFIA_ALIVE && target != src
+
+/datum/mafia_role/mafia/thoughtfeeder/handle_action(datum/mafia_controller/game,action,datum/mafia_role/target)
+ to_chat(body,"You will feast on the memories of [target.body.real_name] tonight.")
+ current_investigation = target
+
+/datum/mafia_role/mafia/thoughtfeeder/proc/investigate(datum/mafia_controller/game)
+ var/datum/mafia_role/target = current_investigation
+ current_investigation = null
+ if(SEND_SIGNAL(src,COMSIG_MAFIA_CAN_PERFORM_ACTION,game,"thoughtfeed",target) & MAFIA_PREVENT_ACTION)
+ to_chat(body,"You were unable to investigate [target.body.real_name].")
+ add_note("N[game.turn] - [target.body.real_name] - Unable to investigate")
+ return
+ if(target)
+ if(target.detect_immune)
+ to_chat(body,"[target.body.real_name]'s memories reveal that they are the Assistant.")
+ add_note("N[game.turn] - [target.body.real_name] - Assistant")
+ else
+ to_chat(body,"[target.body.real_name]'s memories reveal that they are the [target.name].")
+ add_note("N[game.turn] - [target.body.real_name] - [target.name]")
+
+
+///SOLO ROLES/// they range from anomalous factors to deranged killers that try to win alone.
+
+/datum/mafia_role/traitor
+ name = "Traitor"
+ desc = "You're a solo traitor. You are immune to night kills, can kill every night and you win by outnumbering everyone else."
+ win_condition = "kill everyone."
+ team = MAFIA_TEAM_SOLO
+ role_type = NEUTRAL_KILL
+ // winner_award = /datum/award/achievement/mafia/traitor
+
+ targeted_actions = list("Night Kill")
+ revealed_outfit = /datum/outfit/mafia/traitor
+
+ hud_icon = "hudtraitor"
+ revealed_icon = "traitor"
+ special_theme = "neutral"
+
+ var/datum/mafia_role/current_victim
+
+/datum/mafia_role/traitor/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/nightkill_immunity)
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_KILL_PHASE,.proc/try_to_kill)
+
+/datum/mafia_role/traitor/check_total_victory(alive_town, alive_mafia) //serial killers just want teams dead
+ return alive_town + alive_mafia <= 1
+
+/datum/mafia_role/traitor/block_team_victory(alive_town, alive_mafia) //no team can win until they're dead
+ return TRUE //while alive, town AND mafia cannot win (though since mafia know who is who it's pretty easy to win from that point)
+
+/datum/mafia_role/traitor/proc/nightkill_immunity(datum/source,datum/mafia_controller/game,lynch)
+ if(game.phase == MAFIA_PHASE_NIGHT && !lynch)
+ to_chat(body,"You were attacked, but they'll have to try harder than that to put you down.")
+ return MAFIA_PREVENT_KILL
+
+/datum/mafia_role/traitor/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(!.)
+ return FALSE
+ if(game.phase != MAFIA_PHASE_NIGHT || target.game_status != MAFIA_ALIVE || target == src)
+ return FALSE
+
+/datum/mafia_role/traitor/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ current_victim = target
+ to_chat(body,"You will attempt to kill [target.body.real_name] tonight.")
+
+/datum/mafia_role/traitor/proc/try_to_kill(datum/mafia_controller/source)
+ var/datum/mafia_role/target = current_victim
+ current_victim = null
+ if(SEND_SIGNAL(src,COMSIG_MAFIA_CAN_PERFORM_ACTION,source,"traitor kill",target) & MAFIA_PREVENT_ACTION)
+ return
+ if(game_status == MAFIA_ALIVE && target && target.game_status == MAFIA_ALIVE)
+ if(!target.kill(source))
+ to_chat(body,"Your attempt at killing [target.body] was prevented!")
+
+/datum/mafia_role/nightmare
+ name = "Nightmare"
+ desc = "You're a solo monster that cannot be detected by detective roles. You can flicker lights of another room each night. You can instead decide to hunt, killing everyone in a flickering room. Kill everyone to win."
+ win_condition = "kill everyone."
+ revealed_outfit = /datum/outfit/mafia/nightmare
+ detect_immune = TRUE
+ team = MAFIA_TEAM_SOLO
+ role_type = NEUTRAL_KILL
+ special_theme = "neutral"
+ hud_icon = "hudnightmare"
+ revealed_icon = "nightmare"
+ // winner_award = /datum/award/achievement/mafia/nightmare
+
+ targeted_actions = list("Flicker", "Hunt")
+ var/list/flickering = list()
+ var/datum/mafia_role/flicker_target
+
+/datum/mafia_role/nightmare/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_KILL_PHASE,.proc/flicker_or_hunt)
+
+/datum/mafia_role/nightmare/check_total_victory(alive_town, alive_mafia) //nightmares just want teams dead
+ return alive_town + alive_mafia <= 1
+
+/datum/mafia_role/nightmare/block_team_victory(alive_town, alive_mafia) //no team can win until they're dead
+ return TRUE //while alive, town AND mafia cannot win (though since mafia know who is who it's pretty easy to win from that point)
+
+/datum/mafia_role/nightmare/special_reveal_equip()
+ body.underwear = "Nude"
+ body.undershirt = "Nude"
+ body.socks = "Nude"
+ body.set_species(/datum/species/shadow)
+ body.update_body()
+
+/datum/mafia_role/nightmare/validate_action_target(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(!. || game.phase != MAFIA_PHASE_NIGHT || target.game_status != MAFIA_ALIVE)
+ return FALSE
+ if(action == "Flicker")
+ return target != src && !(target in flickering)
+ return target == src
+
+/datum/mafia_role/nightmare/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(target == flicker_target)
+ to_chat(body,"You will do nothing tonight.")
+ flicker_target = null
+ flicker_target = target
+ if(action == "Flicker")
+ to_chat(body,"You will attempt to flicker [target.body.real_name]'s room tonight.")
+ else
+ to_chat(body,"You will hunt everyone in a flickering room down tonight.")
+
+/datum/mafia_role/nightmare/proc/flicker_or_hunt(datum/mafia_controller/source)
+ if(game_status != MAFIA_ALIVE || !flicker_target)
+ return
+ if(SEND_SIGNAL(src,COMSIG_MAFIA_CAN_PERFORM_ACTION,source,"nightmare actions",flicker_target) & MAFIA_PREVENT_ACTION)
+ to_chat(flicker_target.body, "Your actions were prevented!")
+ return
+ var/datum/mafia_role/target = flicker_target
+ flicker_target = null
+ if(target != src) //flicker instead of hunt
+ to_chat(target.body, "The lights begin to flicker and dim. You're in danger.")
+ flickering += target
+ return
+ for(var/r in flickering)
+ var/datum/mafia_role/role = r
+ if(role && role.game_status == MAFIA_ALIVE)
+ to_chat(role.body, "A shadowy monster appears out of the darkness!")
+ role.kill(source)
+ flickering -= role
+
+//just helps read better
+#define FUGITIVE_NOT_PRESERVING 0//will not become night immune tonight
+#define FUGITIVE_WILL_PRESERVE 1 //will become night immune tonight
+
+/datum/mafia_role/fugitive
+ name = "Fugitive"
+ desc = "You're on the run. You can become immune to night kills exactly twice, and you win by surviving to the end of the game with anyone."
+ win_condition = "survive to the end of the game, with anyone"
+ solo_counts_as_town = TRUE //should not count towards mafia victory, they should have the option to work with town
+ revealed_outfit = /datum/outfit/mafia/fugitive
+ team = MAFIA_TEAM_SOLO
+ role_type = NEUTRAL_DISRUPT
+ special_theme = "neutral"
+ hud_icon = "hudfugitive"
+ revealed_icon = "fugitive"
+ // winner_award = /datum/award/achievement/mafia/fugitive
+
+ actions = list("Self Preservation")
+ var/charges = 2
+ var/protection_status = FUGITIVE_NOT_PRESERVING
+
+
+/datum/mafia_role/fugitive/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/night_start)
+ RegisterSignal(game,COMSIG_MAFIA_NIGHT_END,.proc/night_end)
+ RegisterSignal(game,COMSIG_MAFIA_GAME_END,.proc/survived)
+
+/datum/mafia_role/fugitive/handle_action(datum/mafia_controller/game, action, datum/mafia_role/target)
+ . = ..()
+ if(!charges)
+ to_chat(body,"You're out of supplies and cannot protect yourself anymore.")
+ return
+ if(game.phase == MAFIA_PHASE_NIGHT)
+ to_chat(body,"You don't have time to prepare, night has already arrived.")
+ return
+ if(protection_status == FUGITIVE_WILL_PRESERVE)
+ to_chat(body,"You decide to not prepare tonight.")
+ else
+ to_chat(body,"You decide to prepare for a horrible night.")
+ protection_status = !protection_status
+
+/datum/mafia_role/fugitive/proc/night_start(datum/mafia_controller/game)
+ if(protection_status == FUGITIVE_WILL_PRESERVE)
+ to_chat(body,"Your preparations are complete. Nothing could kill you tonight!")
+ RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/prevent_death)
+
+/datum/mafia_role/fugitive/proc/night_end(datum/mafia_controller/game)
+ if(protection_status == FUGITIVE_WILL_PRESERVE)
+ charges--
+ UnregisterSignal(src,COMSIG_MAFIA_ON_KILL)
+ to_chat(body,"You are no longer protected. You have [charges] use[charges == 1 ? "" : "s"] left of your power.")
+ protection_status = FUGITIVE_NOT_PRESERVING
+
+/datum/mafia_role/fugitive/proc/prevent_death(datum/mafia_controller/game)
+ to_chat(body,"You were attacked! Luckily, you were ready for this!")
+ return MAFIA_PREVENT_KILL
+
+/datum/mafia_role/fugitive/proc/survived(datum/mafia_controller/game)
+ if(game_status == MAFIA_ALIVE)
+ // var/client/winner_client = GLOB.directory[player_key]
+ // winner_client?.give_award(winner_award, body)
+ game.send_message("!! FUGITIVE VICTORY !!")
+
+#undef FUGITIVE_NOT_PRESERVING
+#undef FUGITIVE_WILL_PRESERVE
+
+/datum/mafia_role/obsessed
+ name = "Obsessed"
+ desc = "You're completely lost in your own mind. You win by lynching your obsession before you get killed in this mess. Obsession assigned on the first night!"
+ win_condition = "lynch their obsession."
+ revealed_outfit = /datum/outfit/mafia/obsessed // /mafia <- outfit must be readded (just make a new mafia outfits file for all of these)
+ solo_counts_as_town = TRUE //after winning or whatever, can side with whoever. they've already done their objective!
+ team = MAFIA_TEAM_SOLO
+ role_type = NEUTRAL_DISRUPT
+ special_theme = "neutral"
+ hud_icon = "hudobsessed"
+ revealed_icon = "obsessed"
+
+ // winner_award = /datum/award/achievement/mafia/obsessed
+
+ revealed_outfit = /datum/outfit/mafia/obsessed // /mafia <- outfit must be readded (just make a new mafia outfits file for all of these)
+ solo_counts_as_town = TRUE //after winning or whatever, can side with whoever. they've already done their objective!
+ var/datum/mafia_role/obsession
+ var/lynched_target = FALSE
+
+/datum/mafia_role/obsessed/New(datum/mafia_controller/game) //note: obsession is always a townie
+ . = ..()
+ RegisterSignal(game,COMSIG_MAFIA_SUNDOWN,.proc/find_obsession)
+
+/datum/mafia_role/obsessed/proc/find_obsession(datum/mafia_controller/game)
+ var/list/all_roles_shuffle = shuffle(game.all_roles)
+ for(var/role in all_roles_shuffle)
+ var/datum/mafia_role/possible = role
+ if(possible.team == MAFIA_TEAM_TOWN && possible.game_status != MAFIA_DEAD)
+ obsession = possible
+ break
+ if(!obsession)
+ obsession = pick(all_roles_shuffle) //okay no town just pick anyone here
+ //if you still don't have an obsession you're playing a single player game like i can't help your dumb ass
+ to_chat(body, "Your obsession is [obsession.body.real_name]! Get them lynched to win!")
+ add_note("N[game.turn] - I vowed to watch my obsession, [obsession.body.real_name], hang!") //it'll always be N1 but whatever
+ RegisterSignal(obsession,COMSIG_MAFIA_ON_KILL,.proc/check_victory)
+ UnregisterSignal(game,COMSIG_MAFIA_SUNDOWN)
+
+/datum/mafia_role/obsessed/proc/check_victory(datum/source,datum/mafia_controller/game,lynch)
+ UnregisterSignal(source,COMSIG_MAFIA_ON_KILL)
+ if(game_status == MAFIA_DEAD)
+ return
+ if(lynch)
+ game.send_message("!! OBSESSED VICTORY !!")
+ // var/client/winner_client = GLOB.directory[player_key]
+ // winner_client?.give_award(winner_award, body)
+ reveal_role(game, FALSE)
+ else
+ to_chat(body, "You have failed your objective to lynch [obsession.body]!")
+
+/datum/mafia_role/clown
+ name = "Clown"
+ desc = "If you are lynched you take down one of your voters (guilty or abstain) with you and win. HONK!"
+ win_condition = "get themselves lynched!"
+ revealed_outfit = /datum/outfit/mafia/clown
+ solo_counts_as_town = TRUE
+ team = MAFIA_TEAM_SOLO
+ role_type = NEUTRAL_DISRUPT
+ special_theme = "neutral"
+ hud_icon = "hudclown"
+ revealed_icon = "clown"
+ // winner_award = /datum/award/achievement/mafia/clown
+
+/datum/mafia_role/clown/New(datum/mafia_controller/game)
+ . = ..()
+ RegisterSignal(src,COMSIG_MAFIA_ON_KILL,.proc/prank)
+
+/datum/mafia_role/clown/proc/prank(datum/source,datum/mafia_controller/game,lynch)
+ if(lynch)
+ var/datum/mafia_role/victim = pick(game.judgement_guilty_votes + game.judgement_abstain_votes)
+ game.send_message("[body.real_name] WAS A CLOWN! HONK! They take down [victim.body.real_name] with their last prank.")
+ game.send_message("!! CLOWN VICTORY !!")
+ // var/client/winner_client = GLOB.directory[player_key]
+ // winner_client?.give_award(winner_award, body)
+ victim.kill(game,FALSE)
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm b/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm
index 07a6529ed8..2e14a88f29 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm
@@ -192,7 +192,13 @@
extra = TRUE
extra_color_src = MUTCOLORS3
-/datum/sprite_accessory/snouts/mam_snouts/lcanid
+/datum/sprite_accessory/mam_snouts/skulldog
+ name = "Skulldog"
+ icon_state = "skulldog"
+ extra = TRUE
+ extra_color_src = MATRIXED
+
+/datum/sprite_accessory/mam_snouts/lcanid
name = "Mammal, Long"
icon_state = "lcanid"
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index bb39639ec1..a0df1ee938 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -905,6 +905,22 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
else
to_chat(usr, "Can't become a pAI candidate while not dead!")
+/mob/dead/observer/verb/mafia_game_signup()
+ set category = "Ghost"
+ set name = "Signup for Mafia"
+ set desc = "Sign up for a game of Mafia to pass the time while dead."
+ mafia_signup()
+/mob/dead/observer/proc/mafia_signup()
+ if(!client)
+ return
+ if(!isobserver(src))
+ to_chat(usr, "You must be a ghost to join mafia!")
+ return
+ var/datum/mafia_controller/game = GLOB.mafia_game //this needs to change if you want multiple mafia games up at once.
+ if(!game)
+ game = create_mafia_game("mafia")
+ game.ui_interact(usr)
+
/mob/dead/observer/CtrlShiftClick(mob/user)
if(isobserver(user) && check_rights(R_SPAWN))
change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index a7593ca0cb..1c776427cf 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -169,7 +169,7 @@
//Item is handled and in slot, valid to call callback, for this proc should always be true
if(!not_handled)
I.equipped(src, slot)
-
+ update_genitals()
return not_handled //For future deeper overrides
/mob/living/carbon/human/equipped_speed_mods()
@@ -257,6 +257,7 @@
s_store = null
if(!QDELETED(src))
update_inv_s_store()
+ update_genitals()
/mob/living/carbon/human/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
if((C.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || (initial(C.flags_inv) & (HIDEHAIR|HIDEFACIALHAIR)))
diff --git a/code/modules/newscaster/ghostread.dm b/code/modules/newscaster/ghostread.dm
index 77cb1a03c8..ff51f5268c 100644
--- a/code/modules/newscaster/ghostread.dm
+++ b/code/modules/newscaster/ghostread.dm
@@ -3,7 +3,7 @@
set desc = "Open a list of available news channels"
set category = "Ghost"
- var/datum/browser/B = new(src, "ghost_news_list", "Chanenl List", 450, 600)
+ var/datum/browser/B = new(src, "ghost_news_list", "Channel List", 450, 600)
B.set_content(render_news_channel_list())
B.open()
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 997ada6b21..91b8a6719b 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -147,7 +147,7 @@
log_game("[user] [key_name(user)] has renamed [O] to [input]")
if(penchoice == "Change description")
- var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100)
+ var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 2048)
if(QDELETED(O) || !user.canUseTopic(O, BE_CLOSE))
return
O.desc = input
diff --git a/code/modules/procedural_mapping/mapGenerator.dm b/code/modules/procedural_mapping/mapGenerator.dm
index f509c409ce..323f74d0ef 100644
--- a/code/modules/procedural_mapping/mapGenerator.dm
+++ b/code/modules/procedural_mapping/mapGenerator.dm
@@ -147,8 +147,16 @@
set category = "Debug"
var/datum/mapGenerator/nature/N = new()
- var/startInput = input(usr,"Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1") as text
- var/endInput = input(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") as text
+ var/startInput = input(usr,"Start turf of Map, (X;Y;Z)", "Map Gen Settings", "1;1;1") as text|null
+
+ if (isnull(startInput))
+ return
+
+ var/endInput = input(usr,"End turf of Map (X;Y;Z)", "Map Gen Settings", "[world.maxx];[world.maxy];[mob ? mob.z : 1]") as text|null
+
+ if (isnull(endInput))
+ return
+
//maxx maxy and current z so that if you fuck up, you only fuck up one entire z level instead of the entire universe
if(!startInput || !endInput)
to_chat(src, "Missing Input")
diff --git a/code/modules/projectiles/ammunition/_firing.dm b/code/modules/projectiles/ammunition/_firing.dm
index 0ef4c680aa..437b7dcc5a 100644
--- a/code/modules/projectiles/ammunition/_firing.dm
+++ b/code/modules/projectiles/ammunition/_firing.dm
@@ -36,6 +36,14 @@
if(isgun(fired_from))
var/obj/item/gun/G = fired_from
BB.damage *= G.projectile_damage_multiplier
+ if(HAS_TRAIT(user, TRAIT_INSANE_AIM))
+ BB.ricochets_max = max(BB.ricochets_max, 10) //bouncy!
+ BB.ricochet_chance = max(BB.ricochet_chance, 100) //it wont decay so we can leave it at 100 for always bouncing
+ BB.ricochet_auto_aim_range = max(BB.ricochet_auto_aim_range, 3)
+ BB.ricochet_auto_aim_angle = max(BB.ricochet_auto_aim_angle, 360) //it can turn full circle and shoot you in the face because our aim? is insane.
+ BB.ricochet_decay_chance = 0
+ BB.ricochet_decay_damage = max(BB.ricochet_decay_damage, 0.1)
+ BB.ricochet_incidence_leeway = 0
if(reagents && BB.reagents)
reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index c3248bab2f..ee073dbfcd 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -29,7 +29,7 @@
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
var/sawn_desc = null //description change if weapon is sawn-off
var/sawn_off = FALSE
-
+
/// can we be put into a turret
var/can_turret = TRUE
/// can we be put in a circuit
@@ -310,8 +310,6 @@
randomized_gun_spread = rand(0, spread)
else if(burst_size > 1 && burst_spread)
randomized_gun_spread = rand(0, burst_spread)
- if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
- bonus_spread += 25
var/randomized_bonus_spread = rand(0, bonus_spread)
if(burst_size > 1)
@@ -603,10 +601,16 @@
var/penalty = (last_fire + GUN_AIMING_TIME + fire_delay) - world.time
if(penalty > 0) //Yet we only penalize users firing it multiple times in a haste. fire_delay isn't necessarily cumbersomeness.
aiming_delay = penalty
- if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)) //To be removed in favor of something less tactless later.
+ if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE) || HAS_TRAIT(user, TRAIT_INSANE_AIM)) //To be removed in favor of something less tactless later.
base_inaccuracy /= 1.5
if(stamloss > STAMINA_NEAR_SOFTCRIT) //This can null out the above bonus.
base_inaccuracy *= 1 + (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*0.5
+ if(HAS_TRAIT(user, TRAIT_POOR_AIM)) //nice shootin' tex
+ if(!HAS_TRAIT(user, TRAIT_INSANE_AIM))
+ bonus_spread += 25
+ else
+ //you have both poor aim and insane aim, why?
+ bonus_spread += rand(0,50)
var/mult = max((GUN_AIMING_TIME + aiming_delay + user.last_click_move - world.time)/GUN_AIMING_TIME, -0.5) //Yes, there is a bonus for taking time aiming.
if(mult < 0) //accurate weapons should provide a proper bonus with negative inaccuracy. the opposite is true too.
mult *= 1/inaccuracy_modifier
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 43384280d4..99a0bedc4d 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -327,16 +327,18 @@
if(!trajectory)
return
var/turf/T = get_turf(A)
- if(check_ricochet(A) && A.handle_ricochet(src)) //if you can ricochet, attempt to ricochet off the object
- on_ricochet(A) //if allowed, use autoaim to ricochet into someone, otherwise default to ricocheting off the object from above
- var/datum/point/pcache = trajectory.copy_to()
- if(hitscan)
- store_hitscan_collision(pcache)
- decayedRange = max(0, decayedRange - reflect_range_decrease)
- ricochet_chance *= ricochet_decay_chance
- damage *= ricochet_decay_damage
- range = decayedRange
- return TRUE
+ if(check_ricochet_flag(A) && check_ricochet(A)) //if you can ricochet, attempt to ricochet off the object
+ ricochets++
+ if(A.handle_ricochet(src))
+ on_ricochet(A) //if allowed, use autoaim to ricochet into someone, otherwise default to ricocheting off the object from above
+ var/datum/point/pcache = trajectory.copy_to()
+ if(hitscan)
+ store_hitscan_collision(pcache)
+ decayedRange = max(0, decayedRange - reflect_range_decrease)
+ ricochet_chance *= ricochet_decay_chance
+ damage *= ricochet_decay_damage
+ range = decayedRange
+ return TRUE
var/distance = get_dist(T, starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations.
if(def_zone && check_zone(def_zone) != BODY_ZONE_CHEST)
@@ -680,7 +682,8 @@
if(!ignore_source_check && firer)
var/mob/M = firer
if((target == firer) || ((target == firer.loc) && ismecha(firer.loc)) || (target in firer.buckled_mobs) || (istype(M) && (M.buckled == target)))
- return FALSE
+ if(!ricochets) //if it has ricocheted, it can hit the firer.
+ return FALSE
if(!ignore_loc && (loc != target.loc))
return FALSE
if(target in passthrough)
diff --git a/code/modules/uplink/uplink_items/uplink_clothing.dm b/code/modules/uplink/uplink_items/uplink_clothing.dm
index 014e0452b5..c26a9ae1f0 100644
--- a/code/modules/uplink/uplink_items/uplink_clothing.dm
+++ b/code/modules/uplink/uplink_items/uplink_clothing.dm
@@ -97,3 +97,9 @@
item = /obj/item/clothing/gloves/tackler/combat/insulated
include_modes = list(/datum/game_mode/nuclear, /datum/game_mode/nuclear/clown_ops)
cost = 2
+
+/datum/uplink_item/device_tools/syndicate_eyepatch
+ name = "Mechanical Eyepatch"
+ desc = "An eyepatch that connects itself to your eye socket, enhancing your shooting to an impossible degree, allowing your bullets to ricochet far more often than usual."
+ item = /obj/item/clothing/glasses/eyepatch/syndicate
+ cost = 8
diff --git a/code/modules/uplink/uplink_items/uplink_stealthdevices.dm b/code/modules/uplink/uplink_items/uplink_stealthdevices.dm
index f1c27c640b..28d02cf79b 100644
--- a/code/modules/uplink/uplink_items/uplink_stealthdevices.dm
+++ b/code/modules/uplink/uplink_items/uplink_stealthdevices.dm
@@ -112,13 +112,13 @@
name = "Radio Jammer"
desc = "This device will disrupt any nearby outgoing radio communication when activated. Does not affect binary chat."
item = /obj/item/jammer
- cost = 5
+ cost = 2
/datum/uplink_item/stealthy_tools/smugglersatchel
name = "Smuggler's Satchel"
desc = "This satchel is thin enough to be hidden in the gap between plating and tiling; great for stashing \
your stolen goods. Comes with a crowbar and a floor tile inside. Properly hidden satchels have been \
- known to survive intact even beyond the current shift. "
+ known to survive intact even beyond the current shift, but this is just a myth. "
item = /obj/item/storage/backpack/satchel/flat
- cost = 2
+ cost = 1
surplus = 30
diff --git a/html/changelog.html b/html/changelog.html
index da32c25786..9831498c56 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -50,6 +50,20 @@
-->
=0&&p+"s"||"Dispensing..."})]})})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.ForbiddenLore=void 0;var o=n(0),r=n(16),a=n(34),i=n(1),c=n(3),l=n(2);t.ForbiddenLore=function(e,t){var n=(0,i.useBackend)(t),d=n.act,u=n.data,s=u.charges,p=(0,a.flow)([(0,r.sortBy)((function(e){return"Research"!==e.state}),(function(e){return"Side"===e.path}))])(u.to_know||[]);return(0,o.createComponentVNode)(2,l.Window,{width:500,height:900,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Section,{title:"Research Eldritch Knowledge",children:["Charges left : ",s,null!==p?p.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,level:2,children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,my:1,children:[e.path," path"]}),(0,o.createComponentVNode)(2,c.Box,{my:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:e.state,disabled:e.disabled,onClick:function(){return d("research",{name:e.name,cost:e.cost})}})," ","Cost : ",e.cost]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,my:1,children:e.flavour}),(0,o.createComponentVNode)(2,c.Box,{my:1,children:e.desc})]},e.name)})):(0,o.createComponentVNode)(2,c.Box,{children:"No more knowledge can be found"})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gateway=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Gateway=function(){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.gateway_present,d=void 0!==l&&l,u=c.gateway_status,s=void 0!==u&&u,p=c.current_target,m=void 0===p?null:p,f=c.destinations,h=void 0===f?[]:f;return d?m?(0,o.createComponentVNode)(2,a.Section,{title:m.name,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"rainbow",size:4,color:"green"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return i("deactivate")},children:"Deactivate"})]}):h.length?(0,o.createFragment)([!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Gateway Unpowered"}),h.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:e.availible&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return i("activate",{destination:e.ref})},children:"Activate"})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{m:1,textColor:"bad",children:e.reason}),!!e.timeout&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:e.timeout,children:"Calibrating..."})],0)},e.ref)}))],0):(0,o.createComponentVNode)(2,a.Section,{children:"No gateway nodes detected."}):(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No linked gateway"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return i("linkup")},children:"Linkup"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:338,theme:"abductor",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return c("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gps=void 0;var o=n(0),r=n(16),a=n(34),i=n(14),c=n(120),l=n(1),d=n(3),u=n(2),s=function(e){return(0,r.map)(parseFloat)(e.split(", "))};t.Gps=function(e,t){var n=(0,l.useBackend)(t),p=n.act,m=n.data,f=m.currentArea,h=m.currentCoords,C=m.globalmode,g=m.power,b=m.tag,N=m.updating,v=(0,a.flow)([(0,r.map)((function(e,t){var n=e.dist&&Math.round((0,c.vecLength)((0,c.vecSubtract)(s(h),s(e.coords))));return Object.assign({},e,{dist:n,index:t})})),(0,r.sortBy)((function(e){return e.dist===undefined}),(function(e){return e.entrytag}))])(m.signals||[]);return(0,o.createComponentVNode)(2,u.Window,{title:"Global Positioning System",width:470,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d.Section,{title:"Control",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"power-off",content:g?"On":"Off",selected:g,onClick:function(){return p("power")}}),children:(0,o.createComponentVNode)(2,d.LabeledList,{children:[(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Tag",children:(0,o.createComponentVNode)(2,d.Button,{icon:"pencil-alt",content:b,onClick:function(){return p("rename")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,d.Button,{icon:N?"unlock":"lock",content:N?"AUTO":"MANUAL",color:!N&&"bad",onClick:function(){return p("updating")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,d.Button,{icon:"sync",content:C?"MAXIMUM":"LOCAL",selected:!C,onClick:function(){return p("globalmode")}})})]})}),!!g&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Section,{title:"Current Location",children:(0,o.createComponentVNode)(2,d.Box,{fontSize:"18px",children:[f," (",h,")"]})}),(0,o.createComponentVNode)(2,d.Section,{title:"Detected Signals",children:(0,o.createComponentVNode)(2,d.Table,{children:[(0,o.createComponentVNode)(2,d.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,d.Table.Cell,{content:"Name"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Direction"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Coordinates"})]}),v.map((function(e){return(0,o.createComponentVNode)(2,d.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,d.Table.Cell,{bold:!0,color:"label",children:e.entrytag}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,opacity:e.dist!==undefined&&(0,i.clamp)(1.2/Math.log(Math.E+e.dist/20),.4,1),children:[e.degrees!==undefined&&(0,o.createComponentVNode)(2,d.Icon,{mr:1,size:1.2,name:"arrow-up",rotation:e.degrees}),e.dist!==undefined&&e.dist+"m"]}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,children:e.coords})]},e.entrytag+e.coords+e.index)}))]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGenerator=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GravityGenerator=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.charging_state,u=l.operational;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:165,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No data available"}),!!u&&0!==d&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"WARNING - Radiation detected"}),!!u&&0===d&&(0,o.createComponentVNode)(2,a.NoticeBox,{success:!0,children:"No radiation detected"}),!!u&&(0,o.createComponentVNode)(2,c)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.breaker,d=c.charge_count,u=c.charging_state,s=c.on,p=c.operational;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l?"power-off":"times",content:l?"On":"Off",selected:l,disabled:!p,onClick:function(){return i("gentoggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",children:[0===u&&(s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Fully Charged"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not Charging"})),1===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Charging"}),2===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Discharging"})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagItemReclaimer=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GulagItemReclaimer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.mobs,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.Window,{width:325,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[0===u.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items"}),u.length>0&&(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",children:(0,o.createComponentVNode)(2,a.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{content:"Retrieve Items",disabled:!l.can_reclaim,onClick:function(){return c("release_items",{mobref:e.mob})}})})]},e.mob)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagTeleporterConsole=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GulagTeleporterConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.teleporter,u=l.teleporter_lock,s=l.teleporter_state_open,p=l.teleporter_location,m=l.beacon,f=l.beacon_location,h=l.id,C=l.id_name,g=l.can_teleport,b=l.goal,N=void 0===b?0:b,v=l.prisoner,V=void 0===v?{}:v;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:295,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Teleporter Console",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:s?"Open":"Closed",disabled:u,selected:s,onClick:function(){return c("toggle_open")}}),(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",selected:u,disabled:s,onClick:function(){return c("teleporter_lock")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleporter Unit",color:d?"good":"bad",buttons:!d&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return c("scan_teleporter")}}),children:d?p:"Not Connected"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Receiver Beacon",color:m?"good":"bad",buttons:!m&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return c("scan_beacon")}}),children:m?f:"Not Connected"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Prisoner Details",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prisoner ID",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:h?C:"No ID",onClick:function(){return c("handle_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Point Goal",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:N,width:"48px",minValue:1,maxValue:1e3,onChange:function(e,t){return c("set_goal",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:V.name||"No Occupant"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Criminal Status",children:V.crimstat||"No Status"})]})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Process Prisoner",disabled:!g,textAlign:"center",color:"bad",onClick:function(){return c("teleport")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.can_toggle_safety,u=l.default_programs,s=void 0===u?[]:u,p=l.emag_programs,m=void 0===p?[]:p,f=l.emagged,h=l.program;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Default Programs",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:f?"unlock":"lock",content:"Safeties",color:"bad",disabled:!d,selected:!f,onClick:function(){return c("safety")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),textAlign:"center",selected:e.type===h,onClick:function(){return c("load_program",{type:e.type})}},e.type)}))}),!!f&&(0,o.createComponentVNode)(2,a.Section,{title:"Dangerous Programs",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),color:"bad",textAlign:"center",selected:e.type===h,onClick:function(){return c("load_program",{type:e.type})}},e.type)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holopad=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Holopad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data.calling;return(0,o.createComponentVNode)(2,i.Window,{width:440,height:245,resizable:!0,children:[!!d&&(0,o.createComponentVNode)(2,a.Modal,{fontSize:"36px",fontFamily:"monospace",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,mt:2,children:(0,o.createComponentVNode)(2,a.Icon,{name:"phone-alt",rotation:25})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,children:"Dialing..."})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,textAlign:"center",fontSize:"24px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:"40px",icon:"times",content:"Hang Up",color:"bad",onClick:function(){return l("hang_up")}})})]}),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})]})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.on_network,d=c.on_cooldown,u=c.allowed,s=c.disk,p=c.disk_record,m=c.replay_mode,f=c.loop_mode,h=c.record_mode,C=c.holo_calls,g=void 0===C?[]:C;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Holopad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"bell",content:d?"AI Presence Requested":"Request AI Presence",disabled:!l||d,onClick:function(){return i("AIrequest")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Communicator",children:(0,o.createComponentVNode)(2,a.Button,{icon:"phone-alt",content:u?"Connect To Holopad":"Call Holopad",disabled:!l,onClick:function(){return i("holocall",{headcall:u})}})}),g.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.connected?"Current Call":"Incoming Call",children:(0,o.createComponentVNode)(2,a.Button,{icon:e.connected?"phone-slash":"phone-alt",content:e.connected?"Disconnect call from "+e.caller:"Answer call from "+e.caller,color:e.connected?"bad":"good",disabled:!l,onClick:function(){return i(e.connected?"disconnectcall":"connectcall",{holopad:e.ref})}})},e.ref)}))]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holodisk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!s||m||h,onClick:function(){return i("disk_eject")}}),children:!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No holodisk"})||(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk Player",children:[(0,o.createComponentVNode)(2,a.Button,{icon:m?"pause":"play",content:m?"Stop":"Replay",selected:m,disabled:h||!p,onClick:function(){return i("replay_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:f?"Looping":"Loop",selected:f,disabled:h||!p,onClick:function(){return i("loop_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exchange-alt",content:"Change Offset",disabled:!m,onClick:function(){return i("offset")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recorder",children:[(0,o.createComponentVNode)(2,a.Button,{icon:h?"pause":"video",content:h?"End Recording":"Record",selected:h,disabled:p&&!h||m,onClick:function(){return i("record_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:"Clear Recording",color:"bad",disabled:!p||m||h,onClick:function(){return i("record_clear")}})]})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.HypnoChair=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.HypnoChair=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:480,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",backgroundColor:"#450F44",children:"The Enhanced Interrogation Chamber is designed to induce a deep-rooted trance trigger into the subject. Once the procedure is complete, by using the implanted trigger phrase, the authorities are able to ensure immediate and complete obedience and truthfulness."}),(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name?l.occupant.name:"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return c("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Phrase",children:(0,o.createComponentVNode)(2,a.Input,{value:l.trigger,onChange:function(e,t){return c("set_phrase",{phrase:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Interrogate Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.interrogating?"Interrupt Interrogation":"Begin Enhanced Interrogation",onClick:function(){return c("interrogate")}}),1===l.interrogating&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantChair=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.ImplantChair=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:280,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name||"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return c("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implant Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.ready?l.special_name||"Implant":"Recharging",onClick:function(){return c("implant")}}),0===l.ready&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants Remaining",children:[l.ready_implants,1===l.replenishing&&(0,o.createComponentVNode)(2,a.Icon,{name:"sync",color:"red",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InfraredEmitter=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.InfraredEmitter=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.visible;return(0,o.createComponentVNode)(2,i.Window,{width:225,height:110,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Visibility",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"eye":"eye-slash",content:u?"Visible":"Invisible",selected:u,onClick:function(){return c("visibility")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Intellicard=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Intellicard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.name,u=l.isDead,s=l.isBraindead,p=l.health,m=l.wireless,f=l.radio,h=l.wiping,C=l.laws,g=void 0===C?[]:C,b=u||s;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:d||"Empty Card",buttons:!!d&&(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:h?"Stop Wiping":"Wipe",disabled:u,onClick:function(){return c("wipe")}}),children:!!d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:b?"bad":"good",children:b?"Offline":"Operation"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Software Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"signal",content:"Wireless Activity",selected:m,onClick:function(){return c("wireless")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"microphone",content:"Subspace Radio",selected:f,onClick:function(){return c("radio")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laws",children:g.map((function(e){return(0,o.createComponentVNode)(2,a.BlockQuote,{children:e},e)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(16),a=n(34),i=n(1),c=n(3),l=n(2);t.Jukebox=function(e,t){var n=(0,i.useBackend)(t),d=n.act,u=n.data,s=u.active,p=u.track_selected,m=u.track_length,f=u.track_beat,h=u.volume,C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Song Player",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:s?"pause":"play",content:s?"Stop":"Play",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Track Selected",children:(0,o.createComponentVNode)(2,c.Dropdown,{"overflow-y":"scroll",width:"240px",options:C.map((function(e){return e.name})),disabled:s,selected:p||"Select a Track",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Track Length",children:p?m:"No Track Selected"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Track Beat",children:[p?f:"No Track Selected",1===f?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Machine Settings",children:(0,o.createComponentVNode)(2,c.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,c.LabeledControls.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,c.Knob,{size:3.2,color:h>=50?"red":"green",value:h,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:125,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:1===l.waiting&&(0,o.createVNode)(1,"span",null,"Waiting for another device to confirm your request...",16)}),(0,o.createComponentVNode)(2,a.Box,{children:0===l.waiting&&(0,o.createFragment)([!!l.auth_required&&(0,o.createComponentVNode)(2,a.Button,{icon:"check-square",color:"red",textAlign:"center",lineHeight:"60px",fluid:!0,onClick:function(){return c("auth_swipe")},content:"Authorize"}),0===l.auth_required&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",fluid:!0,onClick:function(){return c("red_alert")},content:"Red Alert"}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",fluid:!0,onClick:function(){return c("emergency_maint")},content:"Emergency Maintenance Access"}),(0,o.createComponentVNode)(2,a.Button,{icon:"meteor",fluid:!0,onClick:function(){return c("bsa_unlock")},content:"Bluespace Artillery Unlock"})],4)],0)})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaborClaimConsole=void 0;var o=n(0),r=n(19),a=n(1),i=n(3),c=n(2);t.LaborClaimConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.can_go_home,s=d.id_points,p=d.ores,m=d.status_info,f=d.unclaimed_points;return(0,o.createComponentVNode)(2,c.Window,{width:315,height:430,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle controls",children:(0,o.createComponentVNode)(2,i.Button,{content:"Move shuttle",disabled:!u,onClick:function(){return l("move_shuttle")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Points",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unclaimed points",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Claim points",disabled:!f,onClick:function(){return l("claim_points")}}),children:f})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Material values",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Material"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),p.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,r.toTitleCase)(e.ore)}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,i.Box,{color:"label",inline:!0,children:e.value})})]},e.ore)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LanguageMenu=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.LanguageMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.admin_mode,u=l.is_living,s=l.omnitongue,p=l.languages,m=void 0===p?[]:p,f=l.unknown_languages,h=void 0===f?[]:f;return(0,o.createComponentVNode)(2,i.Window,{title:"Language Menu",width:700,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Known Languages",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createFragment)([!!u&&(0,o.createComponentVNode)(2,a.Button,{content:e.is_default?"Default Language":"Select as Default",disabled:!e.can_speak,selected:e.is_default,onClick:function(){return c("select_default",{language_name:e.name})}}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return c("grant_language",{language_name:e.name})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Remove",onClick:function(){return c("remove_language",{language_name:e.name})}})],4)],0),children:[e.desc," ","Key: ,",e.key," ",e.can_understand?"Can understand.":"Cannot understand."," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})}),!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Unknown Languages",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Omnitongue "+(s?"Enabled":"Disabled"),selected:s,onClick:function(){return c("toggle_omnitongue")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:h.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return c("grant_language",{language_name:e.name})}}),children:[e.desc," ","Key: ,",e.key," ",!!e.shadow&&"(gained from mob)"," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaunchpadRemote=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(181);t.LaunchpadRemote=function(e,t){var n=(0,r.useBackend)(t).data,l=n.has_pad,d=n.pad_closed;return(0,o.createComponentVNode)(2,i.Window,{title:"Briefcase Launchpad Remote",width:300,height:240,theme:"syndicate",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Launchpad Connected"})||d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Launchpad Closed"})||(0,o.createComponentVNode)(2,c.LaunchpadControl,{topLevel:!0})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MafiaPanel=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.MafiaPanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.players,u=l.actions,s=l.phase,p=l.roleinfo,m=l.role_theme,f=l.admin_controls,h=l.judgement_phase,C=l.timeleft,g=l.all_roles;return(0,o.createComponentVNode)(2,i.Window,{title:"Mafia",theme:m,width:650,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:s,children:!!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.TimeDisplay,{auto:"down",value:C})}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"b",null,[(0,o.createTextVNode)("You are a "),p.role],0)}),(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createVNode)(1,"b",null,p.desc,0)})],4)}),(0,o.createComponentVNode)(2,a.Flex,{children:!!u&&u.map((function(e){return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("mf_action",{atype:e})},children:e})},e)}))}),!!f&&(0,o.createComponentVNode)(2,a.Section,{title:"ADMIN CONTROLS",backgroundColor:"red",children:["THESE ARE DEBUG, THEY WILL BREAK THE GAME, DO NOT TOUCH ",(0,o.createVNode)(1,"br"),"Also because an admin did it: do not gib/delete/etc anyone! It will runtime the game to death! ",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-right",onClick:function(){return c("next_phase")},children:"Next Phase"}),(0,o.createComponentVNode)(2,a.Button,{icon:"home",onClick:function(){return c("players_home")},children:"Send All Players Home"}),(0,o.createComponentVNode)(2,a.Button,{icon:"radiation",onClick:function(){return c("new_game")},children:"New Game"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"skull",onClick:function(){return c("nuke")},color:"black",children:"Nuke (delete datum + landmarks, hope it fixes everything!)"})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Players",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:!!d&&d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{className:"candystripe",label:e.name,children:[!e.alive&&(0,o.createComponentVNode)(2,a.Box,{color:"red",children:"DEAD"}),e.votes!==undefined&&!!e.alive&&(0,o.createFragment)([(0,o.createTextVNode)("Votes : "),e.votes,(0,o.createTextVNode)(" ")],0),!!e.actions&&e.actions.map((function(t){return(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("mf_targ_action",{atype:t,target:e.ref})},children:t},t)}))]},e.ref)}))})}),!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"JUDGEMENT",children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"smile-beam",color:"good",onClick:function(){return c("vote_innocent")},children:"INNOCENT!"}),"Use these buttons to vote the accused innocent or guilty!",(0,o.createComponentVNode)(2,a.Button,{icon:"angry",color:"bad",onClick:function(){return c("vote_guilty")},children:"GUILTY!"})]})}),(0,o.createComponentVNode)(2,a.Flex,{mt:1,spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Roles",minHeight:10,children:!!g&&g.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Flex,{justify:"space-between",children:[e,(0,o.createComponentVNode)(2,a.Button,{content:"?",onClick:function(){return c("mf_lookup",{atype:e.slice(0,-3)})}})]})},e)}))})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:2,basis:0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Notes",minHeight:10,children:p!==undefined&&!!p.action_log&&p.action_log.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e},e)}))})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MalfunctionModulePicker=void 0;var o=n(0),r=n(1),a=n(2),i=n(128);t.MalfunctionModulePicker=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.processingTime);return(0,o.createComponentVNode)(2,a.Window,{width:620,height:525,theme:"malfunction",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.GenericUplink,{currencyAmount:c,currencySymbol:"PT"})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayPowerConsole=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.MechBayPowerConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:200,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return c("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalKiosk=void 0;var o=n(0),r=(n(19),n(1)),a=n(3),i=n(2);t.MedicalKiosk=function(e,t){var n=(0,r.useBackend)(t),m=(n.act,n.data),f=(0,r.useSharedState)(t,"scanIndex")[0],h=m.active_status_1,C=m.active_status_2,g=m.active_status_3,b=m.active_status_4;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:420,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,c,{index:1,icon:"procedures",name:"General Health Scan",description:"Reads back exact values of your general health scan."}),(0,o.createComponentVNode)(2,c,{index:2,icon:"heartbeat",name:"Symptom Based Checkup",description:"Provides information based on various non-obvious symptoms,\nlike blood levels or disease status."}),(0,o.createComponentVNode)(2,c,{index:3,icon:"radiation-alt",name:"Neurological/Radiological Scan",description:"Provides information about brain trauma and radiation."}),(0,o.createComponentVNode)(2,c,{index:4,icon:"mortar-pestle",name:"Chemical and Psychoactive Scan",description:"Provides a list of consumed chemicals, as well as potential\nside effects."})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l)})]}),!!h&&1===f&&(0,o.createComponentVNode)(2,d),!!C&&2===f&&(0,o.createComponentVNode)(2,u),!!g&&3===f&&(0,o.createComponentVNode)(2,s),!!b&&4===f&&(0,o.createComponentVNode)(2,p)]})})};var c=function(e,t){var n=e.index,i=e.name,c=e.description,l=e.icon,d=(0,r.useBackend)(t),u=d.act,s=d.data,p=(0,r.useSharedState)(t,"scanIndex"),m=p[0],f=p[1],h=s["active_status_"+n];return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"16px",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:h?"check":"dollar-sign",color:h?"green":"grey"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:l,selected:h&&m===n,tooltip:c,tooltipPosition:"right",content:i,onClick:function(){h||u("beginScan_"+n),f(n)}})})]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.kiosk_cost,d=c.patient_name;return(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:["Greetings Valued Employee! Please select a desired automatic health check procedure. Diagnosis costs ",(0,o.createVNode)(1,"b",null,[l,(0,o.createTextVNode)(" credits.")],0)]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:1,children:"Patient:"}),d]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,tooltip:"Resets the current scanning target, cancelling current scans.",icon:"sync",color:"average",onClick:function(){return i("clearTarget")},content:"Reset Scanner"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,i=n.patient_health,c=n.brute_health,l=n.burn_health,d=n.suffocation_health,u=n.toxin_health;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i}),"%"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:l})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})})})]})})},u=function(e,t){var n=(0,r.useBackend)(t).data,i=n.patient_status,c=n.patient_illness,l=n.illness_info,d=n.bleed_status,u=n.blood_levels,s=n.blood_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Symptom Based Checkup",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Patient Status",color:"good",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease Status",children:c}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease information",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Levels",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})}),(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"label",children:d})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Information",children:s})]})})},s=function(e,t){var n=(0,r.useBackend)(t).data,i=n.clone_health,c=n.brain_damage,l=n.brain_health,d=n.rad_contamination_status,u=n.rad_contamination_value,s=n.rad_sickness_status,p=n.rad_sickness_value,m=n.trauma_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Neurological and Radiological Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cellular Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i})})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Status",color:"health-0",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Trauma Status",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Status",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Percentage",children:[p,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Status",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Percentage",children:[u,"%"]})]})})},p=function(e,t){var n=(0,r.useBackend)(t).data,i=n.chemical_list,c=void 0===i?[]:i,l=n.overdose_list,d=void 0===l?[]:l,u=n.addict_list,s=void 0===u?[]:u,p=n.hallucinating_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical and Psychoactive Analysis",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chemical Contents",children:[0===c.length&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No reagents detected."}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[e.volume," units of ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Overdose Status",color:"bad",children:[0===d.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient is not overdosing."}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Overdosing on ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Addiction Status",color:"bad",children:[0===s.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient has no addictions."}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Addicted to ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Psychoactive Status",children:p})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(6),a=n(1),i=n(3),c=n(2);t.MiningVendor=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=[].concat(d.product_records);return(0,o.createComponentVNode)(2,c.Window,{width:425,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"User",children:d.user&&(0,o.createComponentVNode)(2,i.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,d.user.name||"Unknown",0),","," ",(0,o.createVNode)(1,"b",null,d.user.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[d.user.points,(0,o.createTextVNode)(" mining points")],0),"."]})||(0,o.createComponentVNode)(2,i.Box,{color:"light-gray",children:["No registered ID card!",(0,o.createVNode)(1,"br"),"Please contact your local HoP!"]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Equipment",children:(0,o.createComponentVNode)(2,i.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createVNode)(1,"span",(0,r.classes)(["vending32x32",e.path]),null,1,{style:{"vertical-align":"middle"}})," ",(0,o.createVNode)(1,"b",null,e.name,0)]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{style:{"min-width":"95px","text-align":"center"},disabled:!d.user||e.price>d.user.points,content:e.price+" points",onClick:function(){return l("purchase",{ref:e.ref})}})})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mint=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Mint=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.inserted_materials||[];return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Materials",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.processing?"times":"power-off",content:l.processing?"Stop":"Start",selected:l.processing,onClick:function(){return c(l.processing?"stoppress":"startpress")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.material,buttons:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:l.chosen_material===e.material,onClick:function(){return c("changematerial",{material_name:e.material})}}),children:[e.amount," cm\xb3"]},e.material)}))})}),(0,o.createComponentVNode)(2,a.Section,{children:["Pressed ",l.produced_coins," coins this cycle."]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mule=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(61);t.Mule=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.cell,p=d.cellPercent,m=d.load,f=d.mode,h=d.modeStatus,C=d.haspai,g=d.autoReturn,b=d.autoPickup,N=d.reportDelivery,v=d.destination,V=d.home,y=d.id,k=d.destinations,x=void 0===k?[]:k,_=d.locked&&!d.siliconUser;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:425,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Status",minHeight:"110px",buttons:!_&&(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}}),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:s?p/100:0,color:s?"good":"bad"}),(0,o.createComponentVNode)(2,a.Flex,{mt:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",color:h,children:f})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",color:m?"good":"average",children:m||"None"})})})]})]}),!_&&(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createFragment)([!!m&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Unload",onClick:function(){return l("unload")}}),!!C&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject PAI",onClick:function(){return l("ejectpai")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Input,{value:y,onChange:function(e,t){return l("setid",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:v||"None",options:x,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"stop",content:"Stop",onClick:function(){return l("stop")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"play",content:"Go",onClick:function(){return l("go")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:V,options:x,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"home",content:"Go Home",onClick:function(){return l("home")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:g,content:"Auto-Return",onClick:function(){return l("autored")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:b,content:"Auto-Pickup",onClick:function(){return l("autopick")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Report Delivery",onClick:function(){return l("report")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteChamberControlContent=t.NaniteChamberControl=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.NaniteChamberControl=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:380,height:570,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.status_msg,d=c.locked,u=c.occupant_name,s=c.has_nanites,p=c.nanite_volume,m=c.regen_rate,f=c.safety_threshold,h=c.cloud_id,C=c.scan_level;if(l)return(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:l});var g=c.mob_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Chamber: "+u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"lock":"lock-open",content:d?"Locked":"Unlocked",color:d?"bad":"default",onClick:function(){return i("toggle_lock")}}),children:s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Destroy Nanites",color:"bad",onClick:function(){return i("remove_nanites")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanite Volume",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Growth Rate",children:m})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety Threshold",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:f,minValue:0,maxValue:500,width:"39px",onChange:function(e,t){return i("set_safety",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cloud ID",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:h,minValue:0,maxValue:100,step:1,stepPixelSize:3,width:"39px",onChange:function(e,t){return i("set_cloud",{value:t})}})})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Programs",level:2,children:g.map((function(e){var t=e.extra_settings||[],n=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:e.desc}),C>=2&&(0,o.createComponentVNode)(2,a.Grid.Column,{size:.6,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.activated?"good":"bad",children:e.activated?"Active":"Inactive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanites Consumed",children:[e.use_rate,"/s"]})]})})]}),C>=2&&(0,o.createComponentVNode)(2,a.Grid,{children:[!!e.can_trigger&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Triggers",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:e.trigger_cost}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:e.trigger_cooldown}),!!e.timer_trigger_delay&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[e.timer_trigger_delay," s"]}),!!e.timer_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:[e.timer_trigger," s"]})]})})}),!(!e.timer_restart&&!e.timer_shutdown)&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.timer_restart&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:[e.timer_restart," s"]}),e.timer_shutdown&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:[e.timer_shutdown," s"]})]})})})]}),C>=3&&!!e.has_extra_settings&&(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:t.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.value},e.name)}))})}),C>=4&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!e.activation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:e.activation_code}),!!e.deactivation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:e.deactivation_code}),!!e.kill_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:e.kill_code}),!!e.can_trigger&&!!e.trigger_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:e.trigger_code})]})})}),e.has_rules&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Rules",level:2,children:n.map((function(e){return(0,o.createFragment)([e.display,(0,o.createVNode)(1,"br")],0,e.display)}))})})]})]})},e.name)}))})],4):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",textAlign:"center",fontSize:"30px",mb:1,children:"No Nanites Detected"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,icon:"syringe",content:" Implant Nanites",color:"green",textAlign:"center",fontSize:"30px",lineHeight:"50px",onClick:function(){return i("nanite_injection")}})],4)})};t.NaniteChamberControlContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteCloudControl=t.NaniteCloudBackupDetails=t.NaniteCloudBackupList=t.NaniteInfoBox=t.NaniteDiskBox=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=function(e,t){var n=(0,r.useBackend)(t).data,i=n.has_disk,c=n.has_program,d=n.disk;return i?c?(0,o.createComponentVNode)(2,l,{program:d}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Inserted disk has no program"}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No disk inserted"})};t.NaniteDiskBox=c;var l=function(e,t){var n=e.program,r=n.name,i=n.desc,c=n.activated,l=n.use_rate,d=n.can_trigger,u=n.trigger_cost,s=n.trigger_cooldown,p=n.activation_code,m=n.deactivation_code,f=n.kill_code,h=n.trigger_code,C=n.timer_restart,g=n.timer_shutdown,b=n.timer_trigger,N=n.timer_trigger_delay,v=n.extra_settings||[];return(0,o.createComponentVNode)(2,a.Section,{title:r,level:2,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:c?"good":"bad",children:c?"Activated":"Deactivated"}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{mr:1,children:i}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:l}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:s})],4)]})})]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:f}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:h})]})})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart",children:[C," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown",children:[g," s"]}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:[b," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[N," s"]})],4)]})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:v.map((function(e){var t={number:(0,o.createFragment)([e.value,e.unit],0),text:e.value,type:e.value,boolean:e.value?e.true_text:e.false_text};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:t[e.type]},e.name)}))})})]})};t.NaniteInfoBox=l;var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act;return(n.data.cloud_backups||[]).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Backup #"+e.cloud_id,textAlign:"center",onClick:function(){return i("set_view",{view:e.cloud_id})}},e.cloud_id)}))};t.NaniteCloudBackupList=d;var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,d=c.current_view,u=c.disk,s=c.has_program,p=c.cloud_backup,m=u&&u.can_rule||!1;if(!p)return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: Backup not found"});var f=c.cloud_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Backup #"+d,level:2,buttons:!!s&&(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload From Disk",color:"good",onClick:function(){return i("upload_program")}}),children:f.map((function(e){var t=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return i("remove_program",{program_id:e.id})}}),children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,l,{program:e}),(!!m||!!e.has_rules)&&(0,o.createComponentVNode)(2,a.Section,{mt:-2,title:"Rules",level:2,buttons:!!m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Add Rule from Disk",color:"good",onClick:function(){return i("add_rule",{program_id:e.id})}}),children:e.has_rules?t.map((function(t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return i("remove_rule",{program_id:e.id,rule_id:t.id})}})," "+t.display]},t.display)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Active Rules"})})]})},e.name)}))})};t.NaniteCloudBackupDetails=u;t.NaniteCloudControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,p=s.has_disk,m=s.current_view,f=s.new_backup_id;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Program Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!p,onClick:function(){return l("eject")}}),children:(0,o.createComponentVNode)(2,c)}),(0,o.createComponentVNode)(2,a.Section,{title:"Cloud Storage",buttons:m?(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Return",onClick:function(){return l("set_view",{view:0})}}):(0,o.createFragment)(["New Backup: ",(0,o.createComponentVNode)(2,a.NumberInput,{value:f,minValue:1,maxValue:100,stepPixelSize:4,width:"39px",onChange:function(e,t){return l("update_new_backup_value",{value:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return l("create_backup")}})],0),children:s.current_view?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,d)})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgramHub=void 0;var o=n(0),r=n(16),a=n(1),i=n(3),c=n(2);t.NaniteProgramHub=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.detail_view,s=d.disk,p=d.has_disk,m=d.has_program,f=d.programs,h=void 0===f?{}:f,C=(0,a.useSharedState)(t,"category"),g=C[0],b=C[1],N=h&&h[g]||[];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Program Disk",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return l("eject")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"minus-circle",content:"Delete Program",onClick:function(){return l("clear")}})],4),children:p?m?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Program Name",children:s.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:s.desc})]}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Program Installed"}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Insert Disk"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Programs",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:u?"info":"list",content:u?"Detailed":"Compact",onClick:function(){return l("toggle_details")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Sync Research",onClick:function(){return l("refresh")}})],4),children:null!==h?(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{minWidth:"110px",children:(0,o.createComponentVNode)(2,i.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){var n=t.substring(0,t.length-8);return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:t===g,onClick:function(){return b(t)},children:n},t)}))(h)})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:0,children:u?N.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"download",content:"Download",disabled:!p,onClick:function(){return l("download",{program_id:e.id})}}),children:e.desc},e.id)})):(0,o.createComponentVNode)(2,i.LabeledList,{children:N.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"download",content:"Download",disabled:!p,onClick:function(){return l("download",{program_id:e.id})}})},e.id)}))})})]}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No nanite programs are currently researched."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgrammerContent=t.NaniteProgrammer=t.NaniteExtraBoolean=t.NaniteExtraType=t.NaniteExtraText=t.NaniteExtraNumber=t.NaniteExtraEntry=t.NaniteDelays=t.NaniteCodes=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.activation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"activation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.deactivation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"deactivation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.kill_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"kill",code:t})}})}),!!c.can_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.trigger_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"trigger",code:t})}})})]})})};t.NaniteCodes=c;var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,ml:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_restart,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_restart_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_shutdown,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_shutdown_timer",{delay:t})}})}),!!c.can_trigger&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_trigger,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_trigger_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_trigger_delay,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_timer_trigger_delay",{delay:t})}})})],4)]})})};t.NaniteDelays=l;var d=function(e,t){var n=e.extra_setting,r=n.name,i=n.type,c={number:(0,o.createComponentVNode)(2,u,{extra_setting:n}),text:(0,o.createComponentVNode)(2,s,{extra_setting:n}),type:(0,o.createComponentVNode)(2,p,{extra_setting:n}),boolean:(0,o.createComponentVNode)(2,m,{extra_setting:n})};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:r,children:c[i]})};t.NaniteExtraEntry=d;var u=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value,d=n.min,u=n.max,s=n.unit;return(0,o.createComponentVNode)(2,a.NumberInput,{value:l,width:"64px",minValue:d,maxValue:u,unit:s,onChange:function(e,t){return i("set_extra_setting",{target_setting:c,value:t})}})};t.NaniteExtraNumber=u;var s=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value;return(0,o.createComponentVNode)(2,a.Input,{value:l,width:"200px",onInput:function(e,t){return i("set_extra_setting",{target_setting:c,value:t})}})};t.NaniteExtraText=s;var p=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value,d=n.types;return(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:l,width:"150px",options:d,onSelected:function(e){return i("set_extra_setting",{target_setting:c,value:e})}})};t.NaniteExtraType=p;var m=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value,d=n.true_text,u=n.false_text;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:l?d:u,checked:l,onClick:function(){return i("set_extra_setting",{target_setting:c})}})};t.NaniteExtraBoolean=m;t.NaniteProgrammer=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:420,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,f)})})};var f=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.has_disk,p=u.has_program,m=u.name,f=u.desc,h=u.use_rate,C=u.can_trigger,g=u.trigger_cost,b=u.trigger_cooldown,N=u.activated,v=u.has_extra_settings,V=u.extra_settings,y=void 0===V?{}:V;return s?p?(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return i("eject")}}),children:[(0,o.createComponentVNode)(2,a.Section,{title:"Info",level:2,children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:f}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.7,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:h}),!!C&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:g}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:b})],4)]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Settings",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",content:N?"Active":"Inactive",selected:N,color:"bad",bold:!0,onClick:function(){return i("toggle_active")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,c)}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,l)})]}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Special",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:y.map((function(e){return(0,o.createComponentVNode)(2,d,{extra_setting:e},e.name)}))})})]})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Blank Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return i("eject")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Insert a nanite program disk"})};t.NaniteProgrammerContent=f},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteRemoteContent=t.NaniteRemote=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.NaniteRemote=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:420,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.code,d=c.locked,u=c.mode,s=c.program_name,p=c.relay_code,m=c.comms,f=c.message,h=c.saved_settings,C=void 0===h?[]:h;return d?(0,o.createComponentVNode)(2,a.NoticeBox,{children:"This interface is locked."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Nanite Control",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lock Interface",onClick:function(){return i("lock")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:[(0,o.createComponentVNode)(2,a.Input,{value:s,maxLength:14,width:"130px",onChange:function(e,t){return i("update_name",{name:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"save",content:"Save",onClick:function(){return i("save")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:m?"Comm Code":"Signal Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return i("set_code",{code:t})}})}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:(0,o.createComponentVNode)(2,a.Input,{value:f,width:"270px",onChange:function(e,t){return i("set_message",{value:t})}})}),"Relay"===u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Relay Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:p,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return i("set_relay_code",{code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Signal Mode",children:["Off","Local","Targeted","Area","Relay"].map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,selected:u===e,onClick:function(){return i("select_mode",{mode:e})}},e)}))})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Saved Settings",children:C.length>0?(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"35%",children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Mode"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Code"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Relay"})]}),C.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:"label",children:[e.name,":"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.mode}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.code}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Relay"===e.mode&&e.relay_code}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"upload",color:"good",onClick:function(){return i("load",{save_id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"minus",color:"bad",onClick:function(){return i("remove_save",{save_id:e.id})}})]})]},e.id)}))]}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No settings currently saved"})})],4)};t.NaniteRemoteContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.NotificationPreferences=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.NotificationPreferences=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=(n.data.ignore||[]).sort((function(e,t){var n=e.desc.toLowerCase(),o=t.desc.toLowerCase();return n "+e+"11 August 2020
+ Hatterhat updated:
+
+
+ kappa-sama updated:
+
+
+ zeroisthebiggay updated:
+
+
+
10 August 2020
Hatterhat updated:
@@ -1398,31 +1412,6 @@
-
- 09 June 2020
- Anonymous updated:
-
-
- DeltaFire15 updated:
-
-
- Ghommie updated:
-
-
- Trilbyspaceclone updated:
-
-
- kevinz000 updated:
-
-
{roleinfo.desc}
-
- Also because an admin did it: do not gib/delete/etc
- anyone! It will runtime the game to death!
-
-
-
-
-
-
+
+
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";var o={}.hasOwnProperty;e.exports=function(e,t){return o.call(e,t)}},function(e,t,n){"use strict";var o=n(52),r=n(62),a=n(18),i=n(12),c=n(68),l=[].push,d=function(e){var t=1==e,n=2==e,d=3==e,u=4==e,s=6==e,p=5==e||s;return function(m,f,h,C){for(var g,b,N=a(m),v=r(N),V=o(f,h,3),y=i(v.length),k=0,x=C||c,_=t?x(m,y):n?x(m,0):undefined;y>k;k++)if((p||k in v)&&(b=V(g=v[k],k,N),e))if(t)_[k]=b;else if(b)switch(e){case 3:return!0;case 5:return g;case 6:return k;case 2:l.call(_,g)}else if(u)return!1;return s?-1:d||u?u:_}};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6)}},function(e,t,n){"use strict";var o=n(9),r=n(75),a=n(50),i=n(26),c=n(36),l=n(20),d=n(130),u=Object.getOwnPropertyDescriptor;t.f=o?u:function(e,t){if(e=i(e),t=c(t,!0),d)try{return u(e,t)}catch(n){}if(l(e,t))return a(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";e.exports=function(e){if(e==undefined)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var o=n(7),r=n(31),a=n(20),i=n(93),c=n(94),l=n(37),d=l.get,u=l.enforce,s=String(String).split("String");(e.exports=function(e,t,n,c){var l=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,p=!!c&&!!c.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||r(n,"name",t),u(n).source=s.join("string"==typeof t?t:"")),e!==o?(l?!p&&e[t]&&(d=!0):delete e[t],d?e[t]=n:r(e,t,n)):d?e[t]=n:i(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&d(this).source||c(this)}))},function(e,t,n){"use strict";var o=n(9),r=n(5),a=n(20),i=Object.defineProperty,c={},l=function(e){throw e};e.exports=function(e,t){if(a(c,e))return c[e];t||(t={});var n=[][e],d=!!a(t,"ACCESSORS")&&t.ACCESSORS,u=a(t,0)?t[0]:l,s=a(t,1)?t[1]:undefined;return c[e]=!!n&&!r((function(){if(d&&!o)return!0;var e={length:-1};d?i(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,u,s)}))}},function(e,t,n){"use strict";var o=n(62),r=n(23);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var o=n(134),r=n(20),a=n(140),i=n(15).f;e.exports=function(e){var t=o.Symbol||(o.Symbol={});r(t,e)||i(t,e,{value:a.f(e)})}},function(e,t,n){"use strict";var o=n(23),r=/"/g;e.exports=function(e,t,n,a){var i=String(o(e)),c="<"+t;return""!==n&&(c+=" "+n+'="'+String(a).replace(r,""")+'"'),c+">"+i+""+t+">"}},function(e,t,n){"use strict";var o=n(5);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";t.__esModule=!0,t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{captain:"#c06616",security:"#e74c3c",medbay:"#3498db",science:"#9b59b6",engineering:"#f1c40f",cargo:"#f39c12",centcom:"#00c100",other:"#c38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"CentCom",freq:1337,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"AI Private",freq:1447,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color}},function(e,t,n){"use strict";var o=n(9),r=n(15),a=n(50);e.exports=o?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:o)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0;for(var c in i&&(a=Ce(n))&&he(t,o,n),n)_e(c,null,n[c],o,r,a,null);i&&fe(t,e,o,n,!0,a)}function Be(e,t,n){var o=O(e.render(t,e.state,n)),r=n;return c(e.getChildContext)&&(r=u(n,e.getChildContext())),e.$CX=r,o}function Le(e,t,n,o,r,a){var i=new t(n,o),l=i.$N=Boolean(t.getDerivedStateFromProps||i.getSnapshotBeforeUpdate);if(i.$SVG=r,i.$L=a,e.children=i,i.$BS=!1,i.context=o,i.props===p&&(i.props=n),l)i.state=y(i,n,i.state);else if(c(i.componentWillMount)){i.$BR=!0,i.componentWillMount();var u=i.$PS;if(!d(u)){var s=i.state;if(d(s))i.state=u;else for(var m in u)s[m]=u[m];i.$PS=null}i.$BR=!1}return i.$LI=Be(i,n,o),i}function Se(e,t,n,o,r,a){var i=e.flags|=16384;481&i?Te(e,t,n,o,r,a):4&i?function(e,t,n,o,r,a){var i=Le(e,e.type,e.props||p,n,o,a);Se(i.$LI,t,i.$CX,o,r,a),Ee(e.ref,i,a)}(e,t,n,o,r,a):8&i?(!function(e,t,n,o,r,a){Se(e.children=O(function(e,t){return 32768&e.flags?e.type.render(e.props||p,e.ref,t):e.type(e.props||p,t)}(e,n)),t,n,o,r,a)}(e,t,n,o,r,a),Me(e,a)):512&i||16&i?Ie(e,t,r):8192&i?function(e,t,n,o,r,a){var i=e.children,c=e.childFlags;12&c&&0===i.length&&(c=e.childFlags=2,i=e.children=M());2===c?Se(i,n,r,o,r,a):Ae(i,n,t,o,r,a)}(e,n,t,o,r,a):1024&i&&function(e,t,n,o,r){Se(e.children,e.ref,t,!1,null,r);var a=M();Ie(a,n,o),e.dom=a.dom}(e,n,t,r,a)}function Ie(e,t,n){var o=e.dom=document.createTextNode(e.children);d(t)||h(t,o,n)}function Te(e,t,n,o,r,i){var c=e.flags,l=e.props,u=e.className,s=e.children,p=e.childFlags,m=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&c)>0);if(a(u)||""===u||(o?m.setAttribute("class",u):m.className=u),16===p)_(m,s);else if(1!==p){var f=o&&"foreignObject"!==e.type;2===p?(16384&s.flags&&(e.children=s=E(s)),Se(s,m,n,f,null,i)):8!==p&&4!==p||Ae(s,m,n,f,null,i)}d(t)||h(t,m,r),d(l)||we(e,c,l,m,o),be(e.ref,m,i)}function Ae(e,t,n,o,r,a){for(var i=0;ii)for(p=s;p=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev
\n":"'+(n?e:H(e,!0))+"
\n"},t.blockquote=function(e){return""+(n?e:H(e,!0))+"\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"
\n":"
\n"},t.list=function(e,t,n){var o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+""+o+">\n"},t.listitem=function(e){return"\n\n"+e+"\n"+t+"
\n"},t.tablerow=function(e){return"\n"+e+" \n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
":"
"},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=W(this.options.sanitize,this.options.baseUrl,e)))return n;var o='"+n+""},t.image=function(e,t,n){if(null===(e=W(this.options.sanitize,this.options.baseUrl,e)))return n;var o='":">"},t.text=function(e){return e},e}(),G=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),K=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),q=o.defaults,Y=V.unescape,$=function(){function e(e){this.options=e||q,this.options.renderer=this.options.renderer||new U,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new G,this.slugger=new K}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,o,r,a,i,c,l,d,u,s,p,m,f,h,C,g,b,N,v="",V=e.length;for(n=0;n
"+Z(l.message+"",!0)+"";throw l}}return ne.options=ne.setOptions=function(e){return X(ne.defaults,e),ee(ne.defaults),ne},ne.getDefaults=J,ne.defaults=te,ne.use=function(e){var t=X({},e);if(e.renderer&&function(){var n=ne.defaults.renderer||new U,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,a=new Array(r),i=0;i
=0&&p+"s"||"Dispensing..."})]})})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.ForbiddenLore=void 0;var o=n(0),r=n(16),a=n(34),i=n(1),c=n(3),l=n(2);t.ForbiddenLore=function(e,t){var n=(0,i.useBackend)(t),d=n.act,u=n.data,s=u.charges,p=(0,a.flow)([(0,r.sortBy)((function(e){return"Research"!==e.state}),(function(e){return"Side"===e.path}))])(u.to_know||[]);return(0,o.createComponentVNode)(2,l.Window,{width:500,height:900,resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.Section,{title:"Research Eldritch Knowledge",children:["Charges left : ",s,null!==p?p.map((function(e){return(0,o.createComponentVNode)(2,c.Section,{title:e.name,level:2,children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,my:1,children:[e.path," path"]}),(0,o.createComponentVNode)(2,c.Box,{my:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:e.state,disabled:e.disabled,onClick:function(){return d("research",{name:e.name,cost:e.cost})}})," ","Cost : ",e.cost]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,my:1,children:e.flavour}),(0,o.createComponentVNode)(2,c.Box,{my:1,children:e.desc})]},e.name)})):(0,o.createComponentVNode)(2,c.Box,{children:"No more knowledge can be found"})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gateway=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Gateway=function(){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.gateway_present,d=void 0!==l&&l,u=c.gateway_status,s=void 0!==u&&u,p=c.current_target,m=void 0===p?null:p,h=c.destinations,f=void 0===h?[]:h;return d?m?(0,o.createComponentVNode)(2,a.Section,{title:m.name,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"rainbow",size:4,color:"green"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return i("deactivate")},children:"Deactivate"})]}):f.length?(0,o.createFragment)([!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Gateway Unpowered"}),f.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,children:e.availible&&(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return i("activate",{destination:e.ref})},children:"Activate"})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{m:1,textColor:"bad",children:e.reason}),!!e.timeout&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:e.timeout,children:"Calibrating..."})],0)},e.ref)}))],0):(0,o.createComponentVNode)(2,a.Section,{children:"No gateway nodes detected."}):(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No linked gateway"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,onClick:function(){return i("linkup")},children:"Linkup"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.GlandDispenser=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GlandDispenser=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.glands,d=void 0===l?[]:l;return(0,o.createComponentVNode)(2,i.Window,{width:300,height:338,theme:"abductor",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{width:"60px",height:"60px",m:.75,textAlign:"center",lineHeight:"55px",icon:"eject",backgroundColor:e.color,content:e.amount||"0",disabled:!e.amount,onClick:function(){return c("dispense",{gland_id:e.id})}},e.id)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Gps=void 0;var o=n(0),r=n(16),a=n(34),i=n(14),c=n(120),l=n(1),d=n(3),u=n(2),s=function(e){return(0,r.map)(parseFloat)(e.split(", "))};t.Gps=function(e,t){var n=(0,l.useBackend)(t),p=n.act,m=n.data,h=m.currentArea,f=m.currentCoords,C=m.globalmode,g=m.power,b=m.tag,N=m.updating,v=(0,a.flow)([(0,r.map)((function(e,t){var n=e.dist&&Math.round((0,c.vecLength)((0,c.vecSubtract)(s(f),s(e.coords))));return Object.assign({},e,{dist:n,index:t})})),(0,r.sortBy)((function(e){return e.dist===undefined}),(function(e){return e.entrytag}))])(m.signals||[]);return(0,o.createComponentVNode)(2,u.Window,{title:"Global Positioning System",width:470,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,d.Section,{title:"Control",buttons:(0,o.createComponentVNode)(2,d.Button,{icon:"power-off",content:g?"On":"Off",selected:g,onClick:function(){return p("power")}}),children:(0,o.createComponentVNode)(2,d.LabeledList,{children:[(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Tag",children:(0,o.createComponentVNode)(2,d.Button,{icon:"pencil-alt",content:b,onClick:function(){return p("rename")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,d.Button,{icon:N?"unlock":"lock",content:N?"AUTO":"MANUAL",color:!N&&"bad",onClick:function(){return p("updating")}})}),(0,o.createComponentVNode)(2,d.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,d.Button,{icon:"sync",content:C?"MAXIMUM":"LOCAL",selected:!C,onClick:function(){return p("globalmode")}})})]})}),!!g&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d.Section,{title:"Current Location",children:(0,o.createComponentVNode)(2,d.Box,{fontSize:"18px",children:[h," (",f,")"]})}),(0,o.createComponentVNode)(2,d.Section,{title:"Detected Signals",children:(0,o.createComponentVNode)(2,d.Table,{children:[(0,o.createComponentVNode)(2,d.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,d.Table.Cell,{content:"Name"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Direction"}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,content:"Coordinates"})]}),v.map((function(e){return(0,o.createComponentVNode)(2,d.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,d.Table.Cell,{bold:!0,color:"label",children:e.entrytag}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,opacity:e.dist!==undefined&&(0,i.clamp)(1.2/Math.log(Math.E+e.dist/20),.4,1),children:[e.degrees!==undefined&&(0,o.createComponentVNode)(2,d.Icon,{mr:1,size:1.2,name:"arrow-up",rotation:e.degrees}),e.dist!==undefined&&e.dist+"m"]}),(0,o.createComponentVNode)(2,d.Table.Cell,{collapsing:!0,children:e.coords})]},e.entrytag+e.coords+e.index)}))]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GravityGenerator=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GravityGenerator=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data),d=l.charging_state,u=l.operational;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:165,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No data available"}),!!u&&0!==d&&(0,o.createComponentVNode)(2,a.NoticeBox,{danger:!0,children:"WARNING - Radiation detected"}),!!u&&0===d&&(0,o.createComponentVNode)(2,a.NoticeBox,{success:!0,children:"No radiation detected"}),!!u&&(0,o.createComponentVNode)(2,c)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.breaker,d=c.charge_count,u=c.charging_state,s=c.on,p=c.operational;return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:l?"power-off":"times",content:l?"On":"Off",selected:l,disabled:!p,onClick:function(){return i("gentoggle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Gravity Charge",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Charge Mode",children:[0===u&&(s&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Fully Charged"})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not Charging"})),1===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Charging"}),2===u&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"Discharging"})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagItemReclaimer=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GulagItemReclaimer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.mobs,u=void 0===d?[]:d;return(0,o.createComponentVNode)(2,i.Window,{width:325,height:400,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[0===u.length&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No stored items"}),u.length>0&&(0,o.createComponentVNode)(2,a.Section,{title:"Stored Items",children:(0,o.createComponentVNode)(2,a.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{content:"Retrieve Items",disabled:!l.can_reclaim,onClick:function(){return c("release_items",{mobref:e.mob})}})})]},e.mob)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GulagTeleporterConsole=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.GulagTeleporterConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.teleporter,u=l.teleporter_lock,s=l.teleporter_state_open,p=l.teleporter_location,m=l.beacon,h=l.beacon_location,f=l.id,C=l.id_name,g=l.can_teleport,b=l.goal,N=void 0===b?0:b,v=l.prisoner,V=void 0===v?{}:v;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:295,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Teleporter Console",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:s?"Open":"Closed",disabled:u,selected:s,onClick:function(){return c("toggle_open")}}),(0,o.createComponentVNode)(2,a.Button,{icon:u?"lock":"unlock",content:u?"Locked":"Unlocked",selected:u,disabled:s,onClick:function(){return c("teleporter_lock")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Teleporter Unit",color:d?"good":"bad",buttons:!d&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return c("scan_teleporter")}}),children:d?p:"Not Connected"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Receiver Beacon",color:m?"good":"bad",buttons:!m&&(0,o.createComponentVNode)(2,a.Button,{content:"Reconnect",onClick:function(){return c("scan_beacon")}}),children:m?h:"Not Connected"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Prisoner Details",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Prisoner ID",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:f?C:"No ID",onClick:function(){return c("handle_id")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Point Goal",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:N,width:"48px",minValue:1,maxValue:1e3,onChange:function(e,t){return c("set_goal",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Occupant",children:V.name||"No Occupant"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Criminal Status",children:V.crimstat||"No Status"})]})}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Process Prisoner",disabled:!g,textAlign:"center",color:"bad",onClick:function(){return c("teleport")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holodeck=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Holodeck=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.can_toggle_safety,u=l.default_programs,s=void 0===u?[]:u,p=l.emag_programs,m=void 0===p?[]:p,h=l.emagged,f=l.program;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Default Programs",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:h?"unlock":"lock",content:"Safeties",color:"bad",disabled:!d,selected:!h,onClick:function(){return c("safety")}}),children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),textAlign:"center",selected:e.type===f,onClick:function(){return c("load_program",{type:e.type})}},e.type)}))}),!!h&&(0,o.createComponentVNode)(2,a.Section,{title:"Dangerous Programs",children:m.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:e.name.substring(11),color:"bad",textAlign:"center",selected:e.type===f,onClick:function(){return c("load_program",{type:e.type})}},e.type)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Holopad=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Holopad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data.calling;return(0,o.createComponentVNode)(2,i.Window,{width:440,height:245,resizable:!0,children:[!!d&&(0,o.createComponentVNode)(2,a.Modal,{fontSize:"36px",fontFamily:"monospace",children:[(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,mt:2,children:(0,o.createComponentVNode)(2,a.Icon,{name:"phone-alt",rotation:25})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mr:2,children:"Dialing..."})]}),(0,o.createComponentVNode)(2,a.Box,{mt:2,textAlign:"center",fontSize:"24px",children:(0,o.createComponentVNode)(2,a.Button,{lineHeight:"40px",icon:"times",content:"Hang Up",color:"bad",onClick:function(){return l("hang_up")}})})]}),(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})]})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.on_network,d=c.on_cooldown,u=c.allowed,s=c.disk,p=c.disk_record,m=c.replay_mode,h=c.loop_mode,f=c.record_mode,C=c.holo_calls,g=void 0===C?[]:C;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Holopad",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"bell",content:d?"AI Presence Requested":"Request AI Presence",disabled:!l||d,onClick:function(){return i("AIrequest")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Communicator",children:(0,o.createComponentVNode)(2,a.Button,{icon:"phone-alt",content:u?"Connect To Holopad":"Call Holopad",disabled:!l,onClick:function(){return i("holocall",{headcall:u})}})}),g.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.connected?"Current Call":"Incoming Call",children:(0,o.createComponentVNode)(2,a.Button,{icon:e.connected?"phone-slash":"phone-alt",content:e.connected?"Disconnect call from "+e.caller:"Answer call from "+e.caller,color:e.connected?"bad":"good",disabled:!l,onClick:function(){return i(e.connected?"disconnectcall":"connectcall",{holopad:e.ref})}})},e.ref)}))]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Holodisk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!s||m||f,onClick:function(){return i("disk_eject")}}),children:!s&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No holodisk"})||(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk Player",children:[(0,o.createComponentVNode)(2,a.Button,{icon:m?"pause":"play",content:m?"Stop":"Replay",selected:m,disabled:f||!p,onClick:function(){return i("replay_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:h?"Looping":"Loop",selected:h,disabled:f||!p,onClick:function(){return i("loop_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"exchange-alt",content:"Change Offset",disabled:!m,onClick:function(){return i("offset")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Recorder",children:[(0,o.createComponentVNode)(2,a.Button,{icon:f?"pause":"video",content:f?"End Recording":"Record",selected:f,disabled:p&&!f||m,onClick:function(){return i("record_mode")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:"Clear Recording",color:"bad",disabled:!p||m||f,onClick:function(){return i("record_clear")}})]})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.HypnoChair=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.HypnoChair=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:480,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Information",backgroundColor:"#450F44",children:"The Enhanced Interrogation Chamber is designed to induce a deep-rooted trance trigger into the subject. Once the procedure is complete, by using the implanted trigger phrase, the authorities are able to ensure immediate and complete obedience and truthfulness."}),(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name?l.occupant.name:"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return c("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Phrase",children:(0,o.createComponentVNode)(2,a.Input,{value:l.trigger,onChange:function(e,t){return c("set_phrase",{phrase:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Interrogate Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.interrogating?"Interrupt Interrogation":"Begin Enhanced Interrogation",onClick:function(){return c("interrogate")}}),1===l.interrogating&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantChair=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.ImplantChair=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:280,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Information",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:l.occupant.name||"No Occupant"}),!!l.occupied&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:0===l.occupant.stat?"good":1===l.occupant.stat?"average":"bad",children:0===l.occupant.stat?"Conscious":1===l.occupant.stat?"Unconcious":"Dead"})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Operations",textAlign:"center",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Door",children:(0,o.createComponentVNode)(2,a.Button,{icon:l.open?"unlock":"lock",color:l.open?"default":"red",content:l.open?"Open":"Closed",onClick:function(){return c("door")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implant Occupant",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"code-branch",content:l.ready?l.special_name||"Implant":"Recharging",onClick:function(){return c("implant")}}),0===l.ready&&(0,o.createComponentVNode)(2,a.Icon,{name:"cog",color:"orange",spin:!0})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants Remaining",children:[l.ready_implants,1===l.replenishing&&(0,o.createComponentVNode)(2,a.Icon,{name:"sync",color:"red",spin:!0})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.InfraredEmitter=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.InfraredEmitter=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.on,u=l.visible;return(0,o.createComponentVNode)(2,i.Window,{width:225,height:110,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Visibility",children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"eye":"eye-slash",content:u?"Visible":"Invisible",selected:u,onClick:function(){return c("visibility")}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Intellicard=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Intellicard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.name,u=l.isDead,s=l.isBraindead,p=l.health,m=l.wireless,h=l.radio,f=l.wiping,C=l.laws,g=void 0===C?[]:C,b=u||s;return(0,o.createComponentVNode)(2,i.Window,{width:500,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:d||"Empty Card",buttons:!!d&&(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:f?"Stop Wiping":"Wipe",disabled:u,onClick:function(){return c("wipe")}}),children:!!d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:b?"bad":"good",children:b?"Offline":"Operation"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Software Integrity",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:p,minValue:0,maxValue:100,ranges:{good:[70,Infinity],average:[50,70],bad:[-Infinity,50]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"signal",content:"Wireless Activity",selected:m,onClick:function(){return c("wireless")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"microphone",content:"Subspace Radio",selected:h,onClick:function(){return c("radio")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Laws",children:g.map((function(e){return(0,o.createComponentVNode)(2,a.BlockQuote,{children:e},e)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Jukebox=void 0;var o=n(0),r=n(16),a=n(34),i=n(1),c=n(3),l=n(2);t.Jukebox=function(e,t){var n=(0,i.useBackend)(t),d=n.act,u=n.data,s=u.active,p=u.track_selected,m=u.track_length,h=u.track_beat,f=u.volume,C=(0,a.flow)([(0,r.sortBy)((function(e){return e.name}))])(u.songs||[]);return(0,o.createComponentVNode)(2,l.Window,{width:370,height:313,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,c.Section,{title:"Song Player",buttons:(0,o.createComponentVNode)(2,c.Button,{icon:s?"pause":"play",content:s?"Stop":"Play",selected:s,onClick:function(){return d("toggle")}}),children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Track Selected",children:(0,o.createComponentVNode)(2,c.Dropdown,{"overflow-y":"scroll",width:"240px",options:C.map((function(e){return e.name})),disabled:s,selected:p||"Select a Track",onSelected:function(e){return d("select_track",{track:e})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Track Length",children:p?m:"No Track Selected"}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Track Beat",children:[p?h:"No Track Selected",1===h?" beat":" beats"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Machine Settings",children:(0,o.createComponentVNode)(2,c.LabeledControls,{justify:"center",children:(0,o.createComponentVNode)(2,c.LabeledControls.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,c.Box,{position:"relative",children:[(0,o.createComponentVNode)(2,c.Knob,{size:3.2,color:f>=50?"red":"green",value:f,unit:"%",minValue:0,maxValue:100,step:1,stepPixelSize:1,disabled:s,onDrag:function(e,t){return d("set_volume",{volume:t})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,position:"absolute",top:"-2px",right:"-22px",color:"transparent",icon:"fast-backward",onClick:function(){return d("set_volume",{volume:"min"})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,position:"absolute",top:"16px",right:"-22px",color:"transparent",icon:"fast-forward",onClick:function(){return d("set_volume",{volume:"max"})}}),(0,o.createComponentVNode)(2,c.Button,{fluid:!0,position:"absolute",top:"34px",right:"-22px",color:"transparent",icon:"undo",onClick:function(){return d("set_volume",{volume:"reset"})}})]})})})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:125,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Box,{children:1===l.waiting&&(0,o.createVNode)(1,"span",null,"Waiting for another device to confirm your request...",16)}),(0,o.createComponentVNode)(2,a.Box,{children:0===l.waiting&&(0,o.createFragment)([!!l.auth_required&&(0,o.createComponentVNode)(2,a.Button,{icon:"check-square",color:"red",textAlign:"center",lineHeight:"60px",fluid:!0,onClick:function(){return c("auth_swipe")},content:"Authorize"}),0===l.auth_required&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",fluid:!0,onClick:function(){return c("red_alert")},content:"Red Alert"}),(0,o.createComponentVNode)(2,a.Button,{icon:"wrench",fluid:!0,onClick:function(){return c("emergency_maint")},content:"Emergency Maintenance Access"}),(0,o.createComponentVNode)(2,a.Button,{icon:"meteor",fluid:!0,onClick:function(){return c("bsa_unlock")},content:"Bluespace Artillery Unlock"})],4)],0)})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaborClaimConsole=void 0;var o=n(0),r=n(19),a=n(1),i=n(3),c=n(2);t.LaborClaimConsole=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.can_go_home,s=d.id_points,p=d.ores,m=d.status_info,h=d.unclaimed_points;return(0,o.createComponentVNode)(2,c.Window,{width:315,height:430,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle controls",children:(0,o.createComponentVNode)(2,i.Button,{content:"Move shuttle",disabled:!u,onClick:function(){return l("move_shuttle")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Points",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unclaimed points",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Claim points",disabled:!h,onClick:function(){return l("claim_points")}}),children:h})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Material values",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Material"}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),p.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,r.toTitleCase)(e.ore)}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,i.Box,{color:"label",inline:!0,children:e.value})})]},e.ore)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LanguageMenu=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.LanguageMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.admin_mode,u=l.is_living,s=l.omnitongue,p=l.languages,m=void 0===p?[]:p,h=l.unknown_languages,f=void 0===h?[]:h;return(0,o.createComponentVNode)(2,i.Window,{title:"Language Menu",width:700,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Known Languages",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:m.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createFragment)([!!u&&(0,o.createComponentVNode)(2,a.Button,{content:e.is_default?"Default Language":"Select as Default",disabled:!e.can_speak,selected:e.is_default,onClick:function(){return c("select_default",{language_name:e.name})}}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return c("grant_language",{language_name:e.name})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Remove",onClick:function(){return c("remove_language",{language_name:e.name})}})],4)],0),children:[e.desc," ","Key: ,",e.key," ",e.can_understand?"Can understand.":"Cannot understand."," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})}),!!d&&(0,o.createComponentVNode)(2,a.Section,{title:"Unknown Languages",buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Omnitongue "+(s?"Enabled":"Disabled"),selected:s,onClick:function(){return c("toggle_omnitongue")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:f.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{content:"Grant",onClick:function(){return c("grant_language",{language_name:e.name})}}),children:[e.desc," ","Key: ,",e.key," ",!!e.shadow&&"(gained from mob)"," ",e.can_speak?"Can speak.":"Cannot speak."]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaunchpadRemote=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(181);t.LaunchpadRemote=function(e,t){var n=(0,r.useBackend)(t).data,l=n.has_pad,d=n.pad_closed;return(0,o.createComponentVNode)(2,i.Window,{title:"Briefcase Launchpad Remote",width:300,height:240,theme:"syndicate",children:(0,o.createComponentVNode)(2,i.Window.Content,{children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No Launchpad Connected"})||d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Launchpad Closed"})||(0,o.createComponentVNode)(2,c.LaunchpadControl,{topLevel:!0})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MafiaPanel=void 0;var o=n(0),r=n(6),a=(n(19),n(1)),i=n(3),c=n(2);t.MafiaPanel=function(e,t){var n=(0,a.useBackend)(t),d=n.act,u=n.data,s=u.lobbydata,p=u.players,m=u.actions,h=u.phase,f=u.roleinfo,C=u.role_theme,g=u.admin_controls,b=u.judgement_phase,N=u.timeleft,v=u.all_roles,V=f?30*p.length:7,y=s?s.filter((function(e){return"Ready"===e.status})):null;return(0,o.createComponentVNode)(2,c.Window,{title:"Mafia",theme:C,width:650,height:293+V,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:g,children:[!f&&(0,o.createComponentVNode)(2,i.Flex,{scrollable:!0,overflowY:"scroll",direction:"column",height:"100%",grow:1,children:(0,o.createComponentVNode)(2,i.Section,{title:"Lobby",mb:1,buttons:(0,o.createComponentVNode)(2,l,{phase:h,timeleft:N,admin_controls:g}),children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{info:!0,children:["The lobby currently has ",y.length,"/12 valid players signed up."]}),(0,o.createComponentVNode)(2,i.Flex,{direction:"column",children:!!s&&s.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{basis:2,className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,i.Flex,{height:2,align:"center",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:0,children:e.name}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:"STATUS:"}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Box,{color:"Ready"===e.status?"green":"red",textAlign:"center",children:[e.status," ",e.spectating]})})})]})},e)}))})]})})}),!!f&&(0,o.createComponentVNode)(2,i.Section,{title:h,minHeight:"100px",maxHeight:"50px",buttons:(0,o.createComponentVNode)(2,i.Box,{children:[!!g&&(0,o.createComponentVNode)(2,i.Button,{color:"red",icon:"gavel",tooltipPosition:"bottom-left",tooltip:"Hello admin! If it is the admin controls you seek,\nplease notice the extra scrollbar you have that players\ndo not!"})," ",(0,o.createComponentVNode)(2,i.TimeDisplay,{auto:"down",value:N})]}),children:(0,o.createComponentVNode)(2,i.Flex,{justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{align:"center",textAlign:"center",maxWidth:"500px",children:[(0,o.createVNode)(1,"b",null,[(0,o.createTextVNode)("You are the "),f.role],0),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"b",null,f.desc,0)]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Box,{className:(0,r.classes)(["mafia32x32",f.revealed_icon]),style:{transform:"scale(2) translate(0px, 10%)","vertical-align":"middle"}}),(0,o.createComponentVNode)(2,i.Box,{className:(0,r.classes)(["mafia32x32",f.hud_icon]),style:{transform:"scale(2) translate(-5px, -5px)","vertical-align":"middle"}})]})]})}),(0,o.createComponentVNode)(2,i.Flex,{children:!!m&&m.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return d("mf_action",{atype:e})},children:e})},e)}))}),!!f&&(0,o.createComponentVNode)(2,i.Section,{title:"Judgement",buttons:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"info",tooltipPosition:"left",tooltip:"When someone is on trial, you are in charge of their fate.\nInnocent winning means the person on trial can live to see\nanother day... and in losing they do not. You can go back\nto abstaining with the middle button if you reconsider."}),children:[(0,o.createComponentVNode)(2,i.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"smile-beam",content:"INNOCENT!",color:"good",disabled:!b,onClick:function(){return d("vote_innocent")}}),!b&&(0,o.createComponentVNode)(2,i.Box,{children:"There is nobody on trial at the moment."}),!!b&&(0,o.createComponentVNode)(2,i.Box,{children:"It is now time to vote, vote the accused innocent or guilty!"}),(0,o.createComponentVNode)(2,i.Button,{icon:"angry",content:"GUILTY!",color:"bad",disabled:!b,onClick:function(){return d("vote_guilty")}})]}),(0,o.createComponentVNode)(2,i.Flex,{justify:"center",children:(0,o.createComponentVNode)(2,i.Button,{icon:"meh",content:"Abstain",color:"white",disabled:!b,onClick:function(){return d("vote_abstain")}})})]}),"No Game"!==h&&(0,o.createComponentVNode)(2,i.Flex,{spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:2,children:(0,o.createComponentVNode)(2,i.Section,{title:"Players",buttons:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"info",tooltip:"This is the list of all the players in\nthe game, during the day phase you may vote on them and,\ndepending on your role, select players\nat certain phases to use your ability."}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",children:!!p&&p.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{height:"30px",className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,i.Flex,{height:"18px",justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:16,children:[!!e.alive&&(0,o.createComponentVNode)(2,i.Box,{children:e.name}),!e.alive&&(0,o.createComponentVNode)(2,i.Box,{color:"red",children:e.name})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:!e.alive&&(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"DEAD"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:e.votes!==undefined&&!!e.alive&&(0,o.createFragment)([(0,o.createTextVNode)("Votes : "),e.votes,(0,o.createTextVNode)(" ")],0)}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:!!e.actions&&e.actions.map((function(t){return(0,o.createComponentVNode)(2,i.Button,{onClick:function(){return d("mf_targ_action",{atype:t,target:e.ref})},children:t},t)}))})]})},e.ref)}))})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:2,children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,i.Section,{title:"Roles and Notes",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"address-book",tooltipPosition:"bottom-left",tooltip:"The top section is the roles in the game. You can\npress the question mark to get a quick blurb\nabout the role itself."}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"edit",tooltipPosition:"bottom-left",tooltip:"The bottom section are your notes. on some roles this\nwill just be an empty box, but on others it records the\nactions of your abilities (so for example, your\ndetective work revealing a changeling)."})],4),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",children:!!v&&v.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{height:"30px",className:"Section__title candystripe",children:(0,o.createComponentVNode)(2,i.Flex,{height:"18px",align:"center",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:e}),(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"question",onClick:function(){return d("mf_lookup",{atype:e.slice(0,-3)})}})})]})},e)}))})}),!!f&&(0,o.createComponentVNode)(2,i.Flex.Item,{height:0,grow:1,children:(0,o.createComponentVNode)(2,i.Section,{scrollable:!0,fill:!0,overflowY:"scroll",children:f!==undefined&&!!f.action_log&&f.action_log.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:e},e)}))})})]})})]}),(0,o.createComponentVNode)(2,i.Flex,{mt:1,direction:"column",children:(0,o.createComponentVNode)(2,i.Flex.Item,{children:!!g&&(0,o.createComponentVNode)(2,i.Section,{textAlign:"center",children:(0,o.createComponentVNode)(2,i.Collapsible,{title:"ADMIN CONTROLS",color:"red",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",color:"black",tooltipPosition:"top",tooltip:"Almost all of these are all built to help me debug\nthe game (ow, debugging a 12 player game!) So they are\nrudamentary and prone to breaking at the drop of a hat.\nMake sure you know what you're doing when you press one.\nAlso because an admin did it: do not gib/delete/dust\nanyone! It will runtime the game to death!",content:"A Kind, Coder Warning",onClick:function(){return d("next_phase")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",tooltipPosition:"top",tooltip:"This will advance the game to the next phase\n(day talk > day voting, day voting > night/trial)\npretty fun to just spam this and freak people out,\ntry that roundend!",content:"Next Phase",onClick:function(){return d("next_phase")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"home",tooltipPosition:"top",tooltip:"Hopefully you won't use this button\noften, it's a safety net just in case\nmafia players somehow escape (nullspace\nredirects to the error room then station)\nEither way, VERY BAD IF THAT HAPPENS as\ngodmoded assistants will run free. Use\nthis to recollect them then make a bug report.",content:"Send All Players Home",onClick:function(){return d("players_home")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",tooltipPosition:"top",tooltip:"This immediately ends the game, and attempts to start\nanother. Nothing will happen if another\ngame fails to start!",content:"New Game",onClick:function(){return d("new_game")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"skull",tooltipPosition:"top",tooltip:"Deletes the datum, clears all landmarks, makes mafia\nas it was roundstart: nonexistant. Use this if you\nreally mess things up. You did mess things up, didn't you.",content:"Nuke",onClick:function(){return d("nuke")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"paint-brush",tooltipPosition:"top",tooltip:"This is the custom game creator, it is... simple.\nYou put in roles and until you press CANCEL or FINISH\nit will keep letting you add more roles. Assitants\non the bottom because of pathing stuff. Resets after\nthe round finishes back to 12 player random setups.",content:"Create Custom Setup",onClick:function(){return d("debug_setup")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"paint-roller",tooltipPosition:"top",tooltip:"If you messed up and accidently didn't make it how\nyou wanted, simply just press this to reset it. The game\nwill auto reset after each game as well.",content:"Reset Custom Setup",onClick:function(){return d("cancel_setup")}})]})})})})]})})};var l=function(e,t){var n=(0,a.useBackend)(t),r=n.act,c=n.data,l=c.phase,d=c.timeleft,u=c.admin_controls;return(0,o.createComponentVNode)(2,i.Box,{children:["[Phase = ",l," | ",(0,o.createComponentVNode)(2,i.TimeDisplay,{auto:"down",value:d}),"]"," ",(0,o.createComponentVNode)(2,i.Button,{icon:"clipboard-check",tooltipPosition:"bottom-left",tooltip:"Signs you up for the next game. If there\nis an ongoing one, you will be signed up\nfor the next.",content:"Sign Up",onClick:function(){return r("mf_signup")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",tooltipPosition:"bottom-left",tooltip:"Spectates games until you turn it off.\nAutomatically enabled when you die in game,\nbecause I assumed you would want to see the\nconclusion. You won't get messages if you\nrejoin SS13.",content:"Spectate",onClick:function(){return r("mf_spectate")}}),!!u&&(0,o.createComponentVNode)(2,i.Button,{color:"red",icon:"gavel",tooltipPosition:"bottom-left",tooltip:"Hello admin! If it is the admin controls you seek,\nplease notice the scrollbar you have that players\ndo not!"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.MalfunctionModulePicker=void 0;var o=n(0),r=n(1),a=n(2),i=n(128);t.MalfunctionModulePicker=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.processingTime);return(0,o.createComponentVNode)(2,a.Window,{width:620,height:525,theme:"malfunction",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.GenericUplink,{currencyAmount:c,currencySymbol:"PT"})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayPowerConsole=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.MechBayPowerConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.recharge_port,d=l&&l.mech,u=d&&d.cell;return(0,o.createComponentVNode)(2,i.Window,{width:400,height:200,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Sync",onClick:function(){return c("reconnect")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:d.health/d.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No power port detected. Please re-sync."})||!d&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No mech detected."})||!u&&(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,a.ProgressBar,{value:u.charge/u.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u.charge})," / "+u.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalKiosk=void 0;var o=n(0),r=(n(19),n(1)),a=n(3),i=n(2);t.MedicalKiosk=function(e,t){var n=(0,r.useBackend)(t),m=(n.act,n.data),h=(0,r.useSharedState)(t,"scanIndex")[0],f=m.active_status_1,C=m.active_status_2,g=m.active_status_3,b=m.active_status_4;return(0,o.createComponentVNode)(2,i.Window,{width:575,height:420,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,c,{index:1,icon:"procedures",name:"General Health Scan",description:"Reads back exact values of your general health scan."}),(0,o.createComponentVNode)(2,c,{index:2,icon:"heartbeat",name:"Symptom Based Checkup",description:"Provides information based on various non-obvious symptoms,\nlike blood levels or disease status."}),(0,o.createComponentVNode)(2,c,{index:3,icon:"radiation-alt",name:"Neurological/Radiological Scan",description:"Provides information about brain trauma and radiation."}),(0,o.createComponentVNode)(2,c,{index:4,icon:"mortar-pestle",name:"Chemical and Psychoactive Scan",description:"Provides a list of consumed chemicals, as well as potential\nside effects."})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l)})]}),!!f&&1===h&&(0,o.createComponentVNode)(2,d),!!C&&2===h&&(0,o.createComponentVNode)(2,u),!!g&&3===h&&(0,o.createComponentVNode)(2,s),!!b&&4===h&&(0,o.createComponentVNode)(2,p)]})})};var c=function(e,t){var n=e.index,i=e.name,c=e.description,l=e.icon,d=(0,r.useBackend)(t),u=d.act,s=d.data,p=(0,r.useSharedState)(t,"scanIndex"),m=p[0],h=p[1],f=s["active_status_"+n];return(0,o.createComponentVNode)(2,a.Flex,{spacing:1,align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:"16px",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:f?"check":"dollar-sign",color:f?"green":"grey"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:l,selected:f&&m===n,tooltip:c,tooltipPosition:"right",content:i,onClick:function(){f||u("beginScan_"+n),h(n)}})})]})},l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.kiosk_cost,d=c.patient_name;return(0,o.createComponentVNode)(2,a.Section,{minHeight:"100%",children:[(0,o.createComponentVNode)(2,a.Box,{italic:!0,children:["Greetings Valued Employee! Please select a desired automatic health check procedure. Diagnosis costs ",(0,o.createVNode)(1,"b",null,[l,(0,o.createTextVNode)(" credits.")],0)]}),(0,o.createComponentVNode)(2,a.Box,{mt:1,children:[(0,o.createComponentVNode)(2,a.Box,{inline:!0,color:"label",mr:1,children:"Patient:"}),d]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,tooltip:"Resets the current scanning target, cancelling current scans.",icon:"sync",color:"average",onClick:function(){return i("clearTarget")},content:"Reset Scanner"})]})},d=function(e,t){var n=(0,r.useBackend)(t).data,i=n.patient_health,c=n.brute_health,l=n.burn_health,d=n.suffocation_health,u=n.toxin_health;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i}),"%"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:l/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:l})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:d/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})})})]})})},u=function(e,t){var n=(0,r.useBackend)(t).data,i=n.patient_status,c=n.patient_illness,l=n.illness_info,d=n.bleed_status,u=n.blood_levels,s=n.blood_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Symptom Based Checkup",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Patient Status",color:"good",children:i}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease Status",children:c}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disease information",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Levels",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:u/100,color:"bad",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:u})}),(0,o.createComponentVNode)(2,a.Box,{mt:1,color:"label",children:d})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Information",children:s})]})})},s=function(e,t){var n=(0,r.useBackend)(t).data,i=n.clone_health,c=n.brain_damage,l=n.brain_health,d=n.rad_contamination_status,u=n.rad_contamination_value,s=n.rad_sickness_status,p=n.rad_sickness_value,m=n.trauma_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Patient Neurological and Radiological Health",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cellular Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:i/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:i})})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Damage",children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:c/100,color:"good",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:c})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Status",color:"health-0",children:l}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brain Trauma Status",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Status",children:s}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Sickness Percentage",children:[p,"%"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Status",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Radiation Contamination Percentage",children:[u,"%"]})]})})},p=function(e,t){var n=(0,r.useBackend)(t).data,i=n.chemical_list,c=void 0===i?[]:i,l=n.overdose_list,d=void 0===l?[]:l,u=n.addict_list,s=void 0===u?[]:u,p=n.hallucinating_status;return(0,o.createComponentVNode)(2,a.Section,{title:"Chemical and Psychoactive Analysis",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Chemical Contents",children:[0===c.length&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"No reagents detected."}),c.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[e.volume," units of ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Overdose Status",color:"bad",children:[0===d.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient is not overdosing."}),d.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Overdosing on ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Addiction Status",color:"bad",children:[0===s.length&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Patient has no addictions."}),s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:["Addicted to ",e.name]},e.id)}))]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Psychoactive Status",children:p})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(6),a=n(1),i=n(3),c=n(2);t.MiningVendor=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=[].concat(d.product_records);return(0,o.createComponentVNode)(2,c.Window,{width:425,height:600,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"User",children:d.user&&(0,o.createComponentVNode)(2,i.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,d.user.name||"Unknown",0),","," ",(0,o.createVNode)(1,"b",null,d.user.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[d.user.points,(0,o.createTextVNode)(" mining points")],0),"."]})||(0,o.createComponentVNode)(2,i.Box,{color:"light-gray",children:["No registered ID card!",(0,o.createVNode)(1,"br"),"Please contact your local HoP!"]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Equipment",children:(0,o.createComponentVNode)(2,i.Table,{children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createVNode)(1,"span",(0,r.classes)(["vending32x32",e.path]),null,1,{style:{"vertical-align":"middle"}})," ",(0,o.createVNode)(1,"b",null,e.name,0)]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{style:{"min-width":"95px","text-align":"center"},disabled:!d.user||e.price>d.user.points,content:e.price+" points",onClick:function(){return l("purchase",{ref:e.ref})}})})]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mint=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.Mint=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,d=l.inserted_materials||[];return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,a.Section,{title:"Materials",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:l.processing?"times":"power-off",content:l.processing?"Stop":"Start",selected:l.processing,onClick:function(){return c(l.processing?"stoppress":"startpress")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.material,buttons:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:l.chosen_material===e.material,onClick:function(){return c("changematerial",{material_name:e.material})}}),children:[e.amount," cm\xb3"]},e.material)}))})}),(0,o.createComponentVNode)(2,a.Section,{children:["Pressed ",l.produced_coins," coins this cycle."]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Mule=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=n(61);t.Mule=function(e,t){var n=(0,r.useBackend)(t),l=n.act,d=n.data,u=d.on,s=d.cell,p=d.cellPercent,m=d.load,h=d.mode,f=d.modeStatus,C=d.haspai,g=d.autoReturn,b=d.autoPickup,N=d.reportDelivery,v=d.destination,V=d.home,y=d.id,k=d.destinations,x=void 0===k?[]:k,_=d.locked&&!d.siliconUser;return(0,o.createComponentVNode)(2,i.Window,{width:350,height:425,children:(0,o.createComponentVNode)(2,i.Window.Content,{children:[(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,a.Section,{title:"Status",minHeight:"110px",buttons:!_&&(0,o.createComponentVNode)(2,a.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return l("power")}}),children:[(0,o.createComponentVNode)(2,a.ProgressBar,{value:s?p/100:0,color:s?"good":"bad"}),(0,o.createComponentVNode)(2,a.Flex,{mt:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",color:f,children:h})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Load",color:m?"good":"average",children:m||"None"})})})]})]}),!_&&(0,o.createComponentVNode)(2,a.Section,{title:"Controls",buttons:(0,o.createFragment)([!!m&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Unload",onClick:function(){return l("unload")}}),!!C&&(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject PAI",onClick:function(){return l("ejectpai")}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,a.Input,{value:y,onChange:function(e,t){return l("setid",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Destination",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:v||"None",options:x,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"stop",content:"Stop",onClick:function(){return l("stop")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"play",content:"Go",onClick:function(){return l("go")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Home",children:[(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:V,options:x,width:"150px",onSelected:function(e){return l("destination",{value:e})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"home",content:"Go Home",onClick:function(){return l("home")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Settings",children:[(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:g,content:"Auto-Return",onClick:function(){return l("autored")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:b,content:"Auto-Pickup",onClick:function(){return l("autopick")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:N,content:"Report Delivery",onClick:function(){return l("report")}})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteChamberControlContent=t.NaniteChamberControl=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.NaniteChamberControl=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:380,height:570,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.status_msg,d=c.locked,u=c.occupant_name,s=c.has_nanites,p=c.nanite_volume,m=c.regen_rate,h=c.safety_threshold,f=c.cloud_id,C=c.scan_level;if(l)return(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:l});var g=c.mob_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Chamber: "+u,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"lock":"lock-open",content:d?"Locked":"Unlocked",color:d?"bad":"default",onClick:function(){return i("toggle_lock")}}),children:s?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Status",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"exclamation-triangle",content:"Destroy Nanites",color:"bad",onClick:function(){return i("remove_nanites")}}),children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanite Volume",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Growth Rate",children:m})]})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Safety Threshold",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:h,minValue:0,maxValue:500,width:"39px",onChange:function(e,t){return i("set_safety",{value:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cloud ID",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:f,minValue:0,maxValue:100,step:1,stepPixelSize:3,width:"39px",onChange:function(e,t){return i("set_cloud",{value:t})}})})]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Programs",level:2,children:g.map((function(e){var t=e.extra_settings||[],n=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:e.desc}),C>=2&&(0,o.createComponentVNode)(2,a.Grid.Column,{size:.6,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation Status",children:(0,o.createComponentVNode)(2,a.Box,{color:e.activated?"good":"bad",children:e.activated?"Active":"Inactive"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Nanites Consumed",children:[e.use_rate,"/s"]})]})})]}),C>=2&&(0,o.createComponentVNode)(2,a.Grid,{children:[!!e.can_trigger&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Triggers",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:e.trigger_cost}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:e.trigger_cooldown}),!!e.timer_trigger_delay&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[e.timer_trigger_delay," s"]}),!!e.timer_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:[e.timer_trigger," s"]})]})})}),!(!e.timer_restart&&!e.timer_shutdown)&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[e.timer_restart&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:[e.timer_restart," s"]}),e.timer_shutdown&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:[e.timer_shutdown," s"]})]})})})]}),C>=3&&!!e.has_extra_settings&&(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:t.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:e.value},e.name)}))})}),C>=4&&(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:2,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[!!e.activation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:e.activation_code}),!!e.deactivation_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:e.deactivation_code}),!!e.kill_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:e.kill_code}),!!e.can_trigger&&!!e.trigger_code&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:e.trigger_code})]})})}),e.has_rules&&(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Rules",level:2,children:n.map((function(e){return(0,o.createFragment)([e.display,(0,o.createVNode)(1,"br")],0,e.display)}))})})]})]})},e.name)}))})],4):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",textAlign:"center",fontSize:"30px",mb:1,children:"No Nanites Detected"}),(0,o.createComponentVNode)(2,a.Button,{fluid:!0,bold:!0,icon:"syringe",content:" Implant Nanites",color:"green",textAlign:"center",fontSize:"30px",lineHeight:"50px",onClick:function(){return i("nanite_injection")}})],4)})};t.NaniteChamberControlContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteCloudControl=t.NaniteCloudBackupDetails=t.NaniteCloudBackupList=t.NaniteInfoBox=t.NaniteDiskBox=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=function(e,t){var n=(0,r.useBackend)(t).data,i=n.has_disk,c=n.has_program,d=n.disk;return i?c?(0,o.createComponentVNode)(2,l,{program:d}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"Inserted disk has no program"}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No disk inserted"})};t.NaniteDiskBox=c;var l=function(e,t){var n=e.program,r=n.name,i=n.desc,c=n.activated,l=n.use_rate,d=n.can_trigger,u=n.trigger_cost,s=n.trigger_cooldown,p=n.activation_code,m=n.deactivation_code,h=n.kill_code,f=n.trigger_code,C=n.timer_restart,g=n.timer_shutdown,b=n.timer_trigger,N=n.timer_trigger_delay,v=n.extra_settings||[];return(0,o.createComponentVNode)(2,a.Section,{title:r,level:2,buttons:(0,o.createComponentVNode)(2,a.Box,{inline:!0,bold:!0,color:c?"good":"bad",children:c?"Activated":"Deactivated"}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{mr:1,children:i}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.5,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:l}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:s})],4)]})})]}),(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:p}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:h}),!!d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:f})]})})}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart",children:[C," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown",children:[g," s"]}),!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:[b," s"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:[N," s"]})],4)]})})})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Extra Settings",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:v.map((function(e){var t={number:(0,o.createFragment)([e.value,e.unit],0),text:e.value,type:e.value,boolean:e.value?e.true_text:e.false_text};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.name,children:t[e.type]},e.name)}))})})]})};t.NaniteInfoBox=l;var d=function(e,t){var n=(0,r.useBackend)(t),i=n.act;return(n.data.cloud_backups||[]).map((function(e){return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Backup #"+e.cloud_id,textAlign:"center",onClick:function(){return i("set_view",{view:e.cloud_id})}},e.cloud_id)}))};t.NaniteCloudBackupList=d;var u=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,d=c.current_view,u=c.disk,s=c.has_program,p=c.cloud_backup,m=u&&u.can_rule||!1;if(!p)return(0,o.createComponentVNode)(2,a.NoticeBox,{children:"ERROR: Backup not found"});var h=c.cloud_programs||[];return(0,o.createComponentVNode)(2,a.Section,{title:"Backup #"+d,level:2,buttons:!!s&&(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Upload From Disk",color:"good",onClick:function(){return i("upload_program")}}),children:h.map((function(e){var t=e.rules||[];return(0,o.createComponentVNode)(2,a.Collapsible,{title:e.name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return i("remove_program",{program_id:e.id})}}),children:(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,l,{program:e}),(!!m||!!e.has_rules)&&(0,o.createComponentVNode)(2,a.Section,{mt:-2,title:"Rules",level:2,buttons:!!m&&(0,o.createComponentVNode)(2,a.Button,{icon:"plus",content:"Add Rule from Disk",color:"good",onClick:function(){return i("add_rule",{program_id:e.id})}}),children:e.has_rules?t.map((function(t){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"minus-circle",color:"bad",onClick:function(){return i("remove_rule",{program_id:e.id,rule_id:t.id})}})," "+t.display]},t.display)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No Active Rules"})})]})},e.name)}))})};t.NaniteCloudBackupDetails=u;t.NaniteCloudControl=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,p=s.has_disk,m=s.current_view,h=s.new_backup_id;return(0,o.createComponentVNode)(2,i.Window,{width:375,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"Program Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",disabled:!p,onClick:function(){return l("eject")}}),children:(0,o.createComponentVNode)(2,c)}),(0,o.createComponentVNode)(2,a.Section,{title:"Cloud Storage",buttons:m?(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Return",onClick:function(){return l("set_view",{view:0})}}):(0,o.createFragment)(["New Backup: ",(0,o.createComponentVNode)(2,a.NumberInput,{value:h,minValue:1,maxValue:100,stepPixelSize:4,width:"39px",onChange:function(e,t){return l("update_new_backup_value",{value:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"plus",onClick:function(){return l("create_backup")}})],0),children:s.current_view?(0,o.createComponentVNode)(2,u):(0,o.createComponentVNode)(2,d)})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgramHub=void 0;var o=n(0),r=n(16),a=n(1),i=n(3),c=n(2);t.NaniteProgramHub=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.detail_view,s=d.disk,p=d.has_disk,m=d.has_program,h=d.programs,f=void 0===h?{}:h,C=(0,a.useSharedState)(t,"category"),g=C[0],b=C[1],N=f&&f[g]||[];return(0,o.createComponentVNode)(2,c.Window,{width:500,height:700,resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Program Disk",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject",onClick:function(){return l("eject")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"minus-circle",content:"Delete Program",onClick:function(){return l("clear")}})],4),children:p?m?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Program Name",children:s.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:s.desc})]}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Program Installed"}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Insert Disk"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Programs",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:u?"info":"list",content:u?"Detailed":"Compact",onClick:function(){return l("toggle_details")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Sync Research",onClick:function(){return l("refresh")}})],4),children:null!==f?(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{minWidth:"110px",children:(0,o.createComponentVNode)(2,i.Tabs,{vertical:!0,children:(0,r.map)((function(e,t){var n=t.substring(0,t.length-8);return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:t===g,onClick:function(){return b(t)},children:n},t)}))(f)})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:0,children:u?N.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,level:2,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"download",content:"Download",disabled:!p,onClick:function(){return l("download",{program_id:e.id})}}),children:e.desc},e.id)})):(0,o.createComponentVNode)(2,i.LabeledList,{children:N.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"download",content:"Download",disabled:!p,onClick:function(){return l("download",{program_id:e.id})}})},e.id)}))})})]}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No nanite programs are currently researched."})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteProgrammerContent=t.NaniteProgrammer=t.NaniteExtraBoolean=t.NaniteExtraType=t.NaniteExtraText=t.NaniteExtraNumber=t.NaniteExtraEntry=t.NaniteDelays=t.NaniteCodes=void 0;var o=n(0),r=n(1),a=n(3),i=n(2),c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Codes",level:3,mr:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Activation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.activation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"activation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Deactivation",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.deactivation_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"deactivation",code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Kill",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.kill_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"kill",code:t})}})}),!!c.can_trigger&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.trigger_code,width:"47px",minValue:0,maxValue:9999,onChange:function(e,t){return i("set_code",{target_code:"trigger",code:t})}})})]})})};t.NaniteCodes=c;var l=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data;return(0,o.createComponentVNode)(2,a.Section,{title:"Delays",level:3,ml:1,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Restart Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_restart,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_restart_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shutdown Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_shutdown,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_shutdown_timer",{delay:t})}})}),!!c.can_trigger&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Repeat Timer",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_trigger,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_trigger_timer",{delay:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Delay",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:c.timer_trigger_delay,unit:"s",width:"57px",minValue:0,maxValue:3600,onChange:function(e,t){return i("set_timer_trigger_delay",{delay:t})}})})],4)]})})};t.NaniteDelays=l;var d=function(e,t){var n=e.extra_setting,r=n.name,i=n.type,c={number:(0,o.createComponentVNode)(2,u,{extra_setting:n}),text:(0,o.createComponentVNode)(2,s,{extra_setting:n}),type:(0,o.createComponentVNode)(2,p,{extra_setting:n}),boolean:(0,o.createComponentVNode)(2,m,{extra_setting:n})};return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:r,children:c[i]})};t.NaniteExtraEntry=d;var u=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value,d=n.min,u=n.max,s=n.unit;return(0,o.createComponentVNode)(2,a.NumberInput,{value:l,width:"64px",minValue:d,maxValue:u,unit:s,onChange:function(e,t){return i("set_extra_setting",{target_setting:c,value:t})}})};t.NaniteExtraNumber=u;var s=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value;return(0,o.createComponentVNode)(2,a.Input,{value:l,width:"200px",onInput:function(e,t){return i("set_extra_setting",{target_setting:c,value:t})}})};t.NaniteExtraText=s;var p=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value,d=n.types;return(0,o.createComponentVNode)(2,a.Dropdown,{over:!0,selected:l,width:"150px",options:d,onSelected:function(e){return i("set_extra_setting",{target_setting:c,value:e})}})};t.NaniteExtraType=p;var m=function(e,t){var n=e.extra_setting,i=(0,r.useBackend)(t).act,c=n.name,l=n.value,d=n.true_text,u=n.false_text;return(0,o.createComponentVNode)(2,a.Button.Checkbox,{content:l?d:u,checked:l,onClick:function(){return i("set_extra_setting",{target_setting:c})}})};t.NaniteExtraBoolean=m;t.NaniteProgrammer=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:420,height:550,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,h)})})};var h=function(e,t){var n=(0,r.useBackend)(t),i=n.act,u=n.data,s=u.has_disk,p=u.has_program,m=u.name,h=u.desc,f=u.use_rate,C=u.can_trigger,g=u.trigger_cost,b=u.trigger_cooldown,N=u.activated,v=u.has_extra_settings,V=u.extra_settings,y=void 0===V?{}:V;return s?p?(0,o.createComponentVNode)(2,a.Section,{title:m,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return i("eject")}}),children:[(0,o.createComponentVNode)(2,a.Section,{title:"Info",level:2,children:(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:h}),(0,o.createComponentVNode)(2,a.Grid.Column,{size:.7,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Use Rate",children:f}),!!C&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cost",children:g}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Trigger Cooldown",children:b})],4)]})})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Settings",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:N?"power-off":"times",content:N?"Active":"Inactive",selected:N,color:"bad",bold:!0,onClick:function(){return i("toggle_active")}}),children:[(0,o.createComponentVNode)(2,a.Grid,{children:[(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,c)}),(0,o.createComponentVNode)(2,a.Grid.Column,{children:(0,o.createComponentVNode)(2,l)})]}),!!v&&(0,o.createComponentVNode)(2,a.Section,{title:"Special",level:3,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:y.map((function(e){return(0,o.createComponentVNode)(2,d,{extra_setting:e},e.name)}))})})]})]}):(0,o.createComponentVNode)(2,a.Section,{title:"Blank Disk",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject",onClick:function(){return i("eject")}})}):(0,o.createComponentVNode)(2,a.NoticeBox,{textAlign:"center",children:"Insert a nanite program disk"})};t.NaniteProgrammerContent=h},function(e,t,n){"use strict";t.__esModule=!0,t.NaniteRemoteContent=t.NaniteRemote=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.NaniteRemote=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{width:420,height:500,resizable:!0,children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.code,d=c.locked,u=c.mode,s=c.program_name,p=c.relay_code,m=c.comms,h=c.message,f=c.saved_settings,C=void 0===f?[]:f;return d?(0,o.createComponentVNode)(2,a.NoticeBox,{children:"This interface is locked."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Nanite Control",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"lock",content:"Lock Interface",onClick:function(){return i("lock")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:[(0,o.createComponentVNode)(2,a.Input,{value:s,maxLength:14,width:"130px",onChange:function(e,t){return i("update_name",{name:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"save",content:"Save",onClick:function(){return i("save")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:m?"Comm Code":"Signal Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:l,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return i("set_code",{code:t})}})}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Message",children:(0,o.createComponentVNode)(2,a.Input,{value:h,width:"270px",onChange:function(e,t){return i("set_message",{value:t})}})}),"Relay"===u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Relay Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{value:p,minValue:0,maxValue:9999,width:"47px",step:1,stepPixelSize:2,onChange:function(e,t){return i("set_relay_code",{code:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Signal Mode",children:["Off","Local","Targeted","Area","Relay"].map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e,selected:u===e,onClick:function(){return i("select_mode",{mode:e})}},e)}))})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Saved Settings",children:C.length>0?(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"35%",children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{width:"20%",children:"Mode"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Code"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:"Relay"})]}),C.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"candystripe",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,color:"label",children:[e.name,":"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.mode}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.code}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Relay"===e.mode&&e.relay_code}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"upload",color:"good",onClick:function(){return i("load",{save_id:e.id})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"minus",color:"bad",onClick:function(){return i("remove_save",{save_id:e.id})}})]})]},e.id)}))]}):(0,o.createComponentVNode)(2,a.NoticeBox,{children:"No settings currently saved"})})],4)};t.NaniteRemoteContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.NotificationPreferences=void 0;var o=n(0),r=n(1),a=n(3),i=n(2);t.NotificationPreferences=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=(n.data.ignore||[]).sort((function(e,t){var n=e.desc.toLowerCase(),o=t.desc.toLowerCase();return n "+e+"
\n":"'+(n?e:H(e,!0))+"
\n"},t.blockquote=function(e){return""+(n?e:H(e,!0))+"\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"
\n":"
\n"},t.list=function(e,t,n){var o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+""+o+">\n"},t.listitem=function(e){return"\n\n"+e+"\n"+t+"
\n"},t.tablerow=function(e){return"\n"+e+" \n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
":"
"},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=W(this.options.sanitize,this.options.baseUrl,e)))return n;var o='"+n+""},t.image=function(e,t,n){if(null===(e=W(this.options.sanitize,this.options.baseUrl,e)))return n;var o='":">"},t.text=function(e){return e},e}(),G=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),K=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),q=o.defaults,Y=V.unescape,$=function(){function e(e){this.options=e||q,this.options.renderer=this.options.renderer||new U,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new G,this.slugger=new K}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,o,r,a,i,c,l,d,u,s,p,m,h,f,C,g,b,N,v="",V=e.length;for(n=0;n
"+Z(l.message+"",!0)+"";throw l}}return ne.options=ne.setOptions=function(e){return X(ne.defaults,e),ee(ne.defaults),ne},ne.getDefaults=J,ne.defaults=te,ne.use=function(e){var t=X({},e);if(e.renderer&&function(){var n=ne.defaults.renderer||new U,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,a=new Array(r),i=0;i