diff --git a/.github/AUTODOC_GUIDE.md b/.github/AUTODOC_GUIDE.md
new file mode 100644
index 00000000000..a17a8de3157
--- /dev/null
+++ b/.github/AUTODOC_GUIDE.md
@@ -0,0 +1,108 @@
+# dmdoc
+[DOCUMENTATION]: http://codedocs.tgstation13.org
+
+[BYOND]: https://secure.byond.com/
+
+[DMDOC]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/src/dmdoc
+
+[DMDOC] is a documentation generator for DreamMaker, the scripting language
+of the [BYOND] game engine. It produces simple static HTML files based on
+documented files, macros, types, procs, and vars.
+
+We use **dmdoc** to generate [DOCUMENTATION] for our code, and that documentation
+is automatically generated and built on every new commit to the master branch
+
+This gives new developers a clickable reference [DOCUMENTATION] they can browse to better help
+gain understanding of the /tg/station codebase structure and api reference.
+
+## Documenting code on /tg/station
+We use block comments to document procs and classes, and we use `///` line comments
+when documenting individual variables.
+
+It is required that all new code be covered with DMdoc code, according to the [Requirements](#Required)
+
+We also require that when you touch older code, you must document the functions that you
+have touched in the process of updating that code
+
+### Required
+A class *must* always be autodocumented, and all public functions *must* be documented
+
+All class level defined variables *must* be documented
+
+Internal functions *should* be documented, but may not be
+
+A public function is any function that a developer might reasonably call while using
+or interating with your object. Internal functions are helper functions that your
+public functions rely on to implement logic
+
+
+### Documenting a proc
+When documenting a proc, we give a short one line description (as this is shown
+next to the proc definition in the list of all procs for a type or global
+namespace), then a longer paragraph which will be shown when the user clicks on
+the proc to jump to it's definition
+```
+/**
+ * Short description of the proc
+ *
+ * Longer detailed paragraph about the proc
+ * including any relevant detail
+ * Arguments:
+ * * arg1 - Relevance of this argument
+ * * arg2 - Relevance of this argument
+ */
+```
+
+### Documenting a class
+We first give the name of the class as a header, this can be omitted if the name is
+just going to be the typepath of the class, as dmdoc uses that by default
+
+Then we give a short oneline description of the class
+
+Finally we give a longer multi paragraph description of the class and it's details
+```
+/**
+ * # Classname (Can be omitted if it's just going to be the typepath)
+ *
+ * The short overview
+ *
+ * A longer
+ * paragraph of functionality about the class
+ * including any assumptions/special cases
+ *
+ */
+```
+
+### Documenting a variable
+Give a short explanation of what the variable is in the context of the class.
+```
+/// Type path of item to go in suit slot
+var/suit = null
+```
+
+## Module level description of code
+Modules are the best way to describe the structure/intent of a package of code
+where you don't want to be tied to the formal layout of the class structure.
+
+On /tg/station we do this by adding markdown files inside the `code` directory
+that will also be rendered and added to the modules tree. The structure for
+these is deliberately not defined, so you can be as freeform and as wheeling as
+you would like.
+
+[Here is a representative example of what you might write](http://codedocs.tgstation13.org/code/modules/keybindings/readme.html)
+
+## Special variables
+You can use certain special template variables in DM DOC comments and they will be expanded
+```
+ [DEFINE_NAME] - Expands to a link to the define definition if documented
+ [/mob] - Expands to a link to the docs for the /mob class
+ [/mob/proc/Dizzy] - Expands to a link that will take you to the /mob class and anchor you to the dizzy proc docs
+ [/mob/var/stat] - Expands to a link that will take you to the /mob class and anchor you to the stat var docs
+```
+
+You can customise the link name by using `[link name][link shorthand].`
+
+eg. `[see more about dizzy here] [/mob/proc/Dizzy]`
+
+This is very useful to quickly link to other parts of the autodoc code to expand
+upon a comment made, or reasoning about code
diff --git a/Dockerfile b/Dockerfile
index 50d5316df56..58be08fec1b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM tgstation/byond:513.1503 as base
+FROM tgstation/byond:513.1511 as base
FROM base as build_base
diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm
index 99637bb28c9..08b31193143 100644
--- a/code/__DEFINES/dcs/signals.dm
+++ b/code/__DEFINES/dcs/signals.dm
@@ -267,6 +267,7 @@
// /obj/item/clothing signals
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
+#define COMSIG_SUIT_SPACE_TOGGLE "suit_space_toggle" //from base of /obj/item/clothing/suit/space/proc/toggle_spacesuit(): (obj/item/clothing/suit/space/suit)
// /obj/item/implant signals
#define COMSIG_IMPLANT_ACTIVATED "implant_activated" //from base of /obj/item/implant/proc/activate(): ()
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index f7430cfe273..dfb6a68c6a5 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -1,17 +1,7 @@
// simple is_type and similar inline helpers
-#if DM_VERSION < 513
-#define islist(L) (istype(L, /list))
-#endif
-
#define in_range(source, user) (get_dist(source, user) <= 1 && (get_step(source, 0)?:z) == (get_step(user, 0)?:z))
-#if DM_VERSION < 513
-#define ismovableatom(A) (istype(A, /atom/movable))
-#else
-#define ismovableatom(A) ismovable(A)
-#endif
-
#define isatom(A) (isloc(A))
#define isweakref(D) (istype(D, /datum/weakref))
diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm
index 2f8039de9ba..04242823456 100644
--- a/code/__DEFINES/maths.dm
+++ b/code/__DEFINES/maths.dm
@@ -16,7 +16,7 @@
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(TICK_USAGE_REAL - 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,27 +30,14 @@
// round() acts like floor(x, 1) by default but can't handle other values
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
-#if DM_VERSION < 513
-#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
-#else
-#define CLAMP(CLVALUE,CLMIN,CLMAX) clamp(CLVALUE, CLMIN, CLMAX)
-#endif
-
// 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
-#if DM_VERSION < 513
-#define TAN(x) (sin(x) / cos(x))
-#else
-#define TAN(x) tan(x)
-#endif
-
// Cotangent
-#define COT(x) (1 / TAN(x))
+#define COT(x) (1 / tan(x))
// Secant
#define SEC(x) (1 / cos(x))
@@ -188,8 +175,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
@@ -214,7 +201,7 @@
#define EXP_DISTRIBUTION(desired_mean) ( -(1/(1/desired_mean)) * log(rand(1, 1000) * 0.001) )
-#define LORENTZ_DISTRIBUTION(x, s) ( s*TAN(TODEGREES(PI*(rand()-0.5))) + x )
+#define LORENTZ_DISTRIBUTION(x, s) ( s*tan(TODEGREES(PI*(rand()-0.5))) + x )
#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ( (1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2 )
#define RULE_OF_THREE(a, b, x) ((a*x)/b)
diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm
index ccd5b92c79d..b67be0c5607 100644
--- a/code/__DEFINES/rust_g.dm
+++ b/code/__DEFINES/rust_g.dm
@@ -1,6 +1,10 @@
// rust_g.dm - DM API for rust_g extension library
#define RUST_G "rust_g"
+#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
+#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB"
+#define RUSTG_JOB_ERROR "JOB PANICKED"
+
#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
@@ -8,3 +12,15 @@
#define rustg_log_write(fname, text) call(RUST_G, "log_write")(fname, text)
/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")()
+
+// RUST-G defines & procs for HTTP component
+#define RUSTG_HTTP_METHOD_GET "get"
+#define RUSTG_HTTP_METHOD_POST "post"
+#define RUSTG_HTTP_METHOD_PUT "put"
+#define RUSTG_HTTP_METHOD_DELETE "delete"
+#define RUSTG_HTTP_METHOD_PATCH "patch"
+#define RUSTG_HTTP_METHOD_HEAD "head"
+
+#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
+#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
+#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)
diff --git a/code/__DEFINES/skills.dm b/code/__DEFINES/skills.dm
index ee3f3ee70fa..e61cb51ab77 100644
--- a/code/__DEFINES/skills.dm
+++ b/code/__DEFINES/skills.dm
@@ -24,7 +24,7 @@
#define GetSkillRef(A) (SSskills.all_skills[A])
//number defines
-#define CLEAN_SKILL_BEAUTY_ADJUSTMENT 15//It's a denominator so no 0. Higher number = less cleaning xp per cleanable
+#define CLEAN_SKILL_BEAUTY_ADJUSTMENT -15//It's a denominator so no 0. Higher number = less cleaning xp per cleanable. Negative value means cleanables with negative beauty give xp.
#define CLEAN_SKILL_GENERIC_WASH_XP 1.5//Value. Higher number = more XP when cleaning non-cleanables (walls/floors/lips)
#define MEDICAL_SKILL_EASY 3 //Cannot be 0
diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm
index f00146d7848..299b829edec 100644
--- a/code/__DEFINES/traits.dm
+++ b/code/__DEFINES/traits.dm
@@ -157,6 +157,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NOFLASH "noflash" //Makes you immune to flashes
#define TRAIT_XENO_IMMUNE "xeno_immune"//prevents xeno huggies implanting skeletons
#define TRAIT_NAIVE "naive"
+#define TRAIT_GUNFLIP "gunflip"
//non-mob traits
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm
index 7e52fbe2735..801a2cd4319 100644
--- a/code/__HELPERS/icon_smoothing.dm
+++ b/code/__HELPERS/icon_smoothing.dm
@@ -61,7 +61,7 @@
var/adjacencies = 0
var/atom/movable/AM
- if(ismovableatom(A))
+ if(ismovable(A))
AM = A
if(AM.can_be_unanchored && !AM.anchored)
return 0
diff --git a/code/__HELPERS/radio.dm b/code/__HELPERS/radio.dm
index 1d3c9bf3441..a8baf3a1d7d 100644
--- a/code/__HELPERS/radio.dm
+++ b/code/__HELPERS/radio.dm
@@ -2,9 +2,9 @@
/proc/sanitize_frequency(frequency, free = FALSE)
frequency = round(frequency)
if(free)
- . = CLAMP(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
+ . = clamp(frequency, MIN_FREE_FREQ, MAX_FREE_FREQ)
else
- . = CLAMP(frequency, MIN_FREQ, MAX_FREQ)
+ . = clamp(frequency, MIN_FREQ, MAX_FREQ)
if(!(. % 2)) // Ensure the last digit is an odd number
. += 1
diff --git a/code/__HELPERS/reagents.dm b/code/__HELPERS/reagents.dm
index 8238a2e8af0..e96a5509f66 100644
--- a/code/__HELPERS/reagents.dm
+++ b/code/__HELPERS/reagents.dm
@@ -54,8 +54,9 @@
if(!GLOB.chemical_reactions_list)
return
for(var/reagent in GLOB.chemical_reactions_list)
- for(var/datum/chemical_reaction/R in GLOB.chemical_reactions_list[reagent])
- if(R.id == id)
+ for(var/R in GLOB.chemical_reactions_list[reagent])
+ var/datum/reac = R
+ if(reac.type == id)
return R
/proc/remove_chemical_reaction(datum/chemical_reaction/R)
@@ -66,7 +67,7 @@
//see build_chemical_reactions_list in holder.dm for explanations
/proc/add_chemical_reaction(datum/chemical_reaction/R)
- if(!GLOB.chemical_reactions_list || !R.id || !R.required_reagents || !R.required_reagents.len)
+ if(!GLOB.chemical_reactions_list || !R.required_reagents || !R.required_reagents.len)
return
var/primary_reagent = R.required_reagents[1]
if(!GLOB.chemical_reactions_list[primary_reagent])
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index bb3a7136815..70a24287f3a 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -445,15 +445,6 @@ Turf and target are separate in case you want to teleport some distance from a t
var/y = min(world.maxy, max(1, A.y + dy))
return locate(x,y,A.z)
-#if DM_VERSION > 513
-#warn 513 is definitely stable now, remove this
-#endif
-#if DM_VERSION < 513
-/proc/arctan(x)
- var/y=arcsin(x/sqrt(1+x*x))
- return y
-#endif
-
/*
Gets all contents of contents and returns them all in a list.
*/
@@ -859,8 +850,8 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
tX = splittext(tX[1], ":")
tX = tX[1]
var/list/actual_view = getviewsize(C ? C.view : world.view)
- tX = CLAMP(origin.x + text2num(tX) - round(actual_view[1] / 2) - 1, 1, world.maxx)
- tY = CLAMP(origin.y + text2num(tY) - round(actual_view[2] / 2) - 1, 1, world.maxy)
+ tX = clamp(origin.x + text2num(tX) - round(actual_view[1] / 2) - 1, 1, world.maxx)
+ tY = clamp(origin.y + text2num(tY) - round(actual_view[2] / 2) - 1, 1, world.maxy)
return locate(tX, tY, tZ)
/proc/screen_loc2turf(text, turf/origin, client/C)
@@ -873,8 +864,8 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
tX = text2num(tX[2])
tZ = origin.z
var/list/actual_view = getviewsize(C ? C.view : world.view)
- tX = CLAMP(origin.x + round(actual_view[1] / 2) - tX, 1, world.maxx)
- tY = CLAMP(origin.y + round(actual_view[2] / 2) - tY, 1, world.maxy)
+ tX = clamp(origin.x + round(actual_view[1] / 2) - tX, 1, world.maxx)
+ tY = clamp(origin.y + round(actual_view[2] / 2) - tY, 1, world.maxy)
return locate(tX, tY, tZ)
/proc/IsValidSrc(datum/D)
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index 15aa07c7b9d..b07bb6fdb84 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -32,31 +32,12 @@
#endif
//Update this whenever you need to take advantage of more recent byond features
-#define MIN_COMPILER_VERSION 512
-#if DM_VERSION < MIN_COMPILER_VERSION
+#define MIN_COMPILER_VERSION 513
+#define MIN_COMPILER_BUILD 1493
+#if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
-#error You need version 512 or higher
-#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)
+#error You need version 513.1493 or higher
#endif
//Additional code for the above flags.
diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm
index 2e0a70dcdcf..578db6d69d3 100644
--- a/code/_globalvars/logging.dm
+++ b/code/_globalvars/logging.dm
@@ -42,6 +42,8 @@ GLOBAL_VAR(tgui_log)
GLOBAL_PROTECT(tgui_log)
GLOBAL_VAR(world_shuttle_log)
GLOBAL_PROTECT(world_shuttle_log)
+GLOBAL_VAR(discord_api_log)
+GLOBAL_PROTECT(discord_api_log)
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)
diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm
index 83ea9fefb6c..1fbfb67d821 100644
--- a/code/_globalvars/traits.dm
+++ b/code/_globalvars/traits.dm
@@ -97,7 +97,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_PASSTABLE" = TRAIT_PASSTABLE,
"TRAIT_NOFLASH" = TRAIT_NOFLASH,
"TRAIT_XENO_IMMUNE" = TRAIT_XENO_IMMUNE,
- "TRAIT_NAIVE" = TRAIT_NAIVE
+ "TRAIT_NAIVE" = TRAIT_NAIVE,
+ "TRAIT_GUNFLIP" = TRAIT_GUNFLIP
),
/obj/item/bodypart = list(
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS
diff --git a/code/_onclick/hud/picture_in_picture.dm b/code/_onclick/hud/picture_in_picture.dm
index e028212e96b..5e474331f61 100644
--- a/code/_onclick/hud/picture_in_picture.dm
+++ b/code/_onclick/hud/picture_in_picture.dm
@@ -102,8 +102,8 @@
add_overlay(standard_background)
/obj/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
- width = CLAMP(width, 0, max_dimensions)
- height = CLAMP(height, 0, max_dimensions)
+ width = clamp(width, 0, max_dimensions)
+ height = clamp(height, 0, max_dimensions)
src.width = width
src.height = height
diff --git a/code/_onclick/hud/plane_master.dm b/code/_onclick/hud/plane_master.dm
index ddb8aedad18..d8a1281df82 100644
--- a/code/_onclick/hud/plane_master.dm
+++ b/code/_onclick/hud/plane_master.dm
@@ -47,7 +47,7 @@
/obj/screen/plane_master/floor/backdrop(mob/mymob)
filters = list()
if(istype(mymob) && mymob.eye_blurry)
- filters += GAUSSIAN_BLUR(CLAMP(mymob.eye_blurry*0.1,0.6,3))
+ filters += GAUSSIAN_BLUR(clamp(mymob.eye_blurry*0.1,0.6,3))
/obj/screen/plane_master/game_world
name = "game world plane master"
@@ -60,7 +60,7 @@
if(istype(mymob) && mymob.client && mymob.client.prefs && mymob.client.prefs.ambientocclusion)
filters += AMBIENT_OCCLUSION
if(istype(mymob) && mymob.eye_blurry)
- filters += GAUSSIAN_BLUR(CLAMP(mymob.eye_blurry*0.1,0.6,3))
+ filters += GAUSSIAN_BLUR(clamp(mymob.eye_blurry*0.1,0.6,3))
/obj/screen/plane_master/lighting
name = "lighting plane master"
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 47bf212c768..4dc2da3f741 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -129,9 +129,9 @@
/obj/item/proc/get_clamped_volume()
if(w_class)
if(force)
- return CLAMP((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
+ return clamp((force + w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100
else
- return CLAMP(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
+ return clamp(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area)
var/message_verb = "attacked"
diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index 4dc647b8cea..589de62f61f 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -8,7 +8,7 @@
return // seems legit.
// 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 0115d5cb975..b6245085b38 100644
--- a/code/controllers/configuration/config_entry.dm
+++ b/code/controllers/configuration/config_entry.dm
@@ -98,7 +98,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/entries/general.dm b/code/controllers/configuration/entries/general.dm
index 210b3e8cacb..467c27f6b02 100644
--- a/code/controllers/configuration/entries/general.dm
+++ b/code/controllers/configuration/entries/general.dm
@@ -484,3 +484,13 @@
/datum/config_entry/flag/reopen_roundstart_suicide_roles_command_report
/datum/config_entry/flag/auto_profile
+
+// DISCORD ROLE STUFFS
+// Using strings for everything because BYOND does not like numbers this big
+/datum/config_entry/flag/enable_discord_autorole
+
+/datum/config_entry/string/discord_token
+
+/datum/config_entry/string/discord_guildid
+
+/datum/config_entry/string/discord_roleid
diff --git a/code/controllers/subsystem/discord.dm b/code/controllers/subsystem/discord.dm
index 73105a33217..a76edd50da5 100644
--- a/code/controllers/subsystem/discord.dm
+++ b/code/controllers/subsystem/discord.dm
@@ -1,4 +1,4 @@
-/*
+/*
NOTES:
There is a DB table to track ckeys and associated discord IDs.
This system REQUIRES TGS, and will auto-disable if TGS is not present.
@@ -15,7 +15,7 @@ ROUNDSTART:
2] A ping is sent to the discord with the IDs of people who wished to be notified
3] The file is emptied
-MIDROUND:
+MIDROUND:
1] Someone usees the notify verb, it adds their discord ID to the list.
2] On fire, it will write that to the disk, as long as conditions above are correct
@@ -43,7 +43,7 @@ SUBSYSTEM_DEF(discord)
enabled = 1 // Allows other procs to use this (Account linking, etc)
else
can_fire = 0 // We dont want excess firing
- return ..() // Cancel
+ return ..() // Cancel
try
people_to_notify = json_decode(file2text(notify_file))
@@ -57,18 +57,18 @@ SUBSYSTEM_DEF(discord)
send2chat("[notifymsg]", CONFIG_GET(string/chat_announce_new_game)) // Sends the message to the discord, using same config option as the roundstart notification
fdel(notify_file) // Deletes the file
return ..()
-
+
/datum/controller/subsystem/discord/fire()
if(!enabled)
return // Dont do shit if its disabled
if(notify_members == notify_members_cache)
- return // Dont re-write the file
+ return // Dont re-write the file
// If we are all clear
write_notify_file()
-
+
/datum/controller/subsystem/discord/Shutdown()
write_notify_file() // Guaranteed force-write on server close
-
+
/datum/controller/subsystem/discord/proc/write_notify_file()
if(!enabled) // Dont do shit if its disabled
return
@@ -113,3 +113,20 @@ SUBSYSTEM_DEF(discord)
/datum/controller/subsystem/discord/proc/id_clean(input)
var/regex/num_only = regex("\[^0-9\]", "g")
return num_only.Replace(input, "")
+
+/datum/controller/subsystem/discord/proc/grant_role(id)
+ // Ignore this shit if config isnt enabled for it
+ if(!CONFIG_GET(flag/enable_discord_autorole))
+ return
+
+ var/url = "https://discordapp.com/api/guilds/[CONFIG_GET(string/discord_guildid)]/members/[id]/roles/[CONFIG_GET(string/discord_roleid)]"
+
+ // Make the request
+
+ var/datum/http_request/req = new()
+ req.prepare(RUSTG_HTTP_METHOD_PUT, url, "", list("Authorization" = "Bot [CONFIG_GET(string/discord_token)]"))
+ req.begin_async()
+ UNTIL(req.is_complete())
+ var/datum/http_response/res = req.into_response()
+
+ WRITE_LOG(GLOB.discord_api_log, "PUT [url] returned [res.status_code] [res.body]")
diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm
index 54bbabdb005..dcb03dcf50b 100644
--- a/code/controllers/subsystem/persistence.dm
+++ b/code/controllers/subsystem/persistence.dm
@@ -338,7 +338,7 @@ SUBSYSTEM_DEF(persistence)
var/datum/chemical_reaction/randomized/R = new randomized_type
var/loaded = FALSE
if(R.persistent && json)
- var/list/recipe_data = json[R.id]
+ var/list/recipe_data = json[R.type]
if(recipe_data)
if(R.LoadOldRecipe(recipe_data) && (daysSince(R.created) <= R.persistence_period))
loaded = TRUE
@@ -354,9 +354,8 @@ SUBSYSTEM_DEF(persistence)
//asert globchems done
for(var/randomized_type in subtypesof(/datum/chemical_reaction/randomized))
- var/datum/chemical_reaction/randomized/R = randomized_type
- R = get_chemical_reaction(initial(R.id)) //ew, would be nice to add some simple tracking
- if(R && R.persistent && R.id)
+ var/datum/chemical_reaction/randomized/R = get_chemical_reaction(randomized_type) //ew, would be nice to add some simple tracking
+ if(R && R.persistent)
var/recipe_data = list()
recipe_data["timestamp"] = R.created
recipe_data["required_reagents"] = R.required_reagents
@@ -365,7 +364,7 @@ SUBSYSTEM_DEF(persistence)
recipe_data["is_cold_recipe"] = R.is_cold_recipe
recipe_data["results"] = R.results
recipe_data["required_container"] = "[R.required_container]"
- file_data["[R.id]"] = recipe_data
+ file_data["[R.type]"] = recipe_data
fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data))
diff --git a/code/controllers/subsystem/profiler.dm b/code/controllers/subsystem/profiler.dm
index ec8b243073e..019945b3d16 100644
--- a/code/controllers/subsystem/profiler.dm
+++ b/code/controllers/subsystem/profiler.dm
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(profiler)
init_order = INIT_ORDER_PROFILER
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
wait = 3000
- flags = SS_NO_TICK_CHECK
+ flags = SS_NO_TICK_CHECK
var/fetch_cost = 0
var/write_cost = 0
@@ -31,7 +31,7 @@ SUBSYSTEM_DEF(profiler)
return ..()
/datum/controller/subsystem/profiler/proc/StartProfiling()
-#if DM_BUILD < 1506 || DM_VERSION < 513
+#if DM_BUILD < 1506
stack_trace("Auto profiling unsupported on this byond version")
CONFIG_SET(flag/auto_profile, FALSE)
#else
@@ -39,12 +39,12 @@ SUBSYSTEM_DEF(profiler)
#endif
/datum/controller/subsystem/profiler/proc/StopProfiling()
-#if DM_BUILD >= 1506 && DM_VERSION >= 513
+#if DM_BUILD >= 1506
world.Profile(PROFILE_STOP)
#endif
/datum/controller/subsystem/profiler/proc/DumpFile()
-#if DM_BUILD < 1506 || DM_VERSION < 513
+#if DM_BUILD < 1506
stack_trace("Auto profiling unsupported on this byond version")
CONFIG_SET(flag/auto_profile, FALSE)
#else
diff --git a/code/datums/action.dm b/code/datums/action.dm
index 32b7c643178..cf98e7316e7 100644
--- a/code/datums/action.dm
+++ b/code/datums/action.dm
@@ -277,11 +277,22 @@
icon_icon = 'icons/mob/actions/actions_spacesuit.dmi'
button_icon_state = "thermal_off"
+/datum/action/item_action/toggle_spacesuit/New(Target)
+ . = ..()
+ RegisterSignal(target, COMSIG_SUIT_SPACE_TOGGLE, .proc/toggle)
+
+/datum/action/item_action/toggle_spacesuit/Destroy()
+ UnregisterSignal(target, COMSIG_SUIT_SPACE_TOGGLE)
+ return ..()
+
/datum/action/item_action/toggle_spacesuit/Trigger()
var/obj/item/clothing/suit/space/suit = target
if(!istype(suit))
return
suit.toggle_spacesuit()
+
+/// Toggle the action icon for the space suit thermal regulator
+/datum/action/item_action/toggle_spacesuit/proc/toggle(obj/item/clothing/suit/space/suit)
button_icon_state = "thermal_[suit.thermal_on ? "on" : "off"]"
UpdateButtonIcon()
diff --git a/code/datums/brain_damage/special.dm b/code/datums/brain_damage/special.dm
index c743bf200da..c2c644fba41 100644
--- a/code/datums/brain_damage/special.dm
+++ b/code/datums/brain_damage/special.dm
@@ -120,6 +120,87 @@
user.visible_message("[user] [slip_in_message].", null, null, null, user)
user.visible_message("[user] [slip_out_message].", "...and find your way to the other side.")
+/datum/brain_trauma/special/quantum_alignment
+ name = "Quantum Alignment"
+ desc = "Patient is prone to frequent spontaneous quantum entanglement, against all odds, causing spatial anomalies."
+ scan_desc = "quantum alignment"
+ gain_text = "You feel faintly connected to everything around you..."
+ lose_text = "You no longer feel connected to your surroundings."
+ var/atom/linked_target = null
+ var/linked = FALSE
+ var/returning = FALSE
+ var/snapback_time = 0
+
+/datum/brain_trauma/special/quantum_alignment/on_life()
+ if(linked)
+ if(QDELETED(linked_target))
+ linked_target = null
+ linked = FALSE
+ else if(!returning && world.time > snapback_time)
+ start_snapback()
+ return
+ if(prob(4))
+ try_entangle()
+
+/datum/brain_trauma/special/quantum_alignment/proc/try_entangle()
+ //Check for pulled mobs
+ if(ismob(owner.pulling))
+ entangle(owner.pulling)
+ return
+ //Check for adjacent mobs
+ for(var/mob/living/L in oview(1, owner))
+ if(owner.Adjacent(L))
+ entangle(L)
+ return
+ //Check for pulled objects
+ if(isobj(owner.pulling))
+ entangle(owner.pulling)
+ return
+
+ //Check main hand
+ var/obj/item/held_item = owner.get_active_held_item()
+ if(held_item && !(HAS_TRAIT(held_item, TRAIT_NODROP)))
+ entangle(held_item)
+ return
+
+ //Check off hand
+ held_item = owner.get_inactive_held_item()
+ if(held_item && !(HAS_TRAIT(held_item, TRAIT_NODROP)))
+ entangle(held_item)
+ return
+
+ //Just entangle with the turf
+ entangle(get_turf(owner))
+
+/datum/brain_trauma/special/quantum_alignment/proc/entangle(atom/target)
+ to_chat(owner, "You start feeling a strong sense of connection to [target].")
+ linked_target = target
+ linked = TRUE
+ snapback_time = world.time + rand(450, 6000)
+
+/datum/brain_trauma/special/quantum_alignment/proc/start_snapback()
+ if(QDELETED(linked_target))
+ linked_target = null
+ linked = FALSE
+ return
+ to_chat(owner, "Your connection to [linked_target] suddenly feels extremely strong... you can feel it pulling you!")
+ owner.playsound_local(owner, 'sound/magic/lightning_chargeup.ogg', 75, FALSE)
+ returning = TRUE
+ addtimer(CALLBACK(src, .proc/snapback), 100)
+
+/datum/brain_trauma/special/quantum_alignment/proc/snapback()
+ returning = FALSE
+ if(QDELETED(linked_target))
+ to_chat(owner, "The connection fades abruptly, and the pull with it.")
+ linked_target = null
+ linked = FALSE
+ return
+ to_chat(owner, "You're pulled through spacetime!")
+ do_teleport(owner, get_turf(linked_target), null, TRUE, channel = TELEPORT_CHANNEL_QUANTUM)
+ owner.playsound_local(owner, 'sound/magic/repulse.ogg', 100, FALSE)
+ linked_target = null
+ linked = FALSE
+
/datum/brain_trauma/special/psychotic_brawling
name = "Violent Psychosis"
desc = "Patient fights in unpredictable ways, ranging from helping his target to hitting them with brutal strength."
diff --git a/code/datums/components/beetlejuice.dm b/code/datums/components/beetlejuice.dm
index 2ae78ad3ac9..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()
diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm
index 98d519dd6a8..6a964029b47 100644
--- a/code/datums/components/butchering.dm
+++ b/code/datums/components/butchering.dm
@@ -55,7 +55,7 @@
log_combat(user, H, "starts slicing the throat of")
playsound(H.loc, butcher_sound, 50, TRUE, -1)
- if(do_mob(user, H, CLAMP(500 / source.force, 30, 100)) && H.Adjacent(source))
+ if(do_mob(user, H, clamp(500 / source.force, 30, 100)) && H.Adjacent(source))
if(H.has_status_effect(/datum/status_effect/neck_slice))
user.show_message("[H]'s neck has already been already cut, you can't make the bleeding any worse!", MSG_VISUAL, \
"Their neck has already been already cut, you can't make the bleeding any worse!")
@@ -65,7 +65,7 @@
"[user] slits your throat...")
log_combat(user, H, "finishes slicing the throat of")
H.apply_damage(source.force, BRUTE, BODY_ZONE_HEAD)
- H.bleed_rate = CLAMP(H.bleed_rate + 20, 0, 30)
+ H.bleed_rate = clamp(H.bleed_rate + 20, 0, 30)
H.apply_status_effect(/datum/status_effect/neck_slice)
/datum/component/butchering/proc/Butcher(mob/living/butcher, mob/living/meat)
diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm
index 7dda2b1ac45..a187366c9b9 100644
--- a/code/datums/components/crafting/recipes.dm
+++ b/code/datums/components/crafting/recipes.dm
@@ -217,6 +217,16 @@
time = 40
category = CAT_ROBOT
+/datum/crafting_recipe/Vibebot
+ name = "Vibebot"
+ result = /mob/living/simple_animal/bot/vibebot
+ reqs = list(/obj/item/light/bulb = 2,
+ /obj/item/bodypart/head/robot = 1,
+ /obj/item/assembly/prox_sensor = 1,
+ /obj/item/toy/crayon = 1)
+ time = 40
+ category = CAT_ROBOT
+
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
name = "Pneumatic Cannon"
result = /obj/item/pneumatic_cannon/ghetto
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 d1dbb305e92..f5126ccc69d 100644
--- a/code/datums/components/explodable.dm
+++ b/code/datums/components/explodable.dm
@@ -15,7 +15,7 @@
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))
diff --git a/code/datums/components/fantasy/prefixes.dm b/code/datums/components/fantasy/prefixes.dm
index 11705540cb2..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
diff --git a/code/datums/components/gps.dm b/code/datums/components/gps.dm
index 890a854694c..d3f1a91b117 100644
--- a/code/datums/components/gps.dm
+++ b/code/datums/components/gps.dm
@@ -88,7 +88,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
if(!ui)
// Variable window height, depending on how many GPS units there are
// to show, clamped to relatively safe range.
- var/gps_window_height = CLAMP(325 + GLOB.GPS_list.len * 14, 325, 700)
+ var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
ui = new(user, src, ui_key, "gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
ui.open()
diff --git a/code/datums/components/infective.dm b/code/datums/components/infective.dm
index bf39c32f7d6..930c72d590f 100644
--- a/code/datums/components/infective.dm
+++ b/code/datums/components/infective.dm
@@ -13,7 +13,7 @@
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 110c82ad068..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)
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/nanites.dm b/code/datums/components/nanites.dm
index 64870dfca6d..15b5169bba3 100644
--- a/code/datums/components/nanites.dm
+++ b/code/datums/components/nanites.dm
@@ -176,7 +176,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)
@@ -188,7 +188,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)
@@ -250,13 +250,13 @@
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_cloud_sync(datum/source, method)
switch(method)
@@ -268,7 +268,7 @@
cloud_active = TRUE
/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 80e1bc59505..474d5049c5d 100644
--- a/code/datums/components/orbiter.dm
+++ b/code/datums/components/orbiter.dm
@@ -21,7 +21,7 @@
var/atom/target = parent
target.orbiters = src
- if(ismovableatom(target))
+ if(ismovable(target))
tracker = new(target, CALLBACK(src, .proc/move_react))
/datum/component/orbiter/UnregisterFromParent()
diff --git a/code/datums/components/plumbing/_plumbing.dm b/code/datums/components/plumbing/_plumbing.dm
index 17105b0c5de..2bc2fc3c86b 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)
diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm
index cfc5d4682d1..2bd1f1b938f 100644
--- a/code/datums/components/riding.dm
+++ b/code/datums/components/riding.dm
@@ -25,7 +25,7 @@
var/respect_mob_mobility = TRUE
/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 97dd6e008bd..1a95ec16ef3 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 1482a26305f..285566edf98 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_ITEM_WEARERCROSSED, .proc/play_squeak_crossed)
diff --git a/code/datums/components/stationloving.dm b/code/datums/components/stationloving.dm
index 0282f247153..f8a7a4d44e4 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 1e12ff9fd33..840893d906b 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/wet_floor.dm b/code/datums/components/wet_floor.dm
index fd2a82ce042..c138a2a377f 100644
--- a/code/datums/components/wet_floor.dm
+++ b/code/datums/components/wet_floor.dm
@@ -177,7 +177,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/dash_weapon.dm b/code/datums/dash_weapon.dm
index 60ecc62f766..0e22a4f350f 100644
--- a/code/datums/dash_weapon.dm
+++ b/code/datums/dash_weapon.dm
@@ -43,7 +43,7 @@
addtimer(CALLBACK(src, .proc/charge), charge_rate)
/datum/action/innate/dash/proc/charge()
- current_charges = CLAMP(current_charges + 1, 0, max_charges)
+ current_charges = clamp(current_charges + 1, 0, max_charges)
holder.update_action_buttons_icon()
if(recharge_sound)
playsound(dashing_item, recharge_sound, 50, TRUE)
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index b6b1b55a8cd..9d269370c7c 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -248,7 +248,7 @@
SetSpread(DISEASE_SPREAD_BLOOD)
permeability_mod = max(CEILING(0.4 * properties["transmittable"], 1), 1)
- cure_chance = 15 - CLAMP(properties["resistance"], -5, 5) // can be between 10 and 20
+ cure_chance = 15 - clamp(properties["resistance"], -5, 5) // can be between 10 and 20
stage_prob = max(properties["stage_rate"], 2)
SetSeverity(properties["severity"])
GenerateCure(properties)
@@ -303,7 +303,7 @@
// Will generate a random cure, the more resistance the symptoms have, the harder the cure.
/datum/disease/advance/proc/GenerateCure()
if(properties && properties.len)
- var/res = CLAMP(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
+ var/res = clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
if(res == oldres)
return
cures = list(pick(advance_cures[res]))
diff --git a/code/datums/elements/cleaning.dm b/code/datums/elements/cleaning.dm
index 03c448c14a5..fa563129390 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 8d440f2ca68..928ca275205 100644
--- a/code/datums/elements/firestacker.dm
+++ b/code/datums/elements/firestacker.dm
@@ -10,7 +10,7 @@
/datum/element/firestacker/Attach(datum/target, amount)
. = ..()
- if(!ismovableatom(target))
+ if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
src.amount = amount
diff --git a/code/datums/elements/selfknockback.dm b/code/datums/elements/selfknockback.dm
index ae918de9ea1..5e153579d6a 100644
--- a/code/datums/elements/selfknockback.dm
+++ b/code/datums/elements/selfknockback.dm
@@ -14,12 +14,12 @@ clamping the Knockback_Force value below. */
RegisterSignal(target, COMSIG_ITEM_AFTERATTACK, .proc/Item_SelfKnockback)
else if(isprojectile(target))
RegisterSignal(target, COMSIG_PROJECTILE_FIRE, .proc/Projectile_SelfKnockback)
- else
+ else
return ELEMENT_INCOMPATIBLE
-
+
override_throw_val = throw_amount
override_speed_val = speed_amount
-
+
/datum/element/selfknockback/Detach(datum/source, force)
. = ..()
UnregisterSignal(source, list(COMSIG_ITEM_AFTERATTACK, COMSIG_PROJECTILE_FIRE))
@@ -40,8 +40,8 @@ clamping the Knockback_Force value below. */
if(isturf(attacktarget) && !attacktarget.density)
return
if(proximity_flag || (get_dist(attacktarget, usertarget) <= I.reach))
- var/knockback_force = Get_Knockback_Force(CLAMP(CEILING((I.force / 10), 1), 1, 5))
- var/knockback_speed = Get_Knockback_Speed(CLAMP(knockback_force, 1, 5))
+ var/knockback_force = Get_Knockback_Force(clamp(CEILING((I.force / 10), 1), 1, 5))
+ var/knockback_speed = Get_Knockback_Speed(clamp(knockback_force, 1, 5))
var/target_angle = Get_Angle(attacktarget, usertarget)
var/move_target = get_ranged_target_turf(usertarget, angle2dir(target_angle), knockback_force)
@@ -52,8 +52,8 @@ clamping the Knockback_Force value below. */
if(!P.firer)
return
- var/knockback_force = Get_Knockback_Force(CLAMP(CEILING((P.damage / 10), 1), 1, 5))
- var/knockback_speed = Get_Knockback_Speed(CLAMP(knockback_force, 1, 5))
+ var/knockback_force = Get_Knockback_Force(clamp(CEILING((P.damage / 10), 1), 1, 5))
+ var/knockback_speed = Get_Knockback_Speed(clamp(knockback_force, 1, 5))
var/atom/movable/knockback_target = P.firer
var/move_target = get_edge_target_turf(knockback_target, angle2dir(P.original_angle+180))
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/elements/waddling.dm b/code/datums/elements/waddling.dm
index a7a141afcbd..894d33455cb 100644
--- a/code/datums/elements/waddling.dm
+++ b/code/datums/elements/waddling.dm
@@ -2,7 +2,7 @@
/datum/element/waddling/Attach(datum/target)
. = ..()
- if(!ismovableatom(target))
+ if(!ismovable(target))
return ELEMENT_INCOMPATIBLE
if(isliving(target))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/LivingWaddle)
diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm
index b748d1d3bfa..f751de8bc86 100644
--- a/code/datums/explosion.dm
+++ b/code/datums/explosion.dm
@@ -121,14 +121,14 @@ GLOBAL_LIST_EMPTY(explosions)
if(dist <= round(max_range + world.view - 2, 1))
M.playsound_local(epicenter, null, 100, 1, frequency, falloff = 5, S = explosion_sound)
if(baseshakeamount > 0)
- shake_camera(M, 25, CLAMP(baseshakeamount, 0, 10))
+ shake_camera(M, 25, clamp(baseshakeamount, 0, 10))
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
else if(dist <= far_dist)
- var/far_volume = CLAMP(far_dist, 30, 50) // Volume is based on explosion size and dist
+ var/far_volume = clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
M.playsound_local(epicenter, null, far_volume, 1, frequency, falloff = 5, S = far_explosion_sound)
if(baseshakeamount > 0)
- shake_camera(M, 10, CLAMP(baseshakeamount*0.25, 0, 2.5))
+ shake_camera(M, 10, clamp(baseshakeamount*0.25, 0, 2.5))
EX_PREPROCESS_CHECK_TICK
//postpone processing for a bit
diff --git a/code/datums/http.dm b/code/datums/http.dm
new file mode 100644
index 00000000000..58eb815acbf
--- /dev/null
+++ b/code/datums/http.dm
@@ -0,0 +1,74 @@
+/datum/http_request
+ var/id
+ var/in_progress = FALSE
+
+ var/method
+ var/body
+ var/headers
+ var/url
+
+ var/_raw_response
+
+/datum/http_request/proc/prepare(method, url, body = "", list/headers)
+ if (!length(headers))
+ headers = ""
+ else
+ headers = json_encode(headers)
+
+ src.method = method
+ src.url = url
+ src.body = body
+ src.headers = headers
+
+/datum/http_request/proc/execute_blocking()
+ _raw_response = rustg_http_request_blocking(method, url, body, headers)
+
+/datum/http_request/proc/begin_async()
+ if (in_progress)
+ CRASH("Attempted to re-use a request object.")
+
+ id = rustg_http_request_async(method, url, body, headers)
+
+ if (isnull(text2num(id)))
+ CRASH("Proc error: [id]")
+ _raw_response = "Proc error: [id]"
+ else
+ in_progress = TRUE
+
+/datum/http_request/proc/is_complete()
+ if (isnull(id))
+ return TRUE
+
+ if (!in_progress)
+ return TRUE
+
+ var/r = rustg_http_check_request(id)
+
+ if (r == RUSTG_JOB_NO_RESULTS_YET)
+ return FALSE
+ else
+ _raw_response = r
+ in_progress = FALSE
+ return TRUE
+
+/datum/http_request/proc/into_response()
+ var/datum/http_response/R = new()
+
+ try
+ var/list/L = json_decode(_raw_response)
+ R.status_code = L["status_code"]
+ R.headers = L["headers"]
+ R.body = L["body"]
+ catch
+ R.errored = TRUE
+ R.error = _raw_response
+
+ return R
+
+/datum/http_response
+ var/status_code
+ var/body
+ var/list/headers
+
+ var/errored = FALSE
+ var/error
diff --git a/code/datums/keybinding/carbon.dm b/code/datums/keybinding/carbon.dm
index e8059da5dd3..abf84c9aadf 100644
--- a/code/datums/keybinding/carbon.dm
+++ b/code/datums/keybinding/carbon.dm
@@ -6,8 +6,7 @@
return iscarbon(user.mob)
/datum/keybinding/carbon/toggle_throw_mode
- hotkey_keys = list("R")
- classic_keys = list("Southwest") // END
+ hotkey_keys = list("R", "Southwest") // END
name = "toggle_throw_mode"
full_name = "Toggle throw mode"
description = "Toggle throwing the current item or not."
diff --git a/code/datums/keybinding/mob.dm b/code/datums/keybinding/mob.dm
index 693b740513c..f194c7fd2fe 100644
--- a/code/datums/keybinding/mob.dm
+++ b/code/datums/keybinding/mob.dm
@@ -5,7 +5,6 @@
/datum/keybinding/mob/face_north
hotkey_keys = list("CtrlW", "CtrlNorth")
- classic_keys = list("CtrlNorth")
name = "face_north"
full_name = "Face North"
description = ""
@@ -18,7 +17,6 @@
/datum/keybinding/mob/face_east
hotkey_keys = list("CtrlD", "CtrlEast")
- classic_keys = list("CtrlEast")
name = "face_east"
full_name = "Face East"
description = ""
@@ -31,7 +29,6 @@
/datum/keybinding/mob/face_south
hotkey_keys = list("CtrlS", "CtrlSouth")
- classic_keys = list("CtrlSouth")
name = "face_south"
full_name = "Face South"
description = ""
@@ -43,7 +40,6 @@
/datum/keybinding/mob/face_west
hotkey_keys = list("CtrlA", "CtrlWest")
- classic_keys = list("CtrlWest")
name = "face_west"
full_name = "Face West"
description = ""
@@ -55,7 +51,6 @@
/datum/keybinding/mob/stop_pulling
hotkey_keys = list("H", "Delete")
- classic_keys = list("Delete")
name = "stop_pulling"
full_name = "Stop pulling"
description = ""
@@ -91,8 +86,7 @@
return TRUE
/datum/keybinding/mob/swap_hands
- hotkey_keys = list("X")
- classic_keys = list("Northeast") // PAGEUP
+ hotkey_keys = list("X", "Northeast") // PAGEUP
name = "swap_hands"
full_name = "Swap hands"
description = ""
@@ -103,8 +97,7 @@
return TRUE
/datum/keybinding/mob/activate_inhand
- hotkey_keys = list("Z")
- classic_keys = list("Southeast") // PAGEDOWN
+ hotkey_keys = list("Z", "Southeast") // PAGEDOWN
name = "activate_inhand"
full_name = "Activate in-hand"
description = "Uses whatever item you have inhand"
diff --git a/code/datums/keybinding/movement.dm b/code/datums/keybinding/movement.dm
index c021ca928ed..ca199b5eb4d 100644
--- a/code/datums/keybinding/movement.dm
+++ b/code/datums/keybinding/movement.dm
@@ -4,28 +4,24 @@
/datum/keybinding/movement/north
hotkey_keys = list("W", "North")
- classic_keys = list("North")
name = "North"
full_name = "Move North"
description = "Moves your character north"
/datum/keybinding/movement/south
hotkey_keys = list("S", "South")
- classic_keys = list("South")
name = "South"
full_name = "Move South"
description = "Moves your character south"
/datum/keybinding/movement/west
hotkey_keys = list("A", "West")
- classic_keys = list("West")
name = "West"
full_name = "Move West"
description = "Moves your character left"
/datum/keybinding/movement/east
hotkey_keys = list("D", "East")
- classic_keys = list("East")
name = "East"
full_name = "Move East"
description = "Moves your character east"
diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm
index dc95d24ea37..e67b30b3915 100644
--- a/code/datums/martial/krav_maga.dm
+++ b/code/datums/martial/krav_maga.dm
@@ -106,7 +106,7 @@
to_chat(A, "You pound [D] on the chest!")
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
if(D.losebreath <= 10)
- D.losebreath = CLAMP(D.losebreath + 5, 0, 10)
+ D.losebreath = clamp(D.losebreath + 5, 0, 10)
D.adjustOxyLoss(10)
log_combat(A, D, "quickchoked")
return 1
@@ -118,7 +118,7 @@
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
D.apply_damage(5, A.dna.species.attack_type)
if(D.silent <= 10)
- D.silent = CLAMP(D.silent + 10, 0, 10)
+ D.silent = clamp(D.silent + 10, 0, 10)
log_combat(A, D, "neck chopped")
return 1
diff --git a/code/datums/materials/basemats.dm b/code/datums/materials/basemats.dm
index 839d6857401..ccbcb6de65f 100644
--- a/code/datums/materials/basemats.dm
+++ b/code/datums/materials/basemats.dm
@@ -98,7 +98,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
/datum/material/plasma/on_applied(atom/source, amount, material_flags)
. = ..()
- if(ismovableatom(source))
+ if(ismovable(source))
source.AddElement(/datum/element/firestacker, amount=1)
source.AddComponent(/datum/component/explodable, 0, 0, amount / 2500, amount / 1250)
diff --git a/code/datums/movement_detector.dm b/code/datums/movement_detector.dm
index ff40d6bb1d9..d5df0184097 100644
--- a/code/datums/movement_detector.dm
+++ b/code/datums/movement_detector.dm
@@ -19,7 +19,7 @@
tracked = target
src.listener = listener
- while(ismovableatom(target))
+ while(ismovable(target))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react)
target = target.loc
@@ -28,7 +28,7 @@
if(!tracked)
return
var/atom/movable/target = tracked
- while(ismovableatom(target))
+ while(ismovable(target))
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
target = target.loc
@@ -41,12 +41,12 @@
if(oldloc && !isturf(oldloc))
var/atom/target = oldloc
- while(ismovableatom(target))
+ while(ismovable(target))
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
target = target.loc
if(tracked.loc != newturf)
var/atom/target = mover.loc
- while(ismovableatom(target))
+ while(ismovable(target))
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react, TRUE)
target = target.loc
diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm
index 183b2235be3..2d3ad4551f2 100644
--- a/code/datums/progressbar.dm
+++ b/code/datums/progressbar.dm
@@ -42,7 +42,7 @@
if (user.client)
user.client.images += bar
- progress = CLAMP(progress, 0, goal)
+ progress = clamp(progress, 0, goal)
last_progress = progress
bar.icon_state = "prog_bar_[round(((progress / goal) * 100), 5)]"
if (!shown)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 1913399760f..f5845c25252 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -337,7 +337,7 @@
reagents = new()
reagents.reagent_list.Add(A)
reagents.conditional_update()
- else if(ismovableatom(A))
+ else if(ismovable(A))
var/atom/movable/M = A
if(isliving(M.loc))
var/mob/living/L = M.loc
@@ -889,7 +889,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/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm
index 36f29b5ae8c..574df08d169 100644
--- a/code/game/gamemodes/dynamic/dynamic.dm
+++ b/code/game/gamemodes/dynamic/dynamic.dm
@@ -290,10 +290,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
generate_threat()
var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_latejoin_delay_max + GLOB.dynamic_latejoin_delay_min)
- latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time
+ latejoin_injection_cooldown = round(clamp(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time
var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min)
- midround_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time
+ midround_injection_cooldown = round(clamp(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time
log_game("DYNAMIC: Dynamic Mode initialized with a Threat Level of... [threat_level]!")
return TRUE
@@ -624,7 +624,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
// Somehow it managed to trigger midround multiple times so this was moved here.
// There is no way this should be able to trigger an injection twice now.
var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min)
- midround_injection_cooldown = (round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time)
+ midround_injection_cooldown = (round(clamp(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time)
// Time to inject some threat into the round
if(EMERGENCY_ESCAPED_OR_ENDGAMED) // Unless the shuttle is gone
@@ -753,7 +753,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if (drafted_rules.len > 0 && picking_midround_latejoin_rule(drafted_rules))
var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_latejoin_delay_max + GLOB.dynamic_latejoin_delay_min)
- latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time
+ latejoin_injection_cooldown = round(clamp(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time
/// Refund threat, but no more than threat_level.
/datum/game_mode/dynamic/proc/refund_threat(regain)
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
index a8ecc841597..e64700d8084 100644
--- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
@@ -651,6 +651,6 @@
if (prob(meteorminutes/2))
wavetype = GLOB.meteors_catastrophic
- var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10)
+ var/ramp_up_final = clamp(round(meteorminutes/rampupdelta), 1, 10)
spawn_meteors(ramp_up_final, wavetype)
diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm
index 8bcbb3669b5..3b88abfb83b 100644
--- a/code/game/gamemodes/meteor/meteor.dm
+++ b/code/game/gamemodes/meteor/meteor.dm
@@ -26,7 +26,7 @@
if (prob(meteorminutes/2))
wavetype = GLOB.meteors_catastrophic
- var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10)
+ var/ramp_up_final = clamp(round(meteorminutes/rampupdelta), 1, 10)
spawn_meteors(ramp_up_final, wavetype)
diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm
index 84dbcf8f59e..c515e9798b6 100644
--- a/code/game/gamemodes/objective_items.dm
+++ b/code/game/gamemodes/objective_items.dm
@@ -166,6 +166,12 @@
return 1
return 0
+/datum/objective_item/steal/blackbox
+ name = "The Blackbox."
+ targetitem = /obj/item/blackbox
+ difficulty = 10
+ excludefromjob = list("Chief Engineer","Station Engineer","Atmospheric Technician")
+
//Unique Objectives
/datum/objective_item/unique/docs_red
name = "the \"Red\" secret documents."
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 8179e7f227c..05780c4e776 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -174,7 +174,7 @@
var/multiplier = text2num(href_list["multiplier"])
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
- multiplier = CLAMP(multiplier,1,50)
+ multiplier = clamp(multiplier,1,50)
/////////////////
diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm
index 69118856363..10994a9f4c2 100644
--- a/code/game/machinery/computer/apc_control.dm
+++ b/code/game/machinery/computer/apc_control.dm
@@ -152,7 +152,7 @@
return
log_activity("changed greater than charge filter to \"[new_filter]\"")
if(new_filter)
- new_filter = CLAMP(new_filter, 0, 100)
+ new_filter = clamp(new_filter, 0, 100)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
result_filters["Charge Above"] = new_filter
if(href_list["below_filter"])
@@ -162,7 +162,7 @@
return
log_activity("changed lesser than charge filter to \"[new_filter]\"")
if(new_filter)
- new_filter = CLAMP(new_filter, 0, 100)
+ new_filter = clamp(new_filter, 0, 100)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
result_filters["Charge Below"] = new_filter
if(href_list["access_filter"])
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index a2e3efb9e5c..7c4222a07ea 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
if("rate")
var/target = text2num(params["rate"])
if(!isnull(target))
- target = CLAMP(target, 0, MAX_TRANSFER_RATE)
+ target = clamp(target, 0, MAX_TRANSFER_RATE)
signal.data += list("tag" = input_tag, "set_volume_rate" = target)
. = TRUE
if("output")
@@ -316,7 +316,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)
if("pressure")
var/target = text2num(params["pressure"])
if(!isnull(target))
- target = CLAMP(target, 0, 4500)
+ target = clamp(target, 0, 4500)
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
. = TRUE
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm
index 4f1334cd37d..5fea233e655 100644
--- a/code/game/machinery/computer/dna_console.dm
+++ b/code/game/machinery/computer/dna_console.dm
@@ -604,13 +604,13 @@
if("setbufferlabel")
var/text = sanitize(input(usr, "Input a new label:", "Input a Text", null) as text|null)
if(num && text)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
buffer_slot["label"] = text
if("setbuffer")
if(num && viable_occupant)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
buffer[num] = list(
"label"="Buffer[num]:[viable_occupant.real_name]",
"UI"=viable_occupant.dna.uni_identity,
@@ -620,7 +620,7 @@
)
if("clearbuffer")
if(num)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
buffer_slot.Cut()
@@ -635,7 +635,7 @@
apply_buffer(SCANNER_ACTION_MIXED,num)
if("injector")
if(num && injectorready < world.time)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
var/obj/item/dnainjector/timed/I
@@ -662,11 +662,11 @@
injectorready = world.time + INJECTOR_TIMEOUT
if("loaddisk")
if(num && diskette && diskette.fields)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
buffer[num] = diskette.fields.Copy()
if("savedisk")
if(num && diskette && !diskette.read_only)
- num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
+ num = clamp(num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[num]
if(istype(buffer_slot))
diskette.name = "data disk \[[buffer_slot["label"]]\]"
@@ -955,7 +955,7 @@
return viable_occupant
/obj/machinery/computer/scan_consolenew/proc/apply_buffer(action,buffer_num)
- buffer_num = CLAMP(buffer_num, 1, NUMBER_OF_BUFFERS)
+ buffer_num = clamp(buffer_num, 1, NUMBER_OF_BUFFERS)
var/list/buffer_slot = buffer[buffer_num]
var/mob/living/carbon/viable_occupant = get_viable_occupant()
if(istype(buffer_slot))
diff --git a/code/game/machinery/computer/prisoner/gulag_teleporter.dm b/code/game/machinery/computer/prisoner/gulag_teleporter.dm
index 40d9434ce3d..9da901cd20e 100644
--- a/code/game/machinery/computer/prisoner/gulag_teleporter.dm
+++ b/code/game/machinery/computer/prisoner/gulag_teleporter.dm
@@ -97,7 +97,7 @@
return
if(!new_goal)
new_goal = default_goal
- contained_id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
+ contained_id.goal = clamp(new_goal, 0, 1000) //maximum 1000 points
return TRUE
if("toggle_open")
if(teleporter.locked)
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 356cd54c990..a9573e2a1ee 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -33,7 +33,7 @@
to_chat(user, "You begin repairing [src]...")
if(I.use_tool(src, user, 40, volume=40))
- obj_integrity = CLAMP(obj_integrity + 20, 0, max_integrity)
+ obj_integrity = clamp(obj_integrity + 20, 0, max_integrity)
else
return ..()
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index 38aca8e7e74..4e5fa5f48ae 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -138,7 +138,7 @@
. /= 10
/obj/machinery/door_timer/proc/set_timer(value)
- var/new_time = CLAMP(value,0,MAX_TIMER)
+ var/new_time = clamp(value,0,MAX_TIMER)
. = new_time == timer_duration //return 1 on no change
timer_duration = new_time
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 9b59c5c5df1..addce4d0be1 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -452,7 +452,9 @@
return ..()
/obj/structure/firelock_frame/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
- if((constructionStep == CONSTRUCTION_NOCIRCUIT) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
+ if(the_rcd.mode == RCD_DECONSTRUCT)
+ return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 16)
+ else if((constructionStep == CONSTRUCTION_NOCIRCUIT) && (the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS))
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
return FALSE
@@ -464,6 +466,10 @@
constructionStep = CONSTRUCTION_GUTTED
update_icon()
return TRUE
+ else if(RCD_DECONSTRUCT)
+ to_chat(user, "You deconstruct [src].")
+ qdel(src)
+ return TRUE
return FALSE
/obj/structure/firelock_frame/heavy
diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm
index 8ef69e39322..265832a6a74 100644
--- a/code/game/machinery/launch_pad.dm
+++ b/code/game/machinery/launch_pad.dm
@@ -102,9 +102,9 @@
if(teleporting)
return
if(!isnull(x))
- x_offset = CLAMP(x, -range, range)
+ x_offset = clamp(x, -range, range)
if(!isnull(y))
- y_offset = CLAMP(y, -range, range)
+ y_offset = clamp(y, -range, range)
update_indicator()
/obj/machinery/launchpad/proc/doteleport(mob/user, sending)
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index e64ef7aba17..5b72ef26844 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -55,9 +55,9 @@
new /obj/item/pipe_meter(loc)
wait = world.time + 15
if(href_list["layer_up"])
- piping_layer = CLAMP(++piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
+ piping_layer = clamp(++piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
if(href_list["layer_down"])
- piping_layer = CLAMP(--piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
+ piping_layer = clamp(--piping_layer, PIPING_LAYER_MIN, PIPING_LAYER_MAX)
return
/obj/machinery/pipedispenser/attackby(obj/item/W, mob/user, params)
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 351c432b8f2..2f7279b1be6 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -245,13 +245,13 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
to_department = GLOB.req_console_ckey_departments[to_department]
message = new_message
screen = REQ_SCREEN_AUTHENTICATE
- priority = CLAMP(text2num(href_list["priority"]), REQ_NORMAL_MESSAGE_PRIORITY, REQ_EXTREME_MESSAGE_PRIORITY)
+ priority = clamp(text2num(href_list["priority"]), REQ_NORMAL_MESSAGE_PRIORITY, REQ_EXTREME_MESSAGE_PRIORITY)
if(href_list["writeAnnouncement"])
var/new_message = reject_bad_text(stripped_input(usr, "Write your message:", "Awaiting Input", "", MAX_MESSAGE_LEN))
if(new_message)
message = new_message
- priority = CLAMP(text2num(href_list["priority"]) || REQ_NORMAL_MESSAGE_PRIORITY, REQ_NORMAL_MESSAGE_PRIORITY, REQ_EXTREME_MESSAGE_PRIORITY)
+ priority = clamp(text2num(href_list["priority"]) || REQ_NORMAL_MESSAGE_PRIORITY, REQ_NORMAL_MESSAGE_PRIORITY, REQ_EXTREME_MESSAGE_PRIORITY)
else
message = ""
announceAuth = FALSE
@@ -324,7 +324,7 @@ GLOBAL_LIST_EMPTY(req_console_ckey_departments)
//Handle screen switching
if(href_list["setScreen"])
- var/set_screen = CLAMP(text2num(href_list["setScreen"]) || 0, REQ_SCREEN_MAIN, REQ_SCREEN_ANNOUNCE)
+ var/set_screen = clamp(text2num(href_list["setScreen"]) || 0, REQ_SCREEN_MAIN, REQ_SCREEN_ANNOUNCE)
switch(set_screen)
if(REQ_SCREEN_MAIN)
to_department = ""
diff --git a/code/game/machinery/roulette_machine.dm b/code/game/machinery/roulette_machine.dm
index bb17ba0a4e0..6407b0e8b62 100644
--- a/code/game/machinery/roulette_machine.dm
+++ b/code/game/machinery/roulette_machine.dm
@@ -95,7 +95,7 @@
anchored = !anchored
. = TRUE
if("ChangeBetAmount")
- chosen_bet_amount = CLAMP(text2num(params["amount"]), 10, 500)
+ chosen_bet_amount = clamp(text2num(params["amount"]), 10, 500)
. = TRUE
if("ChangeBetType")
chosen_bet_type = params["type"]
diff --git a/code/game/machinery/scan_gate.dm b/code/game/machinery/scan_gate.dm
index 398c3d8243e..fb3880b90b6 100644
--- a/code/game/machinery/scan_gate.dm
+++ b/code/game/machinery/scan_gate.dm
@@ -216,7 +216,7 @@
. = TRUE
if("set_nanite_cloud")
var/new_cloud = text2num(params["new_cloud"])
- nanite_cloud = CLAMP(round(new_cloud, 1), 1, 100)
+ nanite_cloud = clamp(round(new_cloud, 1), 1, 100)
. = TRUE
//Some species are not scannable, like abductors (too unknown), androids (too artificial) or skeletons (too magic)
if("set_target_species")
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index 95f73e76490..454dedaf125 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -131,7 +131,7 @@
settableTemperatureRange = cap * 30
efficiency = (cap + 1) * 10000
- targetTemperature = CLAMP(targetTemperature,
+ targetTemperature = clamp(targetTemperature,
max(settableTemperatureMedian - settableTemperatureRange, TCMB),
settableTemperatureMedian + settableTemperatureRange)
@@ -234,7 +234,7 @@
target= text2num(target) + T0C
. = TRUE
if(.)
- targetTemperature = CLAMP(round(target),
+ targetTemperature = clamp(round(target),
max(settableTemperatureMedian - settableTemperatureRange, TCMB),
settableTemperatureMedian + settableTemperatureRange)
if("eject")
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index cfc23656d8f..545e2d9ab63 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -192,12 +192,12 @@
/obj/machinery/syndicatebomb/proc/settings(mob/user)
var/new_timer = input(user, "Please set the timer.", "Timer", "[timer_set]") as num|null
-
+
if (isnull(new_timer))
return
-
+
if(in_range(src, user) && isliving(user)) //No running off and setting bombs from across the station
- timer_set = CLAMP(new_timer, minimum_timer, maximum_timer)
+ timer_set = clamp(new_timer, minimum_timer, maximum_timer)
loc.visible_message("[icon2html(src, viewers(src))] timer set for [timer_set] seconds.")
if(alert(user,"Would you like to start the countdown now?",,"Yes","No") == "Yes" && in_range(src, user) && isliving(user))
if(!active)
diff --git a/code/game/machinery/telecomms/machines/message_server.dm b/code/game/machinery/telecomms/machines/message_server.dm
index 694669775be..e07708b93ba 100644
--- a/code/game/machinery/telecomms/machines/message_server.dm
+++ b/code/game/machinery/telecomms/machines/message_server.dm
@@ -5,7 +5,7 @@
require the message server.
*/
-// A decorational representation of SSblackbox, usually placed alongside the message server.
+// A decorational representation of SSblackbox, usually placed alongside the message server. Also contains a traitor theft item.
/obj/machinery/blackbox_recorder
icon = 'icons/obj/stationobjs.dmi'
icon_state = "blackbox"
@@ -15,7 +15,60 @@
idle_power_usage = 10
active_power_usage = 100
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 70)
+ var/obj/item/stored
+/obj/machinery/blackbox_recorder/Initialize()
+ . = ..()
+ stored = new /obj/item/blackbox(src)
+
+/obj/machinery/blackbox_recorder/attack_hand(mob/living/user)
+ . = ..()
+ if(stored)
+ user.put_in_hands(stored)
+ stored = null
+ to_chat(user, "You remove the blackbox from [src]. The tapes stop spinning.")
+ update_icon()
+ return
+ else
+ to_chat(user, "It seems that the blackbox is missing...")
+ return
+
+/obj/machinery/blackbox_recorder/attackby(obj/item/I, mob/living/user, params)
+ . = ..()
+ if(istype(I, /obj/item/blackbox))
+ if(HAS_TRAIT(I, TRAIT_NODROP) || !user.transferItemToLoc(I, src))
+ to_chat(user, "[I] is stuck to your hand!")
+ return
+ user.visible_message("[user] clicks [I] into [src]!", \
+ "You press the device into [src], and it clicks into place. The tapes begin spinning again.")
+ playsound(src, 'sound/machines/click.ogg', 50, TRUE)
+ stored = I
+ update_icon()
+ return ..()
+ return ..()
+
+/obj/machinery/blackbox_recorder/Destroy()
+ if(stored)
+ stored.forceMove(loc)
+ new /obj/effect/decal/cleanable/oil(loc)
+ return ..()
+
+/obj/machinery/blackbox_recorder/update_icon()
+ . = ..()
+ if(!stored)
+ icon_state = "blackbox_b"
+ else
+ icon_state = "blackbox"
+
+/obj/item/blackbox
+ name = "the blackbox"
+ desc = "A strange relic, capable of recording data on extradimensional vertices. It lives inside the blackbox recorder for safe keeping."
+ icon = 'icons/obj/stationobjs.dmi'
+ icon_state = "blackcube"
+ lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
+ righthand_file = 'icons/mob/inhands/items_righthand.dmi'
+ w_class = WEIGHT_CLASS_BULKY
+ resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
#define MESSAGE_SERVER_FUNCTIONING_MESSAGE "This is an automated message. The messaging system is functioning correctly."
@@ -95,7 +148,7 @@
/obj/machinery/telecomms/message_server/update_overlays()
. = ..()
-
+
if(calibrating)
. += "message_server_calibrate"
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 6830c8f18c9..987899dc3ea 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -70,7 +70,7 @@
com.target = null
visible_message("Cannot authenticate locked on coordinates. Please reinstate coordinate matrix.")
return
- if (ismovableatom(M))
+ if (ismovable(M))
if(do_teleport(M, com.target, channel = TELEPORT_CHANNEL_BLUESPACE))
use_power(5000)
if(!calibrated && prob(30 - ((accuracy) * 10))) //oh dear a problem
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index adde836b741..c276ed5f790 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -487,7 +487,7 @@
/obj/item/punching_glove/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(!..())
- if(ismovableatom(hit_atom))
+ if(ismovable(hit_atom))
var/atom/movable/AM = hit_atom
AM.safe_throw_at(get_edge_target_turf(AM,get_dir(src, AM)), 7, 2)
qdel(src)
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index 7fb300b5449..5cd21715164 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -4,6 +4,26 @@
/datum/component/construction/mecha
var/base_icon
+ // Component typepaths.
+ // most must be defined unless
+ // get_steps is overriden.
+
+ // Circuit board typepaths.
+ // circuit_control and circuit_periph must be defined
+ // unless get_circuit_steps is overriden.
+ var/circuit_control
+ var/circuit_periph
+ var/circuit_weapon
+
+ // Armor plating typepaths. both must be defined
+ // unless relevant step procs are overriden. amounts
+ // must be defined if using /obj/item/stack/sheet types
+ var/inner_plating
+ var/inner_plating_amount
+
+ var/outer_plating
+ var/outer_plating_amount
+
/datum/component/construction/mecha/spawn_result()
if(!result)
return
@@ -19,7 +39,14 @@
SSblackbox.record_feedback("tally", "mechas_created", 1, M.name)
QDEL_NULL(parent)
+// Default proc to generate mech steps.
+// Override if the mech needs an entirely custom process (See HONK mech)
+// Otherwise override specific steps as needed (Ripley, firefighter, Phazon)
+/datum/component/construction/mecha/proc/get_steps()
+ return get_frame_steps() + get_circuit_steps() + (circuit_weapon ? get_circuit_weapon_steps() : list()) + get_stockpart_steps() + get_inner_plating_steps() + get_outer_plating_steps()
+
/datum/component/construction/mecha/update_parent(step_index)
+ steps = get_steps()
..()
// By default, each step in mech construction has a single icon_state:
// "[base_icon][index - 1]"
@@ -43,6 +70,188 @@
parent_atom.cut_overlays()
..()
+// Default proc for the first steps of mech construction.
+/datum/component/construction/mecha/proc/get_frame_steps()
+ return list(
+ list(
+ "key" = TOOL_WRENCH,
+ "desc" = "The hydraulic systems are disconnected."
+ ),
+ list(
+ "key" = TOOL_SCREWDRIVER,
+ "back_key" = TOOL_WRENCH,
+ "desc" = "The hydraulic systems are connected."
+ ),
+ list(
+ "key" = /obj/item/stack/cable_coil,
+ "amount" = 5,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "The hydraulic systems are active."
+ ),
+ list(
+ "key" = TOOL_WIRECUTTER,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "The wiring is added."
+ )
+ )
+
+// Default proc for the circuit board steps of a mech.
+// Second set of steps by default.
+/datum/component/construction/mecha/proc/get_circuit_steps()
+ return list(
+ list(
+ "key" = circuit_control,
+ "action" = ITEM_DELETE,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "The wiring is adjusted."
+ ),
+ list(
+ "key" = TOOL_SCREWDRIVER,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "Central control module is installed."
+ ),
+ list(
+ "key" = circuit_periph,
+ "action" = ITEM_DELETE,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "Central control module is secured."
+ ),
+ list(
+ "key" = TOOL_SCREWDRIVER,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "Peripherals control module is installed."
+ )
+ )
+
+// Default proc for weapon circuitboard steps
+// Used by combat mechs
+/datum/component/construction/mecha/proc/get_circuit_weapon_steps()
+ return list(
+ list(
+ "key" = circuit_weapon,
+ "action" = ITEM_DELETE,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "Peripherals control module is secured."
+ ),
+ list(
+ "key" = TOOL_SCREWDRIVER,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "Weapons control module is installed."
+ )
+ )
+
+// Default proc for stock part installation
+// Third set of steps by default
+/datum/component/construction/mecha/proc/get_stockpart_steps()
+ var/prevstep_text = circuit_weapon ? "Weapons control module is secured." : "Peripherals control module is secured."
+ return list(
+ list(
+ "key" = /obj/item/stock_parts/scanning_module,
+ "action" = ITEM_MOVE_INSIDE,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = prevstep_text
+ ),
+ list(
+ "key" = TOOL_SCREWDRIVER,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "Scanner module is installed."
+ ),
+ list(
+ "key" = /obj/item/stock_parts/capacitor,
+ "action" = ITEM_MOVE_INSIDE,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "Scanner module is secured."
+ ),
+ list(
+ "key" = TOOL_SCREWDRIVER,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "Capacitor is installed."
+ ),
+ list(
+ "key" = /obj/item/stock_parts/cell,
+ "action" = ITEM_MOVE_INSIDE,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "Capacitor is secured."
+ ),
+ list(
+ "key" = TOOL_SCREWDRIVER,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "The power cell is installed."
+ )
+ )
+
+// Default proc for inner armor plating
+// Fourth set of steps by default
+/datum/component/construction/mecha/proc/get_inner_plating_steps()
+ var/list/first_step
+ if(ispath(inner_plating, /obj/item/stack/sheet))
+ first_step = list(
+ list(
+ "key" = inner_plating,
+ "amount" = inner_plating_amount,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "The power cell is secured."
+ )
+ )
+ else
+ first_step = list(
+ list(
+ "key" = inner_plating,
+ "action" = ITEM_DELETE,
+ "back_key" = TOOL_SCREWDRIVER,
+ "desc" = "The power cell is secured."
+ )
+ )
+
+ return first_step + list(
+ list(
+ "key" = TOOL_WRENCH,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "Inner plating is installed."
+ ),
+ list(
+ "key" = TOOL_WELDER,
+ "back_key" = TOOL_WRENCH,
+ "desc" = "Inner Plating is wrenched."
+ )
+ )
+
+// Default proc for outer armor plating
+// Fifth set of steps by default
+/datum/component/construction/mecha/proc/get_outer_plating_steps()
+ var/list/first_step
+ if(ispath(outer_plating, /obj/item/stack/sheet))
+ first_step = list(
+ list(
+ "key" = outer_plating,
+ "amount" = outer_plating_amount,
+ "back_key" = TOOL_WELDER,
+ "desc" = "Inner plating is welded."
+ )
+ )
+ else
+ first_step = list(
+ list(
+ "key" = outer_plating,
+ "action" = ITEM_DELETE,
+ "back_key" = TOOL_WELDER,
+ "desc" = "Inner plating is welded."
+ )
+ )
+
+ return first_step + list(
+ list(
+ "key" = TOOL_WRENCH,
+ "back_key" = TOOL_CROWBAR,
+ "desc" = "External armor is installed."
+ ),
+ list(
+ "key" = TOOL_WELDER,
+ "back_key" = TOOL_WRENCH,
+ "desc" = "External armor is wrenched."
+ )
+ )
+
/datum/component/construction/unordered/mecha_chassis/ripley
result = /datum/component/construction/mecha/ripley
@@ -57,141 +266,24 @@
/datum/component/construction/mecha/ripley
result = /obj/mecha/working/ripley
base_icon = "ripley"
- steps = list(
- //1
- list(
- "key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are disconnected."
- ),
- //2
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are connected."
- ),
+ circuit_control = /obj/item/circuitboard/mecha/ripley/main
+ circuit_periph = /obj/item/circuitboard/mecha/ripley/peripherals
- //3
- list(
- "key" = /obj/item/stack/cable_coil,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The hydraulic systems are active."
- ),
+ inner_plating=/obj/item/stack/sheet/metal
+ inner_plating_amount = 5
- //4
- list(
- "key" = TOOL_WIRECUTTER,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is added."
- ),
+ outer_plating=/obj/item/stack/rods
+ outer_plating_amount = 10
- //5
- list(
- "key" = /obj/item/circuitboard/mecha/ripley/main,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is adjusted."
- ),
-
- //6
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Central control module is installed."
- ),
-
- //7
- list(
- "key" = /obj/item/circuitboard/mecha/ripley/peripherals,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Central control module is secured."
- ),
-
- //8
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Peripherals control module is installed."
- ),
-
- //9
- list(
- "key" = /obj/item/stock_parts/scanning_module,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Peripherals control module is secured."
- ),
-
- //10
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Scanner module is installed."
- ),
-
- //11
- list(
- "key" = /obj/item/stock_parts/capacitor,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Scanner module is secured."
- ),
-
- //12
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Capacitor is installed."
- ),
-
- //13
- list(
- "key" = /obj/item/stock_parts/cell,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Capacitor is secured."
- ),
-
- //14
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "The power cell is installed."
- ),
-
- //15
- list(
- "key" = /obj/item/stack/sheet/metal,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The power cell is secured."
- ),
-
- //16
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Outer plating is installed."
- ),
-
- //17
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "Outer Plating is wrenched."
- ),
-
- //18
+/datum/component/construction/mecha/ripley/get_outer_plating_steps()
+ return list(
list(
"key" = /obj/item/stack/rods,
"amount" = 10,
"back_key" = TOOL_WELDER,
"desc" = "Outer Plating is welded."
),
-
- //19
list(
"key" = TOOL_WELDER,
"back_key" = TOOL_WIRECUTTER,
@@ -317,170 +409,16 @@
/datum/component/construction/mecha/gygax
result = /obj/mecha/combat/gygax
base_icon = "gygax"
- steps = list(
- //1
- list(
- "key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are disconnected."
- ),
- //2
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are connected."
- ),
+ circuit_control = /obj/item/circuitboard/mecha/gygax/main
+ circuit_periph = /obj/item/circuitboard/mecha/gygax/peripherals
+ circuit_weapon = /obj/item/circuitboard/mecha/gygax/targeting
- //3
- list(
- "key" = /obj/item/stack/cable_coil,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The hydraulic systems are active."
- ),
+ inner_plating = /obj/item/stack/sheet/metal
+ inner_plating_amount = 5
- //4
- list(
- "key" = TOOL_WIRECUTTER,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is added."
- ),
-
- //5
- list(
- "key" = /obj/item/circuitboard/mecha/gygax/main,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is adjusted."
- ),
-
- //6
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Central control module is installed."
- ),
-
- //7
- list(
- "key" = /obj/item/circuitboard/mecha/gygax/peripherals,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Central control module is secured."
- ),
-
- //8
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Peripherals control module is installed."
- ),
-
- //9
- list(
- "key" = /obj/item/circuitboard/mecha/gygax/targeting,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Peripherals control module is secured."
- ),
-
- //10
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Weapon control module is installed."
- ),
-
- //11
- list(
- "key" = /obj/item/stock_parts/scanning_module,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Weapon control module is secured."
- ),
-
- //12
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Scanner module is installed."
- ),
-
- //13
- list(
- "key" = /obj/item/stock_parts/capacitor,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Scanner module is secured."
- ),
-
- //14
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Capacitor is installed."
- ),
-
- //15
- list(
- "key" = /obj/item/stock_parts/cell,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Capacitor is secured."
- ),
-
- //16
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "The power cell is installed."
- ),
-
- //17
- list(
- "key" = /obj/item/stack/sheet/metal,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The power cell is secured."
- ),
-
- //18
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Internal armor is installed."
- ),
-
- //19
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "Internal armor is wrenched."
- ),
-
- //20
- list(
- "key" = /obj/item/mecha_parts/part/gygax_armor,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_WELDER,
- "desc" = "Internal armor is welded."
- ),
-
- //21
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "External armor is installed."
- ),
-
- //22
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "External armor is wrenched."
- ),
-
- )
+ outer_plating=/obj/item/mecha_parts/part/gygax_armor
+ outer_plating_amount=1
/datum/component/construction/mecha/gygax/action(datum/source, atom/used_atom, mob/user)
return check_step(used_atom,user)
@@ -613,155 +551,32 @@
/datum/component/construction/mecha/firefighter
result = /obj/mecha/working/ripley/firefighter
base_icon = "fireripley"
- steps = list(
- //1
- list(
- "key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are disconnected."
- ),
- //2
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are connected."
- ),
+ circuit_control = /obj/item/circuitboard/mecha/ripley/main
+ circuit_periph = /obj/item/circuitboard/mecha/ripley/peripherals
- //3
- list(
- "key" = /obj/item/stack/cable_coil,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The hydraulic systems are active."
- ),
+ inner_plating = /obj/item/stack/sheet/plasteel
+ inner_plating_amount = 5
- //4
- list(
- "key" = TOOL_WIRECUTTER,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is added."
- ),
-
- //5
- list(
- "key" = /obj/item/circuitboard/mecha/ripley/main,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is adjusted."
- ),
-
- //6
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Central control module is installed."
- ),
-
- //7
- list(
- "key" = /obj/item/circuitboard/mecha/ripley/peripherals,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Central control module is secured."
- ),
-
- //8
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Peripherals control module is installed."
- ),
- //9
- list(
- "key" = /obj/item/stock_parts/scanning_module,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Peripherals control module is secured."
- ),
-
- //10
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Scanner module is installed."
- ),
-
- //11
- list(
- "key" = /obj/item/stock_parts/capacitor,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Scanner module is secured."
- ),
-
- //12
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Capacitor is installed."
- ),
-
- //13
- list(
- "key" = /obj/item/stock_parts/cell,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Capacitor is secured."
- ),
-
- //14
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "The power cell is installed."
- ),
-
- //15
- list(
- "key" = /obj/item/stack/sheet/plasteel,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The power cell is secured."
- ),
-
- //16
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Internal armor is installed."
- ),
-
- //13
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "Internal armor is wrenched."
- ),
-
- //17
+/datum/component/construction/mecha/firefighter/get_outer_plating_steps()
+ return list(
list(
"key" = /obj/item/stack/sheet/plasteel,
"amount" = 5,
"back_key" = TOOL_WELDER,
"desc" = "Internal armor is welded."
),
-
- //18
list(
"key" = /obj/item/stack/sheet/plasteel,
"amount" = 5,
"back_key" = TOOL_CROWBAR,
"desc" = "External armor is being installed."
),
-
- //19
list(
"key" = TOOL_WRENCH,
"back_key" = TOOL_CROWBAR,
"desc" = "External armor is installed."
),
-
- //20
list(
"key" = TOOL_WELDER,
"back_key" = TOOL_WRENCH,
@@ -893,100 +708,70 @@
/datum/component/construction/mecha/honker
result = /obj/mecha/combat/honker
steps = list(
- //1
list(
"key" = /obj/item/bikehorn
),
-
- //2
list(
"key" = /obj/item/circuitboard/mecha/honker/main,
"action" = ITEM_DELETE
),
-
- //3
list(
"key" = /obj/item/bikehorn
),
-
- //4
list(
"key" = /obj/item/circuitboard/mecha/honker/peripherals,
"action" = ITEM_DELETE
),
-
- //5
list(
"key" = /obj/item/bikehorn
),
-
- //6
list(
"key" = /obj/item/circuitboard/mecha/honker/targeting,
"action" = ITEM_DELETE
),
-
- //7
list(
"key" = /obj/item/bikehorn
),
-
- //6
list(
"key" = /obj/item/stock_parts/scanning_module,
"action" = ITEM_MOVE_INSIDE
),
-
- //8
list(
"key" = /obj/item/bikehorn
),
-
- //9
list(
"key" = /obj/item/stock_parts/capacitor,
"action" = ITEM_MOVE_INSIDE
),
-
- //10
list(
"key" = /obj/item/bikehorn
),
-
- //11
list(
"key" = /obj/item/stock_parts/cell,
"action" = ITEM_MOVE_INSIDE
),
-
- //12
list(
"key" = /obj/item/bikehorn
),
-
- //13
list(
"key" = /obj/item/clothing/mask/gas/clown_hat,
"action" = ITEM_DELETE
),
-
- //14
list(
"key" = /obj/item/bikehorn
),
-
- //15
list(
"key" = /obj/item/clothing/shoes/clown_shoes,
"action" = ITEM_DELETE
),
-
- //16
list(
"key" = /obj/item/bikehorn
),
)
+/datum/component/construction/mecha/honker/get_steps()
+ return steps
+
// HONK doesn't have any construction step icons, so we just set an icon once.
/datum/component/construction/mecha/honker/update_parent(step_index)
if(step_index == 1)
@@ -1037,170 +822,16 @@
/datum/component/construction/mecha/durand
result = /obj/mecha/combat/durand
base_icon = "durand"
- steps = list(
- //1
- list(
- "key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are disconnected."
- ),
- //2
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are connected."
- ),
+ circuit_control = /obj/item/circuitboard/mecha/durand/main
+ circuit_periph = /obj/item/circuitboard/mecha/durand/peripherals
+ circuit_weapon = /obj/item/circuitboard/mecha/durand/targeting
- //3
- list(
- "key" = /obj/item/stack/cable_coil,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The hydraulic systems are active."
- ),
-
- //4
- list(
- "key" = TOOL_WIRECUTTER,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is added."
- ),
-
- //5
- list(
- "key" = /obj/item/circuitboard/mecha/durand/main,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is adjusted."
- ),
-
- //6
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Central control module is installed."
- ),
-
- //7
- list(
- "key" = /obj/item/circuitboard/mecha/durand/peripherals,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Central control module is secured."
- ),
-
- //8
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Peripherals control module is installed."
- ),
-
- //9
- list(
- "key" = /obj/item/circuitboard/mecha/durand/targeting,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Peripherals control module is secured."
- ),
-
- //10
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Weapon control module is installed."
- ),
-
- //11
- list(
- "key" = /obj/item/stock_parts/scanning_module,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Weapon control module is secured."
- ),
-
- //12
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Scanner module is installed."
- ),
-
- //13
- list(
- "key" = /obj/item/stock_parts/capacitor,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Scanner module is secured."
- ),
-
- //14
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Capacitor is installed."
- ),
-
- //15
- list(
- "key" = /obj/item/stock_parts/cell,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Capacitor is secured."
- ),
-
- //16
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "The power cell is installed."
- ),
-
- //17
- list(
- "key" = /obj/item/stack/sheet/metal,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The power cell is secured."
- ),
-
- //18
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Internal armor is installed."
- ),
-
- //19
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "Internal armor is wrenched."
- ),
-
- //20
- list(
- "key" = /obj/item/mecha_parts/part/durand_armor,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_WELDER,
- "desc" = "Internal armor is welded."
- ),
-
- //21
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "External armor is installed."
- ),
-
- //22
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "External armor is wrenched."
- ),
- )
+ inner_plating = /obj/item/stack/sheet/metal
+ inner_plating_amount = 5
+ outer_plating = /obj/item/mecha_parts/part/durand_armor
+ outer_plating_amount = 1
/datum/component/construction/mecha/durand/custom_action(obj/item/I, mob/living/user, diff)
if(!..())
@@ -1333,211 +964,101 @@
/datum/component/construction/mecha/phazon
result = /obj/mecha/combat/phazon
base_icon = "phazon"
- steps = list(
- //1
- list(
- "key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are disconnected."
- ),
- //2
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are connected."
- ),
+ circuit_control = /obj/item/circuitboard/mecha/phazon/main
+ circuit_periph = /obj/item/circuitboard/mecha/phazon/peripherals
+ circuit_weapon = /obj/item/circuitboard/mecha/phazon/targeting
- //3
- list(
- "key" = /obj/item/stack/cable_coil,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The hydraulic systems are active."
- ),
+ inner_plating = /obj/item/stack/sheet/plasteel
+ inner_plating_amount = 5
- //4
- list(
- "key" = TOOL_WIRECUTTER,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is added."
- ),
+ outer_plating = /obj/item/mecha_parts/part/phazon_armor
+ outer_plating_amount = 1
- //5
- list(
- "key" = /obj/item/circuitboard/mecha/phazon/main,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is adjusted."
- ),
-
- //6
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Central control module is installed."
- ),
-
- //7
- list(
- "key" = /obj/item/circuitboard/mecha/phazon/peripherals,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Central control module is secured."
- ),
-
- //8
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Peripherals control module is installed"
- ),
-
- //9
- list(
- "key" = /obj/item/circuitboard/mecha/phazon/targeting,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Peripherals control module is secured."
- ),
-
- //10
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Weapon control is installed."
- ),
-
- //11
+/datum/component/construction/mecha/phazon/get_stockpart_steps()
+ return list(
list(
"key" = /obj/item/stock_parts/scanning_module,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Weapon control module is secured."
),
-
- //12
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Scanner module is installed."
),
-
- //13
list(
"key" = /obj/item/stock_parts/capacitor,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Scanner module is secured."
),
-
- //14
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "Capacitor is installed."
),
-
- //15
list(
"key" = /obj/item/stack/ore/bluespace_crystal,
"amount" = 1,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "Capacitor is secured."
),
-
- //16
list(
"key" = /obj/item/stack/cable_coil,
"amount" = 5,
"back_key" = TOOL_CROWBAR,
"desc" = "The bluespace crystal is installed."
),
-
- //17
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_WIRECUTTER,
"desc" = "The bluespace crystal is connected."
),
-
- //18
list(
"key" = /obj/item/stock_parts/cell,
"action" = ITEM_MOVE_INSIDE,
"back_key" = TOOL_SCREWDRIVER,
"desc" = "The bluespace crystal is engaged."
),
-
- //19
list(
"key" = TOOL_SCREWDRIVER,
"back_key" = TOOL_CROWBAR,
"desc" = "The power cell is installed.",
"icon_state" = "phazon17"
// This is the point where a step icon is skipped, so "icon_state" had to be set manually starting from here.
- ),
+ )
+ )
- //20
+/datum/component/construction/mecha/phazon/get_outer_plating_steps()
+ return list(
list(
- "key" = /obj/item/stack/sheet/plasteel,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The power cell is secured.",
- "icon_state" = "phazon18"
- ),
-
- //21
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Phase armor is installed.",
- "icon_state" = "phazon19"
- ),
-
- //22
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "Phase armor is wrenched.",
- "icon_state" = "phazon20"
- ),
-
- //23
- list(
- "key" = /obj/item/mecha_parts/part/phazon_armor,
+ "key" = outer_plating,
+ "amount" = 1,
"action" = ITEM_DELETE,
"back_key" = TOOL_WELDER,
- "desc" = "Phase armor is welded.",
- "icon_state" = "phazon21"
+ "desc" = "Internal armor is welded."
),
-
- //24
list(
"key" = TOOL_WRENCH,
"back_key" = TOOL_CROWBAR,
- "desc" = "External armor is installed.",
- "icon_state" = "phazon22"
+ "desc" = "External armor is installed."
),
-
- //25
list(
"key" = TOOL_WELDER,
"back_key" = TOOL_WRENCH,
- "desc" = "External armor is wrenched.",
- "icon_state" = "phazon23"
+ "desc" = "External armor is wrenched."
),
-
- //26
list(
"key" = /obj/item/assembly/signaler/anomaly,
"action" = ITEM_DELETE,
"back_key" = TOOL_WELDER,
"desc" = "Anomaly core socket is open.",
"icon_state" = "phazon24"
- ),
+ )
)
-
/datum/component/construction/mecha/phazon/custom_action(obj/item/I, mob/living/user, diff)
if(!..())
return FALSE
@@ -1688,153 +1209,15 @@
/datum/component/construction/mecha/odysseus
result = /obj/mecha/medical/odysseus
base_icon = "odysseus"
- steps = list(
- //1
- list(
- "key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are disconnected."
- ),
- //2
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_WRENCH,
- "desc" = "The hydraulic systems are connected."
- ),
+ circuit_control = /obj/item/circuitboard/mecha/odysseus/main
+ circuit_periph = /obj/item/circuitboard/mecha/odysseus/peripherals
- //3
- list(
- "key" = /obj/item/stack/cable_coil,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The hydraulic systems are active."
- ),
+ inner_plating = /obj/item/stack/sheet/metal
+ inner_plating_amount = 5
- //4
- list(
- "key" = TOOL_WIRECUTTER,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is added."
- ),
-
- //5
- list(
- "key" = /obj/item/circuitboard/mecha/odysseus/main,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The wiring is adjusted."
- ),
-
- //6
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Central control module is installed."
- ),
-
- //7
- list(
- "key" = /obj/item/circuitboard/mecha/odysseus/peripherals,
- "action" = ITEM_DELETE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Central control module is secured."
- ),
-
- //8
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Peripherals control module is installed."
- ),
- //9
- list(
- "key" = /obj/item/stock_parts/scanning_module,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Peripherals control module is secured."
- ),
-
- //10
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Scanner module is installed."
- ),
-
- //11
- list(
- "key" = /obj/item/stock_parts/capacitor,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Scanner module is secured."
- ),
-
- //12
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Capacitor is installed."
- ),
-
- //13
- list(
- "key" = /obj/item/stock_parts/cell,
- "action" = ITEM_MOVE_INSIDE,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "Capacitor is secured."
- ),
-
- //11
- list(
- "key" = TOOL_SCREWDRIVER,
- "back_key" = TOOL_CROWBAR,
- "desc" = "The power cell is installed."
- ),
-
- //12
- list(
- "key" = /obj/item/stack/sheet/metal,
- "amount" = 5,
- "back_key" = TOOL_SCREWDRIVER,
- "desc" = "The power cell is secured."
- ),
-
- //13
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "Internal armor is installed."
- ),
-
- //14
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "Internal armor is wrenched."
- ),
-
- //15
- list(
- "key" = /obj/item/stack/sheet/plasteel,
- "amount" = 5,
- "back_key" = TOOL_WELDER,
- "desc" = "Internal armor is welded."
- ),
-
- //16
- list(
- "key" = TOOL_WRENCH,
- "back_key" = TOOL_CROWBAR,
- "desc" = "External armor is installed."
- ),
-
- //17
- list(
- "key" = TOOL_WELDER,
- "back_key" = TOOL_WRENCH,
- "desc" = "External armor is wrenched."
- ),
- )
+ outer_plating = /obj/item/stack/sheet/plasteel
+ outer_plating_amount = 5
/datum/component/construction/mecha/odysseus/custom_action(obj/item/I, mob/living/user, diff)
if(!..())
diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm
index b2d81dce0a6..a91b66a7c52 100644
--- a/code/game/objects/effects/step_triggers.dm
+++ b/code/game/objects/effects/step_triggers.dm
@@ -52,7 +52,7 @@
var/list/affecting = list()
/obj/effect/step_trigger/thrower/Trigger(atom/A)
- if(!A || !ismovableatom(A))
+ if(!A || !ismovable(A))
return
var/atom/movable/AM = A
var/curtiles = 0
diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm
index a2557d56879..c385be7b793 100644
--- a/code/game/objects/items/chrono_eraser.dm
+++ b/code/game/objects/items/chrono_eraser.dm
@@ -172,9 +172,12 @@
var/mutable_appearance/mob_underlay
var/preloaded = 0
var/RPpos = null
+ var/attached = TRUE //if the gun arg isn't included initially, then the chronofield will work without one
/obj/structure/chrono_field/Initialize(mapload, mob/living/target, obj/item/gun/energy/chrono_gun/G)
- if(target && isliving(target) && G)
+ if(target && isliving(target))
+ if(!G)
+ attached = FALSE
target.forceMove(src)
captured = target
var/icon/mob_snapshot = getFlatIcon(target)
@@ -200,7 +203,7 @@
/obj/structure/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
- ttk_frame = CLAMP(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
+ ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
@@ -234,6 +237,8 @@
else
gun = null
return .()
+ else if(!attached)
+ tickstokill--
else
tickstokill++
else
diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm
index 0f9cdfbb014..1d5102bbaf1 100644
--- a/code/game/objects/items/circuitboards/machine_circuitboards.dm
+++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm
@@ -702,7 +702,7 @@
if(!new_cost || (loc != user))
to_chat(user, "You must hold the circuitboard to change its cost!")
return
- custom_cost = CLAMP(round(new_cost, 1), 10, 1000)
+ custom_cost = clamp(round(new_cost, 1), 10, 1000)
to_chat(user, "The cost is now set to [custom_cost].")
/obj/item/circuitboard/machine/medical_kiosk/examine(mob/user)
@@ -883,7 +883,7 @@
if(!new_cloud || (loc != user))
to_chat(user, "You must hold the circuitboard to change its Cloud ID!")
return
- cloud_id = CLAMP(round(new_cloud, 1), 1, 100)
+ cloud_id = clamp(round(new_cloud, 1), 1, 100)
/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user)
. = ..()
diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm
index 73204a43162..0200811a33f 100644
--- a/code/game/objects/items/clown_items.dm
+++ b/code/game/objects/items/clown_items.dm
@@ -80,6 +80,11 @@
cleanspeed = 3 //Only the truest of mind soul and body get one of these
uses = 301
+/obj/item/soap/omega/suicide_act(mob/user)
+ user.visible_message("[user] is using [src] to scrub themselves from the timeline! It looks like [user.p_theyre()] trying to commit suicide!")
+ new /obj/structure/chrono_field(user.loc, user)
+ return MANUAL_SUICIDE
+
/obj/item/paper/fluff/stations/soap
name = "ancient janitorial poem"
desc = "An old paper that has passed many hands."
diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm
index 5219a3032fd..b89a60a326d 100644
--- a/code/game/objects/items/crayons.dm
+++ b/code/game/objects/items/crayons.dm
@@ -335,8 +335,8 @@
var/clicky
if(click_params && click_params["icon-x"] && click_params["icon-y"])
- clickx = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
- clicky = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ clickx = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ clicky = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
if(!instant)
to_chat(user, "You start drawing a [temp] on the [target.name]...")
diff --git a/code/game/objects/items/devices/desynchronizer.dm b/code/game/objects/items/devices/desynchronizer.dm
index d9735dea15b..f5b7cd58fdd 100644
--- a/code/game/objects/items/devices/desynchronizer.dm
+++ b/code/game/objects/items/devices/desynchronizer.dm
@@ -38,7 +38,7 @@
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
if(new_duration)
new_duration = new_duration SECONDS
- new_duration = CLAMP(new_duration, 50, max_duration)
+ new_duration = clamp(new_duration, 50, max_duration)
duration = new_duration
to_chat(user, "You set the duration to [DisplayTimeText(duration)].")
diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm
index 67ac4f310f1..7133e4d56ab 100644
--- a/code/game/objects/items/devices/instruments.dm
+++ b/code/game/objects/items/devices/instruments.dm
@@ -114,6 +114,16 @@
icon_state = "[initial(icon_state)]"
update_icon()
+/obj/item/instrument/piano_synth/headphones/spacepods
+ name = "nanotrasen space pods"
+ desc = "Flex your money, AND ignore what everyone else says, all at once!"
+ icon_state = "spacepods"
+ item_state = "spacepods"
+ slot_flags = ITEM_SLOT_EARS
+ strip_delay = 100 //air pods don't fall out
+ instrumentRange = 0 //you're paying for quality here
+ custom_premium_price = 1800
+
/obj/item/instrument/banjo
name = "banjo"
desc = "A 'Mura' brand banjo. It's pretty much just a drum with a neck and strings."
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 2ba67135243..de808acbd90 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -165,7 +165,7 @@
// Negative numbers will subtract
/obj/item/lightreplacer/proc/AddUses(amount = 1)
- uses = CLAMP(uses + amount, 0, max_uses)
+ uses = clamp(uses + amount, 0, max_uses)
/obj/item/lightreplacer/proc/AddShards(amount = 1, user)
bulb_shards += amount
diff --git a/code/game/objects/items/devices/swapper.dm b/code/game/objects/items/devices/swapper.dm
index b08f83b3618..aab031c0e4a 100644
--- a/code/game/objects/items/devices/swapper.dm
+++ b/code/game/objects/items/devices/swapper.dm
@@ -81,7 +81,7 @@
//Gets the topmost teleportable container
/obj/item/swapper/proc/get_teleportable_container()
var/atom/movable/teleportable = src
- while(ismovableatom(teleportable.loc))
+ while(ismovable(teleportable.loc))
var/atom/movable/AM = teleportable.loc
if(AM.anchored)
break
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 8c48673331c..3a3bdec7ff2 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -70,11 +70,13 @@ effective or pretty fucking useless.
/obj/item/healthanalyzer/rad_laser
custom_materials = list(/datum/material/iron=400)
- var/irradiate = 1
+ var/ui_x = 320
+ var/ui_y = 335
+ var/irradiate = TRUE
+ var/stealth = FALSE
+ var/used = FALSE // is it cooling down?
var/intensity = 10 // how much damage the radiation does
var/wavelength = 10 // time it takes for the radiation to kick in, in seconds
- var/used = 0 // is it cooling down?
- var/stealth = FALSE
/obj/item/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
if(!stealth || !irradiate)
@@ -83,8 +85,8 @@ effective or pretty fucking useless.
return
if(!used)
log_combat(user, M, "irradiated", src)
- var/cooldown = GetCooldown()
- used = 1
+ var/cooldown = get_cooldown()
+ used = TRUE
icon_state = "health1"
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
to_chat(user, "Successfully irradiated [M].")
@@ -98,78 +100,94 @@ effective or pretty fucking useless.
/obj/item/healthanalyzer/rad_laser/proc/handle_cooldown(cooldown)
spawn(cooldown)
- used = 0
+ used = FALSE
icon_state = "health"
+/obj/item/healthanalyzer/rad_laser/proc/get_cooldown()
+ return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
+
/obj/item/healthanalyzer/rad_laser/attack_self(mob/user)
interact(user)
-/obj/item/healthanalyzer/rad_laser/proc/GetCooldown()
- return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
-
/obj/item/healthanalyzer/rad_laser/interact(mob/user)
ui_interact(user)
-/obj/item/healthanalyzer/rad_laser/ui_interact(mob/user)
- . = ..()
+/obj/item/healthanalyzer/rad_laser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
+ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
+ ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
+ if(!ui)
+ ui = new(user, src, ui_key, "radioactive_microlaser", "Radioactive Microlaser", ui_x, ui_y, master_ui, state)
+ ui.open()
- var/dat = "Irradiation: [irradiate ? "On" : "Off"]
"
- dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): [stealth ? "On" : "Off"]
"
- dat += "Scan Mode: "
- if(!scanmode)
- dat += "Scan Health"
- else if(scanmode == 1)
- dat += "Scan Reagents"
- else
- dat += "Disabled"
- dat += "
"
+/obj/item/healthanalyzer/rad_laser/ui_data(mob/user)
+ var/list/data = list()
+ data["irradiate"] = irradiate
+ data["stealth"] = stealth
+ data["scanmode"] = scanmode
+ data["intensity"] = intensity
+ data["wavelength"] = wavelength
+ data["on_cooldown"] = used
+ data["cooldown"] = DisplayTimeText(get_cooldown())
+ return data
- dat += {"
- Radiation Intensity:
- --
- [intensity]
- ++
+/obj/item/healthanalyzer/rad_laser/ui_act(action, params)
+ if(..())
+ return
- Radiation Wavelength:
- --
- [(wavelength+(intensity*4))]
- ++
- Laser Cooldown: [DisplayTimeText(GetCooldown())]
- "}
-
- var/datum/browser/popup = new(user, "radlaser", "Radioactive Microlaser Interface", 400, 240)
- popup.set_content(dat)
- popup.open()
-
-/obj/item/healthanalyzer/rad_laser/Topic(href, href_list)
- if(!usr.canUseTopic(src))
- return 1
-
- usr.set_machine(src)
- if(href_list["rad"])
- irradiate = !irradiate
-
- else if(href_list["stealthy"])
- stealth = !stealth
-
- else if(href_list["mode"])
- scanmode += 1
- if(scanmode > 2)
- scanmode = 0
-
- else if(href_list["radint"])
- var/amount = text2num(href_list["radint"])
- amount += intensity
- intensity = max(1,(min(20,amount)))
-
- else if(href_list["radwav"])
- var/amount = text2num(href_list["radwav"])
- amount += wavelength
- wavelength = max(0,(min(120,amount)))
-
- attack_self(usr)
- add_fingerprint(usr)
- return
+ switch(action)
+ if("irradiate")
+ irradiate = !irradiate
+ . = TRUE
+ if("stealth")
+ stealth = !stealth
+ . = TRUE
+ if("scanmode")
+ scanmode = !scanmode
+ . = TRUE
+ if("radintensity")
+ var/target = params["target"]
+ var/adjust = text2num(params["adjust"])
+ if(target == "input")
+ target = input("New output target (1-20):", name, intensity) as num|null
+ if(!isnull(target) && !..())
+ . = TRUE
+ else if(target == "min")
+ target = 1
+ . = TRUE
+ else if(target == "max")
+ target = 20
+ . = TRUE
+ else if(adjust)
+ target = intensity + adjust
+ . = TRUE
+ else if(text2num(target) != null)
+ target = text2num(target)
+ . = TRUE
+ if(.)
+ target = round(target)
+ intensity = clamp(target, 1, 20)
+ if("radwavelength")
+ var/target = params["target"]
+ var/adjust = text2num(params["adjust"])
+ if(target == "input")
+ target = input("New output target (0-120):", name, wavelength) as num|null
+ if(!isnull(target) && !..())
+ . = TRUE
+ else if(target == "min")
+ target = 0
+ . = TRUE
+ else if(target == "max")
+ target = 120
+ . = TRUE
+ else if(adjust)
+ target = wavelength + adjust
+ . = TRUE
+ else if(text2num(target) != null)
+ target = text2num(target)
+ . = TRUE
+ if(.)
+ target = round(target)
+ wavelength = clamp(target, 0, 120)
/obj/item/shadowcloak
name = "cloaker belt"
@@ -232,7 +250,7 @@ effective or pretty fucking useless.
charge = max(0,charge - 25)//Quick decrease in light
else
charge = min(max_charge,charge + 50) //Charge in the dark
- animate(user,alpha = CLAMP(255 - charge,0,255),time = 10)
+ animate(user,alpha = clamp(255 - charge,0,255),time = 10)
/obj/item/jammer
diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm
index 0e15f306885..25210566996 100644
--- a/code/game/objects/items/dice.dm
+++ b/code/game/objects/items/dice.dm
@@ -189,7 +189,7 @@ obj/item/dice/d6/ebony
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
- if(rigged == DICE_BASICALLY_RIGGED && prob(CLAMP(1/(sides - 1) * 100, 25, 80)))
+ if(rigged == DICE_BASICALLY_RIGGED && prob(clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged_value
else if(rigged == DICE_TOTALLY_RIGGED)
result = rigged_value
diff --git a/code/game/objects/items/grenades/chem_grenade.dm b/code/game/objects/items/grenades/chem_grenade.dm
index e07d42edfce..ae5fc2dc426 100644
--- a/code/game/objects/items/grenades/chem_grenade.dm
+++ b/code/game/objects/items/grenades/chem_grenade.dm
@@ -273,7 +273,7 @@
var/newspread = text2num(stripped_input(user, "Please enter a new spread amount", name))
if (newspread != null && user.canUseTopic(src, BE_CLOSE))
newspread = round(newspread)
- unit_spread = CLAMP(newspread, 5, 100)
+ unit_spread = clamp(newspread, 5, 100)
to_chat(user, "You set the time release to [unit_spread] units per detonation.")
if (newspread != unit_spread)
to_chat(user, "The new value is out of bounds. Minimum spread is 5 units, maximum is 100 units.")
diff --git a/code/game/objects/items/grenades/grenade.dm b/code/game/objects/items/grenades/grenade.dm
index 4871a90f1ee..68b8cc0b943 100644
--- a/code/game/objects/items/grenades/grenade.dm
+++ b/code/game/objects/items/grenades/grenade.dm
@@ -103,7 +103,7 @@
if(time != null)
if(time < 3)
time = 3
- det_time = round(CLAMP(time * 10, 0, 50))
+ det_time = round(clamp(time * 10, 0, 50))
else
var/previous_time = det_time
switch(det_time)
diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm
index 2830f08755d..4c1555a95a1 100644
--- a/code/game/objects/items/grenades/plastic.dm
+++ b/code/game/objects/items/grenades/plastic.dm
@@ -72,7 +72,7 @@
return
if(user.get_active_held_item() == src)
- newtime = CLAMP(newtime, 10, 60000)
+ newtime = clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm
index 57339451237..802efc2fcf5 100644
--- a/code/game/objects/items/his_grace.dm
+++ b/code/game/objects/items/his_grace.dm
@@ -196,9 +196,9 @@
/obj/item/his_grace/proc/adjust_bloodthirst(amt)
prev_bloodthirst = bloodthirst
if(prev_bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
- bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
+ bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_SATIATED, HIS_GRACE_CONSUME_OWNER)
else if(!ascended)
- bloodthirst = CLAMP(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
+ bloodthirst = clamp(bloodthirst + amt, HIS_GRACE_CONSUME_OWNER, HIS_GRACE_FALL_ASLEEP)
update_stats()
/obj/item/his_grace/proc/update_stats()
diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm
index 7241849b008..bd79c3dffc8 100644
--- a/code/game/objects/items/holy_weapons.dm
+++ b/code/game/objects/items/holy_weapons.dm
@@ -285,8 +285,8 @@
shield_icon = "shield-old"
/obj/item/nullrod/claymore
- icon_state = "claymore"
- item_state = "claymore"
+ icon_state = "claymore_gold"
+ item_state = "claymore_gold"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
name = "holy claymore"
diff --git a/code/game/objects/items/hot_potato.dm b/code/game/objects/items/hot_potato.dm
index aa7a20480d8..50ca27defc3 100644
--- a/code/game/objects/items/hot_potato.dm
+++ b/code/game/objects/items/hot_potato.dm
@@ -77,7 +77,7 @@
L.SetImmobilized(0)
L.SetParalyzed(0)
L.SetUnconscious(0)
- L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
+ L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, clamp(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
colorize(L)
/obj/item/hot_potato/examine(mob/user)
diff --git a/code/game/objects/items/implants/implant_mindshield.dm b/code/game/objects/items/implants/implant_mindshield.dm
index 90b4f798977..78732e7e944 100644
--- a/code/game/objects/items/implants/implant_mindshield.dm
+++ b/code/game/objects/items/implants/implant_mindshield.dm
@@ -22,9 +22,10 @@
ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant")
target.sec_hud_set_implants()
return TRUE
-
+ var/deconverted = FALSE
if(target.mind.has_antag_datum(/datum/antagonist/brainwashed))
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
+ deconverted = TRUE
if(target.mind.has_antag_datum(/datum/antagonist/rev/head)|| target.mind.unconvertable)
if(!silent)
@@ -35,6 +36,7 @@
var/datum/antagonist/rev/rev = target.mind.has_antag_datum(/datum/antagonist/rev)
if(rev)
+ deconverted = TRUE
rev.remove_revolutionary(FALSE, user)
if(!silent)
if(target.mind in SSticker.mode.cult)
@@ -43,6 +45,9 @@
to_chat(target, "You feel a sense of peace and security. You are now protected from brainwashing.")
ADD_TRAIT(target, TRAIT_MINDSHIELD, "implant")
target.sec_hud_set_implants()
+ if(deconverted)
+ if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
+ target.say("I'm out! I quit! Whose kidneys are these?", forced = "They're out! They quit! Whose kidneys do they have?")
return TRUE
return FALSE
diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm
index a9bcae025ae..97d4a05467b 100644
--- a/code/game/objects/items/pneumaticCannon.dm
+++ b/code/game/objects/items/pneumaticCannon.dm
@@ -212,8 +212,8 @@
return target
var/x_o = (target.x - starting.x)
var/y_o = (target.y - starting.y)
- var/new_x = CLAMP((starting.x + (x_o * range_multiplier)), 0, world.maxx)
- var/new_y = CLAMP((starting.y + (y_o * range_multiplier)), 0, world.maxy)
+ var/new_x = clamp((starting.x + (x_o * range_multiplier)), 0, world.maxx)
+ var/new_y = clamp((starting.y + (y_o * range_multiplier)), 0, world.maxy)
var/turf/newtarget = locate(new_x, new_y, starting.z)
return newtarget
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index a546f68dc01..05e69f269a5 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -653,7 +653,7 @@
continue
usage += projectile_tick_speed_ecost
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
- energy = CLAMP(energy - usage, 0, maxenergy)
+ energy = clamp(energy - usage, 0, maxenergy)
if(energy <= 0)
deactivate_field()
visible_message("[src] blinks \"ENERGY DEPLETED\".")
@@ -663,7 +663,7 @@
if(iscyborg(host.loc))
host = host.loc
else
- energy = CLAMP(energy + energy_recharge, 0, maxenergy)
+ energy = clamp(energy + energy_recharge, 0, maxenergy)
return
if(host.cell && (host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
diff --git a/code/game/objects/items/sharpener.dm b/code/game/objects/items/sharpener.dm
index e93d6502a74..da4ce62437c 100644
--- a/code/game/objects/items/sharpener.dm
+++ b/code/game/objects/items/sharpener.dm
@@ -35,15 +35,15 @@
if(TH.force_wielded > initial(TH.force_wielded))
to_chat(user, "[TH] has already been refined before. It cannot be sharpened further!")
return
- TH.force_wielded = CLAMP(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
+ TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
if(I.force > initial(I.force))
to_chat(user, "[I] has already been refined before. It cannot be sharpened further!")
return
user.visible_message("[user] sharpens [I] with [src]!", "You sharpen [I], making it much more deadly than before.")
playsound(src, 'sound/items/unsheath.ogg', 25, TRUE)
I.sharpness = IS_SHARP_ACCURATE
- I.force = CLAMP(I.force + increment, 0, max)
- I.throwforce = CLAMP(I.throwforce + increment, 0, max)
+ I.force = clamp(I.force + increment, 0, max)
+ I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
name = "worn out [name]"
desc = "[desc] At least, it used to."
diff --git a/code/game/objects/items/singularityhammer.dm b/code/game/objects/items/singularityhammer.dm
index d36ae41d627..3a9f29f6bc8 100644
--- a/code/game/objects/items/singularityhammer.dm
+++ b/code/game/objects/items/singularityhammer.dm
@@ -36,7 +36,7 @@
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
for(var/atom/X in orange(5,pull))
- if(ismovableatom(X))
+ if(ismovable(X))
var/atom/movable/A = X
if(A == wielder)
continue
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index aa21eb24460..92f8c6a691d 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -77,9 +77,9 @@
/obj/item/stack/proc/update_weight()
if(amount <= (max_amount * (1/3)))
- w_class = CLAMP(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
+ w_class = clamp(full_w_class-2, WEIGHT_CLASS_TINY, full_w_class)
else if (amount <= (max_amount * (2/3)))
- w_class = CLAMP(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
+ w_class = clamp(full_w_class-1, WEIGHT_CLASS_TINY, full_w_class)
else
w_class = full_w_class
diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm
index 1b8d9ce464a..543ba33bcf0 100644
--- a/code/game/objects/items/storage/belt.dm
+++ b/code/game/objects/items/storage/belt.dm
@@ -186,7 +186,7 @@
/obj/item/storage/belt/medical/paramedic/PopulateContents()
new /obj/item/sensor_device(src)
- new /obj/item/flashlight/pen(src)
+ new /obj/item/pinpointer/crew/prox(src)
new /obj/item/stack/medical/gauze/twelve(src)
new /obj/item/reagent_containers/syringe(src)
new /obj/item/reagent_containers/glass/bottle/epinephrine(src)
@@ -564,31 +564,6 @@
/obj/item/ammo_casing/shotgun
))
-/obj/item/storage/belt/holster
- name = "shoulder holster"
- desc = "A holster to carry a handgun and ammo. WARNING: Badasses only."
- icon_state = "holster"
- item_state = "holster"
- alternate_worn_layer = UNDER_SUIT_LAYER
-
-/obj/item/storage/belt/holster/ComponentInitialize()
- . = ..()
- var/datum/component/storage/STR = GetComponent(/datum/component/storage)
- STR.max_items = 3
- STR.max_w_class = WEIGHT_CLASS_NORMAL
- STR.set_holdable(list(
- /obj/item/gun/ballistic/automatic/pistol,
- /obj/item/gun/ballistic/revolver,
- /obj/item/ammo_box,
- /obj/item/gun/energy/e_gun/mini
- ))
-
-/obj/item/storage/belt/holster/full/PopulateContents()
- var/static/items_inside = list(
- /obj/item/gun/ballistic/revolver/detective = 1,
- /obj/item/ammo_box/c38 = 2)
- generate_items_inside(items_inside,src)
-
/obj/item/storage/belt/fannypack
name = "fannypack"
desc = "A dorky fannypack for keeping small items in."
diff --git a/code/game/objects/items/storage/holsters.dm b/code/game/objects/items/storage/holsters.dm
new file mode 100644
index 00000000000..39bd034a156
--- /dev/null
+++ b/code/game/objects/items/storage/holsters.dm
@@ -0,0 +1,119 @@
+
+/obj/item/storage/belt/holster
+ name = "shoulder holster"
+ desc = "A rather plain but still badass looking holster with a single pouch that can hold a small firearm."
+ icon_state = "holster"
+ item_state = "holster"
+ alternate_worn_layer = UNDER_SUIT_LAYER
+
+/obj/item/storage/belt/holster/equipped(mob/user, slot)
+ . = ..()
+ if(slot == ITEM_SLOT_BELT)
+ ADD_TRAIT(user, TRAIT_GUNFLIP, CLOTHING_TRAIT)
+
+/obj/item/storage/belt/holster/dropped(mob/user)
+ . = ..()
+ REMOVE_TRAIT(user, TRAIT_GUNFLIP, CLOTHING_TRAIT)
+
+/obj/item/storage/belt/holster/ComponentInitialize()
+ . = ..()
+ var/datum/component/storage/STR = GetComponent(/datum/component/storage)
+ STR.max_items = 1
+ STR.max_w_class = WEIGHT_CLASS_NORMAL
+ STR.set_holdable(list(
+ /obj/item/gun/ballistic/automatic/pistol,
+ /obj/item/gun/ballistic/revolver,
+ /obj/item/gun/energy/e_gun/mini,
+ /obj/item/gun/energy/disabler,
+ /obj/item/gun/energy/pulse/carbine,
+ /obj/item/gun/energy/dueling
+ ))
+
+/obj/item/storage/belt/holster/detective
+ name = "detective's holster"
+ desc = "A holster to carry a handgun and ammo. WARNING: Badasses only."
+
+/obj/item/storage/belt/holster/detective/ComponentInitialize()
+ . = ..()
+ var/datum/component/storage/STR = GetComponent(/datum/component/storage)
+ STR.max_items = 3
+ STR.max_w_class = WEIGHT_CLASS_NORMAL
+ STR.set_holdable(list(
+ /obj/item/gun/ballistic/revolver,
+ /obj/item/ammo_box,
+ /obj/item/gun/energy/disabler,
+ /obj/item/gun/energy/dueling
+ ))
+
+/obj/item/storage/belt/holster/detective/full/PopulateContents()
+ var/static/items_inside = list(
+ /obj/item/gun/ballistic/revolver/detective = 1,
+ /obj/item/ammo_box/c38 = 2)
+ generate_items_inside(items_inside,src)
+
+/obj/item/storage/belt/holster/chameleon
+ name = "syndicate holster"
+ desc = "A two pouched hip holster that uses chameleon technology to disguise itself and any guns in it."
+ icon_state = "syndicate_holster"
+ item_state = "syndicate_holster"
+ var/datum/action/item_action/chameleon/change/chameleon_action
+
+/obj/item/storage/belt/holster/chameleon/Initialize()
+ . = ..()
+
+ chameleon_action = new(src)
+ chameleon_action.chameleon_type = /obj/item/storage/belt
+ chameleon_action.chameleon_name = "Belt"
+ chameleon_action.initialize_disguises()
+
+/obj/item/storage/belt/chameleon/ComponentInitialize()
+ . = ..()
+ var/datum/component/storage/STR = GetComponent(/datum/component/storage)
+ STR.silent = TRUE
+
+/obj/item/storage/belt/holster/chameleon/emp_act(severity)
+ . = ..()
+ if(. & EMP_PROTECT_SELF)
+ return
+ chameleon_action.emp_randomise()
+
+/obj/item/storage/belt/holster/chameleon/broken/Initialize()
+ . = ..()
+ chameleon_action.emp_randomise(INFINITY)
+
+/obj/item/storage/belt/holster/chameleon/ComponentInitialize()
+ . = ..()
+ var/datum/component/storage/STR = GetComponent(/datum/component/storage)
+ STR.max_items = 2
+ STR.max_w_class = WEIGHT_CLASS_NORMAL
+ STR.set_holdable(list(
+ /obj/item/gun/ballistic/automatic/pistol,
+ /obj/item/gun/ballistic/revolver,
+ /obj/item/gun/energy/e_gun/mini,
+ /obj/item/gun/energy/disabler,
+ /obj/item/gun/energy/pulse/carbine,
+ /obj/item/gun/energy/dueling
+ ))
+
+/obj/item/storage/belt/holster/nukie
+ name = "operative holster"
+ desc = "A deep shoulder holster capable of holding almost any form of ballistic weaponry."
+ icon_state = "syndicate_holster"
+ item_state = "syndicate_holster"
+ w_class = WEIGHT_CLASS_BULKY
+
+/obj/item/storage/belt/holster/nukie/ComponentInitialize()
+ . = ..()
+ var/datum/component/storage/STR = GetComponent(/datum/component/storage)
+ STR.max_items = 2
+ STR.max_w_class = WEIGHT_CLASS_BULKY
+ STR.set_holdable(list(
+ /obj/item/gun/ballistic/automatic,
+ /obj/item/gun/ballistic/revolver,
+ /obj/item/gun/energy/e_gun/mini,
+ /obj/item/gun/energy/disabler,
+ /obj/item/gun/energy/pulse/carbine,
+ /obj/item/gun/energy/dueling,
+ /obj/item/gun/ballistic/shotgun,
+ /obj/item/gun/ballistic/rocketlauncher
+ ))
diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm
index fa395e32a98..9cc2bac1b19 100644
--- a/code/game/objects/items/stunbaton.dm
+++ b/code/game/objects/items/stunbaton.dm
@@ -170,12 +170,14 @@
playsound(src, stun_sound, 75, TRUE, -1)
user.visible_message("[user] accidentally hits [user.p_them()]self with [src]!", \
"You accidentally hit yourself with [src]!")
- user.Knockdown(stun_time*3)
+ user.Knockdown(stun_time*3) //should really be an equivalent to attack(user,user)
deductcharge(cell_hit_cost)
- return
+ return TRUE
+ return FALSE
/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
- clumsy_check(user)
+ if(clumsy_check(user))
+ return FALSE
if(iscyborg(M))
..()
@@ -206,7 +208,8 @@
/obj/item/melee/baton/proc/baton_effect(mob/living/L, mob/user)
- check_shields(L, user)
+ if(shields_blocked(L, user))
+ return FALSE
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
if(!R || !R.cell || !R.cell.use(cell_hit_cost))
@@ -257,12 +260,13 @@
if (!(. & EMP_PROTECT_SELF))
deductcharge(1000 / severity)
-/obj/item/melee/baton/proc/check_shields(mob/living/L, mob/user)
+/obj/item/melee/baton/proc/shields_blocked(mob/living/L, mob/user)
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
- playsound(L, 'sound/weapons/genhit.ogg', 50, TRUE)
- return FALSE
+ playsound(H, 'sound/weapons/genhit.ogg', 50, TRUE)
+ return TRUE
+ return FALSE
//Makeshift stun baton. Replacement for stun gloves.
/obj/item/melee/baton/cattleprod
diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm
index 9105c7ec258..16283852de7 100644
--- a/code/game/objects/items/tanks/tanks.dm
+++ b/code/game/objects/items/tanks/tanks.dm
@@ -190,7 +190,7 @@
pressure = text2num(pressure)
. = TRUE
if(.)
- distribute_pressure = CLAMP(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
+ distribute_pressure = clamp(round(pressure), TANK_MIN_RELEASE_PRESSURE, TANK_MAX_RELEASE_PRESSURE)
/obj/item/tank/remove_air(amount)
return air_contents.remove(amount)
@@ -212,7 +212,7 @@
return null
var/tank_pressure = air_contents.return_pressure()
- var/actual_distribute_pressure = CLAMP(tank_pressure, 0, distribute_pressure)
+ var/actual_distribute_pressure = clamp(tank_pressure, 0, distribute_pressure)
var/moles_needed = actual_distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm
index 4d0f7697853..08bfeca3fc7 100644
--- a/code/game/objects/items/theft_tools.dm
+++ b/code/game/objects/items/theft_tools.dm
@@ -234,7 +234,7 @@
. = ..()
if(!sliver)
return
- if(proximity && ismovableatom(O) && O != sliver)
+ if(proximity && ismovable(O) && O != sliver)
Consume(O, user)
/obj/item/hemostat/supermatter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) // no instakill supermatter javelins
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index f92a60af330..cdc16465bcf 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -196,7 +196,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
"YOU FEEL THE POWER OF VALHALLA FLOWING THROUGH YOU! THERE CAN BE ONLY ONE!!!")
user.update_icons()
new_name = "GORE-DRENCHED CLAYMORE OF [pick("THE WHIMSICAL SLAUGHTER", "A THOUSAND SLAUGHTERED CATTLE", "GLORY AND VALHALLA", "ANNIHILATION", "OBLITERATION")]"
- icon_state = "claymore_valhalla"
+ icon_state = "claymore_gold"
item_state = "cultblade"
remove_atom_colour(ADMIN_COLOUR_PRIORITY)
diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm
index eebcb395b61..bd57f992544 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -33,7 +33,7 @@
if(damage_flag)
armor_protection = armor.getRating(damage_flag)
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
- armor_protection = CLAMP(armor_protection - armour_penetration, min(armor_protection, 0), 100)
+ armor_protection = clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
///the sound played when the obj is damaged.
@@ -206,7 +206,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(T.intact && level == 1) //fire can't damage things hidden below the floor.
return
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
- take_damage(CLAMP(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
+ take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
resistance_flags |= ON_FIRE
SSfire_burning.processing[src] = src
@@ -242,7 +242,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
if(has_buckled_mobs())
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
- buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
+ buckled_mob.electrocute_act((clamp(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
/obj/proc/reset_shocked()
obj_flags &= ~BEING_SHOCKED
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 9174ca2e8d4..11e8aa881f6 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -388,7 +388,7 @@
/obj/structure/closet/container_resist(mob/living/user)
if(opened)
return
- if(ismovableatom(loc))
+ if(ismovable(loc))
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
var/atom/movable/AM = loc
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 43db503b2c0..d8aefab7a1f 100755
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -200,7 +200,7 @@
new /obj/item/holosign_creator/security(src)
new /obj/item/reagent_containers/spray/pepper(src)
new /obj/item/clothing/suit/armor/vest/det_suit(src)
- new /obj/item/storage/belt/holster/full(src)
+ new /obj/item/storage/belt/holster/detective/full(src)
new /obj/item/pinpointer/crew(src)
new /obj/item/twohanded/binoculars(src)
new /obj/item/storage/box/rxglasses/spyglasskit(src)
diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm
index 94d1b03fdb0..05f07ecdc46 100644
--- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm
+++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm
@@ -16,6 +16,7 @@
new /obj/item/storage/belt/military(src)
new /obj/item/crowbar/red(src)
new /obj/item/clothing/glasses/night(src)
+ new /obj/item/storage/belt/holster/nukie(src)
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for a Syndicate boarding party."
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index 5791d9527ba..6e70a13a261 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -323,3 +323,17 @@
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new mineral_path(T, 2)
qdel(src)
+
+
+/obj/structure/door_assembly/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
+ if(the_rcd.mode == RCD_DECONSTRUCT)
+ return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 16)
+ return FALSE
+
+/obj/structure/door_assembly/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
+ switch(passed_mode)
+ if(RCD_DECONSTRUCT)
+ to_chat(user, "You deconstruct [src].")
+ qdel(src)
+ return TRUE
+ return FALSE
diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm
index 2803df4c786..e761ae2dbc4 100644
--- a/code/game/objects/structures/fireplace.dm
+++ b/code/game/objects/structures/fireplace.dm
@@ -129,7 +129,7 @@
if(burn_time_remaining() < MAXIMUM_BURN_TIMER)
flame_expiry_timer = world.time + MAXIMUM_BURN_TIMER
else
- fuel_added = CLAMP(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
+ fuel_added = clamp(fuel_added + amount, 0, MAXIMUM_BURN_TIMER)
/obj/structure/fireplace/proc/burn_time_remaining()
if(lit)
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index e31a7333f1f..678d6184f2a 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -285,7 +285,7 @@
/obj/structure/girder/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSGRILLE)
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 3228dc13107..2a242487af2 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -123,7 +123,7 @@
/obj/structure/grille/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSGRILLE)
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index bc1e54686c5..4c2e3fd296d 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -342,7 +342,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
to_chat(user, "That's not connected to anything!")
/obj/structure/tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user)
- if(!ismovableatom(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
+ if(!ismovable(O) || O.anchored || !Adjacent(user) || !user.Adjacent(O) || O.loc == user)
return
if(!ismob(O))
if(!istype(O, /obj/structure/closet/body_bag))
@@ -387,6 +387,6 @@ GLOBAL_LIST_EMPTY(crematoriums)
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
index 83e368b13a2..aa2bb8b6148 100644
--- a/code/game/objects/structures/musician.dm
+++ b/code/game/objects/structures/musician.dm
@@ -125,7 +125,7 @@
else
cur_oct[cur_note] = text2num(ni)
if(user.dizziness > 0 && prob(user.dizziness / 2))
- cur_note = CLAMP(cur_note + rand(round(-user.dizziness / 10), round(user.dizziness / 10)), 1, 7)
+ cur_note = clamp(cur_note + rand(round(-user.dizziness / 10), round(user.dizziness / 10)), 1, 7)
if(user.dizziness > 0 && prob(user.dizziness / 5))
if(prob(30))
cur_acc[cur_note] = "#"
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 971909151c4..4207dfc413f 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -101,7 +101,7 @@
/obj/structure/table/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
@@ -182,8 +182,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
- I.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
- I.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
+ I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
AfterPutItemOnTable(I, user)
return TRUE
else
@@ -552,7 +552,7 @@
/obj/structure/rack/CanAStarPass(ID, dir, caller)
. = !density
- if(ismovableatom(caller))
+ if(ismovable(caller))
var/atom/movable/mover = caller
. = . || (mover.pass_flags & PASSTABLE)
diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm
index 7561b06746f..0de4b556219 100644
--- a/code/game/turfs/change_turf.dm
+++ b/code/game/turfs/change_turf.dm
@@ -257,9 +257,9 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
if(depth)
var/list/target_baseturfs
if(length(copytarget.baseturfs))
- // with default inputs this would be Copy(CLAMP(2, -INFINITY, baseturfs.len))
+ // with default inputs this would be Copy(clamp(2, -INFINITY, baseturfs.len))
// Don't forget a lower index is lower in the baseturfs stack, the bottom is baseturfs[1]
- target_baseturfs = copytarget.baseturfs.Copy(CLAMP(1 + ignore_bottom, 1 + copytarget.baseturfs.len - depth, copytarget.baseturfs.len))
+ target_baseturfs = copytarget.baseturfs.Copy(clamp(1 + ignore_bottom, 1 + copytarget.baseturfs.len - depth, copytarget.baseturfs.len))
else if(!ignore_bottom)
target_baseturfs = list(copytarget.baseturfs)
if(target_baseturfs)
diff --git a/code/game/turfs/closed/minerals.dm b/code/game/turfs/closed/minerals.dm
index 49ef6d4e652..01e1403521e 100644
--- a/code/game/turfs/closed/minerals.dm
+++ b/code/game/turfs/closed/minerals.dm
@@ -158,7 +158,7 @@
. = ..()
if (prob(mineralChance))
var/path = pickweight(mineralSpawnChanceList)
- if(isturf(path))
+ if(ispath(path, /turf))
var/turf/T = ChangeTurf(path,null,CHANGETURF_IGNORE_AIR)
T.baseturfs = src.baseturfs
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 7130a640f52..639b756c40c 100755
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -424,7 +424,7 @@
for(var/V in contents)
var/atom/A = V
if(!QDELETED(A) && A.level >= affecting_level)
- if(ismovableatom(A))
+ if(ismovable(A))
var/atom/movable/AM = A
if(!AM.ex_check(explosion_id))
continue
diff --git a/code/game/world.dm b/code/game/world.dm
index 322a77c7508..a1af55a4fd3 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -22,7 +22,7 @@ GLOBAL_VAR(restart_counter)
enable_debugger()
//Early profile for auto-profiler - will be stopped on profiler init if necessary.
-#if DM_VERSION >= 513 && DM_BUILD >= 1506
+#if DM_BUILD >= 1506
world.Profile(PROFILE_START)
#endif
@@ -138,6 +138,7 @@ GLOBAL_VAR(restart_counter)
GLOB.world_paper_log = "[GLOB.log_directory]/paper.log"
GLOB.tgui_log = "[GLOB.log_directory]/tgui.log"
GLOB.world_shuttle_log = "[GLOB.log_directory]/shuttle.log"
+ GLOB.discord_api_log = "[GLOB.log_directory]/discord_api_log.log"
#ifdef UNIT_TESTS
GLOB.test_log = file("[GLOB.log_directory]/tests.log")
@@ -154,6 +155,7 @@ GLOBAL_VAR(restart_counter)
start_log(GLOB.world_job_debug_log)
start_log(GLOB.tgui_log)
start_log(GLOB.world_shuttle_log)
+ start_log(GLOB.discord_api_log)
GLOB.changelog_hash = md5('html/changelog.html') //for telling if the changelog has changed recently
if(fexists(GLOB.config_error_log))
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index a13c0d09737..cc293829f1d 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -679,7 +679,7 @@
var/path = preparsed[1]
var/amount = 1
if(preparsed.len > 1)
- amount = CLAMP(text2num(preparsed[2]),1,ADMIN_SPAWN_CAP)
+ amount = clamp(text2num(preparsed[2]),1,ADMIN_SPAWN_CAP)
var/chosen = pick_closest_path(path)
if(!chosen)
diff --git a/code/modules/admin/sound_emitter.dm b/code/modules/admin/sound_emitter.dm
index 64ce709dfab..b5fb625cbd4 100644
--- a/code/modules/admin/sound_emitter.dm
+++ b/code/modules/admin/sound_emitter.dm
@@ -93,7 +93,7 @@
var/new_volume = input(user, "Choose a volume.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_volume))
return
- new_volume = CLAMP(new_volume, 0, 100)
+ new_volume = clamp(new_volume, 0, 100)
sound_volume = new_volume
to_chat(user, "Volume set to [sound_volume]%.")
if(href_list["edit_mode"])
@@ -116,7 +116,7 @@
var/new_radius = input(user, "Choose a radius.", "Sound Emitter", sound_volume) as null|num
if(isnull(new_radius))
return
- new_radius = CLAMP(new_radius, 0, 127)
+ new_radius = clamp(new_radius, 0, 127)
play_radius = new_radius
to_chat(user, "Audible radius set to [play_radius].")
if(href_list["play"])
diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm
index c47328807db..2b8d021ed86 100644
--- a/code/modules/admin/sql_message_system.dm
+++ b/code/modules/admin/sql_message_system.dm
@@ -393,7 +393,7 @@
var/nsd = CONFIG_GET(number/note_stale_days)
var/nfd = CONFIG_GET(number/note_fresh_days)
if (agegate && type == "note" && isnum(nsd) && isnum(nfd) && nsd > nfd)
- var/alpha = CLAMP(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
+ var/alpha = clamp(100 - (age - nfd) * (85 / (nsd - nfd)), 15, 100)
if (alpha < 100)
if (alpha <= 15)
if (skipped)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 704f720ad9b..c39f568809d 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1619,7 +1619,7 @@
return
var/list/offset = splittext(href_list["offset"],",")
- var/number = CLAMP(text2num(href_list["object_count"]), 1, ADMIN_SPAWN_CAP)
+ var/number = clamp(text2num(href_list["object_count"]), 1, ADMIN_SPAWN_CAP)
var/X = offset.len > 0 ? text2num(offset[1]) : 0
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
var/Z = offset.len > 2 ? text2num(offset[3]) : 0
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm
index 32f385f8ec0..1c26cd7932f 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm
@@ -482,14 +482,6 @@
temp_expression_list = list()
i = expression(i, temp_expression_list)
-#if MIN_COMPILER_VERSION > 512
-#warn Remove this outdated workaround
-#elif DM_BUILD < 1467
- // http://www.byond.com/forum/post/2445083
- var/dummy = src.type
- dummy = dummy
-#endif
-
while(token(i) && token(i) != "]")
if (temp_expression_list)
diff --git a/code/modules/admin/verbs/borgpanel.dm b/code/modules/admin/verbs/borgpanel.dm
index 520ce8ede8c..47767560936 100644
--- a/code/modules/admin/verbs/borgpanel.dm
+++ b/code/modules/admin/verbs/borgpanel.dm
@@ -85,7 +85,7 @@
if ("set_charge")
var/newcharge = input("New charge (0-[borg.cell.maxcharge]):", borg.name, borg.cell.charge) as num|null
if (newcharge)
- borg.cell.charge = CLAMP(newcharge, 0, borg.cell.maxcharge)
+ borg.cell.charge = clamp(newcharge, 0, borg.cell.maxcharge)
message_admins("[key_name_admin(user)] set the charge of [ADMIN_LOOKUPFLW(borg)] to [borg.cell.charge].")
log_admin("[key_name(user)] set the charge of [key_name(borg)] to [borg.cell.charge].")
if ("remove_cell")
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 1fa7be8e9ee..1df7fc62fde 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -8,7 +8,7 @@
var/vol = input(usr, "What volume would you like the sound to play at?",, 100) as null|num
if(!vol)
return
- vol = CLAMP(vol, 1, 100)
+ vol = clamp(vol, 1, 100)
var/sound/admin_sound = new()
admin_sound.file = S
diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
index 6018b497931..5cc9ce2ce0a 100644
--- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm
+++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm
@@ -510,7 +510,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/item/melee/baton/abductor/attack(mob/target, mob/living/user)
if(!AbductorCheck(user))
- return
+ return FALSE
if(!deductcharge(cell_hit_cost))
to_chat(user, "[src] [cell ? "is out of charge" : "does not have a power source installed"].")
@@ -522,16 +522,20 @@ Congratulations! You are now trained for invasive xenobiology research!"}
if(iscyborg(target))
if(BATON_STUN)
..()
- return
+ return FALSE
if(!isliving(target))
- return
+ return FALSE
+
+ if(clumsy_check(user))
+ return FALSE
var/mob/living/L = target
user.do_attack_animation(L)
- check_shields(L, user)
+ if(shields_blocked(L, user))
+ return FALSE
switch (mode)
if(BATON_STUN)
diff --git a/code/modules/antagonists/blob/blob_mobs.dm b/code/modules/antagonists/blob/blob_mobs.dm
index 462a73f07ea..93c18c56313 100644
--- a/code/modules/antagonists/blob/blob_mobs.dm
+++ b/code/modules/antagonists/blob/blob_mobs.dm
@@ -42,7 +42,7 @@
/mob/living/simple_animal/hostile/blob/fire_act(exposed_temperature, exposed_volume)
..()
if(exposed_temperature)
- adjustFireLoss(CLAMP(0.01 * exposed_temperature, 1, 5))
+ adjustFireLoss(clamp(0.01 * exposed_temperature, 1, 5))
else
adjustFireLoss(5)
diff --git a/code/modules/antagonists/blob/overmind.dm b/code/modules/antagonists/blob/overmind.dm
index 2e8bd26ad2b..e2567e091cc 100644
--- a/code/modules/antagonists/blob/overmind.dm
+++ b/code/modules/antagonists/blob/overmind.dm
@@ -201,7 +201,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
B.hud_used.blobpwrdisplay.maptext = "
| AUTHOR | TITLE | CATEGORY | |
| <<<< | >>>> |