diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000000..79c4b77c52b
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,13 @@
+[*]
+indent_style = tab
+indent_size = 4
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.yml]
+indent_style = space
+indent_size = 2
+
+[*.py]
+indent_style = space
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000000..0abac7a5338
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,8 @@
+{
+ "recommendations": [
+ "gbasood.byond-dm-language-support",
+ "platymuus.dm-langclient",
+ "EditorConfig.EditorConfig",
+ "dbaeumer.vscode-eslint"
+ ]
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 00000000000..13c253e612b
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,15 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "byond",
+ "request": "launch",
+ "name": "Launch DreamSeeker",
+ "preLaunchTask": "dm: build - ${command:CurrentDME}",
+ "dmb": "${workspaceFolder}/${command:CurrentDMB}"
+ }
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000000..67e90f1d388
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,12 @@
+{
+ "eslint.workingDirectories": [
+ "./tgui"
+ ],
+
+ "workbench.editorAssociations": [
+ {
+ "filenamePattern": "*.dmi",
+ "viewType": "imagePreview.previewEditor"
+ }
+ ]
+}
diff --git a/SpacemanDMM.toml b/SpacemanDMM.toml
new file mode 100644
index 00000000000..b8274722546
--- /dev/null
+++ b/SpacemanDMM.toml
@@ -0,0 +1,2 @@
+[langserver]
+dreamchecker = true
diff --git a/maps/tether/tether-01-surface1.dmm b/_maps/map_files/Tether/tether-01-surface1.dmm
similarity index 99%
rename from maps/tether/tether-01-surface1.dmm
rename to _maps/map_files/Tether/tether-01-surface1.dmm
index 34921d3763f..13a5f5817b6 100644
--- a/maps/tether/tether-01-surface1.dmm
+++ b/_maps/map_files/Tether/tether-01-surface1.dmm
@@ -8629,6 +8629,7 @@
/obj/structure/cable{
icon_state = "4-8"
},
+/obj/item/paicard,
/turf/simulated/floor/tiled,
/area/crew_quarters/locker)
"apO" = (
@@ -14822,6 +14823,7 @@
/obj/effect/floor_decal/corner/lightgrey/border{
dir = 8
},
+/obj/item/paicard,
/turf/simulated/floor/tiled,
/area/crew_quarters/locker/laundry_arrival)
"aAF" = (
diff --git a/maps/tether/tether-02-surface2.dmm b/_maps/map_files/Tether/tether-02-surface2.dmm
similarity index 99%
rename from maps/tether/tether-02-surface2.dmm
rename to _maps/map_files/Tether/tether-02-surface2.dmm
index 0b1407a4697..6d170a61578 100644
--- a/maps/tether/tether-02-surface2.dmm
+++ b/_maps/map_files/Tether/tether-02-surface2.dmm
@@ -8340,6 +8340,7 @@
dir = 4;
pixel_x = -28
},
+/obj/item/book/manual/the_humanized_mice,
/turf/simulated/floor/wood,
/area/rnd/breakroom)
"qW" = (
@@ -17653,6 +17654,7 @@
/obj/structure/table/steel,
/obj/item/stack/medical/splint/ghetto,
/obj/random/technology_scanner,
+/obj/item/book/manual/the_humanized_mice,
/turf/simulated/floor/tiled/techfloor,
/area/maintenance/lower/atmos)
"Ic" = (
@@ -19291,6 +19293,7 @@
/obj/effect/floor_decal/corner/lime/border{
dir = 9
},
+/obj/item/paicard,
/turf/simulated/floor/tiled,
/area/tether/surfacebase/public_garden_two)
"Xk" = (
diff --git a/maps/tether/tether-03-surface3.dmm b/_maps/map_files/Tether/tether-03-surface3.dmm
similarity index 99%
rename from maps/tether/tether-03-surface3.dmm
rename to _maps/map_files/Tether/tether-03-surface3.dmm
index 0b2ec719ef0..cb1b87c4f33 100644
--- a/maps/tether/tether-03-surface3.dmm
+++ b/_maps/map_files/Tether/tether-03-surface3.dmm
@@ -4618,6 +4618,7 @@
dir = 9
},
/obj/effect/floor_decal/steeldecal/steel_decals7,
+/obj/machinery/vending/giftvendor,
/turf/simulated/floor/tiled,
/area/tether/surfacebase/atrium_three)
"ir" = (
@@ -16826,6 +16827,7 @@
icon_state = "bsposter4";
pixel_y = 32
},
+/obj/item/storage/box/freezer,
/turf/simulated/floor/tiled{
icon_state = "techmaint"
},
@@ -20489,9 +20491,8 @@
/obj/structure/table/standard,
/obj/item/defib_kit/jumper_kit,
/obj/item/storage/box/gloves,
-/obj/item/storage/box/bodybags{
- pixel_x = -1;
- pixel_y = -2
+/obj/item/storage/box/masks{
+ pixel_y = 5
},
/turf/simulated/floor/tiled/white,
/area/assembly/robotics)
diff --git a/maps/tether/tether-04-transit.dmm b/_maps/map_files/Tether/tether-04-transit.dmm
similarity index 100%
rename from maps/tether/tether-04-transit.dmm
rename to _maps/map_files/Tether/tether-04-transit.dmm
diff --git a/maps/tether/tether-05-station1.dmm b/_maps/map_files/Tether/tether-05-station1.dmm
similarity index 99%
rename from maps/tether/tether-05-station1.dmm
rename to _maps/map_files/Tether/tether-05-station1.dmm
index 3b32ca6dfa4..445c30eaa80 100644
--- a/maps/tether/tether-05-station1.dmm
+++ b/_maps/map_files/Tether/tether-05-station1.dmm
@@ -5707,6 +5707,7 @@
dir = 4
},
/obj/random/maintenance,
+/obj/item/paicard,
/turf/simulated/floor/plating,
/area/vacant/vacant_library)
"alv" = (
@@ -18488,7 +18489,7 @@
dir = 6
},
/obj/effect/landmark/start{
- name = "Colony Director"
+ name = "Facility Director"
},
/obj/item/storage/secure/safe{
pixel_x = -28
@@ -19859,7 +19860,7 @@
/obj/machinery/door/firedoor/glass,
/obj/machinery/door/airlock/command{
id_tag = "captaindoor";
- name = "Colony Director's Office";
+ name = "Facility Director's Office";
req_access = list(20)
},
/turf/simulated/floor/tiled/dark,
@@ -20315,7 +20316,7 @@
},
/obj/machinery/door/airlock/command{
id_tag = "captaindoor";
- name = "Colony Director's Office";
+ name = "Facility Director's Office";
req_access = list(20)
},
/obj/machinery/door/firedoor/glass,
@@ -20468,7 +20469,7 @@
/obj/structure/table/woodentable,
/obj/machinery/computer/skills,
/obj/item/perfect_tele{
- desc = "Seems absurd, doesn't it? Yet, here we are. This handheld device is capable of producing bluespace teleportation beacons, and can be activated to translocate the user or a target of their choice to any linked beacon. This one is the Colony Director's.";
+ desc = "Seems absurd, doesn't it? Yet, here we are. This handheld device is capable of producing bluespace teleportation beacons, and can be activated to translocate the user or a target of their choice to any linked beacon. This one is the Facility Director's.";
name = "director's translocator"
},
/obj/machinery/atmospherics/unary/vent_scrubber/on{
@@ -20669,7 +20670,7 @@
},
/obj/machinery/door/firedoor/glass,
/obj/machinery/door/airlock/command{
- name = "Colony Director's Quarters";
+ name = "Facility Director's Quarters";
req_access = list(20)
},
/obj/machinery/door/blast/regular{
@@ -20677,7 +20678,7 @@
dir = 4;
icon_state = "pdoor0";
id = "cd-blast";
- name = "Colony Director Lockdown";
+ name = "Facility Director Lockdown";
opacity = 0
},
/obj/structure/disposalpipe/segment{
@@ -20789,7 +20790,7 @@
},
/obj/structure/disposalpipe/segment,
/obj/structure/dogbed{
- desc = "A bed made just for the Colony Director's fox.";
+ desc = "A bed made just for the Facility Director's fox.";
name = "Renault's Bed"
},
/mob/living/simple_mob/animal/passive/fox/renault,
@@ -20829,7 +20830,7 @@
},
/obj/item/card/id/gold/captain/spare,
/obj/machinery/door/window/brigdoor/westright{
- name = "Colony Director's Storage";
+ name = "Facility Director's Storage";
req_access = list(20)
},
/turf/simulated/floor/wood,
@@ -22829,7 +22830,7 @@
"hFL" = (
/obj/machinery/button/remote/blast_door{
id = "cd-blast";
- name = "Colony Director Lockdown"
+ name = "Facility Director Lockdown"
},
/turf/simulated/wall/r_wall,
/area/crew_quarters/captain)
@@ -23808,6 +23809,11 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on,
/turf/simulated/floor,
/area/construction/observation)
+"nXR" = (
+/obj/structure/table/woodentable,
+/obj/item/paicard,
+/turf/simulated/floor/wood,
+/area/hallway/station/atrium)
"nYc" = (
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
@@ -25277,7 +25283,7 @@
},
/obj/structure/window/reinforced,
/obj/machinery/door/window/brigdoor/eastright{
- name = "Colony Director's Voidsuit";
+ name = "Facility Director's Voidsuit";
req_access = list(20)
},
/obj/item/clothing/suit/space/void/captain,
@@ -37080,7 +37086,7 @@ acm
acH
ada
adk
-adm
+nXR
adn
acH
acm
diff --git a/maps/tether/tether-06-station2.dmm b/_maps/map_files/Tether/tether-06-station2.dmm
similarity index 99%
rename from maps/tether/tether-06-station2.dmm
rename to _maps/map_files/Tether/tether-06-station2.dmm
index 2dbd3ab5add..8643641950e 100644
--- a/maps/tether/tether-06-station2.dmm
+++ b/_maps/map_files/Tether/tether-06-station2.dmm
@@ -3239,6 +3239,7 @@
dir = 4
},
/obj/structure/table/woodentable,
+/obj/item/book/manual/the_humanized_mice,
/turf/simulated/floor/wood,
/area/crew_quarters/medbreak)
"ff" = (
@@ -18826,6 +18827,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/on{
dir = 4
},
+/obj/item/paicard,
/turf/simulated/floor/carpet/bcarpet,
/area/tether/station/public_meeting_room)
"Pl" = (
diff --git a/maps/tether/tether-07-station3.dmm b/_maps/map_files/Tether/tether-07-station3.dmm
similarity index 100%
rename from maps/tether/tether-07-station3.dmm
rename to _maps/map_files/Tether/tether-07-station3.dmm
diff --git a/maps/tether/tether-08-mining.dmm b/_maps/map_files/Tether/tether-08-mining.dmm
similarity index 100%
rename from maps/tether/tether-08-mining.dmm
rename to _maps/map_files/Tether/tether-08-mining.dmm
diff --git a/maps/tether/tether-09-solars.dmm b/_maps/map_files/Tether/tether-09-solars.dmm
similarity index 100%
rename from maps/tether/tether-09-solars.dmm
rename to _maps/map_files/Tether/tether-09-solars.dmm
diff --git a/maps/tether/tether-10-colony.dmm b/_maps/map_files/Tether/tether-10-colony.dmm
similarity index 100%
rename from maps/tether/tether-10-colony.dmm
rename to _maps/map_files/Tether/tether-10-colony.dmm
diff --git a/_maps/tether.json b/_maps/tether.json
new file mode 100644
index 00000000000..86fa4466341
--- /dev/null
+++ b/_maps/tether.json
@@ -0,0 +1,89 @@
+{
+ "map_name":"Tether",
+ "map_path":"map_files/tether",
+ "map_file":[
+ "tether-01-surface1.dmm",
+ "tether-02-surface2.dmm",
+ "tether-03-surface3.dmm",
+ "tether-04-transit.dmm",
+ "tether-05-station1.dmm",
+ "tether-06-station2.dmm",
+ "tether-07-station3.dmm",
+ "tether-08-mining.dmm",
+ "tether-09-solars.dmm",
+ "tether-10-colony.dmm"
+ ],
+ "traits":[
+ {
+ "Up":1,
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/simulated/floor/outdoors/grass/sif/virgo3b"
+ },
+ {
+ "Down":-1,
+ "Up":1,
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/simulated/open/virgo3b"
+ },
+ {
+ "Down":-1,
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/simulated/open/virgo3b"
+ },
+ {
+ "Down":-1,
+ "Up":1,
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/simulated/sky/virgo3b"
+ },
+ {
+ "Up":1,
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/space"
+ },
+ {
+ "Up":1,
+ "Down":-1,
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/space"
+ },
+ {
+ "Down":-1,
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/space"
+ },
+ {
+ "Mining":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/simulated/floor/outdoors/grass/sif/virgo3b"
+ },
+ {
+ "Station":true,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/simulated/floor/outdoors/grass/sif/virgo3b"
+ },
+ {
+ "Station":false,
+ "Linkage":null,
+ "Gravity":true,
+ "Baseturf":"/turf/simulated/floor/outdoors/grass/sif/virgo3b"
+ }
+ ],
+ "minetype":"none"
+}
diff --git a/code/__DEFINES/__513_compatibility.dm b/code/__DEFINES/__513_compatibility.dm
deleted file mode 100644
index dcc98df2508..00000000000
--- a/code/__DEFINES/__513_compatibility.dm
+++ /dev/null
@@ -1,54 +0,0 @@
-
-#if DM_VERSION < 513
-
-#define ismovableatom(A) (istype(A, /atom/movable))
-
-#define ismovable(A) ismovableatom(A)
-
-#define islist(L) (istype(L, /list))
-
-#define CLAMP01(x) (CLAMP(x, 0, 1))
-
-#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
-
-#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
-
-#define TAN(x) (sin(x) / cos(x))
-
-#define arctan(x) (arcsin(x/sqrt(1+x*x)))
-
-//////////////////////////////////////////////////
-
-#else
-
-#define ismovableatom(A) ismovable(A)
-
-#define CLAMP01(x) clamp(x, 0, 1)
-
-#define CLAMP(CLVALUE, CLMIN, CLMAX) clamp(CLVALUE, CLMIN, CLMAX)
-
-#define TAN(x) tan(x)
-
-#define ATAN2(x, y) arctan(x, y)
-
-#endif
-
-//Compatability -- These procs were added in 513.1493, not 513.1490
-//Which really shoulda bumped us up to 514 right then and there but instead Lummox is a dumb dumb
-#if DM_BUILD < 1493
-#define length_char(args...) length(args)
-#define text2ascii_char(args...) text2ascii(args)
-#define copytext_char(args...) copytext(args)
-#define splittext_char(args...) splittext(args)
-#define spantext_char(args...) spantext(args)
-#define nonspantext_char(args...) nonspantext(args)
-#define findtext_char(args...) findtext(args)
-#define findtextEx_char(args...) findtextEx(args)
-#define findlasttext_char(args...) findlasttext(args)
-#define findlasttextEx_char(args...) findlasttextEx(args)
-#define replacetext_char(args...) replacetext(args)
-#define replacetextEx_char(args...) replacetextEx(args)
-// /regex procs
-#define Find_char(args...) Find(args)
-#define Replace_char(args...) Replace(args)
-#endif
diff --git a/code/__DEFINES/_planes+layers.dm b/code/__DEFINES/_planes+layers.dm
index c54fbe93ccf..2f0b1a12d92 100644
--- a/code/__DEFINES/_planes+layers.dm
+++ b/code/__DEFINES/_planes+layers.dm
@@ -50,7 +50,6 @@ What is the naming convention for planes or layers?
#define OVER_OPENSPACE_PLANE -57
// Turf Planes
-#define SPACE_PLANE -43 // Space turfs themselves
#define PLATING_PLANE -44 // Plating
#define DISPOSAL_LAYER 2.1 // Under objects, even when planeswapped
#define PIPES_LAYER 2.2 // Under objects, even when planeswapped
diff --git a/code/__DEFINES/controllers/_subsystems.dm b/code/__DEFINES/controllers/_subsystems.dm
index c7a2686cabb..9391b0c2b85 100644
--- a/code/__DEFINES/controllers/_subsystems.dm
+++ b/code/__DEFINES/controllers/_subsystems.dm
@@ -84,6 +84,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
#define INIT_ORDER_CHEMISTRY 18
#define INIT_ORDER_AI -22
#define INIT_ORDER_OPENSPACE -50
+#define INIT_ORDER_PERSISTENCE -95
// Subsystem fire priority, from lowest to highest priority
diff --git a/code/__DEFINES/gamemode.dm b/code/__DEFINES/gamemode.dm
index f437c74c6e9..d01433d7b58 100644
--- a/code/__DEFINES/gamemode.dm
+++ b/code/__DEFINES/gamemode.dm
@@ -77,7 +77,6 @@ var/list/be_special_flags = list(
#define MODE_MONKEY "monkey"
#define MODE_RENEGADE "renegade"
#define MODE_REVOLUTIONARY "revolutionary"
-#define MODE_LOYALIST "loyalist"
#define MODE_MALFUNCTION "malf"
#define MODE_TRAITOR "traitor"
#define MODE_AUTOTRAITOR "autotraitor"
@@ -125,4 +124,4 @@ var/list/be_special_flags = list(
#define Sp_CHARGES "charges"
#define Sp_HOLDVAR "holdervar"
-#define CHANGELING_STASIS_COST 20
\ No newline at end of file
+#define CHANGELING_STASIS_COST 20
diff --git a/code/__DEFINES/items_clothing.dm b/code/__DEFINES/items_clothing.dm
index ffbda3e2989..eeb56232807 100644
--- a/code/__DEFINES/items_clothing.dm
+++ b/code/__DEFINES/items_clothing.dm
@@ -101,8 +101,6 @@
#define slot_r_ear_str "slot_r_ear"
#define slot_belt_str "slot_belt"
#define slot_shoes_str "slot_shoes"
-#define slot_head_str "slot_head"
-#define slot_wear_mask_str "slot_wear_mask"
#define slot_handcuffed_str "slot_handcuffed"
#define slot_legcuffed_str "slot_legcuffed"
#define slot_wear_mask_str "slot_wear_mask"
@@ -197,4 +195,4 @@
// Hair Defines
#define HAIR_VERY_SHORT 0x1
-#define HAIR_TIEABLE 0x4
\ No newline at end of file
+#define HAIR_TIEABLE 0x4
diff --git a/code/__DEFINES/lighting.dm b/code/__DEFINES/lighting.dm
index 6a9bcb6de43..3b99554c389 100644
--- a/code/__DEFINES/lighting.dm
+++ b/code/__DEFINES/lighting.dm
@@ -79,8 +79,8 @@
//Lighting values used by the station lights
#define LIGHT_COLOR_FLUORESCENT_TUBE "#E0EFFF"
#define LIGHT_COLOR_FLUORESCENT_FLASHLIGHT "#CDDDFF"
-#define LIGHT_COLOR_INCANDESCENT_TUBE "#FFFEB8"
-#define LIGHT_COLOR_INCANDESCENT_BULB "#FFDDBB"
+#define LIGHT_COLOR_INCANDESCENT_TUBE "#E0EFF0"
+#define LIGHT_COLOR_INCANDESCENT_BULB "#FFFEB8"
#define LIGHT_COLOR_INCANDESCENT_FLASHLIGHT "#FFCC66"
//Fake ambient occlusion filter
diff --git a/code/__DEFINES/lighting_vr.dm b/code/__DEFINES/lighting_vr.dm
deleted file mode 100644
index 0cd6b060a17..00000000000
--- a/code/__DEFINES/lighting_vr.dm
+++ /dev/null
@@ -1,2 +0,0 @@
-#define LIGHT_COLOR_INCANDESCENT_TUBE "#E0EFF0"
-#define LIGHT_COLOR_INCANDESCENT_BULB "#FFFEB8"
\ No newline at end of file
diff --git a/code/__DEFINES/map.dm b/code/__DEFINES/map.dm
deleted file mode 100644
index fce63b9955c..00000000000
--- a/code/__DEFINES/map.dm
+++ /dev/null
@@ -1,12 +0,0 @@
-// Z-level flags bitfield - Set these flags to determine the z level's purpose
-#define MAP_LEVEL_STATION 0x001 // Z-levels the station exists on
-#define MAP_LEVEL_ADMIN 0x002 // Z-levels for admin functionality (Centcom, shuttle transit, etc)
-#define MAP_LEVEL_CONTACT 0x004 // Z-levels that can be contacted from the station, for eg announcements
-#define MAP_LEVEL_PLAYER 0x008 // Z-levels a character can typically reach
-#define MAP_LEVEL_SEALED 0x010 // Z-levels that don't allow random transit at edge
-#define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump)
-#define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset.
-#define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation.
-
-// Misc map defines.
-#define SUBMAP_MAP_EDGE_PAD 8 // Automatically created submaps are forbidden from being this close to the main map's edge. //VOREStation Edit
\ No newline at end of file
diff --git a/code/__DEFINES/map_vr.dm b/code/__DEFINES/map_vr.dm
deleted file mode 100644
index 3847dc29f9a..00000000000
--- a/code/__DEFINES/map_vr.dm
+++ /dev/null
@@ -1 +0,0 @@
-#define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation.
\ No newline at end of file
diff --git a/code/__DEFINES/maps.dm b/code/__DEFINES/maps.dm
new file mode 100644
index 00000000000..a46756df907
--- /dev/null
+++ b/code/__DEFINES/maps.dm
@@ -0,0 +1,145 @@
+// Z-level flags bitfield - Set these flags to determine the z level's purpose
+#define MAP_LEVEL_STATION 0x001 // Z-levels the station exists on
+#define MAP_LEVEL_ADMIN 0x002 // Z-levels for admin functionality (Centcom, shuttle transit, etc)
+#define MAP_LEVEL_CONTACT 0x004 // Z-levels that can be contacted from the station, for eg announcements
+#define MAP_LEVEL_PLAYER 0x008 // Z-levels a character can typically reach
+#define MAP_LEVEL_SEALED 0x010 // Z-levels that don't allow random transit at edge
+#define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump)
+#define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset.
+#define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation.
+
+// Misc map defines.
+#define SUBMAP_MAP_EDGE_PAD 8 // Automatically created submaps are forbidden from being this close to the main map's edge. //VOREStation Edit
+
+// TG MAP LOADING SYSTEM PENDING
+/*
+The /tg/ codebase allows mixing of hardcoded and dynamically-loaded z-levels.
+Z-levels can be reordered as desired and their properties are set by "traits".
+See map_config.dm for how a particular station's traits may be chosen.
+The list DEFAULT_MAP_TRAITS at the bottom of this file should correspond to
+the maps that are hardcoded, as set in _maps/_basemap.dm. SSmapping is
+responsible for loading every non-hardcoded z-level.
+
+As of 2018-02-04, the typical z-levels for a single-level station are:
+1: CentCom
+2: Station
+3-4: Randomized space
+5: Mining
+6: City of Cogs
+7-11: Randomized space
+12: Empty space
+13: Transit space
+
+Multi-Z stations are supported and multi-Z mining and away missions would
+require only minor tweaks.
+*/
+
+/*
+// helpers for modifying jobs, used in various job_changes.dm files
+#define MAP_JOB_CHECK if(SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) { return; }
+#define MAP_JOB_CHECK_BASE if(SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) { return ..(); }
+#define MAP_REMOVE_JOB(jobpath) /datum/job/##jobpath/map_check() { return (SSmapping.config.map_name != JOB_MODIFICATION_MAP_NAME) && ..() }
+
+#define SPACERUIN_MAP_EDGE_PAD 15
+
+// traits
+// boolean - marks a level as having that property if present
+*/
+#define ZTRAIT_CENTCOM "CentCom"
+#define ZTRAIT_STATION "Station"
+#define ZTRAIT_MINING "Mining"
+/*
+#define ZTRAIT_REEBE "Reebe"
+*/
+#define ZTRAIT_RESERVED "Transit/Reserved"
+#define ZTRAIT_AWAY "Away Mission"
+/*
+#define ZTRAIT_VR "Virtual Reality"
+#define ZTRAIT_SPACE_RUINS "Space Ruins"
+#define ZTRAIT_LAVA_RUINS "Lava Ruins"
+#define ZTRAIT_ICE_RUINS "Ice Ruins"
+#define ZTRAIT_ICE_RUINS_UNDERGROUND "Ice Ruins Underground"
+#define ZTRAIT_ISOLATED_RUINS "Isolated Ruins" //Placing ruins on z levels with this trait will use turf reservation instead of usual placement.
+#define ZTRAIT_VIRTUAL_REALITY "Virtual Reality"
+
+//boolean - weather types that occur on the level
+#define ZTRAIT_SNOWSTORM "Weather_Snowstorm"
+#define ZTRAIT_ASHSTORM "Weather_Ashstorm"
+#define ZTRAIT_ACIDRAIN "Weather_Acidrain"
+*/
+
+// number - bombcap is multiplied by this before being applied to bombs
+#define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier"
+
+// number - default gravity if there's no gravity generators or area overrides present
+#define ZTRAIT_GRAVITY "Gravity"
+
+// numeric offsets - e.g. {"Down": -1} means that chasms will fall to z - 1 rather than oblivion
+#define ZTRAIT_UP "Up"
+#define ZTRAIT_DOWN "Down"
+
+// enum - how space transitions should affect this level
+#define ZTRAIT_LINKAGE "Linkage"
+ // UNAFFECTED if absent - no space transitions
+ #define UNAFFECTED null
+ // SELFLOOPING - space transitions always self-loop
+ #define SELFLOOPING "Self"
+ // CROSSLINKED - mixed in with the cross-linked space pool
+ #define CROSSLINKED "Cross"
+
+// string - type path of the z-level's baseturf (defaults to space)
+#define ZTRAIT_BASETURF "Baseturf"
+
+// default trait definitions, used by SSmapping
+#define ZTRAITS_CENTCOM list(ZTRAIT_CENTCOM = TRUE)
+#define ZTRAITS_STATION list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_STATION = TRUE)
+#define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_SPACE_RUINS = TRUE)
+/*
+#define ZTRAITS_LAVALAND list(\
+ ZTRAIT_MINING = TRUE, \
+ ZTRAIT_ASHSTORM = TRUE, \
+ ZTRAIT_LAVA_RUINS = TRUE, \
+ ZTRAIT_BOMBCAP_MULTIPLIER = 5, \
+ ZTRAIT_BASETURF = /turf/open/lava/smooth/lava_land_surface)
+#define ZTRAITS_REEBE list(ZTRAIT_REEBE = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 0.5)
+#define ZTRAITS_VR list(ZTRAIT_VIRTUAL_REALITY = TRUE, ZTRAIT_AWAY = TRUE)
+*/
+
+#define DL_NAME "name"
+#define DL_TRAITS "traits"
+#define DECLARE_LEVEL(NAME, TRAITS) list(DL_NAME = NAME, DL_TRAITS = TRAITS)
+
+// must correspond to _basemap.dm for things to work correctly
+#define DEFAULT_MAP_TRAITS list(\
+ DECLARE_LEVEL("Base Reserve Level", list(ZTRAIT_RESERVEd = TRUE)),\
+)
+
+/*
+// Camera lock flags
+#define CAMERA_LOCK_STATION 1
+#define CAMERA_LOCK_MINING 2
+#define CAMERA_LOCK_CENTCOM 4
+#define CAMERA_LOCK_REEBE 8
+*/
+
+//Reserved/Transit turf type
+#define RESERVED_TURF_TYPE /turf/open/space/basic //What the turf is when not being used
+
+/*
+//Ruin Generation
+
+#define PLACEMENT_TRIES 100 //How many times we try to fit the ruin somewhere until giving up (really should just swap to some packing algo)
+
+#define PLACE_DEFAULT "random"
+#define PLACE_SAME_Z "same" //On same z level as original ruin
+#define PLACE_SPACE_RUIN "space" //On space ruin z level(s)
+#define PLACE_LAVA_RUIN "lavaland" //On lavaland ruin z levels(s)
+#define PLACE_BELOW "below" //On z levl below - centered on same tile
+#define PLACE_ISOLATED "isolated" //On isolated ruin z level
+//Map type stuff.
+#define MAP_TYPE_STATION "station"
+
+//Random z-levels name defines.
+#define AWAY_MISSION_NAME "Away Mission"
+#define VIRT_REALITY_NAME "Virtual Reality"
+*/
diff --git a/code/__DEFINES/math.dm b/code/__DEFINES/math.dm
index 88c459ba782..c1c26db795b 100644
--- a/code/__DEFINES/math.dm
+++ b/code/__DEFINES/math.dm
@@ -16,7 +16,7 @@
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(world.tick_usage - starting_tickusage))
#define PERCENT(val) (round((val)*100, 0.1))
-#define CLAMP01(x) (CLAMP(x, 0, 1))
+#define CLAMP01(x) (clamp(x, 0, 1))
//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
@@ -30,19 +30,14 @@
// round() acts like floor(x, 1) by default but can't handle other values
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
-#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
-
// Similar to clamp but the bottom rolls around to the top and vice versa. min is inclusive, max is exclusive
#define WRAP(val, min, max) ( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) )
// Real modulus that handles decimals
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
-// Tangent
-#define TAN(x) (sin(x) / cos(x))
-
// Cotangent
-#define COT(x) (1 / TAN(x))
+#define COT(x) (1 / tan(x))
// Secant
#define SEC(x) (1 / cos(x))
@@ -50,8 +45,6 @@
// Cosecant
#define CSC(x) (1 / sin(x))
-#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
-
// Greatest Common Divisor - Euclid's algorithm
/proc/GCD(a, b)
return b ? GCD(b, (a) % (b)) : a
@@ -189,8 +182,8 @@
while(pixel_y < -16)
pixel_y += 32
new_y--
- new_x = CLAMP(new_x, 0, world.maxx)
- new_y = CLAMP(new_y, 0, world.maxy)
+ new_x = clamp(new_x, 0, world.maxx)
+ new_y = clamp(new_y, 0, world.maxy)
return locate(new_x, new_y, starting.z)
// Returns a list where [1] is all x values and [2] is all y values that overlap between the given pair of rectangles
diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm
deleted file mode 100644
index d357f6bbfba..00000000000
--- a/code/__DEFINES/maths.dm
+++ /dev/null
@@ -1,2 +0,0 @@
-// Real modulus that handles decimals
-#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
diff --git a/code/__DEFINES/persistence.dm b/code/__DEFINES/persistence.dm
new file mode 100644
index 00000000000..f1d8285b0ba
--- /dev/null
+++ b/code/__DEFINES/persistence.dm
@@ -0,0 +1,11 @@
+// Direct filename paths
+
+#define PERSISTENCE_FILE_BUNKER_PASSTHROUGH "data/persistence/bunker_passthrough.json"
+
+// Filenames for putting under directories
+
+#define PERSISTENCE_FILENAME_OBJECTS "objects.json"
+
+// Directories
+
+#define PERSISTENCE_MAP_ROOT_DIRECTORY "data/persistence/maps"
diff --git a/code/__DEFINES/spaceman_dmm.dm b/code/__DEFINES/spaceman_dmm.dm
index 05d41206e73..3d4207c5c97 100644
--- a/code/__DEFINES/spaceman_dmm.dm
+++ b/code/__DEFINES/spaceman_dmm.dm
@@ -7,13 +7,13 @@
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
#define UNLINT(X) SpacemanDMM_unlint(X)
#define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X
- #define SHOULD_NOT_SLEEP(X)
- #define SHOULD_BE_PURE(X)
- #define PRIVATE_PROC(X)
- #define PROTECTED_PROC(X)
+ #define SHOULD_NOT_SLEEP(X) set SpacemanDMM_should_not_sleep = X
+ #define SHOULD_BE_PURE(X) set SpacemanDMM_should_be_pure = X
+ #define PRIVATE_PROC(X) set SpacemanDMM_private_proc = X
+ #define PROTECTED_PROC(X) set SpacemanDMM_protected_proc = X
#define VAR_FINAL var/SpacemanDMM_final
- #define VAR_PRIVATE var
- #define VAR_PROTECTED var
+ #define VAR_PRIVATE var/SpacemanDMM_private
+ #define VAR_PROTECTED var/SpacemanDMM_protected
#else
#define RETURN_TYPE(X)
#define SHOULD_CALL_PARENT(X)
diff --git a/code/__DEFINES/spells.dm b/code/__DEFINES/spells.dm
new file mode 100644
index 00000000000..1bc4f76b3ac
--- /dev/null
+++ b/code/__DEFINES/spells.dm
@@ -0,0 +1,22 @@
+//cast_method flags, needs to be up to date with Technomancer's. They were, for some reason, not working outside it.
+#define CAST_USE 1 // Clicking the spell in your hand.
+#define CAST_MELEE 2 // Clicking an atom in melee range.
+#define CAST_RANGED 4 // Clicking an atom beyond melee range.
+#define CAST_THROW 8 // Throwing the spell and hitting an atom.
+#define CAST_COMBINE 16 // Clicking another spell with this spell.
+#define CAST_INNATE 32 // Activates upon verb usage, used for mobs without hands.
+
+//Aspects
+#define ASPECT_FIRE "fire" //Damage over time and raising body-temp. Firesuits protect from this.
+#define ASPECT_FROST "frost" //Slows down the affected, also involves imbedding with icicles. Winter coats protect from this.
+#define ASPECT_SHOCK "shock" //Energy-expensive, usually stuns. Insulated armor protects from this.
+#define ASPECT_AIR "air" //Mostly involves manipulation of atmos, useless in a vacuum. Magboots protect from this.
+#define ASPECT_FORCE "force" //Manipulates gravity to push things away or towards a location.
+#define ASPECT_TELE "tele" //Teleportation of self, other objects, or other people.
+#define ASPECT_DARK "dark" //Makes all those photons vanish using magic-- WITH SCIENCE. Used for sneaky stuff.
+#define ASPECT_LIGHT "light" //The opposite of dark, usually blinds, makes holo-illusions, or makes laser lightshows.
+#define ASPECT_BIOMED "biomed" //Mainly concerned with healing and restoration.
+#define ASPECT_EMP "emp" //Unused now.
+#define ASPECT_UNSTABLE "unstable" //Heavily RNG-based, causes instability to the victim.
+#define ASPECT_CHROMATIC "chromatic" //Used to combine with other spells.
+#define ASPECT_UNHOLY "unholy" //Involves the dead, blood, and most things against divine beings.
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index c159bc9b64f..113bfc55bdd 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -327,8 +327,6 @@
return list("mobs" = mobs, "objs" = objs)
-#define SIGN(X) ((X<0)?-1:1)
-
proc
inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
var/turf/T
@@ -628,4 +626,4 @@ datum/projectile_data
/proc/window_flash(var/client_or_usr)
if (!client_or_usr)
return
- winset(client_or_usr, "mainwindow", "flash=5")
\ No newline at end of file
+ winset(client_or_usr, "mainwindow", "flash=5")
diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm
index f885a35f0d8..aa69e38ccc3 100644
--- a/code/__HELPERS/icons.dm
+++ b/code/__HELPERS/icons.dm
@@ -107,7 +107,7 @@ AngleToHue(hue)
Converts an angle to a hue in the valid range.
RotateHue(hsv, angle)
Takes an HSV or HSVA value and rotates the hue forward through red, green, and blue by an angle from 0 to 360.
- (Rotating red by 60° produces yellow.) The result is another HSV or HSVA color with the same saturation and value
+ (Rotating red by 60� produces yellow.) The result is another HSV or HSVA color with the same saturation and value
as the original, but a different hue.
GrayScale(rgb)
Takes an RGB or RGBA color and converts it to grayscale. Returns an RGB or RGBA string.
@@ -904,9 +904,9 @@ proc/adjust_brightness(var/color, var/value)
if (!value) return color
var/list/RGB = ReadRGB(color)
- RGB[1] = CLAMP(RGB[1]+value,0,255)
- RGB[2] = CLAMP(RGB[2]+value,0,255)
- RGB[3] = CLAMP(RGB[3]+value,0,255)
+ RGB[1] = clamp(RGB[1]+value,0,255)
+ RGB[2] = clamp(RGB[2]+value,0,255)
+ RGB[3] = clamp(RGB[3]+value,0,255)
return rgb(RGB[1],RGB[2],RGB[3])
proc/sort_atoms_by_layer(var/list/atoms)
diff --git a/code/__HELPERS/lists/associations.dm b/code/__HELPERS/lists/associations.dm
index 1fd6e8a66b0..56bcdaf6ba1 100644
--- a/code/__HELPERS/lists/associations.dm
+++ b/code/__HELPERS/lists/associations.dm
@@ -26,6 +26,27 @@
input[input[i]] = null
return input
+/proc/deep_list2params(list/deep_list)
+ var/list/L = list()
+ for(var/i in deep_list)
+ var/key = i
+ if(isnum(key))
+ L += "[key]"
+ continue
+ if(islist(key))
+ key = deep_list2params(key)
+ else if(!istext(key))
+ key = "[REF(key)]"
+ L += "[key]"
+ var/value = deep_list[key]
+ if(!isnull(value))
+ if(islist(value))
+ value = deep_list2params(value)
+ else if(!(istext(key) || isnum(key)))
+ value = "[REF(value)]"
+ L["[key]"] = "[value]"
+ return list2params(L)
+
//takes an input_key, as text, and the list of keys already used, outputting a replacement key in the format of "[input_key] ([number_of_duplicates])" if it finds a duplicate
//use this for lists of things that might have the same name, like mobs or objects, that you plan on giving to a player as input
/proc/avoid_assoc_duplicate_keys(input_key, list/used_key_list)
diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm
index d048e739345..a6390808ecb 100644
--- a/code/__HELPERS/matrices.dm
+++ b/code/__HELPERS/matrices.dm
@@ -52,7 +52,7 @@
/proc/color_rotation(angle)
if(angle == 0)
return color_identity()
- angle = CLAMP(angle, -180, 180)
+ angle = clamp(angle, -180, 180)
var/cos = cos(angle)
var/sin = sin(angle)
@@ -67,7 +67,7 @@
//Makes everything brighter or darker without regard to existing color or brightness
/proc/color_brightness(power)
- power = CLAMP(power, -255, 255)
+ power = clamp(power, -255, 255)
power = power/255
return list(1,0,0, 0,1,0, 0,0,1, power,power,power)
@@ -87,7 +87,7 @@
//Exxagerates or removes brightness
/proc/color_contrast(value)
- value = CLAMP(value, -100, 100)
+ value = clamp(value, -100, 100)
if(value == 0)
return color_identity()
@@ -110,7 +110,7 @@
/proc/color_saturation(value as num)
if(value == 0)
return color_identity()
- value = CLAMP(value, -100, 100)
+ value = clamp(value, -100, 100)
if(value > 0)
value *= 3
var/x = 1 + value / 100
@@ -123,4 +123,4 @@
#undef LUMR
#undef LUMG
-#undef LUMB
\ No newline at end of file
+#undef LUMB
diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm
index 29899ddce13..883a2cf4f25 100644
--- a/code/__HELPERS/time.dm
+++ b/code/__HELPERS/time.dm
@@ -129,3 +129,6 @@ var/round_start_time = 0
if(hour)
hourT = " and [hour] hour[(hour != 1)? "s":""]"
return "[day] day[(day != 1)? "s":""][hourT][minuteT][secondT]"
+
+/proc/daysSince(realtimev)
+ return round((world.realtime - realtimev) / (24 HOURS))
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 7e9d3505ec1..410183604b3 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1441,4 +1441,4 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
if(315)
return "Northwest"
if(337.5)
- return "North-Northwest"
\ No newline at end of file
+ return "North-Northwest"
diff --git a/code/__HELPERS/vector.dm b/code/__HELPERS/vector.dm
index 1cada6122e7..8caa904985b 100644
--- a/code/__HELPERS/vector.dm
+++ b/code/__HELPERS/vector.dm
@@ -1,4 +1,4 @@
-/*
+/*
plot_vector is a helper datum for plotting a path in a straight line towards a target turf.
This datum converts from world space (turf.x and turf.y) to pixel space, which the datum keeps track of itself. This
should work with any size turfs (i.e. 32x32, 64x64) as it references world.icon_size (note: not actually tested with
@@ -6,7 +6,7 @@ anything other than 32x32 turfs).
setup()
This should be called after creating a new instance of a plot_vector datum.
- This does the initial setup and calculations. Since we are travelling in a straight line we only need to calculate
+ This does the initial setup and calculations. Since we are travelling in a straight line we only need to calculate
the vector and x/y steps once. x/y steps are capped to 1 full turf, whichever is further. If we are travelling along
the y axis each step will be +/- 1 y, and the x movement reduced based on the angle (tangent calculation). After
this every subsequent step will be incremented based on these calculations.
@@ -23,22 +23,22 @@ return_angle()
Returns the direction (angle in degrees) the object is travelling in.
(N)
- 90°
+ 90�
^
|
- (W) 180° <--+--> 0° (E)
+ (W) 180� <--+--> 0� (E)
|
v
- -90°
+ -90�
(S)
return_hypotenuse()
- Returns the distance of travel for each step of the vector, relative to each full step of movement. 1 is a full turf
+ Returns the distance of travel for each step of the vector, relative to each full step of movement. 1 is a full turf
length. Currently used as a multiplier for scaling effects that should be contiguous, like laser beams.
return_location()
- Returns a vector_loc datum containing the current location data of the object (see /datum/vector_loc). This includes
- the turf it currently should be at, as well as the pixel offset from the centre of that turf. Typically increment()
+ Returns a vector_loc datum containing the current location data of the object (see /datum/vector_loc). This includes
+ the turf it currently should be at, as well as the pixel offset from the centre of that turf. Typically increment()
would be called before this if you are going to move an object based on it's vector data.
*/
@@ -55,11 +55,11 @@ return_location()
/datum/plot_vector/proc/setup(var/turf/S, var/turf/T, var/xo = 0, var/yo = 0, var/angle_offset=0)
source = S
target = T
-
+
if(!istype(source))
source = get_turf(source)
if(!istype(target))
- target = get_turf(target)
+ target = get_turf(target)
if(!istype(source) || !istype(target))
return
@@ -68,7 +68,7 @@ return_location()
loc_x = source.x * world.icon_size + xo
loc_y = source.y * world.icon_size + yo
loc_z = source.z
-
+
// calculate initial x and y difference
var/dx = target.x - source.x
var/dy = target.y - source.y
@@ -78,7 +78,7 @@ return_location()
return
// calculate the angle
- angle = ATAN2(dx, dy) + angle_offset
+ angle = arctan(dx, dy) + angle_offset
// and some rounding to stop the increments jumping whole turfs - because byond favours certain angles
if(angle > -135 && angle < 45)
@@ -97,7 +97,7 @@ return_location()
offset_y = sign(dy)
else
offset_x = sign(dx)
- offset_y = TAN(angle)
+ offset_y = tan(angle)
if(dx < 0)
offset_y = -offset_y
@@ -125,7 +125,7 @@ return_location()
data.pixel_y = loc_y - (data.loc.y * world.icon_size)
return data
-/*
+/*
vector_loc is a helper datum for returning precise location data from plot_vector. It includes the turf the object is in
as well as the pixel offsets.
diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm
index 62d7af21719..faefbc375c4 100644
--- a/code/_globalvars/misc.dm
+++ b/code/_globalvars/misc.dm
@@ -4,3 +4,5 @@ GLOBAL_VAR_INIT(TAB, " ")
//Loadout stuff
GLOBAL_DATUM_INIT(global_underwear, /datum/category_collection/underwear, new)
+
+GLOBAL_VAR_INIT(internal_tick_usage, 0.2 * world.tick_lag)
diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index e0171c41841..66cff1afebe 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -8,7 +8,7 @@
return
// Things you might plausibly want to follow
- if(ismovableatom(A))
+ if(ismovable(A))
ManualFollow(A)
// Otherwise jump
diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm
index d7323700e4c..4647b83cd71 100644
--- a/code/controllers/configuration/config_entry.dm
+++ b/code/controllers/configuration/config_entry.dm
@@ -103,7 +103,7 @@
return FALSE
var/temp = text2num(trim(str_val))
if(!isnull(temp))
- config_entry_value = CLAMP(integer ? round(temp) : temp, min_val, max_val)
+ config_entry_value = clamp(integer ? round(temp) : temp, min_val, max_val)
if(config_entry_value != temp && !(datum_flags & DF_VAR_EDITED))
log_config("Changing [name] from [temp] to [config_entry_value]!")
return TRUE
diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm
index 1a4a113adfb..eece4b94e79 100644
--- a/code/controllers/configuration/configuration.dm
+++ b/code/controllers/configuration/configuration.dm
@@ -8,10 +8,8 @@
var/list/entries
var/list/entries_by_type
- /*
var/list/maplist
var/datum/map_config/defaultmap
- */
/*
var/list/modes // allowed modes
@@ -53,7 +51,7 @@
for(var/J in legacy_configs)
LoadEntries(J)
break
- //loadmaplist(CONFIG_MAPS_FILE)
+ loadmaplist(CONFIG_MAPS_FILE)
LoadMOTD()
/datum/controller/configuration/proc/full_wipe()
@@ -62,11 +60,9 @@
entries_by_type.Cut()
QDEL_LIST_ASSOC_VAL(entries)
entries = null
- /*
QDEL_LIST_ASSOC_VAL(maplist)
maplist = null
QDEL_NULL(defaultmap)
- */
/datum/controller/configuration/Destroy()
full_wipe()
@@ -266,7 +262,6 @@
if(motd || tm_info)
motd = motd ? "[motd]
[tm_info]" : tm_info
-/*
/datum/controller/configuration/proc/loadmaplist(filename)
log_config("Loading config file [filename]...")
filename = "[directory]/[filename]"
@@ -321,7 +316,6 @@
currentmap = null
else
log_config("Unknown command in map vote config: '[command]'")
-*/
/*
/datum/controller/configuration/proc/pick_mode(mode_name)
diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm
index e08c96c775c..120aa128a89 100644
--- a/code/controllers/configuration/entries/general.dm
+++ b/code/controllers/configuration/entries/general.dm
@@ -1,2 +1,6 @@
/datum/config_entry/flag/minimaps_enabled
config_entry_value = TRUE
+
+/datum/config_entry/number/max_bunker_days
+ config_entry_value = 7
+ min_val = 1
diff --git a/code/controllers/subsystems/dcs.dm b/code/controllers/subsystems/dcs.dm
index d34d6d7bcb4..3243a8d8c88 100644
--- a/code/controllers/subsystems/dcs.dm
+++ b/code/controllers/subsystems/dcs.dm
@@ -7,10 +7,53 @@ PROCESSING_SUBSYSTEM_DEF(dcs)
/datum/controller/subsystem/processing/dcs/Recover()
comp_lookup = SSdcs.comp_lookup
-/datum/controller/subsystem/processing/dcs/proc/GetElement(eletype)
- . = elements_by_type[eletype]
- if(.)
- return
+/datum/controller/subsystem/processing/dcs/proc/GetElement(list/arguments)
+ var/datum/element/eletype = arguments[1]
+ var/element_id = eletype
+
if(!ispath(eletype, /datum/element))
CRASH("Attempted to instantiate [eletype] as a /datum/element")
- . = elements_by_type[eletype] = new eletype
+
+ if(initial(eletype.element_flags) & ELEMENT_BESPOKE)
+ element_id = GetIdFromArguments(arguments)
+
+ . = elements_by_type[element_id]
+ if(.)
+ return
+ . = elements_by_type[element_id] = new eletype
+
+/****
+ * Generates an id for bespoke elements when given the argument list
+ * Generating the id here is a bit complex because we need to support named arguments
+ * Named arguments can appear in any order and we need them to appear after ordered arguments
+ * We assume that no one will pass in a named argument with a value of null
+ **/
+/datum/controller/subsystem/processing/dcs/proc/GetIdFromArguments(list/arguments)
+ var/datum/element/eletype = arguments[1]
+ var/list/fullid = list("[eletype]")
+ var/list/named_arguments = list()
+ for(var/i in initial(eletype.id_arg_index) to length(arguments))
+ var/key = arguments[i]
+ var/value
+ if(istext(key))
+ value = arguments[key]
+ if(!(istext(key) || isnum(key)))
+ if(islist(key)) // CITADEL EDIT
+ key = deep_list2params(key)
+ else
+ key = REF(key)
+ key = "[key]" // Key is stringified so numbers dont break things
+ if(!isnull(value))
+ if(!(istext(value) || isnum(value)))
+ if(islist(value)) // CITADEL EDIT
+ value = deep_list2params(value)
+ else
+ value = REF(value)
+ named_arguments["[key]"] = value
+ else
+ fullid += "[key]"
+
+ if(length(named_arguments))
+ named_arguments = sortList(named_arguments)
+ fullid += named_arguments
+ return list2params(fullid)
diff --git a/code/controllers/subsystems/jobs.dm b/code/controllers/subsystems/jobs.dm
index 58dd49dd265..4640149c489 100644
--- a/code/controllers/subsystems/jobs.dm
+++ b/code/controllers/subsystems/jobs.dm
@@ -467,9 +467,9 @@ SUBSYSTEM_DEF(jobs)
return H.Robotize()
if("AI")
return H
- if("Colony Director")
+ if("Facility Director")
var/sound/announce_sound = (SSticker.current_state <= GAME_STATE_SETTING_UP)? null : sound('sound/misc/boatswain.ogg', volume=20)
- captain_announcement.Announce("All hands, [alt_title ? alt_title : "Colony Director"] [H.real_name] on deck!", new_sound=announce_sound)
+ captain_announcement.Announce("All hands, [alt_title ? alt_title : "Facility Director"] [H.real_name] on deck!", new_sound=announce_sound)
//Deferred item spawning.
if(spawn_in_storage && spawn_in_storage.len)
diff --git a/code/controllers/subsystems/lighting.dm b/code/controllers/subsystems/lighting.dm
index 8817d83ad54..b6782b18db5 100644
--- a/code/controllers/subsystems/lighting.dm
+++ b/code/controllers/subsystems/lighting.dm
@@ -163,4 +163,4 @@ SUBSYSTEM_DEF(lighting)
#undef SSLIGHTING_STAGE_LIGHTS
#undef SSLIGHTING_STAGE_CORNERS
#undef SSLIGHTING_STAGE_OVERLAYS
-#undef SSLIGHTING_STAGE_STATS
\ No newline at end of file
+#undef SSLIGHTING_STAGE_STATS
diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm
index 428d5d5de7f..c9bb7331cea 100644
--- a/code/controllers/subsystems/mapping.dm
+++ b/code/controllers/subsystems/mapping.dm
@@ -4,8 +4,60 @@ SUBSYSTEM_DEF(mapping)
init_order = INIT_ORDER_MAPPING
flags = SS_NO_FIRE
+ /// The current map config datum the round is using
+ var/static/datum/map_config/config
+ /// The next map to load
+ var/static/datum/map_config/next_map_config
+
+ /// Cached map name for statpanel
+ var/static/stat_map_name = "Loading..."
+
+ /// Lookup list for random generated IDs.
+ var/static/list/random_generated_ids_by_original = list()
+ /// next id for separating obfuscated ids.
+ var/static/obfuscation_next_id = 1
+ /// "secret" key
+ var/static/obfuscation_secret
+
+//dlete dis once #39770 is resolved
+/datum/controller/subsystem/mapping/proc/HACK_LoadMapConfig()
+ if(!config)
+#ifdef FORCE_MAP
+ config = load_map_config(FORCE_MAP)
+#else
+ config = load_map_config(error_if_missing = FALSE)
+#endif
+ stat_map_name = config.map_name
+
+/datum/controller/subsystem/mapping/PreInit()
+ if(!obfuscation_secret)
+ obfuscation_secret = md5(GUID()) //HAH! Guess this!
+
+/datum/controller/subsystem/mapping/Initialize(timeofday)
+ HACK_LoadMapConfig()
+ if(subsystem_initialized)
+ return
+ if(config.defaulted)
+ var/old_config = config
+ config = global.config.defaultmap
+ if(!config || config.defaulted)
+ to_chat(world, "Unable to load next or default map config, defaulting to Tethermap")
+ config = old_config
+ return ..()
+
+//
+// Mapping subsystem handles initialization of random map elements at server start
+// On VOREStation that means loading our random roundstart engine!
+//
+/datum/controller/subsystem/mapping
var/list/map_templates = list()
var/dmm_suite/maploader = null
+ var/obj/effect/landmark/engine_loader/engine_loader
+ var/list/shelter_templates = list()
+
+/datum/controller/subsystem/mapping/Recover()
+ flags |= SS_NO_INIT // Make extra sure we don't initialize twice.
+ shelter_templates = SSmapping.shelter_templates
/datum/controller/subsystem/mapping/Initialize(timeofday)
if(subsystem_initialized)
@@ -19,6 +71,13 @@ SUBSYSTEM_DEF(mapping)
if(GLOB.using_map.perform_map_generation())
GLOB.using_map.refresh_mining_turfs()
+ loadEngine()
+ preloadShelterTemplates()
+ // Mining generation probably should be here too
+ // TODO - Other stuff related to maps and areas could be moved here too. Look at /tg
+ if(GLOB.using_map)
+ loadLateMaps()
+ ..()
/datum/controller/subsystem/mapping/proc/load_map_templates()
for(var/T in subtypesof(/datum/map_template))
@@ -28,3 +87,82 @@ SUBSYSTEM_DEF(mapping)
template = new T()
map_templates[template.name] = template
return TRUE
+
+/datum/controller/subsystem/mapping/proc/loadEngine()
+ if(!engine_loader)
+ return // Seems this map doesn't need an engine loaded.
+
+ var/turf/T = get_turf(engine_loader)
+ if(!isturf(T))
+ subsystem_log("[log_info_line(engine_loader)] not on a turf! Cannot place engine template.")
+ return
+
+ // Choose an engine type
+ var/datum/map_template/engine/chosen_type = null
+ if (LAZYLEN(config_legacy.engine_map))
+ var/chosen_name = pick(config_legacy.engine_map)
+ chosen_type = map_templates[chosen_name]
+ if(!istype(chosen_type))
+ log_world("Configured engine map [chosen_name] is not a valid engine map name!")
+ if(!istype(chosen_type))
+ var/list/engine_types = list()
+ for(var/map in map_templates)
+ var/datum/map_template/engine/MT = map_templates[map]
+ if(istype(MT))
+ engine_types += MT
+ chosen_type = pick(engine_types)
+ subsystem_log("Chose Engine Map: [chosen_type.name]")
+ admin_notice("Chose Engine Map: [chosen_type.name]", R_DEBUG)
+
+ // Annihilate movable atoms
+ engine_loader.annihilate_bounds()
+ //CHECK_TICK //Don't let anything else happen for now
+ // Actually load it
+ chosen_type.load(T)
+
+/datum/controller/subsystem/mapping/proc/loadLateMaps()
+ var/list/deffo_load = GLOB.using_map.lateload_z_levels
+ var/list/maybe_load = GLOB.using_map.lateload_single_pick
+
+ for(var/list/maplist in deffo_load)
+ if(!islist(maplist))
+ log_world("Lateload Z level [maplist] is not a list! Must be in a list!")
+ continue
+ for(var/mapname in maplist)
+ var/datum/map_template/MT = map_templates[mapname]
+ if(!istype(MT))
+ log_world("Lateload Z level \"[mapname]\" is not a valid map!")
+ continue
+ MT.load_new_z(centered = FALSE)
+ CHECK_TICK
+
+ if(LAZYLEN(maybe_load))
+ var/picklist = pick(maybe_load)
+
+ if(!picklist) //No lateload maps at all
+ return
+
+ if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
+ log_world("Randompick Z level [picklist] is not a list! Must be in a list!")
+ return
+
+ for(var/map in picklist)
+ var/datum/map_template/MT = map_templates[map]
+ if(!istype(MT))
+ log_world("Randompick Z level \"[map]\" is not a valid map!")
+ else
+ MT.load_new_z(centered = FALSE)
+
+/datum/controller/subsystem/mapping/proc/preloadShelterTemplates()
+ for(var/item in subtypesof(/datum/map_template/shelter))
+ var/datum/map_template/shelter/shelter_type = item
+ if(!(initial(shelter_type.mappath)))
+ continue
+ var/datum/map_template/shelter/S = new shelter_type()
+
+ shelter_templates[S.shelter_id] = S
+
+/datum/controller/subsystem/mapping/stat_entry(msg)
+ if (!Debug2)
+ return // Only show up in stat panel if debugging is enabled.
+ . = ..()
diff --git a/code/controllers/subsystems/mapping_vr.dm b/code/controllers/subsystems/mapping_vr.dm
deleted file mode 100644
index 1194906e272..00000000000
--- a/code/controllers/subsystems/mapping_vr.dm
+++ /dev/null
@@ -1,125 +0,0 @@
-//
-// Mapping subsystem handles initialization of random map elements at server start
-// On VOREStation that means loading our random roundstart engine!
-//
-SUBSYSTEM_DEF(mapping)
- name = "Mapping"
- init_order = INIT_ORDER_MAPPING
- flags = SS_NO_FIRE
-
- var/list/map_templates = list()
- var/dmm_suite/maploader = null
- var/obj/effect/landmark/engine_loader/engine_loader
- var/list/shelter_templates = list()
-
-/datum/controller/subsystem/mapping/Recover()
- flags |= SS_NO_INIT // Make extra sure we don't initialize twice.
- shelter_templates = SSmapping.shelter_templates
-
-/datum/controller/subsystem/mapping/Initialize(timeofday)
- if(subsystem_initialized)
- return
- world.max_z_changed() // This is to set up the player z-level list, maxz hasn't actually changed (probably)
- maploader = new()
- load_map_templates()
-
- if(config_legacy.generate_map)
- // Map-gen is still very specific to the map, however putting it here should ensure it loads in the correct order.
- if(GLOB.using_map.perform_map_generation())
- GLOB.using_map.refresh_mining_turfs()
-
- loadEngine()
- preloadShelterTemplates()
- // Mining generation probably should be here too
- // TODO - Other stuff related to maps and areas could be moved here too. Look at /tg
- if(GLOB.using_map)
- loadLateMaps()
- ..()
-
-/datum/controller/subsystem/mapping/proc/load_map_templates()
- for(var/T in subtypesof(/datum/map_template))
- var/datum/map_template/template = T
- if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritence.
- continue
- template = new T()
- map_templates[template.name] = template
- return TRUE
-
-/datum/controller/subsystem/mapping/proc/loadEngine()
- if(!engine_loader)
- return // Seems this map doesn't need an engine loaded.
-
- var/turf/T = get_turf(engine_loader)
- if(!isturf(T))
- subsystem_log("[log_info_line(engine_loader)] not on a turf! Cannot place engine template.")
- return
-
- // Choose an engine type
- var/datum/map_template/engine/chosen_type = null
- if (LAZYLEN(config_legacy.engine_map))
- var/chosen_name = pick(config_legacy.engine_map)
- chosen_type = map_templates[chosen_name]
- if(!istype(chosen_type))
- log_world("Configured engine map [chosen_name] is not a valid engine map name!")
- if(!istype(chosen_type))
- var/list/engine_types = list()
- for(var/map in map_templates)
- var/datum/map_template/engine/MT = map_templates[map]
- if(istype(MT))
- engine_types += MT
- chosen_type = pick(engine_types)
- subsystem_log("Chose Engine Map: [chosen_type.name]")
- admin_notice("Chose Engine Map: [chosen_type.name]", R_DEBUG)
-
- // Annihilate movable atoms
- engine_loader.annihilate_bounds()
- //CHECK_TICK //Don't let anything else happen for now
- // Actually load it
- chosen_type.load(T)
-
-/datum/controller/subsystem/mapping/proc/loadLateMaps()
- var/list/deffo_load = GLOB.using_map.lateload_z_levels
- var/list/maybe_load = GLOB.using_map.lateload_single_pick
-
- for(var/list/maplist in deffo_load)
- if(!islist(maplist))
- log_world("Lateload Z level [maplist] is not a list! Must be in a list!")
- continue
- for(var/mapname in maplist)
- var/datum/map_template/MT = map_templates[mapname]
- if(!istype(MT))
- log_world("Lateload Z level \"[mapname]\" is not a valid map!")
- continue
- MT.load_new_z(centered = FALSE)
- CHECK_TICK
-
- if(LAZYLEN(maybe_load))
- var/picklist = pick(maybe_load)
-
- if(!picklist) //No lateload maps at all
- return
-
- if(!islist(picklist)) //So you can have a 'chain' of z-levels that make up one away mission
- log_world("Randompick Z level [picklist] is not a list! Must be in a list!")
- return
-
- for(var/map in picklist)
- var/datum/map_template/MT = map_templates[map]
- if(!istype(MT))
- log_world("Randompick Z level \"[map]\" is not a valid map!")
- else
- MT.load_new_z(centered = FALSE)
-
-/datum/controller/subsystem/mapping/proc/preloadShelterTemplates()
- for(var/item in subtypesof(/datum/map_template/shelter))
- var/datum/map_template/shelter/shelter_type = item
- if(!(initial(shelter_type.mappath)))
- continue
- var/datum/map_template/shelter/S = new shelter_type()
-
- shelter_templates[S.shelter_id] = S
-
-/datum/controller/subsystem/mapping/stat_entry(msg)
- if (!Debug2)
- return // Only show up in stat panel if debugging is enabled.
- . = ..()
diff --git a/code/controllers/subsystems/persistence/_persistence.dm b/code/controllers/subsystems/persistence/_persistence.dm
new file mode 100644
index 00000000000..55376fc4e88
--- /dev/null
+++ b/code/controllers/subsystems/persistence/_persistence.dm
@@ -0,0 +1,35 @@
+SUBSYSTEM_DEF(persistence)
+ name = "Persistence"
+ init_order = INIT_ORDER_PERSISTENCE
+ flags = SS_NO_FIRE
+ /// The directory to write to for per-map persistence. If null, the current map shouldn't be persisted to/from.
+ var/current_map_directory
+
+/datum/controller/subsystem/persistence/Initialize()
+ SetMapDirectory()
+ LoadPersistence()
+ return ..()
+
+/datum/controller/subsystem/persistence/Shutdown()
+ SavePersistence()
+ return ..()
+
+/**
+ * Loads all persistent information from disk.
+ */
+/datum/controller/subsystem/persistence/proc/LoadPersistence()
+ return
+
+/**
+ * Saves all persistent information to disk.
+ */
+/datum/controller/subsystem/persistence/proc/SavePersistence()
+ return
+
+/**
+ * Sets our current_map_directory to corrospond to the current map.
+ */
+/datum/controller/subsystem/persistence/proc/SetMapDirectory()
+ if(!SSmapping.config.persistence_id)
+ return // map doesn't support persistence.
+ current_map_directory = "[PERSISTENCE_MAP_ROOT_DIRECTORY]/[SSmapping.config.persistence_id]"
diff --git a/code/controllers/subsystems/persistence/bunker.dm b/code/controllers/subsystems/persistence/bunker.dm
new file mode 100644
index 00000000000..0ad95dc8782
--- /dev/null
+++ b/code/controllers/subsystems/persistence/bunker.dm
@@ -0,0 +1,24 @@
+// Persistent panic bunker passthrough
+/datum/controller/subsystem/persistence/LoadPersistence()
+ LoadPanicBunker()
+ return ..()
+
+/datum/controller/subsystem/persistence/SavePersistence()
+ SavePanicBunker()
+ return ..()
+
+/datum/controller/subsystem/persistence/proc/SavePanicBunker()
+ var/json_file = file(PERSISTENCE_FILE_BUNKER_PASSTHROUGH)
+ var/list/file_data = list()
+ file_data["data"] = GLOB.bunker_passthrough
+ fdel(json_file)
+ WRITE_FILE(json_file,json_encode(file_data))
+
+/datum/controller/subsystem/persistence/proc/LoadPanicBunker()
+ var/bunker_path = file(PERSISTENCE_FILE_BUNKER_PASSTHROUGH)
+ if(fexists(bunker_path))
+ var/list/json = json_decode(file2text(bunker_path))
+ GLOB.bunker_passthrough = json["data"]
+ for(var/ckey in GLOB.bunker_passthrough)
+ if(daysSince(GLOB.bunker_passthrough[ckey]) >= CONFIG_GET(number/max_bunker_days))
+ GLOB.bunker_passthrough -= ckey
diff --git a/code/controllers/subsystems/persistence/objects.dm b/code/controllers/subsystems/persistence/objects.dm
new file mode 100644
index 00000000000..ebb85540514
--- /dev/null
+++ b/code/controllers/subsystems/persistence/objects.dm
@@ -0,0 +1,40 @@
+/datum/controller/subsystem/persistence/LoadPersistence()
+ LoadObjects()
+ return ..()
+
+/datum/controller/subsystem/persistence/SavePersistence()
+ SaveObjects()
+ return ..()
+
+/datum/controller/subsystem/persistence/proc/LoadObjects()
+ if(!current_map_directory)
+ return
+ var/jsonfile = file("[current_map_directory]/[PERSISTENCE_FILENAME_OBJECTS]")
+ if(!jsonfile)
+ return
+ var/list/data = json_decode(file2text(jsonfile))
+ var/datum/element/persistence/P = SSdcs.GetElement(list(/datum/element/persistence))
+ if(!P)
+ to_chat(world, "Persistence subsystem failed to grab the persistence element. !!ALL DATA WILL BE LOST AT ROUND END!!")
+ CRASH("FATAL: COULD NOT GRAB PERSISTENCE ELEMENT FOR OBJECT LOAD.")
+ P.DeserializeAndInstantiateAll(data)
+
+/datum/controller/subsystem/persistence/proc/SaveObjects()
+ if(!current_map_directory)
+ return
+ var/jsonfile = file("[current_map_directory]/[PERSISTENCE_FILENAME_OBJECTS]")
+ var/list/data = GetObjectData()
+ if(!islist(data))
+ to_chat(world, "Persistence subsystem failed to save objects! Object data not modified. ERROR: [data || "!UNKNOWN!"]")
+ CRASH("Unable to get valid object data. [data]")
+ fdel(jsonfile)
+ WRITE_FILE(jsonfile, json_encode(data))
+
+/datum/controller/subsystem/persistence/proc/GetObjectData()
+ var/datum/element/persistence/P = SSdcs.GetElement(list(/datum/element/persistence))
+ if(!P)
+ return "COULD NOT FIND ELEMENT"
+ var/list/returnlist = P.SerializeAll()
+ if(!islist(returnlist))
+ return "DID NOT GET LIST"
+ return returnlist
diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm
index 2ef367df5d3..fa5f57743b4 100644
--- a/code/controllers/subsystems/ticker.dm
+++ b/code/controllers/subsystems/ticker.dm
@@ -391,7 +391,7 @@ SUBSYSTEM_DEF(ticker)
var/captainless=1
for(var/mob/living/carbon/human/player in player_list)
if(player && player.mind && player.mind.assigned_role)
- if(player.mind.assigned_role == "Colony Director")
+ if(player.mind.assigned_role == "Facility Director")
captainless=0
if(!player_is_antag(player.mind, only_offstation_roles = 1))
SSjobs.EquipRank(player, player.mind.assigned_role, 0)
@@ -401,7 +401,7 @@ SUBSYSTEM_DEF(ticker)
if(captainless)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
- to_chat(M, "Colony Directorship not forced on anyone.")
+ to_chat(M, "Facility Directorship not forced on anyone.")
/datum/controller/subsystem/ticker/proc/round_process()
@@ -437,6 +437,10 @@ SUBSYSTEM_DEF(ticker)
if(blackbox)
blackbox.save_all_data_to_sql()
+ send2irc("Server", "A round of [mode.name] just ended.")
+ world.TgsTargetedChatBroadcast("The round has ended.", FALSE)
+
+ SSpersistence.SavePersistence()
ready_for_reboot = TRUE
standard_reboot()
diff --git a/code/datums/components/beetlejuice.dm b/code/datums/components/beetlejuice.dm
index 42123fdef18..8df118565a3 100644
--- a/code/datums/components/beetlejuice.dm
+++ b/code/datums/components/beetlejuice.dm
@@ -10,7 +10,7 @@
var/regex/R
/datum/component/beetlejuice/Initialize()
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
first_heard = list()
@@ -57,4 +57,4 @@
var/atom/movable/AM = parent
do_teleport(AM,get_turf(target))
active = FALSE
- addtimer(VARSET_CALLBACK(src, active, TRUE), cooldown)
\ No newline at end of file
+ addtimer(VARSET_CALLBACK(src, active, TRUE), cooldown)
diff --git a/code/datums/components/edit_complainer.dm b/code/datums/components/edit_complainer.dm
index bf52296e2cb..e2cca2eb50c 100644
--- a/code/datums/components/edit_complainer.dm
+++ b/code/datums/components/edit_complainer.dm
@@ -3,7 +3,7 @@
var/list/say_lines
/datum/component/edit_complainer/Initialize(list/text)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
var/static/list/default_lines = list(
diff --git a/code/datums/components/explodable.dm b/code/datums/components/explodable.dm
index 094dce211d4..b0843229aa7 100644
--- a/code/datums/components/explodable.dm
+++ b/code/datums/components/explodable.dm
@@ -5,7 +5,7 @@
var/light_impact_range = 2
var/flash_range = 3
var/equipped_slot //For items, lets us determine where things should be hit.
-
+
/datum/component/explodable/Initialize(devastation_range_override, heavy_impact_range_override, light_impact_range_override, flash_range_override)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
@@ -13,15 +13,15 @@
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/explodable_attack)
RegisterSignal(parent, COMSIG_TRY_STORAGE_INSERT, .proc/explodable_insert_item)
RegisterSignal(parent, COMSIG_ATOM_EX_ACT, .proc/detonate)
- if(ismovableatom(parent))
+ if(ismovable(parent))
RegisterSignal(parent, COMSIG_MOVABLE_IMPACT, .proc/explodable_impact)
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/explodable_bump)
if(isitem(parent))
RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), .proc/explodable_attack)
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
-
-
+
+
if(devastation_range_override)
devastation_range = devastation_range_override
@@ -45,14 +45,14 @@
/datum/component/explodable/proc/explodable_attack(datum/source, atom/movable/target, mob/living/user)
check_if_detonate(target)
-///Called when you attack a specific body part of the thing this is equipped on. Useful for exploding pants.
+///Called when you attack a specific body part of the thing this is equipped on. Useful for exploding pants.
/datum/component/explodable/proc/explodable_attack_zone(datum/source, damage, damagetype, def_zone)
if(!def_zone)
return
if(damagetype != BURN) //Don't bother if it's not fire.
return
if(!is_hitting_zone(def_zone)) //You didn't hit us! ha!
- return
+ return
detonate()
/datum/component/explodable/proc/on_equip(datum/source, mob/equipper, slot)
@@ -87,7 +87,7 @@
if(I.body_parts_covered & bodypart.body_part)
return TRUE
return FALSE
-
+
/datum/component/explodable/proc/check_if_detonate(target)
if(!isitem(target))
diff --git a/code/datums/components/fantasy/prefixes.dm b/code/datums/components/fantasy/prefixes.dm
index 702ec9329af..7445ab582bf 100644
--- a/code/datums/components/fantasy/prefixes.dm
+++ b/code/datums/components/fantasy/prefixes.dm
@@ -54,7 +54,7 @@
/datum/fantasy_affix/pyromantic/apply(datum/component/fantasy/comp, newName)
var/obj/item/master = comp.parent
- comp.appliedComponents += master.AddComponent(/datum/component/igniter, CLAMP(comp.quality, 1, 10))
+ comp.appliedComponents += master.AddComponent(/datum/component/igniter, clamp(comp.quality, 1, 10))
return "pyromantic [newName]"
/datum/fantasy_affix/vampiric
@@ -65,4 +65,4 @@
/datum/fantasy_affix/vampiric/apply(datum/component/fantasy/comp, newName)
var/obj/item/master = comp.parent
comp.appliedComponents += master.AddComponent(/datum/component/lifesteal, comp.quality)
- return "vampiric [newName]"
\ No newline at end of file
+ return "vampiric [newName]"
diff --git a/code/datums/components/infective.dm b/code/datums/components/infective.dm
index bf39c32f7d6..8d3c6ab81f0 100644
--- a/code/datums/components/infective.dm
+++ b/code/datums/components/infective.dm
@@ -12,8 +12,8 @@
if(expire_in)
expire_time = world.time + expire_in
QDEL_IN(src, expire_in)
-
- if(!ismovableatom(parent))
+
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/try_infect_buckle)
diff --git a/code/datums/components/knockback.dm b/code/datums/components/knockback.dm
index 12a4ae89556..7ff9caa6f4e 100644
--- a/code/datums/components/knockback.dm
+++ b/code/datums/components/knockback.dm
@@ -32,7 +32,7 @@
do_knockback(target, null, angle2dir(Angle))
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
- if(!ismovableatom(target) || throw_dir == null)
+ if(!ismovable(target) || throw_dir == null)
return
var/atom/movable/throwee = target
if(throwee.anchored && !throw_anchored)
@@ -41,4 +41,4 @@
throw_dir = turn(throw_dir, 180)
throw_distance *= -1
var/atom/throw_target = get_edge_target_turf(throwee, throw_dir)
- throwee.safe_throw_at(throw_target, throw_distance, 1, thrower)
\ No newline at end of file
+ throwee.safe_throw_at(throw_target, throw_distance, 1, thrower)
diff --git a/code/datums/components/magnetic_catch.dm b/code/datums/components/magnetic_catch.dm
index 4defe936e5e..20cd8e1d78f 100644
--- a/code/datums/components/magnetic_catch.dm
+++ b/code/datums/components/magnetic_catch.dm
@@ -2,7 +2,7 @@
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
- if(ismovableatom(parent))
+ if(ismovable(parent))
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/crossed_react)
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/uncrossed_react)
for(var/i in get_turf(parent))
diff --git a/code/datums/components/mirage_border.dm b/code/datums/components/mirage_border.dm
index d5d32010cd1..a366f4b822f 100644
--- a/code/datums/components/mirage_border.dm
+++ b/code/datums/components/mirage_border.dm
@@ -14,8 +14,8 @@
var/x = target.x
var/y = target.y
var/z = target.z
- var/turf/southwest = locate(CLAMP(x - (direction & WEST ? range : 0), 1, world.maxx), CLAMP(y - (direction & SOUTH ? range : 0), 1, world.maxy), CLAMP(z, 1, world.maxz))
- var/turf/northeast = locate(CLAMP(x + (direction & EAST ? range : 0), 1, world.maxx), CLAMP(y + (direction & NORTH ? range : 0), 1, world.maxy), CLAMP(z, 1, world.maxz))
+ var/turf/southwest = locate(clamp(x - (direction & WEST ? range : 0), 1, world.maxx), clamp(y - (direction & SOUTH ? range : 0), 1, world.maxy), clamp(z, 1, world.maxz))
+ var/turf/northeast = locate(clamp(x + (direction & EAST ? range : 0), 1, world.maxx), clamp(y + (direction & NORTH ? range : 0), 1, world.maxy), clamp(z, 1, world.maxz))
//holder.vis_contents += block(southwest, northeast) // This doesnt work because of beta bug memes
for(var/i in block(southwest, northeast))
holder.vis_contents += i
diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm
index 3bcbf983f1d..de2e523d88d 100644
--- a/code/datums/components/mood.dm
+++ b/code/datums/components/mood.dm
@@ -199,7 +199,7 @@
// If we're out of the acceptable minimum-maximum range move back towards it in steps of 0.5
// If the new amount would move towards the acceptable range faster then use it instead
if(amount < minimum)
- amount += CLAMP(minimum - sanity, 0, 0.7)
+ amount += clamp(minimum - sanity, 0, 0.7)
else
if(!override && HAS_TRAIT(parent, TRAIT_UNSTABLE))
maximum = sanity
diff --git a/code/datums/components/nanites.dm b/code/datums/components/nanites.dm
index 761d3e47585..2c1a48af0b8 100644
--- a/code/datums/components/nanites.dm
+++ b/code/datums/components/nanites.dm
@@ -154,7 +154,7 @@
return (nanite_volume > 0)
/datum/component/nanites/proc/adjust_nanites(datum/source, amount)
- nanite_volume = CLAMP(nanite_volume + amount, 0, max_nanites)
+ nanite_volume = clamp(nanite_volume + amount, 0, max_nanites)
if(nanite_volume <= 0) //oops we ran out
qdel(src)
@@ -166,7 +166,7 @@
if(remove || stealth)
return //bye icon
var/nanite_percent = (nanite_volume / max_nanites) * 100
- nanite_percent = CLAMP(CEILING(nanite_percent, 10), 10, 100)
+ nanite_percent = clamp(CEILING(nanite_percent, 10), 10, 100)
holder.icon_state = "nanites[nanite_percent]"
/datum/component/nanites/proc/on_emp(datum/source, severity)
@@ -220,16 +220,16 @@
return FALSE
/datum/component/nanites/proc/set_volume(datum/source, amount)
- nanite_volume = CLAMP(amount, 0, max_nanites)
+ nanite_volume = clamp(amount, 0, max_nanites)
/datum/component/nanites/proc/set_max_volume(datum/source, amount)
max_nanites = max(1, max_nanites)
/datum/component/nanites/proc/set_cloud(datum/source, amount)
- cloud_id = CLAMP(amount, 0, 100)
+ cloud_id = clamp(amount, 0, 100)
/datum/component/nanites/proc/set_safety(datum/source, amount)
- safety_threshold = CLAMP(amount, 0, max_nanites)
+ safety_threshold = clamp(amount, 0, max_nanites)
/datum/component/nanites/proc/set_regen(datum/source, amount)
regen_rate = amount
diff --git a/code/datums/components/orbiter.dm b/code/datums/components/orbiter.dm
index 877de444815..df93d87cca0 100644
--- a/code/datums/components/orbiter.dm
+++ b/code/datums/components/orbiter.dm
@@ -22,14 +22,14 @@
/datum/component/orbiter/RegisterWithParent()
. = ..()
var/atom/target = parent
- while(ismovableatom(target))
+ while(ismovable(target))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react)
target = target.loc
/datum/component/orbiter/UnregisterFromParent()
. = ..()
var/atom/target = parent
- while(ismovableatom(target))
+ while(ismovable(target))
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
target = target.loc
@@ -111,12 +111,12 @@
// These are prety rarely activated, how often are you following something in a bag?
if(oldloc && !isturf(oldloc)) // We used to be registered to it, probably
var/atom/target = oldloc
- while(ismovableatom(target))
+ while(ismovable(target))
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
target = target.loc
if(orbited?.loc && orbited.loc != newturf) // We want to know when anything holding us moves too
var/atom/target = orbited.loc
- while(ismovableatom(target))
+ while(ismovable(target))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react, TRUE)
target = target.loc
diff --git a/code/datums/components/plumbing/_plumbing.dm b/code/datums/components/plumbing/_plumbing.dm
index bca95173727..9d4a16ac920 100644
--- a/code/datums/components/plumbing/_plumbing.dm
+++ b/code/datums/components/plumbing/_plumbing.dm
@@ -17,7 +17,7 @@
var/turn_connects = TRUE
/datum/component/plumbing/Initialize(start=TRUE, _turn_connects=TRUE) //turn_connects for wheter or not we spin with the object to change our pipes
- if(parent && !ismovableatom(parent))
+ if(parent && !ismovable(parent))
return COMPONENT_INCOMPATIBLE
var/atom/movable/AM = parent
if(!AM.reagents)
@@ -194,4 +194,4 @@
///input and output, like a holding tank
/datum/component/plumbing/tank
demand_connects = WEST
- supply_connects = EAST
\ No newline at end of file
+ supply_connects = EAST
diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm
index 3690c3374f7..ef5d5a3ca7e 100644
--- a/code/datums/components/riding.dm
+++ b/code/datums/components/riding.dm
@@ -22,7 +22,7 @@
var/del_on_unbuckle_all = FALSE
/datum/component/riding/Initialize()
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/vehicle_mob_buckle)
RegisterSignal(parent, COMSIG_MOVABLE_UNBUCKLE, .proc/vehicle_mob_unbuckle)
diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm
index f5564f99a57..8820813dea9 100644
--- a/code/datums/components/rotation.dm
+++ b/code/datums/components/rotation.dm
@@ -14,7 +14,7 @@
var/default_rotation_direction = ROTATION_CLOCKWISE
/datum/component/simple_rotation/Initialize(rotation_flags = NONE ,can_user_rotate,can_be_rotated,after_rotation)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
//throw if no rotation direction is specificed ?
diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm
index 9209a9d401e..ab32cc8a703 100644
--- a/code/datums/components/squeak.dm
+++ b/code/datums/components/squeak.dm
@@ -17,7 +17,7 @@
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
- if(ismovableatom(parent))
+ if(ismovable(parent))
RegisterSignal(parent, list(COMSIG_MOVABLE_BUMP, COMSIG_MOVABLE_IMPACT), .proc/play_squeak)
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/play_squeak_crossed)
RegisterSignal(parent, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react)
diff --git a/code/datums/components/stationloving.dm b/code/datums/components/stationloving.dm
index 51d67e10e20..65a4d765b88 100644
--- a/code/datums/components/stationloving.dm
+++ b/code/datums/components/stationloving.dm
@@ -5,7 +5,7 @@
var/allow_death = FALSE
/datum/component/stationloving/Initialize(inform_admins = FALSE, allow_death = FALSE)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
RegisterSignal(parent, list(COMSIG_MOVABLE_SECLUDED_LOCATION), .proc/relocate)
diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm
index 57fac5f9b1b..e0e882b4b61 100644
--- a/code/datums/components/storage/storage.dm
+++ b/code/datums/components/storage/storage.dm
@@ -335,8 +335,8 @@
numbered_contents = _process_numerical_display()
adjusted_contents = numbered_contents.len
- var/columns = CLAMP(max_items, 1, screen_max_columns)
- var/rows = CLAMP(CEILING(adjusted_contents / columns, 1), 1, screen_max_rows)
+ var/columns = clamp(max_items, 1, screen_max_columns)
+ var/rows = clamp(CEILING(adjusted_contents / columns, 1), 1, screen_max_rows)
standard_orient_objs(rows, columns, numbered_contents)
//This proc draws out the inventory and places the items on it. It uses the standard position.
diff --git a/code/datums/components/swarming.dm b/code/datums/components/swarming.dm
index c9d20f1f702..16ddc66280e 100644
--- a/code/datums/components/swarming.dm
+++ b/code/datums/components/swarming.dm
@@ -5,7 +5,7 @@
var/list/swarm_members = list()
/datum/component/swarming/Initialize(max_x = 24, max_y = 24)
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
offset_x = rand(-max_x, max_x)
offset_y = rand(-max_y, max_y)
diff --git a/code/datums/components/waddling.dm b/code/datums/components/waddling.dm
index 47ca60c8a19..6549d9fa888 100644
--- a/code/datums/components/waddling.dm
+++ b/code/datums/components/waddling.dm
@@ -3,7 +3,7 @@
/datum/component/waddling/Initialize()
. = ..()
- if(!ismovableatom(parent))
+ if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
if(isliving(parent))
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/LivingWaddle)
diff --git a/code/datums/components/wet_floor.dm b/code/datums/components/wet_floor.dm
index 4eab08fa1a2..3aa3bfdb6b9 100644
--- a/code/datums/components/wet_floor.dm
+++ b/code/datums/components/wet_floor.dm
@@ -178,7 +178,7 @@
/datum/component/wet_floor/proc/_do_add_wet(type, duration_minimum, duration_add, duration_maximum)
var/time = 0
if(LAZYACCESS(time_left_list, "[type]"))
- time = CLAMP(LAZYACCESS(time_left_list, "[type]") + duration_add, duration_minimum, duration_maximum)
+ time = clamp(LAZYACCESS(time_left_list, "[type]") + duration_add, duration_minimum, duration_maximum)
else
time = min(duration_minimum, duration_maximum)
LAZYSET(time_left_list, "[type]", time)
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 12b3df07e48..976c858a57a 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -148,13 +148,24 @@
to_chat(target, txt_changed_vars())
#endif
-///Return a LIST for serialize_datum to encode! Not the actual json!
+/**
+ * Saves our data into a data list.
+ *
+ * @params
+ * * options - associative list of options to use. Not yet particularly used/standardized, but can be easily implemented.
+ */
/datum/proc/serialize_list(list/options)
- CRASH("Attempted to serialize datum [src] of type [type] without serialize_list being implemented!")
+ return list()
-///Accepts a LIST from deserialize_datum. Should return src or another datum.
-/datum/proc/deserialize_list(json, list/options)
- CRASH("Attempted to deserialize datum [src] of type [type] without deserialize_list being implemented!")
+/**
+ * Takes a data list in and loads data into ourselves. Persistence elements currently use this.
+ *
+ * @params
+ * * data - list of data for us to use
+ * * options - associatve list of options to use. Not yet particularly used/standardized, but can be easily implemented.
+ */
+/datum/proc/deserialize_list(list/data, list/options)
+ return list()
///Serializes into JSON. Does not encode type.
/datum/proc/serialize_json(list/options)
diff --git a/code/datums/elements/cleaning.dm b/code/datums/elements/cleaning.dm
index c89c13978f4..b989494c625 100644
--- a/code/datums/elements/cleaning.dm
+++ b/code/datums/elements/cleaning.dm
@@ -1,6 +1,6 @@
/datum/element/cleaning/Attach(datum/target)
. = ..()
- if(!ismovableatom(target))
+ if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/Clean)
diff --git a/code/datums/elements/firestacker.dm b/code/datums/elements/firestacker.dm
index 6f5b4b99666..fa24e3c2d6f 100644
--- a/code/datums/elements/firestacker.dm
+++ b/code/datums/elements/firestacker.dm
@@ -9,7 +9,7 @@
/datum/element/firestacker/Attach(datum/target, amount)
. = ..()
- if(!ismovableatom(target))
+ if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
RegisterSignal(target, COMSIG_MOVABLE_IMPACT, .proc/impact)
if(isitem(target))
diff --git a/code/datums/elements/persistence.dm b/code/datums/elements/persistence.dm
new file mode 100644
index 00000000000..ae175e78330
--- /dev/null
+++ b/code/datums/elements/persistence.dm
@@ -0,0 +1,63 @@
+/**
+ * Simple object persistence elements
+ * For now, it just attachs and detaches and all objects with it are recorded to disk based on map and stuff at round end
+ * Can expand later for more functionality
+ *
+ * WARNING: All atoms recorded are stored to turf! This does not yet support things like loading into inventories. This is mostly for on-floor objects.
+ */
+/datum/element/persistence
+ element_flags = ELEMENT_DETACH
+
+ /// List of persistent atoms. Associated list to their GUID
+ var/list/atom/objects = list()
+
+/**
+ * Serializes all objects into a list for json encode or anything else needed.
+ * Includes data the datum includes in serialize_list(), the GUID of the datum's entry, and its turf location.
+ */
+/datum/element/persistence/proc/SerializeAll()
+ . = list()
+ var/atom/A
+ var/guid
+ for(var/i in objects)
+ A = i
+ guid = objects[A]
+ var/turf/location = get_turf(A)
+ if(!A || !guid || !location)
+ continue
+ var/list/datalist = A.serialize_list()
+ if(!datalist)
+ continue
+ . += list(list(datalist, guid, list(location.x, location.y, location.z), "[A.type]"))
+
+/**
+ * Instantiates all objects from a data list and attaches to them.
+ */
+/datum/element/persistence/proc/DeserializeAndInstantiateAll(list/data)
+ for(var/i in data)
+ var/list/L = i
+ if(!istype(L) || (length(L) < 4))
+ continue
+ var/list/datumdata = L[1]
+ var/guid = L[2]
+ var/coords = L[3]
+ var/datumtype = text2path(L[4])
+ if(!ispath(datumtype))
+ continue
+ var/turf/T = locate(coords[1], coords[2], coords[3])
+ if(!T)
+ continue
+ var/atom/A = new datumtype(T)
+ A.deserialize_list(datumdata)
+ Attach(A, guid)
+
+/datum/element/persistence/Attach(datum/D, guid = GUID())
+ if(!isatom(D))
+ return ELEMENT_INCOMPATIBLE
+ . = ..()
+ if(. == ELEMENT_INCOMPATIBLE)
+ return
+ objects[D] = guid
+
+/datum/element/persistence/Detach(datum/D)
+ objects -= D
diff --git a/code/datums/elements/snail_crawl.dm b/code/datums/elements/snail_crawl.dm
index a3ce8213387..9352ab7beda 100644
--- a/code/datums/elements/snail_crawl.dm
+++ b/code/datums/elements/snail_crawl.dm
@@ -3,7 +3,7 @@
/datum/element/snailcrawl/Attach(datum/target)
. = ..()
- if(!ismovableatom(target))
+ if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
var/P
if(iscarbon(target))
diff --git a/code/datums/position_point_vector.dm b/code/datums/position_point_vector.dm
index c5c392e126d..c26f46beb61 100644
--- a/code/datums/position_point_vector.dm
+++ b/code/datums/position_point_vector.dm
@@ -64,7 +64,7 @@
return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2))
/proc/angle_between_points(datum/point/a, datum/point/b)
- return ATAN2((b.y - a.y), (b.x - a.x))
+ return arctan((b.y - a.y), (b.x - a.x))
/datum/point //A precise point on the map in absolute pixel locations based on world.icon_size. Pixels are FROM THE EDGE OF THE MAP!
var/x = 0
diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm
index 581dc012f8b..763aedb9c8b 100644
--- a/code/datums/progressbar.dm
+++ b/code/datums/progressbar.dm
@@ -39,7 +39,7 @@
shown = 0
client = user.client
- progress = CLAMP(progress, 0, goal)
+ progress = clamp(progress, 0, goal)
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
if (!shown && user.is_preference_enabled(/datum/client_preference/show_progress_bar))
user.client.images += bar
diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm
index 6af79460723..53fe06147cb 100644
--- a/code/datums/recipe.dm
+++ b/code/datums/recipe.dm
@@ -188,7 +188,7 @@
//to decide what to do. They may be used again to make another recipe or discarded, or merged into the results,
//thats no longer the concern of this proc
var/obj/temp = new /obj(src)
- temp.create_reagents(9999999999)
+ temp.create_reagents(1000000000)
//Find items we need
if (items && items.len)
@@ -234,7 +234,7 @@
the single-result's reagents
*/
var/obj/tempholder = new(src)
- tempholder.create_reagents(9999999999)
+ tempholder.create_reagents(100000000)
var/list/results = list()
while (tally < result_quantity)
var/obj/result_obj = new result(container)
diff --git a/code/datums/underwear/bottom.dm b/code/datums/underwear/bottom.dm
index b6270ec4822..4cf2bbfbd5f 100644
--- a/code/datums/underwear/bottom.dm
+++ b/code/datums/underwear/bottom.dm
@@ -72,4 +72,18 @@
/datum/category_item/underwear/bottom/maebari
name = "Maebari"
icon_state = "maebari"
- has_color = TRUE
\ No newline at end of file
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/chastbelt
+ name = "Chastity Belt"
+ icon_state = "chastbelt"
+
+/datum/category_item/underwear/bottom/chastcage
+ name = "Chastity Cage"
+ icon_state = "chastcage"
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/cfishnet_bottom
+ name = "Dyed Fishnets"
+ icon_state = "c_fishnet_lower"
+ has_color = TRUE
diff --git a/code/datums/underwear/socks.dm b/code/datums/underwear/socks.dm
index e1fe7e07f2f..e8a1b8ba3ac 100644
--- a/code/datums/underwear/socks.dm
+++ b/code/datums/underwear/socks.dm
@@ -60,4 +60,13 @@
/datum/category_item/underwear/socks/leggings
name = "Leggings"
- icon_state = "leggings"
\ No newline at end of file
+ icon_state = "leggings"
+
+/datum/category_item/underwear/socks/cfishnet
+ name = "Dyed Fishnet"
+ icon_state = "c_fishnet"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/pantyhose_rip
+ name = "Ripped Pantyhose"
+ icon_state = "pantyhose_ripped"
diff --git a/code/datums/underwear/top.dm b/code/datums/underwear/top.dm
index 28a17c3ab7b..1ce87de2a31 100644
--- a/code/datums/underwear/top.dm
+++ b/code/datums/underwear/top.dm
@@ -70,4 +70,38 @@
/datum/category_item/underwear/top/straplessbinder
name = "Binder Strapless"
- icon_state = "straplessbinder_s"
\ No newline at end of file
+ icon_state = "straplessbinder_s"
+
+/datum/category_item/underwear/top/chastbra
+ name = "Chastity Bra"
+ icon_state = "chastbra"
+
+/datum/category_item/underwear/top/pasties
+ name = "Pasties"
+ icon_state = "pasties"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/pasties_alt
+ name = "Pasties alt, X"
+ icon_state = "pasties_alt"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/babydoll_lingerie
+ name = "Babydoll Lingerie"
+ icon_state = "babydoll_lingerie"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/cfishnet
+ name = "Dyed Fishnet top"
+ icon_state = "c_fishnet_body"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/cfishnet_sleeve
+ name = "Dyed Fishnet with sleeves"
+ icon_state = "c_fishnet_sleeves"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/cfishnet_glove
+ name = "Dyed Fishnet with gloves"
+ icon_state = "c_fishnet_gloves"
+ has_color = TRUE
diff --git a/code/datums/weakref.dm b/code/datums/weakref.dm
index 51716f86fc4..e4e244587a4 100644
--- a/code/datums/weakref.dm
+++ b/code/datums/weakref.dm
@@ -17,6 +17,7 @@
reference = REF(thing)
/datum/weakref/Destroy()
+ . = ..()
return QDEL_HINT_LETMELIVE //Let BYOND autoGC thiswhen nothing is using it anymore.
/datum/weakref/proc/resolve()
diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm
index ca06b87e56c..67730febe80 100644
--- a/code/datums/wires/wires.dm
+++ b/code/datums/wires/wires.dm
@@ -31,7 +31,6 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
src.holder = holder
if(!istype(holder, holder_type))
CRASH("Our holder is null/the wrong type!")
- return
// Generate new wires
if(random)
@@ -126,7 +125,7 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
to_chat(L, "You need wirecutters!")
else if(href_list["pulse"])
- if(istype(I, /obj/item/multitool))
+ if(I.is_multitool())
var/colour = href_list["pulse"]
PulseColour(colour)
playsound(holder, 'sound/weapons/empty.ogg', 20, 1)
@@ -150,13 +149,13 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown"
to_chat(L, "You need a remote signaller!")
else if(href_list["rename"]) //add the ability to rename doors via multitool
- if(istype(I, /obj/item/multitool))
+ if(I.is_multitool())
RenameDoor(src)
else
to_chat(L, "You need a multitool!")
else if(href_list["description"]) // and describe them!
- if(istype(I, /obj/item/multitool))
+ if(I.is_multitool())
DescribeDoor(src)
else
to_chat(L, "You need a multitool!")
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 86050023ab3..d5ed5c5bb21 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -87,7 +87,7 @@ var/global/list/PDA_Manifest = list()
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
depthead = 1
- if(rank=="Colony Director" && heads.len != 1)
+ if(rank=="Facility Director" && heads.len != 1)
heads.Swap(1,heads.len)
if(real_rank in security_positions)
diff --git a/code/defines/procs/AStar.dm b/code/defines/procs/AStar.dm
index 34d5bb74f2d..f9403bedea7 100644
--- a/code/defines/procs/AStar.dm
+++ b/code/defines/procs/AStar.dm
@@ -39,7 +39,7 @@ length to avoid portals or something i guess?? Not that they're counted right no
PriorityQueue
var/list/queue
- var/proc/comparison_function
+ var/comparison_function
New(compare)
queue = list()
diff --git a/code/game/antagonist/_antagonist_setup.dm b/code/game/antagonist/_antagonist_setup.dm
index fa99f001f32..6f514b94132 100644
--- a/code/game/antagonist/_antagonist_setup.dm
+++ b/code/game/antagonist/_antagonist_setup.dm
@@ -14,19 +14,6 @@
- To skip equipping with appropriate gear, supply a positive third argument.
*/
-// Antagonist datum flags.
-#define ANTAG_OVERRIDE_JOB 1 // Assigned job is set to MODE when spawning.
-#define ANTAG_OVERRIDE_MOB 2 // Mob is recreated from datum mob_type var when spawning.
-#define ANTAG_CLEAR_EQUIPMENT 4 // All preexisting equipment is purged.
-#define ANTAG_CHOOSE_NAME 8 // Antagonists are prompted to enter a name.
-#define ANTAG_IMPLANT_IMMUNE 16 // Cannot be loyalty implanted.
-#define ANTAG_SUSPICIOUS 32 // Shows up on roundstart report.
-#define ANTAG_HAS_LEADER 64 // Generates a leader antagonist.
-#define ANTAG_HAS_NUKE 128 // Will spawn a nuke at supplied location.
-#define ANTAG_RANDSPAWN 256 // Potentially randomly spawns due to events.
-#define ANTAG_VOTABLE 512 // Can be voted as an additional antagonist before roundstart.
-#define ANTAG_SET_APPEARANCE 1024 // Causes antagonists to use an appearance modifier on spawn.
-
// Globals.
var/global/list/all_antag_types = list()
var/global/list/all_antag_spawnpoints = list()
diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm
index 69a065c2a18..31758278364 100644
--- a/code/game/antagonist/mutiny/mutineer.dm
+++ b/code/game/antagonist/mutiny/mutineer.dm
@@ -6,7 +6,7 @@ var/datum/antagonist/mutineer/mutineers
role_text_plural = "Mutineers"
id = MODE_MUTINEER
antag_indicator = "mutineer"
- restricted_jobs = list("Colony Director")
+ restricted_jobs = list("Facility Director")
/datum/antagonist/mutineer/New(var/no_reference)
..()
@@ -39,7 +39,7 @@ var/datum/antagonist/mutineer/mutineers
proc/get_head_loyalist_candidates()
var/list/candidates[0]
for(var/mob/loyalist in player_list)
- if(loyalist.mind && loyalist.mind.assigned_role == "Colony Director")
+ if(loyalist.mind && loyalist.mind.assigned_role == "Facility Director")
candidates.Add(loyalist.mind)
return candidates
@@ -47,7 +47,7 @@ var/datum/antagonist/mutineer/mutineers
var/list/candidates[0]
for(var/mob/mutineer in player_list)
if(mutineer.client.prefs.be_special & BE_MUTINEER)
- for(var/job in command_positions - "Colony Director")
+ for(var/job in command_positions - "Facility Director")
if(mutineer.mind && mutineer.mind.assigned_role == job)
candidates.Add(mutineer.mind)
return candidates
diff --git a/code/game/antagonist/outsider/ert.dm b/code/game/antagonist/outsider/ert.dm
index 66c31d41767..a4c640cc8e3 100644
--- a/code/game/antagonist/outsider/ert.dm
+++ b/code/game/antagonist/outsider/ert.dm
@@ -14,7 +14,7 @@ var/datum/antagonist/ert/ert
and before taking extreme actions, please try to also contact the administration! \
Think through your actions and make the roleplay immersive! Please remember all \
rules aside from those without explicit exceptions apply to the ERT."
- leader_welcome_text = "As leader of the Emergency Response Team, you answer only to the Company, and have authority to override the Colony Director where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the Colony Director where possible, however."
+ leader_welcome_text = "As leader of the Emergency Response Team, you answer only to the Company, and have authority to override the Facility Director where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the Facility Director where possible, however."
landmark_id = "Response Team"
id_type = /obj/item/card/id/centcom/ERT
diff --git a/code/game/antagonist/station/changeling.dm b/code/game/antagonist/station/changeling.dm
index f59ed1d9c6e..326c9071ab2 100644
--- a/code/game/antagonist/station/changeling.dm
+++ b/code/game/antagonist/station/changeling.dm
@@ -6,7 +6,7 @@
bantype = "changeling"
feedback_tag = "changeling_objective"
restricted_jobs = list("AI", "Cyborg")
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Colony Director")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Facility Director")
welcome_text = "Use say \"#g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them."
antag_sound = 'sound/effects/antag_notice/ling_alert.ogg'
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
diff --git a/code/game/antagonist/station/cultist.dm b/code/game/antagonist/station/cultist.dm
index 7603c1eafca..d2eab010f5c 100644
--- a/code/game/antagonist/station/cultist.dm
+++ b/code/game/antagonist/station/cultist.dm
@@ -12,8 +12,8 @@ var/datum/antagonist/cultist/cult
role_text_plural = "Cultists"
bantype = "cultist"
restricted_jobs = list("Chaplain","AI", "Cyborg")
- protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Colony Director")
- roundstart_restricted = list("Internal Affairs Agent", "Head of Security", "Colony Director")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Facility Director")
+ roundstart_restricted = list("Internal Affairs Agent", "Head of Security", "Facility Director")
role_type = BE_CULTIST
feedback_tag = "cult_objective"
antag_indicator = "cult"
diff --git a/code/game/antagonist/station/infiltrator.dm b/code/game/antagonist/station/infiltrator.dm
index ba325a4d204..edc507d7dd0 100644
--- a/code/game/antagonist/station/infiltrator.dm
+++ b/code/game/antagonist/station/infiltrator.dm
@@ -11,7 +11,7 @@ var/datum/antagonist/traitor/infiltrator/infiltrators
role_text = "Infiltrator"
role_text_plural = "Infiltrators"
welcome_text = "To speak on your team's private channel, use :t."
- protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Colony Director")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Facility Director")
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
can_speak_aooc = TRUE
diff --git a/code/game/antagonist/station/revolutionary.dm b/code/game/antagonist/station/revolutionary.dm
index 9e6100c8af4..6f51ba42e08 100644
--- a/code/game/antagonist/station/revolutionary.dm
+++ b/code/game/antagonist/station/revolutionary.dm
@@ -30,8 +30,8 @@ var/datum/antagonist/revolutionary/revs
faction_invisible = 1
restricted_jobs = list("AI", "Cyborg")
- protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Colony Director", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
- roundstart_restricted = list("Internal Affairs Agent", "Colony Director", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Facility Director", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
+ roundstart_restricted = list("Internal Affairs Agent", "Facility Director", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
/datum/antagonist/revolutionary/New()
..()
diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm
index 01a3f73e167..736cb097654 100644
--- a/code/game/antagonist/station/traitor.dm
+++ b/code/game/antagonist/station/traitor.dm
@@ -4,7 +4,7 @@ var/datum/antagonist/traitor/traitors
/datum/antagonist/traitor
id = MODE_TRAITOR
antag_sound = 'sound/effects/antag_notice/traitor_alert.ogg'
- protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Colony Director")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Facility Director")
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
can_speak_aooc = FALSE // If they want to plot and plan as this sort of traitor, they'll need to do it ICly.
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 52c170ffee8..2a9c532736f 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -1079,7 +1079,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
sound_env = MEDIUM_SOFTFLOOR
/area/crew_quarters/captain
- name = "\improper Command - Colony Director's Office"
+ name = "\improper Command - Facility Director's Office"
icon_state = "captain"
sound_env = MEDIUM_SOFTFLOOR
diff --git a/code/game/atom_vv.dm b/code/game/atom_vv.dm
index 20a6c9eb5b0..1b1b31b85e2 100644
--- a/code/game/atom_vv.dm
+++ b/code/game/atom_vv.dm
@@ -27,7 +27,7 @@
/atom/vv_get_dropdown()
. = ..()
VV_DROPDOWN_OPTION("", "---------")
- if(!ismovableatom(src))
+ if(!ismovable(src))
var/turf/curturf = get_turf(src)
if(curturf)
. += ""
diff --git a/code/game/atoms_movable_movement.dm b/code/game/atoms_movable_movement.dm
index 3bc10db5ca8..cdce0c7d75d 100644
--- a/code/game/atoms_movable_movement.dm
+++ b/code/game/atoms_movable_movement.dm
@@ -244,7 +244,7 @@
M.locationTransitForceMove(destination, recurse_levels - 1)
else
M.doLocationTransitForceMove(destination)
- buckle_mob(M, force = TRUE)
+ buckle_mob(M, forced = TRUE)
// until movement rework
/mob/locationTransitForceMove(atom/destination, recurse_levels = 0)
diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm
index 919a435ced5..35235f4ef7a 100644
--- a/code/game/gamemodes/cult/construct_spells.dm
+++ b/code/game/gamemodes/cult/construct_spells.dm
@@ -1,25 +1,3 @@
-//cast_method flags, needs to be up to date with Technomancer's. They were, for some reason, not working outside it.
-#define CAST_USE 1 // Clicking the spell in your hand.
-#define CAST_MELEE 2 // Clicking an atom in melee range.
-#define CAST_RANGED 4 // Clicking an atom beyond melee range.
-#define CAST_THROW 8 // Throwing the spell and hitting an atom.
-#define CAST_COMBINE 16 // Clicking another spell with this spell.
-#define CAST_INNATE 32 // Activates upon verb usage, used for mobs without hands.
-
-//Aspects
-#define ASPECT_FIRE "fire" //Damage over time and raising body-temp. Firesuits protect from this.
-#define ASPECT_FROST "frost" //Slows down the affected, also involves imbedding with icicles. Winter coats protect from this.
-#define ASPECT_SHOCK "shock" //Energy-expensive, usually stuns. Insulated armor protects from this.
-#define ASPECT_AIR "air" //Mostly involves manipulation of atmos, useless in a vacuum. Magboots protect from this.
-#define ASPECT_FORCE "force" //Manipulates gravity to push things away or towards a location.
-#define ASPECT_TELE "tele" //Teleportation of self, other objects, or other people.
-#define ASPECT_DARK "dark" //Makes all those photons vanish using magic-- WITH SCIENCE. Used for sneaky stuff.
-#define ASPECT_LIGHT "light" //The opposite of dark, usually blinds, makes holo-illusions, or makes laser lightshows.
-#define ASPECT_BIOMED "biomed" //Mainly concerned with healing and restoration.
-#define ASPECT_EMP "emp" //Unused now.
-#define ASPECT_UNSTABLE "unstable" //Heavily RNG-based, causes instability to the victim.
-#define ASPECT_CHROMATIC "chromatic" //Used to combine with other spells.
-#define ASPECT_UNHOLY "unholy" //Involves the dead, blood, and most things against divine beings.
//////////////////////////////Construct Spells/////////////////////////
@@ -693,4 +671,4 @@ proc/findNullRod(var/atom/target)
else
user.visible_message("\The [user] lowers its fist.")
return
- qdel(src)
\ No newline at end of file
+ qdel(src)
diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm
index 4ebd24b0f47..905b23ce5e3 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -132,16 +132,6 @@
anchored = 1.0
var/spawnable = null
-/obj/effect/gateway/Bumped(mob/M as mob|obj)
- spawn(0)
- return
- return
-
-/obj/effect/gateway/Crossed(AM as mob|obj)
- spawn(0)
- return
- return
-
/obj/effect/gateway/active
light_range=5
light_color="#ff0000"
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index 529c465daa8..f257d4d7d48 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -297,9 +297,9 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
to_chat(M, "
")
- to_chat(M, "THE COLONY DIRECTOR, HOP AND HOS ARE [who2]...LAWS UPDATED")
+ to_chat(M, "THE Facility Director, HOP AND HOS ARE [who2]...LAWS UPDATED")
to_chat(M, "
")
- M.add_ion_law("THE COLONY DIRECTOR, HOP AND HOS ARE [who2]")
+ M.add_ion_law("THE Facility Director, HOP AND HOS ARE [who2]")
if(6)
to_chat(M, "
")
to_chat(M, "THE STATION IS BUILT FOR [who2]...LAWS UPDATED")
diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm
index 828ace48a68..59ed34fb243 100644
--- a/code/game/gamemodes/newobjective.dm
+++ b/code/game/gamemodes/newobjective.dm
@@ -564,7 +564,7 @@ datum
captainslaser
steal_target = /obj/item/gun/energy/captain
- explanation_text = "Steal the Colony Director's antique laser gun."
+ explanation_text = "Steal the Facility Director's antique laser gun."
weight = 20
get_points(var/job)
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index a625f032eb6..602deccad7b 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -427,11 +427,11 @@ datum/objective/steal
var/target_name
var/global/possible_items[] = list(
- "the Colony Director's antique laser gun" = /obj/item/gun/energy/captain,
+ "the Facility Director's antique laser gun" = /obj/item/gun/energy/captain,
"a hand teleporter" = /obj/item/hand_tele,
"an RCD" = /obj/item/rcd,
"a jetpack" = /obj/item/tank/jetpack,
- "a colony director's jumpsuit" = /obj/item/clothing/under/rank/captain,
+ "a Facility Director's jumpsuit" = /obj/item/clothing/under/rank/captain,
"a functional AI" = /obj/item/aicard,
"a pair of magboots" = /obj/item/clothing/shoes/magboots,
"the station blueprints" = /obj/item/blueprints,
@@ -445,7 +445,7 @@ datum/objective/steal
"a head of security's jumpsuit" = /obj/item/clothing/under/rank/head_of_security,
"a head of personnel's jumpsuit" = /obj/item/clothing/under/rank/head_of_personnel,
"the hypospray" = /obj/item/reagent_containers/hypospray/vial,
- "the colony director's pinpointer" = /obj/item/pinpointer,
+ "the Facility Director's pinpointer" = /obj/item/pinpointer,
"an ablative armor vest" = /obj/item/clothing/suit/armor/laserproof,
)
diff --git a/code/game/gamemodes/technomancer/spell_objs.dm b/code/game/gamemodes/technomancer/spell_objs.dm
index c4acb76ec92..ea076817286 100644
--- a/code/game/gamemodes/technomancer/spell_objs.dm
+++ b/code/game/gamemodes/technomancer/spell_objs.dm
@@ -1,25 +1,3 @@
-//cast_method flags
-#define CAST_USE 1 // Clicking the spell in your hand.
-#define CAST_MELEE 2 // Clicking an atom in melee range.
-#define CAST_RANGED 4 // Clicking an atom beyond melee range.
-#define CAST_THROW 8 // Throwing the spell and hitting an atom.
-#define CAST_COMBINE 16 // Clicking another spell with this spell.
-#define CAST_INNATE 32 // Activates upon verb usage, used for mobs without hands.
-
-//Aspects
-#define ASPECT_FIRE "fire" //Damage over time and raising body-temp. Firesuits protect from this.
-#define ASPECT_FROST "frost" //Slows down the affected, also involves imbedding with icicles. Winter coats protect from this.
-#define ASPECT_SHOCK "shock" //Energy-expensive, usually stuns. Insulated armor protects from this.
-#define ASPECT_AIR "air" //Mostly involves manipulation of atmos, useless in a vacuum. Magboots protect from this.
-#define ASPECT_FORCE "force" //Manipulates gravity to push things away or towards a location.
-#define ASPECT_TELE "tele" //Teleportation of self, other objects, or other people.
-#define ASPECT_DARK "dark" //Makes all those photons vanish using magic-- WITH SCIENCE. Used for sneaky stuff.
-#define ASPECT_LIGHT "light" //The opposite of dark, usually blinds, makes holo-illusions, or makes laser lightshows.
-#define ASPECT_BIOMED "biomed" //Mainly concerned with healing and restoration.
-#define ASPECT_EMP "emp" //Unused now.
-#define ASPECT_UNSTABLE "unstable" //Heavily RNG-based, causes instability to the victim.
-#define ASPECT_CHROMATIC "chromatic" //Used to combine with other spells.
-#define ASPECT_UNHOLY "unholy" //Involves the dead, blood, and most things against divine beings.
/obj/item/spell
name = "glowing particles"
diff --git a/code/game/jobs/access_datum.dm b/code/game/jobs/access_datum.dm
index ce73c07e73f..7290a464078 100644
--- a/code/game/jobs/access_datum.dm
+++ b/code/game/jobs/access_datum.dm
@@ -127,7 +127,7 @@
/var/const/access_captain = 20
/datum/access/captain
id = access_captain
- desc = "Colony Director"
+ desc = "Facility Director"
region = ACCESS_REGION_COMMAND
/var/const/access_all_personal_lockers = 21
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index 6fcf7bd6116..7b77d9dae2b 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -1,7 +1,7 @@
var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
/datum/job/captain
- title = "Colony Director"
+ title = "Facility Director"
flag = CAPTAIN
department = "Command"
head_position = 1
@@ -22,7 +22,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
ideal_character_age = 70 // Old geezer captains ftw
outfit_type = /decl/hierarchy/outfit/job/captain
- alt_titles = list("Site Manager", "Overseer")
+ alt_titles = list("Site Manager", "Overseer", "Director of Operations")
/*
/datum/job/captain/equip(var/mob/living/carbon/human/H)
@@ -42,7 +42,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
faction = "Station"
total_positions = 1
spawn_positions = 1
- supervisors = "the Colony Director"
+ supervisors = "the Facility Director"
selection_color = "#2F2F7F"
idtype = /obj/item/card/id/silver/hop
req_admin_notify = 1
diff --git a/code/game/jobs/job/captain_vr.dm b/code/game/jobs/job/captain_vr.dm
index b6c38cae15e..f70dbc52490 100644
--- a/code/game/jobs/job/captain_vr.dm
+++ b/code/game/jobs/job/captain_vr.dm
@@ -4,7 +4,7 @@
/datum/job/hop
disallow_jobhop = TRUE
- alt_titles = list("Deputy Director", "Crew Resources Officer")
+ alt_titles = list("Deputy Director", "Crew Resources Officer", "Underseer")
access = list(access_security, access_sec_doors, access_brig, access_forensics_lockers,
access_medical, access_engine, access_change_ids, access_ai_upload, access_eva, access_heads,
diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm
index 04aa16f9b9f..b8f3e8a9283 100644
--- a/code/game/jobs/job/engineering.dm
+++ b/code/game/jobs/job/engineering.dm
@@ -7,7 +7,7 @@
faction = "Station"
total_positions = 1
spawn_positions = 1
- supervisors = "the Colony Director"
+ supervisors = "the Facility Director"
selection_color = "#7F6E2C"
idtype = /obj/item/card/id/engineering/head
req_admin_notify = 1
diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm
index d0b4749537a..8625f02d81b 100644
--- a/code/game/jobs/job/medical.dm
+++ b/code/game/jobs/job/medical.dm
@@ -7,7 +7,7 @@
faction = "Station"
total_positions = 1
spawn_positions = 1
- supervisors = "the Colony Director"
+ supervisors = "the Facility Director"
selection_color = "#026865"
idtype = /obj/item/card/id/medical/head
req_admin_notify = 1
diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm
index c1208ea97f2..a0db9c2a2ec 100644
--- a/code/game/jobs/job/science.dm
+++ b/code/game/jobs/job/science.dm
@@ -7,7 +7,7 @@
faction = "Station"
total_positions = 1
spawn_positions = 1
- supervisors = "the Colony Director"
+ supervisors = "the Facility Director"
selection_color = "#AD6BAD"
idtype = /obj/item/card/id/science/head
req_admin_notify = 1
diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm
index 948c9de09df..689060343a9 100644
--- a/code/game/jobs/job/security.dm
+++ b/code/game/jobs/job/security.dm
@@ -7,7 +7,7 @@
faction = "Station"
total_positions = 1
spawn_positions = 1
- supervisors = "the Colony Director"
+ supervisors = "the Facility Director"
selection_color = "#8E2929"
idtype = /obj/item/card/id/security/head
req_admin_notify = 1
diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm
index b0047a5c2a6..4b0ac13c050 100644
--- a/code/game/jobs/job/silicon.dm
+++ b/code/game/jobs/job/silicon.dm
@@ -12,6 +12,8 @@
account_allowed = 0
economic_modifier = 0
+ alt_titles = list("Overseer: Digitised Deluxe Edition")
+
/datum/job/ai/equip(var/mob/living/carbon/human/H)
if(!H) return 0
return 1
@@ -55,9 +57,7 @@
return 1
*/
/datum/job/cyborg/equip_backpack(var/mob/living/carbon/human/H)
- if(!H) return 0
- return 1
- return 1
+ return H? TRUE : FALSE
/datum/job/cyborg/equip_preview(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/cardborg(H), slot_wear_suit)
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index fb55b8a8476..29af140094f 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -459,9 +459,9 @@ var/global/datum/controller/occupations/job_master
return H.Robotize()
if("AI")
return H
- if("Colony Director")
+ if("Facility Director")
var/sound/announce_sound = (ticker.current_state <= GAME_STATE_SETTING_UP)? null : sound('sound/misc/boatswain.ogg', volume=20)
- captain_announcement.Announce("All hands, [alt_title ? alt_title : "Colony Director"] [H.real_name] on deck!", new_sound=announce_sound)
+ captain_announcement.Announce("All hands, [alt_title ? alt_title : "Facility Director"] [H.real_name] on deck!", new_sound=announce_sound)
//Deferred item spawning.
if(spawn_in_storage && spawn_in_storage.len)
diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm
index c9d73c0b9a9..43d894000d3 100644
--- a/code/game/jobs/jobs.dm
+++ b/code/game/jobs/jobs.dm
@@ -50,7 +50,7 @@ var/list/assistant_occupations = list(
var/list/command_positions = list(
- "Colony Director",
+ "Facility Director",
"Head of Personnel",
"Head of Security",
"Chief Engineer",
diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm
index 8423abf7d05..19641e1cdff 100644
--- a/code/game/machinery/_machinery.dm
+++ b/code/game/machinery/_machinery.dm
@@ -329,7 +329,7 @@ Class Procs:
RefreshParts()
else
to_chat(user, "Following parts detected in the machine:")
- for(var/var/obj/item/C in component_parts) //var/var/obj/item/C?
+ for(var/obj/item/C in component_parts)
to_chat(user, " [C.name]")
return 1
diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm
index 16bb4f19434..f5f8e9a38f8 100644
--- a/code/game/machinery/atmoalter/scrubber.dm
+++ b/code/game/machinery/atmoalter/scrubber.dm
@@ -136,7 +136,7 @@
. = 1
if (href_list["volume_adj"])
var/diff = text2num(href_list["volume_adj"])
- volume_rate = CLAMP(volume_rate+diff, minrate, maxrate)
+ volume_rate = clamp(volume_rate+diff, minrate, maxrate)
. = 1
update_icon()
diff --git a/code/game/machinery/bomb_tester_vr.dm b/code/game/machinery/bomb_tester_vr.dm
index 124235bcf68..2d7850fc91c 100644
--- a/code/game/machinery/bomb_tester_vr.dm
+++ b/code/game/machinery/bomb_tester_vr.dm
@@ -201,7 +201,7 @@
if(href_list["set_can_pressure"])
var/change = text2num(href_list["set_can_pressure"])
- sim_canister_output = CLAMP(sim_canister_output+change, ONE_ATMOSPHERE/10, ONE_ATMOSPHERE*10)
+ sim_canister_output = clamp(sim_canister_output+change, ONE_ATMOSPHERE/10, ONE_ATMOSPHERE*10)
if(href_list["start_sim"])
start_simulating()
@@ -381,4 +381,4 @@
#undef MODE_SINGLE
#undef MODE_DOUBLE
-#undef MODE_CANISTER
\ No newline at end of file
+#undef MODE_CANISTER
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index a17b76c2e7f..9b979cda243 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -380,13 +380,9 @@
return null
/proc/near_range_camera(var/mob/M)
-
for(var/obj/machinery/camera/C in range(4, M))
if(C.can_use()) // check if camera disabled
return C
- break
-
- return null
/obj/machinery/camera/proc/weld(var/obj/item/weldingtool/WT, var/mob/user)
diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm
index 9559313ec52..09b2c2b8209 100644
--- a/code/game/machinery/computer/atmos_alert.dm
+++ b/code/game/machinery/computer/atmos_alert.dm
@@ -14,7 +14,7 @@ var/global/list/minor_air_alarms = list()
/obj/machinery/computer/atmos_alert/Initialize(mapload)
. = ..()
- SSalarms.atmosphere_alarm.register_alarm(src, /obj/machinery/computer/station_alert/update_icon)
+ SSalarms.atmosphere_alarm.register_alarm(src, /atom/proc/update_icon)
/obj/machinery/computer/atmos_alert/Destroy()
SSalarms.atmosphere_alarm.unregister_alarm(src)
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index b362b57d294..03370cf4866 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -497,7 +497,7 @@ What a mess.*/
temp += "
| Command | " - jobs_all += "||
| Special | "//Colony Director in special because he is head of heads ~Intercross21 - jobs_all += "Colony Director | " + jobs_all += "|
| Special | "//Facility Director in special because he is head of heads ~Intercross21 + jobs_all += "Facility Director | " jobs_all += "Custom | " counter = 0 diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm index ae263ae08f3..31b14143626 100644 --- a/code/game/machinery/computer3/computers/security.dm +++ b/code/game/machinery/computer3/computers/security.dm @@ -515,7 +515,7 @@ What a mess.*/ temp += "