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 = "
[round(blob_core.obj_integrity)]
" /mob/camera/blob/proc/add_points(points) - blob_points = CLAMP(blob_points + points, 0, max_blob_points) + blob_points = clamp(blob_points + points, 0, max_blob_points) hud_used.blobpwrdisplay.maptext = "
[round(blob_points)]
" /mob/camera/blob/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null) diff --git a/code/modules/antagonists/blob/structures/_blob.dm b/code/modules/antagonists/blob/structures/_blob.dm index cc238587560..966290d1509 100644 --- a/code/modules/antagonists/blob/structures/_blob.dm +++ b/code/modules/antagonists/blob/structures/_blob.dm @@ -77,7 +77,7 @@ /obj/structure/blob/CanAStarPass(ID, dir, caller) . = 0 - if(ismovableatom(caller)) + if(ismovable(caller)) var/atom/movable/mover = caller . = . || (mover.pass_flags & PASSBLOB) diff --git a/code/modules/antagonists/brainwashing/brainwashing.dm b/code/modules/antagonists/brainwashing/brainwashing.dm index 9b358956594..807ec65b7e0 100644 --- a/code/modules/antagonists/brainwashing/brainwashing.dm +++ b/code/modules/antagonists/brainwashing/brainwashing.dm @@ -22,6 +22,8 @@ var/end_message = "." var/rendered = begin_message + obj_message + end_message deadchat_broadcast(rendered, "[L]", follow_target = L, turf_target = get_turf(L), message_type=DEADCHAT_REGULAR) + if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + L.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") /datum/antagonist/brainwashed name = "Brainwashed Victim" diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index 26483160071..3d1422e3bb2 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -348,7 +348,7 @@ /datum/objective/sacrifice/update_explanation_text() if(target) - explanation_text = "Sacrifice [target], the [target.assigned_role] via invoking a Sacrifice rune with [target.p_them()] on it and three acolytes around it." + explanation_text = "Sacrifice [target], the [target.assigned_role] via invoking an Offer rune with [target.p_them()] on it and three acolytes around it." else explanation_text = "The veil has already been weakened here, proceed to the final objective." diff --git a/code/modules/antagonists/cult/runes.dm b/code/modules/antagonists/cult/runes.dm index 82f0f6e885d..61c727cf7d0 100644 --- a/code/modules/antagonists/cult/runes.dm +++ b/code/modules/antagonists/cult/runes.dm @@ -256,6 +256,8 @@ structure_check() searches for nearby cultist structures required for the invoca H.uncuff() H.stuttering = 0 H.cultslurring = 0 + if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + H.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") return 1 /obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers) @@ -520,7 +522,7 @@ structure_check() searches for nearby cultist structures required for the invoca icon_state = "1" color = RUNE_COLOR_MEDIUMRED var/static/sacrifices_used = -SOULS_TO_REVIVE // Cultists get one "free" revive - + /obj/effect/rune/raise_dead/examine(mob/user) . = ..() if(iscultist(user) || user.stat == DEAD) diff --git a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm index 7911ec7ef0d..9e0b19f6e15 100644 --- a/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm +++ b/code/modules/antagonists/nukeop/equipment/nuclearbomb.dm @@ -362,7 +362,7 @@ if(NUKEUI_AWAIT_TIMER) var/number_value = text2num(numeric_input) if(number_value) - timer_set = CLAMP(number_value, minimum_timer_set, maximum_timer_set) + timer_set = clamp(number_value, minimum_timer_set, maximum_timer_set) playsound(src, 'sound/machines/nuke/general_beep.ogg', 50, FALSE) set_safety() . = TRUE diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 5478fb639f7..c388537aac2 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -191,6 +191,8 @@ to_chat(user, "They must be conscious before you can convert [H.p_them()]!") return if(converter.add_revolutionary(H.mind)) + if(prob(1) || SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) + H.say("You son of a bitch! I'm in.", forced = "That son of a bitch! They're in.") times_used -- //Flashes less likely to burn out for headrevs when used for conversion else to_chat(user, "This mind seems resistant to the flash!") diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index 48958eee2c4..b9684f73fd5 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -152,5 +152,5 @@ var/value = text2num(params["adjust"]) if(value) value = round(time + value) - time = CLAMP(value, 0, 600) + time = clamp(value, 0, 600) . = TRUE diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 185bddc9524..e33ae714172 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -321,7 +321,7 @@ var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY && (air.temperature <= FUSION_MAXIMUM_TEMPERATURE || reaction_energy <= 0)) //If above FUSION_MAXIMUM_TEMPERATURE, will only adjust temperature for endothermic reactions. - air.temperature = CLAMP(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY) + air.temperature = clamp(((air.temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB,INFINITY) return REACTING /datum/gas_reaction/nitrylformation //The formation of nitryl. Endothermic. Requires N2O as a catalyst. @@ -521,5 +521,5 @@ if(energy_released) var/new_heat_capacity = air.heat_capacity() if(new_heat_capacity > MINIMUM_HEAT_CAPACITY) - air.temperature = CLAMP((air.temperature*old_heat_capacity + energy_released)/new_heat_capacity,TCMB,INFINITY) + air.temperature = clamp((air.temperature*old_heat_capacity + energy_released)/new_heat_capacity,TCMB,INFINITY) return REACTING diff --git a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm index 97eba613358..4bba6e94c04 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/dp_vent_pump.dm @@ -159,13 +159,13 @@ pump_direction = 1 if("set_input_pressure" in signal.data) - input_pressure_min = CLAMP(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50) + input_pressure_min = clamp(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50) if("set_output_pressure" in signal.data) - output_pressure_max = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50) + output_pressure_max = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50) if("set_external_pressure" in signal.data) - external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50) + external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50) addtimer(CALLBACK(src, .proc/broadcast_status), 2) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm index a421bad9415..cb994fb40c9 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/passive_gate.dm @@ -125,7 +125,7 @@ Passive gate is similar to the regular pump except: pressure = text2num(pressure) . = TRUE if(.) - target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE) + target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS) update_icon() @@ -147,7 +147,7 @@ Passive gate is similar to the regular pump except: on = !on if("set_output_pressure" in signal.data) - target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50) + target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50) if(on != old_on) investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm index c4985ae7d05..cb9bc3e03c9 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/pump.dm @@ -131,7 +131,7 @@ pressure = text2num(pressure) . = TRUE if(.) - target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE) + target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS) update_icon() @@ -153,7 +153,7 @@ on = !on if("set_output_pressure" in signal.data) - target_pressure = CLAMP(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50) + target_pressure = clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50) if(on != old_on) investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS) diff --git a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm index f5046d9ed2c..fa44af56d49 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/volume_pump.dm @@ -149,7 +149,7 @@ rate = text2num(rate) . = TRUE if(.) - transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE) + transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE) investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS) update_icon() @@ -167,7 +167,7 @@ if("set_transfer_rate" in signal.data) var/datum/gas_mixture/air1 = airs[1] - transfer_rate = CLAMP(text2num(signal.data["set_transfer_rate"]),0,air1.volume) + transfer_rate = clamp(text2num(signal.data["set_transfer_rate"]),0,air1.volume) if(on != old_on) investigate_log("was turned [on ? "on" : "off"] by a remote signal", INVESTIGATE_ATMOS) diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm index 0bfbe53ea1a..b5d4614e9af 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/filter.dm @@ -161,7 +161,7 @@ rate = text2num(rate) . = TRUE if(.) - transfer_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE) + transfer_rate = clamp(rate, 0, MAX_TRANSFER_RATE) investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS) if("filter") filter_type = null diff --git a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm index 7927c697ee1..8e3f647d88d 100644 --- a/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm +++ b/code/modules/atmospherics/machinery/components/trinary_devices/mixer.dm @@ -162,7 +162,7 @@ pressure = text2num(pressure) . = TRUE if(.) - target_pressure = CLAMP(pressure, 0, MAX_OUTPUT_PRESSURE) + target_pressure = clamp(pressure, 0, MAX_OUTPUT_PRESSURE) investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS) if("node1") var/value = text2num(params["concentration"]) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm index 530ea2a18a5..76f3f999c9e 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/outlet_injector.dm @@ -122,7 +122,7 @@ if("set_volume_rate" in signal.data) var/number = text2num(signal.data["set_volume_rate"]) var/datum/gas_mixture/air_contents = airs[1] - volume_rate = CLAMP(number, 0, air_contents.volume) + volume_rate = clamp(number, 0, air_contents.volume) addtimer(CALLBACK(src, .proc/broadcast_status), 2) @@ -166,7 +166,7 @@ rate = text2num(rate) . = TRUE if(.) - volume_rate = CLAMP(rate, 0, MAX_TRANSFER_RATE) + volume_rate = clamp(rate, 0, MAX_TRANSFER_RATE) investigate_log("was set to [volume_rate] L/s by [key_name(usr)]", INVESTIGATE_ATMOS) update_icon() broadcast_status() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index 35470b47bde..4a48f490d9c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -166,7 +166,7 @@ target = text2num(target) . = TRUE if(.) - target_temperature = CLAMP(target, min_temperature, max_temperature) + target_temperature = clamp(target, min_temperature, max_temperature) investigate_log("was set to [target_temperature] K by [key_name(usr)]", INVESTIGATE_ATMOS) update_icon() diff --git a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm index 3605c5f4120..ec64bd45fd7 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/vent_pump.dm @@ -212,13 +212,13 @@ if("set_internal_pressure" in signal.data) var/old_pressure = internal_pressure_bound - internal_pressure_bound = CLAMP(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50) + internal_pressure_bound = clamp(text2num(signal.data["set_internal_pressure"]),0,ONE_ATMOSPHERE*50) if(old_pressure != internal_pressure_bound) investigate_log(" internal pressure was set to [internal_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS) if("set_external_pressure" in signal.data) var/old_pressure = external_pressure_bound - external_pressure_bound = CLAMP(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50) + external_pressure_bound = clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50) if(old_pressure != external_pressure_bound) investigate_log(" external pressure was set to [external_pressure_bound] by [key_name(signal_sender)]",INVESTIGATE_ATMOS) @@ -229,10 +229,10 @@ internal_pressure_bound = 0 if("adjust_internal_pressure" in signal.data) - internal_pressure_bound = CLAMP(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50) + internal_pressure_bound = clamp(internal_pressure_bound + text2num(signal.data["adjust_internal_pressure"]),0,ONE_ATMOSPHERE*50) if("adjust_external_pressure" in signal.data) - external_pressure_bound = CLAMP(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50) + external_pressure_bound = clamp(external_pressure_bound + text2num(signal.data["adjust_external_pressure"]),0,ONE_ATMOSPHERE*50) if("init" in signal.data) name = signal.data["init"] diff --git a/code/modules/atmospherics/machinery/pipes/layermanifold.dm b/code/modules/atmospherics/machinery/pipes/layermanifold.dm index 6ed67319840..1d1f7ccac3b 100644 --- a/code/modules/atmospherics/machinery/pipes/layermanifold.dm +++ b/code/modules/atmospherics/machinery/pipes/layermanifold.dm @@ -128,9 +128,9 @@ if(initialize_directions & dir) return ..() if((NORTH|EAST) & dir) - user.ventcrawl_layer = CLAMP(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) + user.ventcrawl_layer = clamp(user.ventcrawl_layer + 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) if((SOUTH|WEST) & dir) - user.ventcrawl_layer = CLAMP(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) + user.ventcrawl_layer = clamp(user.ventcrawl_layer - 1, PIPING_LAYER_MIN, PIPING_LAYER_MAX) to_chat(user, "You align yourself with the [user.ventcrawl_layer]\th output.") /obj/machinery/atmospherics/pipe/layer_manifold/visible diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 74cc37dc5ac..91a3a8987dc 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -403,7 +403,7 @@ pressure = text2num(pressure) . = TRUE if(.) - release_pressure = CLAMP(round(pressure), can_min_release_pressure, can_max_release_pressure) + release_pressure = clamp(round(pressure), can_min_release_pressure, can_max_release_pressure) investigate_log("was set to [release_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS) if("valve") var/logmsg @@ -447,7 +447,7 @@ var/N = text2num(user_input) if(!N) return - timer_set = CLAMP(N,minimum_timer_set,maximum_timer_set) + timer_set = clamp(N,minimum_timer_set,maximum_timer_set) log_admin("[key_name(usr)] has activated a prototype valve timer") . = TRUE if("toggle_timer") diff --git a/code/modules/atmospherics/machinery/portable/pump.dm b/code/modules/atmospherics/machinery/portable/pump.dm index 062a1199147..438101a2b76 100644 --- a/code/modules/atmospherics/machinery/portable/pump.dm +++ b/code/modules/atmospherics/machinery/portable/pump.dm @@ -151,7 +151,7 @@ pressure = text2num(pressure) . = TRUE if(.) - pump.target_pressure = CLAMP(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE) + pump.target_pressure = clamp(round(pressure), PUMP_MIN_PRESSURE, PUMP_MAX_PRESSURE) investigate_log("was set to [pump.target_pressure] kPa by [key_name(usr)].", INVESTIGATE_ATMOS) if("eject") if(holding) diff --git a/code/modules/buildmode/submodes/copy.dm b/code/modules/buildmode/submodes/copy.dm index ba415c50fc7..4aed8ac700d 100644 --- a/code/modules/buildmode/submodes/copy.dm +++ b/code/modules/buildmode/submodes/copy.dm @@ -23,6 +23,6 @@ DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T) log_admin("Build Mode: [key_name(c)] copied [stored] to [AREACOORD(object)]") else if(right_click) - if(ismovableatom(object)) // No copying turfs for now. + if(ismovable(object)) // No copying turfs for now. to_chat(c, "[object] set as template.") stored = object diff --git a/code/modules/cargo/exports/organs.dm b/code/modules/cargo/exports/organs.dm new file mode 100644 index 00000000000..83d650e729b --- /dev/null +++ b/code/modules/cargo/exports/organs.dm @@ -0,0 +1,38 @@ +/datum/export/organ + include_subtypes = FALSE //Centcom doesn't need organs from non-humans. + export_category = EXPORT_CONTRABAND + +/datum/export/organ/heart + cost = 10 //For the man who has everything and nothing. + unit_name = "humanoid heart" + export_types = list(/obj/item/organ/heart) + +/datum/export/organ/eyes + cost = 5 + unit_name = "humanoid eyes" + export_types = list(/obj/item/organ/eyes) + +/datum/export/organ/ears + cost = 5 + unit_name = "humanoid ears" + export_types = list(/obj/item/organ/ears) + +/datum/export/organ/liver + cost = 5 + unit_name = "humanoid liver" + export_types = list(/obj/item/organ/liver) + +/datum/export/organ/lungs + cost = 5 + unit_name = "humanoid lungs" + export_types = list(/obj/item/organ/lungs) + +/datum/export/organ/stomach + cost = 5 + unit_name = "humanoid stomach" + export_types = list(/obj/item/organ/stomach) + +/datum/export/organ/tongue + cost = 5 + unit_name = "humanoid tounge" + export_types = list(/obj/item/organ/tongue) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 1e363479a64..c0dbc6e9933 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -878,8 +878,8 @@ GLOBAL_LIST_EMPTY(external_rsc_urls) var/viewscale = getviewsize(view) var/x = viewscale[1] var/y = viewscale[2] - x = CLAMP(x+change, min, max) - y = CLAMP(y+change, min,max) + x = clamp(x+change, min, max) + y = clamp(y+change, min,max) change_view("[x]x[y]") /client/proc/update_movement_keys(datum/preferences/direct_prefs) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 14509f250cf..b27e33cc063 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1815,3 +1815,15 @@ GLOBAL_LIST_EMPTY(preferences_datums) return else custom_names[name_id] = sanitized_name + +//Used in savefile update 32, can be removed once that is no longer relevant. +/datum/preferences/proc/force_reset_keybindings() + var/choice = tgalert(parent.mob, "Your basic keybindings need to be reset, emotes will remain as before. Would you prefer 'hotkey' or 'classic' mode?", "Reset keybindings", "Hotkey", "Classic") + hotkeys = (choice != "Classic") + var/list/oldkeys = key_bindings + key_bindings = (hotkeys) ? deepCopyList(GLOB.hotkey_keybinding_list_by_key) : deepCopyList(GLOB.classic_keybinding_list_by_key) + + for(var/key in oldkeys) + if(!key_bindings[key]) + key_bindings[key] = oldkeys[key] + parent.update_movement_keys() diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 6231006c5bb..b458d28841f 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -5,7 +5,7 @@ // You do not need to raise this if you are adding new values that have sane defaults. // Only raise this value when changing the meaning/format/name/layout of an existing value // where you would want the updater procs below to run -#define SAVEFILE_VERSION_MAX 31 +#define SAVEFILE_VERSION_MAX 32 /* SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn @@ -42,11 +42,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car //if your savefile is 3 months out of date, then 'tough shit'. /datum/preferences/proc/update_preferences(current_version, savefile/S) - if(current_version < 29) - key_bindings = (hotkeys) ? deepCopyList(GLOB.hotkey_keybinding_list_by_key) : deepCopyList(GLOB.classic_keybinding_list_by_key) - parent.update_movement_keys(src) - to_chat(parent, "Empty keybindings, setting default to [hotkeys ? "Hotkey" : "Classic"] mode") - if(current_version < 30) if(clientfps == 0) clientfps = 60 @@ -55,6 +50,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(clientfps == 60) clientfps = 0 + if(current_version < 32) //If you remove this, remove force_reset_keybindings() too. + addtimer(CALLBACK(src, .proc/force_reset_keybindings), 30) //No mob available when this is run, timer allows user choice. + /datum/preferences/proc/update_character(current_version, savefile/S) if(current_version < 19) pda_style = "mono" diff --git a/code/modules/clothing/ears/_ears.dm b/code/modules/clothing/ears/_ears.dm index 1c7a66e3616..16745badb17 100644 --- a/code/modules/clothing/ears/_ears.dm +++ b/code/modules/clothing/ears/_ears.dm @@ -30,12 +30,3 @@ /obj/item/clothing/ears/earmuffs/dropped(mob/user) . = ..() REMOVE_TRAIT(user, TRAIT_DEAF, CLOTHING_TRAIT) - -/obj/item/clothing/ears/earmuffs/spacepods - name = "nanotrasen space pods" - desc = "Flex your money, AND ignore what everone else says, all at once!" - icon = 'icons/obj/clothing/accessories.dmi' - icon_state = "spacepods" - item_state = "spacepods" - strip_delay = 100 //air pods don't fall out - custom_premium_price = 1800 diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index 1dbb155a269..8e9cdd441db 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -75,10 +75,12 @@ var/mob/living/carbon/human/user = src.loc if(!user || !ishuman(user) || !(user.wear_suit == src)) return + if(!cell && thermal_on) + toggle_spacesuit() if(!cell) user.update_spacesuit_hud_icon("missing") else - var/cell_percent = cell.charge / cell.maxcharge + var/cell_percent = cell.percent() if(cell_percent > 0.6) user.update_spacesuit_hud_icon("high") else if(cell_percent > 0.20) @@ -90,7 +92,7 @@ if(thermal_on && cell.charge >= THERMAL_REGULATOR_COST) user.adjust_bodytemperature((temperature_setting - user.bodytemperature), use_steps=TRUE, capped=FALSE) - cell.charge -= THERMAL_REGULATOR_COST + cell.use(THERMAL_REGULATOR_COST) // Clean up the cell on destroy /obj/item/clothing/suit/space/Destroy() @@ -116,18 +118,16 @@ // Show the status of the suit and the cell /obj/item/clothing/suit/space/examine(mob/user) . = ..() - if(!in_range(src, user) && !isobserver(user)) - return - - . += "The thermal regulator is [thermal_on ? "on" : "off"] and the temperature is set to \ - [round(temperature_setting-T0C,0.1)] °C ([round(temperature_setting*1.8-459.67,0.1)] °F)" - . += "The power meeter shows [cell ? "[round(cell.charge / cell.maxcharge * 100)]%" : "!invalid!"] charge remaining." - if(cell_cover_open) - . += "The cell cover is open exposing the cell and setting knobs." - if(!cell) - . += "The slot for a cell is empty." - else - . += "\The [cell] is firmly in place." + if(in_range(src, user) || isobserver(user)) + . += "The thermal regulator is [thermal_on ? "on" : "off"] and the temperature is set to \ + [round(temperature_setting-T0C,0.1)] °C ([round(temperature_setting*1.8-459.67,0.1)] °F)" + . += "The power meter shows [cell ? "[round(cell.percent(), 0.1)]%" : "!invalid!"] charge remaining." + if(cell_cover_open) + . += "The cell cover is open exposing the cell and setting knobs." + if(!cell) + . += "The slot for a cell is empty." + else + . += "\The [cell] is firmly in place." // object handling for accessing features of the suit /obj/item/clothing/suit/space/attackby(obj/item/I, mob/user, params) @@ -159,24 +159,23 @@ /// Open the cell cover when ALT+Click on the suit /obj/item/clothing/suit/space/AltClick(mob/living/user) - . = ..() - if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) - return + if(!user || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + return ..() toggle_spacesuit_cell(user) /// Remove the cell whent he cover is open on CTRL+Click /obj/item/clothing/suit/space/CtrlClick(mob/living/user) - if(istype(user) && user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + if(user && user.canUseTopic(src, BE_CLOSE, ismonkey(user))) if(cell_cover_open && cell) remove_cell(user) return return ..() -// Remove suit when using the suit on its self +// Remove the cell when using the suit on its self /obj/item/clothing/suit/space/attack_self(mob/user) remove_cell(user) -/// Remove the cell from the suit if the over is open +/// Remove the cell from the suit if the cell cover is open /obj/item/clothing/suit/space/proc/remove_cell(mob/user) if(cell_cover_open && cell) user.visible_message("[user] removes \the [cell] from [src]!", \ @@ -191,10 +190,10 @@ to_chat(user, "You [cell_cover_open ? "open" : "close"] the cell cover on \the [src].") /// Toggle the space suit's thermal regulator status -/obj/item/clothing/suit/space/proc/toggle_spacesuit(mob/user) +/obj/item/clothing/suit/space/proc/toggle_spacesuit() thermal_on = !thermal_on min_cold_protection_temperature = thermal_on ? SPACE_SUIT_MIN_TEMP_PROTECT : SPACE_SUIT_MIN_TEMP_PROTECT_OFF - to_chat(user, "You turn [thermal_on ? "on" : "off"] the thermal regulator on \the [src].") + SEND_SIGNAL(src, COMSIG_SUIT_SPACE_TOGGLE) // let emags override the temperature settings /obj/item/clothing/suit/space/emag_act(mob/user) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 37274476003..2c61e9cd5b6 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -760,7 +760,7 @@ /obj/item/clothing/suit/space/hardsuit/shielded/process() . = ..() if(recharge_rate && world.time > recharge_cooldown && current_charges < max_charges) - current_charges = CLAMP((current_charges + recharge_rate), 0, max_charges) + current_charges = clamp((current_charges + recharge_rate), 0, max_charges) playsound(loc, 'sound/magic/charge.ogg', 50, TRUE) if(current_charges == max_charges) playsound(loc, 'sound/machines/ding.ogg', 50, TRUE) diff --git a/code/modules/discord/tgs_commands.dm b/code/modules/discord/tgs_commands.dm index cb2ff65934c..124da4a068f 100644 --- a/code/modules/discord/tgs_commands.dm +++ b/code/modules/discord/tgs_commands.dm @@ -8,7 +8,7 @@ if(member == "[sender.mention]") SSdiscord.notify_members -= "[SSdiscord.id_clean(sender.mention)]" // The list uses strings because BYOND cannot handle a 17 digit integer return "You will no longer be notified when the server restarts" - + // If we got here, they arent in the list. Chuck 'em in! SSdiscord.notify_members += "[SSdiscord.id_clean(sender.mention)]" // The list uses strings because BYOND cannot handle a 17 digit integer return "You will now be notified when the server restarts" @@ -22,7 +22,10 @@ var/lowerparams = replacetext(lowertext(params), " ", "") // Fuck spaces if(SSdiscord.account_link_cache[lowerparams]) // First if they are in the list, then if the ckey matches if(SSdiscord.account_link_cache[lowerparams] == "[SSdiscord.id_clean(sender.mention)]") // If the associated ID is the correct one + // Link the account in the DB table SSdiscord.link_account(lowerparams) + // Role the user + SSdiscord.grant_role(lowerparams) return "Successfully linked accounts" else return "That ckey is not associated to this discord account. If someone has used your ID, please inform an administrator" diff --git a/code/modules/events/wormholes.dm b/code/modules/events/wormholes.dm index ce114d8b91a..8d3955e57df 100644 --- a/code/modules/events/wormholes.dm +++ b/code/modules/events/wormholes.dm @@ -67,7 +67,7 @@ GLOBAL_LIST_EMPTY(all_wormholes) // So we can pick wormholes to teleport to if(!(ismecha(M) && mech_sized)) return - if(ismovableatom(M)) + if(ismovable(M)) if(GLOB.all_wormholes.len) var/obj/effect/portal/wormhole/P = pick(GLOB.all_wormholes) if(P && isturf(P.loc)) diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index fc146281b6e..5f331e5df74 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -15,10 +15,6 @@ resistance_flags = NONE var/isGlass = TRUE //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it -/obj/item/reagent_containers/food/drinks/on_reagent_change(changetype) - . = ..() - gulp_size = max(round(reagents.total_volume / 5), 5) - /obj/item/reagent_containers/food/drinks/attack(mob/living/M, mob/user, def_zone) if(!reagents || !reagents.total_volume) diff --git a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm index d91968797c8..c417f472307 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/food_cart.dm @@ -122,7 +122,7 @@ log_combat(usr, src, "dispensed [O] from", null, "with [stored_food[href_list["dispense"]]] remaining") if(href_list["portion"]) - portion = CLAMP(input("How much drink do you want to dispense per glass?") as num|null, 0, 50) + portion = clamp(input("How much drink do you want to dispense per glass?") as num|null, 0, 50) if (isnull(portion)) return diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index 829b79bc02b..ecc75ff9ba6 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -129,7 +129,7 @@ if (isnull(bomb_timer)) return - bomb_timer = CLAMP(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX) + bomb_timer = clamp(CEILING(bomb_timer / 2, 1), BOMB_TIMER_MIN, BOMB_TIMER_MAX) bomb_defused = FALSE log_bomber(user, "has trapped a", src, "with [bomb] set to [bomb_timer * 2] seconds") diff --git a/code/modules/food_and_drinks/recipes/drinks_recipes.dm b/code/modules/food_and_drinks/recipes/drinks_recipes.dm index 8cb44059ad6..3e886d061b4 100644 --- a/code/modules/food_and_drinks/recipes/drinks_recipes.dm +++ b/code/modules/food_and_drinks/recipes/drinks_recipes.dm @@ -2,753 +2,519 @@ /datum/chemical_reaction/goldschlager - name = "Goldschlager" - id = /datum/reagent/consumable/ethanol/goldschlager results = list(/datum/reagent/consumable/ethanol/goldschlager = 10) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 10, /datum/reagent/gold = 1) /datum/chemical_reaction/patron - name = "Patron" - id = /datum/reagent/consumable/ethanol/patron results = list(/datum/reagent/consumable/ethanol/patron = 10) required_reagents = list(/datum/reagent/consumable/ethanol/tequila = 10, /datum/reagent/silver = 1) /datum/chemical_reaction/bilk - name = "Bilk" - id = /datum/reagent/consumable/ethanol/bilk results = list(/datum/reagent/consumable/ethanol/bilk = 2) required_reagents = list(/datum/reagent/consumable/milk = 1, /datum/reagent/consumable/ethanol/beer = 1) /datum/chemical_reaction/icetea - name = "Iced Tea" - id = /datum/reagent/consumable/icetea results = list(/datum/reagent/consumable/icetea = 4) required_reagents = list(/datum/reagent/consumable/ice = 1, /datum/reagent/consumable/tea = 3) /datum/chemical_reaction/icecoffee - name = "Iced Coffee" - id = /datum/reagent/consumable/icecoffee results = list(/datum/reagent/consumable/icecoffee = 4) required_reagents = list(/datum/reagent/consumable/ice = 1, /datum/reagent/consumable/coffee = 3) /datum/chemical_reaction/nuka_cola - name = "Nuka Cola" - id = /datum/reagent/consumable/nuka_cola results = list(/datum/reagent/consumable/nuka_cola = 6) required_reagents = list(/datum/reagent/uranium = 1, /datum/reagent/consumable/space_cola = 6) /datum/chemical_reaction/moonshine - name = "Moonshine" - id = /datum/reagent/consumable/ethanol/moonshine results = list(/datum/reagent/consumable/ethanol/moonshine = 10) required_reagents = list(/datum/reagent/consumable/nutriment = 5, /datum/reagent/consumable/sugar = 5) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) /datum/chemical_reaction/wine - name = "Wine" - id = /datum/reagent/consumable/ethanol/wine results = list(/datum/reagent/consumable/ethanol/wine = 10) required_reagents = list(/datum/reagent/consumable/grapejuice = 10) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) /datum/chemical_reaction/spacebeer - name = "Space Beer" - id = "spacebeer" results = list(/datum/reagent/consumable/ethanol/beer = 10) required_reagents = list(/datum/reagent/consumable/flour = 10) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) /datum/chemical_reaction/vodka - name = "Vodka" - id = /datum/reagent/consumable/ethanol/vodka results = list(/datum/reagent/consumable/ethanol/vodka = 10) required_reagents = list(/datum/reagent/consumable/potato_juice = 10) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) /datum/chemical_reaction/kahlua - name = "Kahlua" - id = /datum/reagent/consumable/ethanol/kahlua results = list(/datum/reagent/consumable/ethanol/kahlua = 5) required_reagents = list(/datum/reagent/consumable/coffee = 5, /datum/reagent/consumable/sugar = 5) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) /datum/chemical_reaction/gin_tonic - name = "Gin and Tonic" - id = /datum/reagent/consumable/ethanol/gintonic results = list(/datum/reagent/consumable/ethanol/gintonic = 3) required_reagents = list(/datum/reagent/consumable/ethanol/gin = 2, /datum/reagent/consumable/tonic = 1) /datum/chemical_reaction/rum_coke - name = "Rum and Coke" - id = /datum/reagent/consumable/ethanol/rum_coke results = list(/datum/reagent/consumable/ethanol/rum_coke = 3) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 2, /datum/reagent/consumable/space_cola = 1) /datum/chemical_reaction/cuba_libre - name = "Cuba Libre" - id = /datum/reagent/consumable/ethanol/cuba_libre results = list(/datum/reagent/consumable/ethanol/cuba_libre = 4) required_reagents = list(/datum/reagent/consumable/ethanol/rum_coke = 3, /datum/reagent/consumable/limejuice = 1) /datum/chemical_reaction/martini - name = "Classic Martini" - id = /datum/reagent/consumable/ethanol/martini results = list(/datum/reagent/consumable/ethanol/martini = 3) required_reagents = list(/datum/reagent/consumable/ethanol/gin = 2, /datum/reagent/consumable/ethanol/vermouth = 1) /datum/chemical_reaction/vodkamartini - name = "Vodka Martini" - id = /datum/reagent/consumable/ethanol/vodkamartini results = list(/datum/reagent/consumable/ethanol/vodkamartini = 3) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 2, /datum/reagent/consumable/ethanol/vermouth = 1) /datum/chemical_reaction/white_russian - name = "White Russian" - id = /datum/reagent/consumable/ethanol/white_russian results = list(/datum/reagent/consumable/ethanol/white_russian = 5) required_reagents = list(/datum/reagent/consumable/ethanol/black_russian = 3, /datum/reagent/consumable/cream = 2) /datum/chemical_reaction/whiskey_cola - name = "Whiskey Cola" - id = /datum/reagent/consumable/ethanol/whiskey_cola results = list(/datum/reagent/consumable/ethanol/whiskey_cola = 3) required_reagents = list(/datum/reagent/consumable/ethanol/whiskey = 2, /datum/reagent/consumable/space_cola = 1) /datum/chemical_reaction/screwdriver - name = "Screwdriver" - id = /datum/reagent/consumable/ethanol/screwdrivercocktail results = list(/datum/reagent/consumable/ethanol/screwdrivercocktail = 3) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 2, /datum/reagent/consumable/orangejuice = 1) /datum/chemical_reaction/bloody_mary - name = "Bloody Mary" - id = /datum/reagent/consumable/ethanol/bloody_mary results = list(/datum/reagent/consumable/ethanol/bloody_mary = 4) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 1, /datum/reagent/consumable/tomatojuice = 2, /datum/reagent/consumable/limejuice = 1) /datum/chemical_reaction/gargle_blaster - name = "Pan-Galactic Gargle Blaster" - id = /datum/reagent/consumable/ethanol/gargle_blaster results = list(/datum/reagent/consumable/ethanol/gargle_blaster = 5) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 1, /datum/reagent/consumable/ethanol/gin = 1, /datum/reagent/consumable/ethanol/whiskey = 1, /datum/reagent/consumable/ethanol/cognac = 1, /datum/reagent/consumable/limejuice = 1) /datum/chemical_reaction/brave_bull - name = "Brave Bull" - id = /datum/reagent/consumable/ethanol/brave_bull results = list(/datum/reagent/consumable/ethanol/brave_bull = 3) required_reagents = list(/datum/reagent/consumable/ethanol/tequila = 2, /datum/reagent/consumable/ethanol/kahlua = 1) /datum/chemical_reaction/tequila_sunrise - name = "Tequila Sunrise" - id = /datum/reagent/consumable/ethanol/tequila_sunrise results = list(/datum/reagent/consumable/ethanol/tequila_sunrise = 5) required_reagents = list(/datum/reagent/consumable/ethanol/tequila = 2, /datum/reagent/consumable/orangejuice = 2, /datum/reagent/consumable/grenadine = 1) /datum/chemical_reaction/toxins_special - name = "Toxins Special" - id = /datum/chemical_reaction/toxins_special results = list(/datum/reagent/consumable/ethanol/toxins_special = 5) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 2, /datum/reagent/consumable/ethanol/vermouth = 1, /datum/reagent/toxin/plasma = 2) /datum/chemical_reaction/beepsky_smash - name = "Beepksy Smash" - id = "beepksysmash" results = list(/datum/reagent/consumable/ethanol/beepsky_smash = 5) required_reagents = list(/datum/reagent/consumable/limejuice = 2, /datum/reagent/consumable/ethanol/quadruple_sec = 2, /datum/reagent/iron = 1) /datum/chemical_reaction/doctor_delight - name = "The Doctor's Delight" - id = "doctordelight" results = list(/datum/reagent/consumable/doctor_delight = 5) required_reagents = list(/datum/reagent/consumable/limejuice = 1, /datum/reagent/consumable/tomatojuice = 1, /datum/reagent/consumable/orangejuice = 1, /datum/reagent/consumable/cream = 1, /datum/reagent/medicine/cryoxadone = 1) /datum/chemical_reaction/irish_cream - name = "Irish Cream" - id = /datum/reagent/consumable/ethanol/irish_cream results = list(/datum/reagent/consumable/ethanol/irish_cream = 3) required_reagents = list(/datum/reagent/consumable/ethanol/whiskey = 2, /datum/reagent/consumable/cream = 1) /datum/chemical_reaction/manly_dorf - name = "The Manly Dorf" - id = /datum/reagent/consumable/ethanol/manly_dorf results = list(/datum/reagent/consumable/ethanol/manly_dorf = 3) required_reagents = list (/datum/reagent/consumable/ethanol/beer = 1, /datum/reagent/consumable/ethanol/ale = 2) /datum/chemical_reaction/greenbeer - name = "Green Beer" - id = /datum/reagent/consumable/ethanol/beer/green results = list(/datum/reagent/consumable/ethanol/beer/green = 10) required_reagents = list(/datum/reagent/colorful_reagent/powder/green = 1, /datum/reagent/consumable/ethanol/beer = 10) /datum/chemical_reaction/greenbeer2 //apparently there's no other way to do this - name = "Green Beer" - id = /datum/reagent/consumable/ethanol/beer/green results = list(/datum/reagent/consumable/ethanol/beer/green = 10) required_reagents = list(/datum/reagent/colorful_reagent/powder/green/crayon = 1, /datum/reagent/consumable/ethanol/beer = 10) /datum/chemical_reaction/hooch - name = "Hooch" - id = /datum/reagent/consumable/ethanol/hooch results = list(/datum/reagent/consumable/ethanol/hooch = 3) required_reagents = list (/datum/reagent/consumable/ethanol = 2, /datum/reagent/fuel = 1) required_catalysts = list(/datum/reagent/consumable/enzyme = 1) /datum/chemical_reaction/irish_coffee - name = "Irish Coffee" - id = /datum/reagent/consumable/ethanol/irishcoffee results = list(/datum/reagent/consumable/ethanol/irishcoffee = 2) required_reagents = list(/datum/reagent/consumable/ethanol/irish_cream = 1, /datum/reagent/consumable/coffee = 1) /datum/chemical_reaction/b52 - name = "B-52" - id = /datum/reagent/consumable/ethanol/b52 results = list(/datum/reagent/consumable/ethanol/b52 = 3) required_reagents = list(/datum/reagent/consumable/ethanol/irish_cream = 1, /datum/reagent/consumable/ethanol/kahlua = 1, /datum/reagent/consumable/ethanol/cognac = 1) /datum/chemical_reaction/atomicbomb - name = "Atomic Bomb" - id = /datum/reagent/consumable/ethanol/atomicbomb results = list(/datum/reagent/consumable/ethanol/atomicbomb = 10) required_reagents = list(/datum/reagent/consumable/ethanol/b52 = 10, /datum/reagent/uranium = 1) /datum/chemical_reaction/margarita - name = "Margarita" - id = /datum/reagent/consumable/ethanol/margarita results = list(/datum/reagent/consumable/ethanol/margarita = 4) required_reagents = list(/datum/reagent/consumable/ethanol/tequila = 2, /datum/reagent/consumable/limejuice = 1, /datum/reagent/consumable/ethanol/triple_sec = 1) /datum/chemical_reaction/longislandicedtea - name = "Long Island Iced Tea" - id = /datum/reagent/consumable/ethanol/longislandicedtea results = list(/datum/reagent/consumable/ethanol/longislandicedtea = 4) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 1, /datum/reagent/consumable/ethanol/gin = 1, /datum/reagent/consumable/ethanol/tequila = 1, /datum/reagent/consumable/ethanol/cuba_libre = 1) /datum/chemical_reaction/threemileisland - name = "Three Mile Island Iced Tea" - id = /datum/reagent/consumable/ethanol/threemileisland results = list(/datum/reagent/consumable/ethanol/threemileisland = 10) required_reagents = list(/datum/reagent/consumable/ethanol/longislandicedtea = 10, /datum/reagent/uranium = 1) /datum/chemical_reaction/whiskeysoda - name = "Whiskey Soda" - id = /datum/reagent/consumable/ethanol/whiskeysoda results = list(/datum/reagent/consumable/ethanol/whiskeysoda = 3) required_reagents = list(/datum/reagent/consumable/ethanol/whiskey = 2, /datum/reagent/consumable/sodawater = 1) /datum/chemical_reaction/black_russian - name = "Black Russian" - id = /datum/reagent/consumable/ethanol/black_russian results = list(/datum/reagent/consumable/ethanol/black_russian = 5) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 3, /datum/reagent/consumable/ethanol/kahlua = 2) +/datum/chemical_reaction/hiveminderaser + results = list(/datum/reagent/consumable/ethanol/hiveminderaser = 4) + required_reagents = list(/datum/reagent/consumable/ethanol/black_russian = 2, /datum/reagent/consumable/ethanol/thirteenloko = 1, /datum/reagent/consumable/grenadine = 1) + /datum/chemical_reaction/manhattan - name = "Manhattan" - id = /datum/reagent/consumable/ethanol/manhattan results = list(/datum/reagent/consumable/ethanol/manhattan = 3) required_reagents = list(/datum/reagent/consumable/ethanol/whiskey = 2, /datum/reagent/consumable/ethanol/vermouth = 1) /datum/chemical_reaction/manhattan_proj - name = "Manhattan Project" - id = /datum/reagent/consumable/ethanol/manhattan_proj results = list(/datum/reagent/consumable/ethanol/manhattan_proj = 10) required_reagents = list(/datum/reagent/consumable/ethanol/manhattan = 10, /datum/reagent/uranium = 1) /datum/chemical_reaction/vodka_tonic - name = "Vodka and Tonic" - id = /datum/reagent/consumable/ethanol/vodkatonic results = list(/datum/reagent/consumable/ethanol/vodkatonic = 3) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 2, /datum/reagent/consumable/tonic = 1) /datum/chemical_reaction/gin_fizz - name = "Gin Fizz" - id = /datum/reagent/consumable/ethanol/ginfizz results = list(/datum/reagent/consumable/ethanol/ginfizz = 4) required_reagents = list(/datum/reagent/consumable/ethanol/gin = 2, /datum/reagent/consumable/sodawater = 1, /datum/reagent/consumable/limejuice = 1) /datum/chemical_reaction/bahama_mama - name = "Bahama Mama" - id = /datum/reagent/consumable/ethanol/bahama_mama results = list(/datum/reagent/consumable/ethanol/bahama_mama = 5) required_reagents = list(/datum/reagent/consumable/ethanol/creme_de_coconut = 1, /datum/reagent/consumable/ethanol/kahlua = 1, /datum/reagent/consumable/ethanol/rum = 2, /datum/reagent/consumable/pineapplejuice = 1) /datum/chemical_reaction/singulo - name = "Singulo" - id = /datum/reagent/consumable/ethanol/singulo results = list(/datum/reagent/consumable/ethanol/singulo = 10) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 5, /datum/reagent/uranium/radium = 1, /datum/reagent/consumable/ethanol/wine = 5) /datum/chemical_reaction/alliescocktail - name = "Allies Cocktail" - id = /datum/reagent/consumable/ethanol/alliescocktail results = list(/datum/reagent/consumable/ethanol/alliescocktail = 2) required_reagents = list(/datum/reagent/consumable/ethanol/martini = 1, /datum/reagent/consumable/ethanol/vodka = 1) /datum/chemical_reaction/demonsblood - name = "Demons Blood" - id = /datum/reagent/consumable/ethanol/demonsblood results = list(/datum/reagent/consumable/ethanol/demonsblood = 4) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 1, /datum/reagent/consumable/spacemountainwind = 1, /datum/reagent/blood = 1, /datum/reagent/consumable/dr_gibb = 1) /datum/chemical_reaction/booger - name = "Booger" - id = /datum/reagent/consumable/ethanol/booger results = list(/datum/reagent/consumable/ethanol/booger = 4) required_reagents = list(/datum/reagent/consumable/cream = 1, /datum/reagent/consumable/banana = 1, /datum/reagent/consumable/ethanol/rum = 1, /datum/reagent/consumable/watermelonjuice = 1) /datum/chemical_reaction/antifreeze - name = "Anti-freeze" - id = /datum/reagent/consumable/ethanol/antifreeze results = list(/datum/reagent/consumable/ethanol/antifreeze = 4) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 2, /datum/reagent/consumable/cream = 1, /datum/reagent/consumable/ice = 1) /datum/chemical_reaction/barefoot - name = "Barefoot" - id = /datum/reagent/consumable/ethanol/barefoot results = list(/datum/reagent/consumable/ethanol/barefoot = 3) required_reagents = list(/datum/reagent/consumable/berryjuice = 1, /datum/reagent/consumable/cream = 1, /datum/reagent/consumable/ethanol/vermouth = 1) /datum/chemical_reaction/moscow_mule - name = "Moscow Mule" - id = /datum/reagent/consumable/ethanol/moscow_mule results = list(/datum/reagent/consumable/ethanol/moscow_mule = 10) required_reagents = list(/datum/reagent/consumable/sol_dry = 5, /datum/reagent/consumable/ethanol/vodka = 5, /datum/reagent/consumable/limejuice = 1, /datum/reagent/consumable/ice = 1) mix_sound = 'sound/effects/bubbles2.ogg' /datum/chemical_reaction/painkiller - name = "Painkiller" - id = /datum/reagent/consumable/ethanol/painkiller results = list(/datum/reagent/consumable/ethanol/painkiller = 10) required_reagents = list(/datum/reagent/consumable/ethanol/creme_de_coconut = 5, /datum/reagent/consumable/pineapplejuice = 4, /datum/reagent/consumable/orangejuice = 1) /datum/chemical_reaction/pina_colada - name = "Pina Colada" - id = /datum/reagent/consumable/ethanol/pina_colada results = list(/datum/reagent/consumable/ethanol/pina_colada = 5) required_reagents = list(/datum/reagent/consumable/ethanol/creme_de_coconut = 1, /datum/reagent/consumable/pineapplejuice = 3, /datum/reagent/consumable/ethanol/rum = 1, /datum/reagent/consumable/limejuice = 1) ////DRINKS THAT REQUIRED IMPROVED SPRITES BELOW:: -Agouri///// /datum/chemical_reaction/sbiten - name = "Sbiten" - id = /datum/reagent/consumable/ethanol/sbiten results = list(/datum/reagent/consumable/ethanol/sbiten = 10) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 10, /datum/reagent/consumable/capsaicin = 1) /datum/chemical_reaction/red_mead - name = "Red Mead" - id = /datum/reagent/consumable/ethanol/red_mead results = list(/datum/reagent/consumable/ethanol/red_mead = 2) required_reagents = list(/datum/reagent/blood = 1, /datum/reagent/consumable/ethanol/mead = 1) /datum/chemical_reaction/mead - name = "Mead" - id = /datum/reagent/consumable/ethanol/mead results = list(/datum/reagent/consumable/ethanol/mead = 2) required_reagents = list(/datum/reagent/consumable/honey = 2) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) /datum/chemical_reaction/iced_beer - name = "Iced Beer" - id = /datum/reagent/consumable/ethanol/iced_beer results = list(/datum/reagent/consumable/ethanol/iced_beer = 6) required_reagents = list(/datum/reagent/consumable/ethanol/beer = 5, /datum/reagent/consumable/ice = 1) /datum/chemical_reaction/grog - name = "Grog" - id = /datum/reagent/consumable/ethanol/grog results = list(/datum/reagent/consumable/ethanol/grog = 2) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 1, /datum/reagent/water = 1) /datum/chemical_reaction/soy_latte - name = "Soy Latte" - id = /datum/reagent/consumable/soy_latte results = list(/datum/reagent/consumable/soy_latte = 2) required_reagents = list(/datum/reagent/consumable/coffee = 1, /datum/reagent/consumable/soymilk = 1) /datum/chemical_reaction/cafe_latte - name = "Cafe Latte" - id = /datum/reagent/consumable/cafe_latte results = list(/datum/reagent/consumable/cafe_latte = 2) required_reagents = list(/datum/reagent/consumable/coffee = 1, /datum/reagent/consumable/milk = 1) /datum/chemical_reaction/acidspit - name = "Acid Spit" - id = /datum/reagent/consumable/ethanol/acid_spit results = list(/datum/reagent/consumable/ethanol/acid_spit = 6) required_reagents = list(/datum/reagent/toxin/acid = 1, /datum/reagent/consumable/ethanol/wine = 5) /datum/chemical_reaction/amasec - name = "Amasec" - id = /datum/reagent/consumable/ethanol/amasec results = list(/datum/reagent/consumable/ethanol/amasec = 10) required_reagents = list(/datum/reagent/iron = 1, /datum/reagent/consumable/ethanol/wine = 5, /datum/reagent/consumable/ethanol/vodka = 5) /datum/chemical_reaction/changelingsting - name = "Changeling Sting" - id = /datum/reagent/consumable/ethanol/changelingsting results = list(/datum/reagent/consumable/ethanol/changelingsting = 5) required_reagents = list(/datum/reagent/consumable/ethanol/screwdrivercocktail = 1, /datum/reagent/consumable/lemon_lime = 2) /datum/chemical_reaction/aloe - name = "Aloe" - id = /datum/reagent/consumable/ethanol/aloe results = list(/datum/reagent/consumable/ethanol/aloe = 2) required_reagents = list(/datum/reagent/consumable/ethanol/irish_cream = 1, /datum/reagent/consumable/watermelonjuice = 1) /datum/chemical_reaction/andalusia - name = "Andalusia" - id = /datum/reagent/consumable/ethanol/andalusia results = list(/datum/reagent/consumable/ethanol/andalusia = 3) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 1, /datum/reagent/consumable/ethanol/whiskey = 1, /datum/reagent/consumable/lemonjuice = 1) /datum/chemical_reaction/neurotoxin - name = "Neurotoxin" - id = /datum/reagent/consumable/ethanol/neurotoxin results = list(/datum/reagent/consumable/ethanol/neurotoxin = 2) required_reagents = list(/datum/reagent/consumable/ethanol/gargle_blaster = 1, /datum/reagent/medicine/morphine = 1) /datum/chemical_reaction/snowwhite - name = "Snow White" - id = /datum/reagent/consumable/ethanol/snowwhite results = list(/datum/reagent/consumable/ethanol/snowwhite = 2) required_reagents = list(/datum/reagent/consumable/ethanol/beer = 1, /datum/reagent/consumable/lemon_lime = 1) /datum/chemical_reaction/irishcarbomb - name = "Irish Car Bomb" - id = /datum/reagent/consumable/ethanol/irishcarbomb results = list(/datum/reagent/consumable/ethanol/irishcarbomb = 2) required_reagents = list(/datum/reagent/consumable/ethanol/ale = 1, /datum/reagent/consumable/ethanol/irish_cream = 1) /datum/chemical_reaction/syndicatebomb - name = "Syndicate Bomb" - id = /datum/reagent/consumable/ethanol/syndicatebomb results = list(/datum/reagent/consumable/ethanol/syndicatebomb = 2) required_reagents = list(/datum/reagent/consumable/ethanol/beer = 1, /datum/reagent/consumable/ethanol/whiskey_cola = 1) /datum/chemical_reaction/erikasurprise - name = "Erika Surprise" - id = /datum/reagent/consumable/ethanol/erikasurprise results = list(/datum/reagent/consumable/ethanol/erikasurprise = 5) required_reagents = list(/datum/reagent/consumable/ethanol/ale = 1, /datum/reagent/consumable/limejuice = 1, /datum/reagent/consumable/ethanol/whiskey = 1, /datum/reagent/consumable/banana = 1, /datum/reagent/consumable/ice = 1) /datum/chemical_reaction/devilskiss - name = "Devils Kiss" - id = /datum/reagent/consumable/ethanol/devilskiss results = list(/datum/reagent/consumable/ethanol/devilskiss = 3) required_reagents = list(/datum/reagent/blood = 1, /datum/reagent/consumable/ethanol/kahlua = 1, /datum/reagent/consumable/ethanol/rum = 1) /datum/chemical_reaction/hippiesdelight - name = "Hippies Delight" - id = /datum/reagent/consumable/ethanol/hippies_delight results = list(/datum/reagent/consumable/ethanol/hippies_delight = 2) required_reagents = list(/datum/reagent/drug/mushroomhallucinogen = 1, /datum/reagent/consumable/ethanol/gargle_blaster = 1) /datum/chemical_reaction/bananahonk - name = "Banana Honk" - id = /datum/reagent/consumable/ethanol/bananahonk results = list(/datum/reagent/consumable/ethanol/bananahonk = 2) required_reagents = list(/datum/reagent/consumable/laughter = 1, /datum/reagent/consumable/cream = 1) /datum/chemical_reaction/silencer - name = "Silencer" - id = /datum/reagent/consumable/ethanol/silencer results = list(/datum/reagent/consumable/ethanol/silencer = 3) required_reagents = list(/datum/reagent/consumable/nothing = 1, /datum/reagent/consumable/cream = 1, /datum/reagent/consumable/sugar = 1) /datum/chemical_reaction/driestmartini - name = "Driest Martini" - id = /datum/reagent/consumable/ethanol/driestmartini results = list(/datum/reagent/consumable/ethanol/driestmartini = 2) required_reagents = list(/datum/reagent/consumable/nothing = 1, /datum/reagent/consumable/ethanol/gin = 1) /datum/chemical_reaction/thirteenloko - name = "Thirteen Loko" - id = /datum/reagent/consumable/ethanol/thirteenloko results = list(/datum/reagent/consumable/ethanol/thirteenloko = 3) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 1, /datum/reagent/consumable/coffee = 1, /datum/reagent/consumable/limejuice = 1) /datum/chemical_reaction/chocolatepudding - name = "Chocolate Pudding" - id = /datum/reagent/consumable/chocolatepudding results = list(/datum/reagent/consumable/chocolatepudding = 20) required_reagents = list(/datum/reagent/consumable/milk/chocolate_milk = 10, /datum/reagent/consumable/eggyolk = 5) /datum/chemical_reaction/vanillapudding - name = "Vanilla Pudding" - id = /datum/reagent/consumable/vanillapudding results = list(/datum/reagent/consumable/vanillapudding = 20) required_reagents = list(/datum/reagent/consumable/vanilla = 5, /datum/reagent/consumable/milk = 5, /datum/reagent/consumable/eggyolk = 5) /datum/chemical_reaction/cherryshake - name = "Cherry Shake" - id = /datum/reagent/consumable/cherryshake results = list(/datum/reagent/consumable/cherryshake = 3) required_reagents = list(/datum/reagent/consumable/cherryjelly = 1, /datum/reagent/consumable/ice = 1, /datum/reagent/consumable/cream = 1) /datum/chemical_reaction/bluecherryshake - name = "Blue Cherry Shake" - id = /datum/reagent/consumable/bluecherryshake results = list(/datum/reagent/consumable/bluecherryshake = 3) required_reagents = list(/datum/reagent/consumable/bluecherryjelly = 1, /datum/reagent/consumable/ice = 1, /datum/reagent/consumable/cream = 1) /datum/chemical_reaction/drunkenblumpkin - name = "Drunken Blumpkin" - id = /datum/reagent/consumable/ethanol/drunkenblumpkin results = list(/datum/reagent/consumable/ethanol/drunkenblumpkin = 4) required_reagents = list(/datum/reagent/consumable/blumpkinjuice = 1, /datum/reagent/consumable/ethanol/irish_cream = 2, /datum/reagent/consumable/ice = 1) /datum/chemical_reaction/pumpkin_latte - name = "Pumpkin space latte" - id = /datum/reagent/consumable/pumpkin_latte results = list(/datum/reagent/consumable/pumpkin_latte = 15) required_reagents = list(/datum/reagent/consumable/pumpkinjuice = 5, /datum/reagent/consumable/coffee = 5, /datum/reagent/consumable/cream = 5) /datum/chemical_reaction/gibbfloats - name = "Gibb Floats" - id = /datum/reagent/consumable/gibbfloats results = list(/datum/reagent/consumable/gibbfloats = 15) required_reagents = list(/datum/reagent/consumable/dr_gibb = 5, /datum/reagent/consumable/ice = 5, /datum/reagent/consumable/cream = 5) /datum/chemical_reaction/triple_citrus - name = /datum/reagent/consumable/triple_citrus - id = /datum/reagent/consumable/triple_citrus results = list(/datum/reagent/consumable/triple_citrus = 5) required_reagents = list(/datum/reagent/consumable/lemonjuice = 1, /datum/reagent/consumable/limejuice = 1, /datum/reagent/consumable/orangejuice = 1) /datum/chemical_reaction/grape_soda - name = "grape soda" - id = /datum/reagent/consumable/grape_soda results = list(/datum/reagent/consumable/grape_soda = 2) required_reagents = list(/datum/reagent/consumable/grapejuice = 1, /datum/reagent/consumable/sodawater = 1) /datum/chemical_reaction/grappa - name = /datum/reagent/consumable/ethanol/grappa - id = /datum/reagent/consumable/ethanol/grappa results = list(/datum/reagent/consumable/ethanol/grappa = 10) required_reagents = list (/datum/reagent/consumable/ethanol/wine = 10) required_catalysts = list (/datum/reagent/consumable/enzyme = 5) /datum/chemical_reaction/whiskey_sour - name = "Whiskey Sour" - id = /datum/reagent/consumable/ethanol/whiskey_sour results = list(/datum/reagent/consumable/ethanol/whiskey_sour = 3) required_reagents = list(/datum/reagent/consumable/ethanol/whiskey = 1, /datum/reagent/consumable/lemonjuice = 1, /datum/reagent/consumable/sugar = 1) mix_message = "The mixture darkens to a rich gold hue." /datum/chemical_reaction/fetching_fizz - name = "Fetching Fizz" - id = /datum/reagent/consumable/ethanol/fetching_fizz results = list(/datum/reagent/consumable/ethanol/fetching_fizz = 3) required_reagents = list(/datum/reagent/consumable/nuka_cola = 1, /datum/reagent/iron = 1) //Manufacturable from only the mining station mix_message = "The mixture slightly vibrates before settling." /datum/chemical_reaction/hearty_punch - name = "Hearty Punch" - id = /datum/reagent/consumable/ethanol/hearty_punch results = list(/datum/reagent/consumable/ethanol/hearty_punch = 1) //Very little, for balance reasons required_reagents = list(/datum/reagent/consumable/ethanol/brave_bull = 5, /datum/reagent/consumable/ethanol/syndicatebomb = 5, /datum/reagent/consumable/ethanol/absinthe = 5) mix_message = "The mixture darkens to a healthy crimson." required_temp = 315 //Piping hot! /datum/chemical_reaction/bacchus_blessing - name = "Bacchus' Blessing" - id = /datum/reagent/consumable/ethanol/bacchus_blessing results = list(/datum/reagent/consumable/ethanol/bacchus_blessing = 4) required_reagents = list(/datum/reagent/consumable/ethanol/hooch = 1, /datum/reagent/consumable/ethanol/absinthe = 1, /datum/reagent/consumable/ethanol/manly_dorf = 1, /datum/reagent/consumable/ethanol/syndicatebomb = 1) mix_message = "The mixture turns to a sickening froth." /datum/chemical_reaction/lemonade - name = "Lemonade" - id = /datum/reagent/consumable/lemonade results = list(/datum/reagent/consumable/lemonade = 5) required_reagents = list(/datum/reagent/consumable/lemonjuice = 2, /datum/reagent/water = 2, /datum/reagent/consumable/sugar = 1, /datum/reagent/consumable/ice = 1) mix_message = "You're suddenly reminded of home." /datum/chemical_reaction/arnold_palmer - name = "Arnold Palmer" - id = /datum/reagent/consumable/tea/arnold_palmer results = list(/datum/reagent/consumable/tea/arnold_palmer = 2) required_reagents = list(/datum/reagent/consumable/tea = 1, /datum/reagent/consumable/lemonade = 1) mix_message = "The smells of fresh green grass and sand traps waft through the air as the mixture turns a friendly yellow-orange." /datum/chemical_reaction/chocolate_milk - name = "chocolate milk" - id = /datum/reagent/consumable/milk/chocolate_milk results = list(/datum/reagent/consumable/milk/chocolate_milk = 2) required_reagents = list(/datum/reagent/consumable/milk = 1, /datum/reagent/consumable/coco = 1) mix_message = "The color changes as the mixture blends smoothly." /datum/chemical_reaction/hot_coco - name = "Hot Coco" - id = /datum/reagent/consumable/hot_coco results = list(/datum/reagent/consumable/hot_coco = 5) required_reagents = list(/datum/reagent/consumable/milk = 5, /datum/reagent/consumable/coco = 1) required_temp = 320 /datum/chemical_reaction/coffee - name = "Coffee" - id = /datum/reagent/consumable/coffee results = list(/datum/reagent/consumable/coffee = 5) required_reagents = list(/datum/reagent/toxin/coffeepowder = 1, /datum/reagent/water = 5) /datum/chemical_reaction/tea - name = "Tea" - id = /datum/reagent/consumable/tea results = list(/datum/reagent/consumable/tea = 5) required_reagents = list(/datum/reagent/toxin/teapowder = 1, /datum/reagent/water = 5) /datum/chemical_reaction/eggnog - name = /datum/reagent/consumable/ethanol/eggnog - id = /datum/reagent/consumable/ethanol/eggnog results = list(/datum/reagent/consumable/ethanol/eggnog = 15) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 5, /datum/reagent/consumable/cream = 5, /datum/reagent/consumable/eggyolk = 5) /datum/chemical_reaction/narsour - name = "Nar'sour" - id = /datum/reagent/consumable/ethanol/narsour results = list(/datum/reagent/consumable/ethanol/narsour = 1) required_reagents = list(/datum/reagent/blood = 1, /datum/reagent/consumable/lemonjuice = 1, /datum/reagent/consumable/ethanol/demonsblood = 1) mix_message = "The mixture develops a sinister glow." mix_sound = 'sound/effects/singlebeat.ogg' /datum/chemical_reaction/quadruplesec - name = "Quadruple Sec" - id = /datum/reagent/consumable/ethanol/quadruple_sec results = list(/datum/reagent/consumable/ethanol/quadruple_sec = 15) required_reagents = list(/datum/reagent/consumable/ethanol/triple_sec = 5, /datum/reagent/consumable/triple_citrus = 5, /datum/reagent/consumable/ethanol/creme_de_menthe = 5) mix_message = "The snap of a taser emanates clearly from the mixture as it settles." mix_sound = 'sound/weapons/taser.ogg' /datum/chemical_reaction/grasshopper - name = "Grasshopper" - id = /datum/reagent/consumable/ethanol/grasshopper results = list(/datum/reagent/consumable/ethanol/grasshopper = 15) required_reagents = list(/datum/reagent/consumable/cream = 5, /datum/reagent/consumable/ethanol/creme_de_menthe = 5, /datum/reagent/consumable/ethanol/creme_de_cacao = 5) mix_message = "A vibrant green bubbles forth as the mixture emulsifies." /datum/chemical_reaction/stinger - name = "Stinger" - id = /datum/reagent/consumable/ethanol/stinger results = list(/datum/reagent/consumable/ethanol/stinger = 15) required_reagents = list(/datum/reagent/consumable/ethanol/whiskey = 10, /datum/reagent/consumable/ethanol/creme_de_menthe = 5 ) /datum/chemical_reaction/quintuplesec - name = "Quintuple Sec" - id = /datum/reagent/consumable/ethanol/quintuple_sec results = list(/datum/reagent/consumable/ethanol/quintuple_sec = 15) required_reagents = list(/datum/reagent/consumable/ethanol/quadruple_sec = 5, /datum/reagent/consumable/clownstears = 5, /datum/reagent/consumable/ethanol/syndicatebomb = 5) mix_message = "Judgement is upon you." mix_sound = 'sound/items/airhorn2.ogg' /datum/chemical_reaction/bastion_bourbon - name = "Bastion Bourbon" - id = /datum/reagent/consumable/ethanol/bastion_bourbon results = list(/datum/reagent/consumable/ethanol/bastion_bourbon = 2) required_reagents = list(/datum/reagent/consumable/tea = 1, /datum/reagent/consumable/ethanol/creme_de_menthe = 1, /datum/reagent/consumable/triple_citrus = 1, /datum/reagent/consumable/berryjuice = 1) //herbal and minty, with a hint of citrus and berry mix_message = "You catch an aroma of hot tea and fruits as the mix blends into a blue-green color." /datum/chemical_reaction/squirt_cider - name = "Squirt Cider" - id = /datum/reagent/consumable/ethanol/squirt_cider results = list(/datum/reagent/consumable/ethanol/squirt_cider = 1) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/consumable/tomatojuice = 1, /datum/reagent/consumable/nutriment = 1) mix_message = "The mix swirls and turns a bright red that reminds you of an apple's skin." /datum/chemical_reaction/fringe_weaver - name = "Fringe Weaver" - id = /datum/reagent/consumable/ethanol/fringe_weaver results = list(/datum/reagent/consumable/ethanol/fringe_weaver = 10) required_reagents = list(/datum/reagent/consumable/ethanol = 9, /datum/reagent/consumable/sugar = 1) //9 karmotrine, 1 adelhyde mix_message = "The mix turns a pleasant cream color and foams up." /datum/chemical_reaction/sugar_rush - name = "Sugar Rush" - id = /datum/reagent/consumable/ethanol/sugar_rush results = list(/datum/reagent/consumable/ethanol/sugar_rush = 4) required_reagents = list(/datum/reagent/consumable/sugar = 2, /datum/reagent/consumable/lemonjuice = 1, /datum/reagent/consumable/ethanol/wine = 1) //2 adelhyde (sweet), 1 powdered delta (sour), 1 karmotrine (alcohol) mix_message = "The mixture bubbles and brightens into a girly pink." /datum/chemical_reaction/crevice_spike - name = "Crevice Spike" - id = /datum/reagent/consumable/ethanol/crevice_spike results = list(/datum/reagent/consumable/ethanol/crevice_spike = 6) required_reagents = list(/datum/reagent/consumable/limejuice = 2, /datum/reagent/consumable/capsaicin = 4) //2 powdered delta (sour), 4 flanergide (spicy) mix_message = "The mixture stings your eyes as it settles." /datum/chemical_reaction/sake - name = /datum/reagent/consumable/ethanol/sake - id = /datum/reagent/consumable/ethanol/sake results = list(/datum/reagent/consumable/ethanol/sake = 10) required_reagents = list(/datum/reagent/consumable/rice = 10) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) mix_message = "The rice grains ferment into a clear, sweet-smelling liquid." /datum/chemical_reaction/peppermint_patty - name = "Peppermint Patty" - id = /datum/reagent/consumable/ethanol/peppermint_patty results = list(/datum/reagent/consumable/ethanol/peppermint_patty = 10) required_reagents = list(/datum/reagent/consumable/hot_coco = 6, /datum/reagent/consumable/ethanol/creme_de_cacao = 1, /datum/reagent/consumable/ethanol/creme_de_menthe = 1, /datum/reagent/consumable/ethanol/vodka = 1, /datum/reagent/consumable/menthol = 1) mix_message = "The coco turns mint green just as the strong scent hits your nose." /datum/chemical_reaction/alexander - name = "Alexander" - id = /datum/reagent/consumable/ethanol/alexander results = list(/datum/reagent/consumable/ethanol/alexander = 3) required_reagents = list(/datum/reagent/consumable/ethanol/cognac = 1, /datum/reagent/consumable/ethanol/creme_de_cacao = 1, /datum/reagent/consumable/cream = 1) /datum/chemical_reaction/sidecar - name = "Sidecar" - id = /datum/reagent/consumable/ethanol/sidecar results = list(/datum/reagent/consumable/ethanol/sidecar = 4) required_reagents = list(/datum/reagent/consumable/ethanol/cognac = 2, /datum/reagent/consumable/ethanol/triple_sec = 1, /datum/reagent/consumable/lemonjuice = 1) /datum/chemical_reaction/between_the_sheets - name = "Between the Sheets" - id = /datum/reagent/consumable/ethanol/between_the_sheets results = list(/datum/reagent/consumable/ethanol/between_the_sheets = 5) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 1, /datum/reagent/consumable/ethanol/sidecar = 4) /datum/chemical_reaction/kamikaze - name = "Kamikaze" - id = /datum/reagent/consumable/ethanol/kamikaze results = list(/datum/reagent/consumable/ethanol/kamikaze = 3) required_reagents = list(/datum/reagent/consumable/ethanol/vodka = 1, /datum/reagent/consumable/ethanol/triple_sec = 1, /datum/reagent/consumable/limejuice = 1) /datum/chemical_reaction/mojito - name = "Mojito" - id = /datum/reagent/consumable/ethanol/mojito results = list(/datum/reagent/consumable/ethanol/mojito = 5) required_reagents = list(/datum/reagent/consumable/ethanol/rum = 1, /datum/reagent/consumable/sugar = 1, /datum/reagent/consumable/limejuice = 1, /datum/reagent/consumable/sodawater = 1, /datum/reagent/consumable/menthol = 1) /datum/chemical_reaction/fernet_cola - name = "Fernet Cola" - id = /datum/reagent/consumable/ethanol/fernet_cola results = list(/datum/reagent/consumable/ethanol/fernet_cola = 2) required_reagents = list(/datum/reagent/consumable/ethanol/fernet = 1, /datum/reagent/consumable/space_cola = 1) /datum/chemical_reaction/fanciulli - name = "Fanciulli" - id = /datum/reagent/consumable/ethanol/fanciulli results = list(/datum/reagent/consumable/ethanol/fanciulli = 2) required_reagents = list(/datum/reagent/consumable/ethanol/manhattan = 1, /datum/reagent/consumable/ethanol/fernet = 1) /datum/chemical_reaction/branca_menta - name = "Branca Menta" - id = /datum/reagent/consumable/ethanol/branca_menta results = list(/datum/reagent/consumable/ethanol/branca_menta = 3) required_reagents = list(/datum/reagent/consumable/ethanol/fernet = 1, /datum/reagent/consumable/ethanol/creme_de_menthe = 1, /datum/reagent/consumable/ice = 1) /datum/chemical_reaction/blank_paper - name = "Blank Paper" - id = /datum/reagent/consumable/ethanol/blank_paper results = list(/datum/reagent/consumable/ethanol/blank_paper = 3) required_reagents = list(/datum/reagent/consumable/ethanol/silencer = 1, /datum/reagent/consumable/nothing = 1, /datum/reagent/consumable/nuka_cola = 1) /datum/chemical_reaction/wizz_fizz - name = "Wizz Fizz" - id = /datum/reagent/consumable/ethanol/wizz_fizz results = list(/datum/reagent/consumable/ethanol/wizz_fizz = 3) required_reagents = list(/datum/reagent/consumable/ethanol/triple_sec = 1, /datum/reagent/consumable/sodawater = 1, /datum/reagent/consumable/ethanol/champagne = 1) mix_message = "The beverage starts to froth with an almost mystical zeal!" @@ -756,77 +522,53 @@ /datum/chemical_reaction/bug_spray - name = "Bug Spray" - id = /datum/reagent/consumable/ethanol/bug_spray results = list(/datum/reagent/consumable/ethanol/bug_spray = 5) required_reagents = list(/datum/reagent/consumable/ethanol/triple_sec = 2, /datum/reagent/consumable/lemon_lime = 1, /datum/reagent/consumable/ethanol/rum = 2, /datum/reagent/consumable/ethanol/vodka = 1) mix_message = "The faint aroma of summer camping trips wafts through the air; but what's that buzzing noise?" mix_sound = 'sound/creatures/bee.ogg' /datum/chemical_reaction/jack_rose - name = "Jack Rose" - id = /datum/reagent/consumable/ethanol/jack_rose results = list(/datum/reagent/consumable/ethanol/jack_rose = 4) required_reagents = list(/datum/reagent/consumable/grenadine = 1, /datum/reagent/consumable/ethanol/applejack = 2, /datum/reagent/consumable/limejuice = 1) mix_message = "As the grenadine incorporates, the beverage takes on a mellow, red-orange glow." /datum/chemical_reaction/turbo - name = "Turbo" - id = /datum/reagent/consumable/ethanol/turbo results = list(/datum/reagent/consumable/ethanol/turbo = 5) required_reagents = list(/datum/reagent/consumable/ethanol/moonshine = 2, /datum/reagent/nitrous_oxide = 1, /datum/reagent/consumable/ethanol/sugar_rush = 1, /datum/reagent/consumable/pwr_game = 1) /datum/chemical_reaction/old_timer - name = "Old Timer" - id = /datum/reagent/consumable/ethanol/old_timer results = list(/datum/reagent/consumable/ethanol/old_timer = 6) required_reagents = list(/datum/reagent/consumable/ethanol/whiskeysoda = 3, /datum/reagent/consumable/parsnipjuice = 2, /datum/reagent/consumable/ethanol/alexander = 1) /datum/chemical_reaction/rubberneck - name = "Rubberneck" - id = /datum/reagent/consumable/ethanol/rubberneck results = list(/datum/reagent/consumable/ethanol/rubberneck = 10) required_reagents = list(/datum/reagent/consumable/ethanol = 4, /datum/reagent/consumable/grey_bull = 5, /datum/reagent/consumable/astrotame = 1) /datum/chemical_reaction/duplex - name = "Duplex" - id = /datum/reagent/consumable/ethanol/duplex results = list(/datum/reagent/consumable/ethanol/duplex = 4) required_reagents = list(/datum/reagent/consumable/ethanol/hcider = 2, /datum/reagent/consumable/applejuice = 1, /datum/reagent/consumable/berryjuice = 1) /datum/chemical_reaction/trappist - name = "Trappist" - id = /datum/reagent/consumable/ethanol/trappist results = list(/datum/reagent/consumable/ethanol/trappist = 5) required_reagents = list(/datum/reagent/consumable/ethanol/ale = 2, /datum/reagent/water/holywater = 2, /datum/reagent/consumable/sugar = 1) /datum/chemical_reaction/cream_soda - name = "Cream Soda" - id = /datum/reagent/consumable/cream_soda results = list(/datum/reagent/consumable/cream_soda = 4) required_reagents = list(/datum/reagent/consumable/sugar = 2, /datum/reagent/consumable/sodawater = 2, /datum/reagent/consumable/vanilla = 1) /datum/chemical_reaction/blazaam - name = "Blazaam" - id = /datum/reagent/consumable/ethanol/blazaam results = list(/datum/reagent/consumable/ethanol/blazaam = 3) required_reagents = list(/datum/reagent/consumable/ethanol/gin = 2, /datum/reagent/consumable/peachjuice = 1, /datum/reagent/bluespace = 1) /datum/chemical_reaction/planet_cracker - name = "Planet Cracker" - id = /datum/reagent/consumable/ethanol/planet_cracker results = list(/datum/reagent/consumable/ethanol/planet_cracker = 4) required_reagents = list(/datum/reagent/consumable/ethanol/champagne = 2, /datum/reagent/consumable/ethanol/lizardwine = 2, /datum/reagent/consumable/eggyolk = 1, /datum/reagent/gold = 1) mix_message = "The liquid's color starts shifting as the nanogold is alternately corroded and redeposited." /datum/chemical_reaction/red_queen - name = "Red Queen" - id = /datum/reagent/consumable/red_queen results = list(/datum/reagent/consumable/red_queen = 10) required_reagents = list(/datum/reagent/consumable/tea = 6, /datum/reagent/mercury = 2, /datum/reagent/consumable/blackpepper = 1, /datum/reagent/growthserum = 1) /datum/chemical_reaction/mauna_loa - name = "Mauna Loa" - id = /datum/reagent/consumable/ethanol/mauna_loa results = list(/datum/reagent/consumable/ethanol/mauna_loa = 5) required_reagents = list(/datum/reagent/consumable/capsaicin = 2, /datum/reagent/consumable/ethanol/kahlua = 1, /datum/reagent/consumable/ethanol/bahama_mama = 2) diff --git a/code/modules/food_and_drinks/recipes/food_mixtures.dm b/code/modules/food_and_drinks/recipes/food_mixtures.dm index 9e0bab02e3c..ceed56e01d9 100644 --- a/code/modules/food_and_drinks/recipes/food_mixtures.dm +++ b/code/modules/food_and_drinks/recipes/food_mixtures.dm @@ -9,8 +9,6 @@ //////////////////////////////////////////FOOD MIXTURES//////////////////////////////////// /datum/chemical_reaction/tofu - name = "Tofu" - id = "tofu" required_reagents = list(/datum/reagent/consumable/soymilk = 10) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) mob_react = FALSE @@ -22,8 +20,6 @@ return /datum/chemical_reaction/chocolate_bar - name = "Chocolate Bar" - id = "chocolate_bar" required_reagents = list(/datum/reagent/consumable/soymilk = 2, /datum/reagent/consumable/coco = 2, /datum/reagent/consumable/sugar = 2) /datum/chemical_reaction/chocolate_bar/on_reaction(datum/reagents/holder, created_volume) @@ -33,8 +29,6 @@ return /datum/chemical_reaction/chocolate_bar2 - name = "Chocolate Bar" - id = "chocolate_bar" required_reagents = list(/datum/reagent/consumable/milk/chocolate_milk = 4, /datum/reagent/consumable/sugar = 2) mob_react = FALSE @@ -45,37 +39,27 @@ return /datum/chemical_reaction/soysauce - name = "Soy Sauce" - id = /datum/reagent/consumable/soysauce results = list(/datum/reagent/consumable/soysauce = 5) required_reagents = list(/datum/reagent/consumable/soymilk = 4, /datum/reagent/toxin/acid = 1) /datum/chemical_reaction/corn_syrup - name = /datum/reagent/consumable/corn_syrup - id = /datum/reagent/consumable/corn_syrup results = list(/datum/reagent/consumable/corn_syrup = 5) required_reagents = list(/datum/reagent/consumable/corn_starch = 1, /datum/reagent/toxin/acid = 1) required_temp = 374 /datum/chemical_reaction/caramel - name = "Caramel" - id = /datum/reagent/consumable/caramel results = list(/datum/reagent/consumable/caramel = 1) required_reagents = list(/datum/reagent/consumable/sugar = 1) required_temp = 413.15 mob_react = FALSE /datum/chemical_reaction/caramel_burned - name = "Caramel burned" - id = "caramel_burned" results = list(/datum/reagent/carbon = 1) required_reagents = list(/datum/reagent/consumable/caramel = 1) required_temp = 483.15 mob_react = FALSE /datum/chemical_reaction/cheesewheel - name = "Cheesewheel" - id = "cheesewheel" required_reagents = list(/datum/reagent/consumable/milk = 40) required_catalysts = list(/datum/reagent/consumable/enzyme = 5) @@ -85,8 +69,6 @@ new /obj/item/reagent_containers/food/snacks/store/cheesewheel(location) /datum/chemical_reaction/synthmeat - name = "synthmeat" - id = "synthmeat" required_reagents = list(/datum/reagent/blood = 5, /datum/reagent/medicine/cryoxadone = 1) mob_react = FALSE @@ -96,20 +78,14 @@ new /obj/item/reagent_containers/food/snacks/meat/slab/synthmeat(location) /datum/chemical_reaction/hot_ramen - name = "Hot Ramen" - id = /datum/reagent/consumable/hot_ramen results = list(/datum/reagent/consumable/hot_ramen = 3) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/consumable/dry_ramen = 3) /datum/chemical_reaction/hell_ramen - name = "Hell Ramen" - id = /datum/reagent/consumable/hell_ramen results = list(/datum/reagent/consumable/hell_ramen = 6) required_reagents = list(/datum/reagent/consumable/capsaicin = 1, /datum/reagent/consumable/hot_ramen = 6) /datum/chemical_reaction/imitationcarpmeat - name = "Imitation Carpmeat" - id = "imitationcarpmeat" required_reagents = list(/datum/reagent/toxin/carpotoxin = 5) required_container = /obj/item/reagent_containers/food/snacks/tofu mix_message = "The mixture becomes similar to carp meat." @@ -121,8 +97,6 @@ qdel(holder.my_atom) /datum/chemical_reaction/dough - name = "Dough" - id = "dough" required_reagents = list(/datum/reagent/water = 10, /datum/reagent/consumable/flour = 15) mix_message = "The ingredients form a dough." @@ -132,8 +106,6 @@ new /obj/item/reagent_containers/food/snacks/dough(location) /datum/chemical_reaction/cakebatter - name = "Cake Batter" - id = "cakebatter" required_reagents = list(/datum/reagent/consumable/eggyolk = 15, /datum/reagent/consumable/flour = 15, /datum/reagent/consumable/sugar = 5) mix_message = "The ingredients form a cake batter." @@ -143,12 +115,9 @@ new /obj/item/reagent_containers/food/snacks/cakebatter(location) /datum/chemical_reaction/cakebatter/vegan - id = "vegancakebatter" required_reagents = list(/datum/reagent/consumable/soymilk = 15, /datum/reagent/consumable/flour = 15, /datum/reagent/consumable/sugar = 5) /datum/chemical_reaction/ricebowl - name = "Rice Bowl" - id = "ricebowl" required_reagents = list(/datum/reagent/consumable/rice = 10, /datum/reagent/water = 10) required_container = /obj/item/reagent_containers/glass/bowl mix_message = "The rice absorbs the water." @@ -160,14 +129,10 @@ qdel(holder.my_atom) /datum/chemical_reaction/nutriconversion - name = "Nutriment Conversion" - id = "nutriconversion" results = list(/datum/reagent/consumable/nutriment/peptides = 0.5) required_reagents = list(/datum/reagent/consumable/nutriment/ = 0.5) required_catalysts = list(/datum/reagent/medicine/metafactor = 0.5) /datum/chemical_reaction/bbqsauce - name = "BBQ Sauce" - id = /datum/reagent/consumable/bbqsauce results = list(/datum/reagent/consumable/bbqsauce = 5) required_reagents = list(/datum/reagent/ash = 1, /datum/reagent/consumable/tomatojuice = 1, /datum/reagent/medicine/salglu_solution = 3, /datum/reagent/consumable/blackpepper = 1) diff --git a/code/modules/goonchat/browserOutput.dm b/code/modules/goonchat/browserOutput.dm index 903a911a21e..95811d30f5a 100644 --- a/code/modules/goonchat/browserOutput.dm +++ b/code/modules/goonchat/browserOutput.dm @@ -165,7 +165,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("tmp/iconCache.sav")) //Cache of ico /datum/chatOutput/proc/setMusicVolume(volume = "") if(volume) - adminMusicVolume = CLAMP(text2num(volume), 0, 100) + adminMusicVolume = clamp(text2num(volume), 0, 100) //Sends client connection details to the chat to handle and save /datum/chatOutput/proc/sendClientData() diff --git a/code/modules/holiday/easter.dm b/code/modules/holiday/easter.dm index 7faf6f22eb2..2f0e032c946 100644 --- a/code/modules/holiday/easter.dm +++ b/code/modules/holiday/easter.dm @@ -102,6 +102,13 @@ body_parts_covered = CHEST|GROIN|LEGS|ARMS flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT +//Bunny bag! +/obj/item/storage/backpack/satchel/bunnysatchel + name = "Easter Bunny Satchel" + desc = "Good for your eyes." + icon_state = "satchel_carrot" + item_state = "satchel_carrot" + //Egg prizes and egg spawns! /obj/item/reagent_containers/food/snacks/egg var/containsPrize = FALSE @@ -117,16 +124,33 @@ /obj/item/reagent_containers/food/snacks/egg/proc/dispensePrize(turf/where) var/won = pick(/obj/item/clothing/head/bunnyhead, /obj/item/clothing/suit/bunnysuit, + /obj/item/storage/backpack/satchel/bunnysatchel, /obj/item/reagent_containers/food/snacks/grown/carrot, - /obj/item/reagent_containers/food/snacks/chocolateegg, /obj/item/toy/balloon, /obj/item/toy/gun, /obj/item/toy/sword, + /obj/item/toy/talking/AI, + /obj/item/toy/talking/owl, + /obj/item/toy/talking/griffin, + /obj/item/toy/minimeteor, + /obj/item/toy/clockwork_watch, + /obj/item/toy/toy_xeno, /obj/item/toy/foamblade, /obj/item/toy/prize/ripley, + /obj/item/toy/prize/fireripley, + /obj/item/toy/prize/deathripley, + /obj/item/toy/prize/gygax, + /obj/item/toy/prize/durand, + /obj/item/toy/prize/marauder, + /obj/item/toy/prize/seraph, + /obj/item/toy/prize/mauler, + /obj/item/toy/prize/odysseus, + /obj/item/toy/prize/phazon, + /obj/item/toy/prize/reticence, /obj/item/toy/prize/honk, /obj/item/toy/plush/carpplushie, /obj/item/toy/redbutton, + /obj/item/toy/windupToolbox, /obj/item/clothing/head/collectable/rabbitears) new won(where) new/obj/item/reagent_containers/food/snacks/chocolateegg(where) diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 11d7acdbe71..f71a4fefe10 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -314,7 +314,7 @@ else if(href_list["create"]) var/amount = (text2num(href_list["amount"])) //Can't be outside these (if you change this keep a sane limit) - amount = CLAMP(amount, 1, 10) + amount = clamp(amount, 1, 10) var/id = href_list["create"] if(!stored_research.researched_designs.Find(id)) //naughty naughty diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index cc6995f36f4..a85b7ba05e3 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -202,8 +202,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) - W.pixel_x = CLAMP(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2) - W.pixel_y = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2) + W.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2) + W.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2) else return ..() diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index c902f18f391..2df185c4b84 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -914,26 +914,26 @@ /// Tray Setters - The following procs adjust the tray or plants variables, and make sure that the stat doesn't go out of bounds./// /obj/machinery/hydroponics/proc/adjustNutri(adjustamt) - nutrilevel = CLAMP(nutrilevel + adjustamt, 0, maxnutri) + nutrilevel = clamp(nutrilevel + adjustamt, 0, maxnutri) /obj/machinery/hydroponics/proc/adjustWater(adjustamt) - waterlevel = CLAMP(waterlevel + adjustamt, 0, maxwater) + waterlevel = clamp(waterlevel + adjustamt, 0, maxwater) if(adjustamt>0) adjustToxic(-round(adjustamt/4))//Toxicity dilutation code. The more water you put in, the lesser the toxin concentration. /obj/machinery/hydroponics/proc/adjustHealth(adjustamt) if(myseed && !dead) - plant_health = CLAMP(plant_health + adjustamt, 0, myseed.endurance) + plant_health = clamp(plant_health + adjustamt, 0, myseed.endurance) /obj/machinery/hydroponics/proc/adjustToxic(adjustamt) - toxic = CLAMP(toxic + adjustamt, 0, 100) + toxic = clamp(toxic + adjustamt, 0, 100) /obj/machinery/hydroponics/proc/adjustPests(adjustamt) - pestlevel = CLAMP(pestlevel + adjustamt, 0, 10) + pestlevel = clamp(pestlevel + adjustamt, 0, 10) /obj/machinery/hydroponics/proc/adjustWeeds(adjustamt) - weedlevel = CLAMP(weedlevel + adjustamt, 0, 10) + weedlevel = clamp(weedlevel + adjustamt, 0, 10) /obj/machinery/hydroponics/proc/spawnplant() // why would you put strange reagent in a hydro tray you monster I bet you also feed them blood var/list/livingplants = list(/mob/living/simple_animal/hostile/tree, /mob/living/simple_animal/hostile/killertomato) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 65a917d8fa7..c4b52acae1a 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -207,7 +207,7 @@ /// Setters procs /// /obj/item/seeds/proc/adjust_yield(adjustamt) if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable - yield = CLAMP(yield + adjustamt, 0, 10) + yield = clamp(yield + adjustamt, 0, 10) if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) yield = 1 // Mushrooms always have a minimum yield of 1. @@ -216,39 +216,39 @@ C.value = yield /obj/item/seeds/proc/adjust_lifespan(adjustamt) - lifespan = CLAMP(lifespan + adjustamt, 10, 100) + lifespan = clamp(lifespan + adjustamt, 10, 100) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan) if(C) C.value = lifespan /obj/item/seeds/proc/adjust_endurance(adjustamt) - endurance = CLAMP(endurance + adjustamt, 10, 100) + endurance = clamp(endurance + adjustamt, 10, 100) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance) if(C) C.value = endurance /obj/item/seeds/proc/adjust_production(adjustamt) if(yield != -1) - production = CLAMP(production + adjustamt, 1, 10) + production = clamp(production + adjustamt, 1, 10) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production) if(C) C.value = production /obj/item/seeds/proc/adjust_potency(adjustamt) if(potency != -1) - potency = CLAMP(potency + adjustamt, 0, 100) + potency = clamp(potency + adjustamt, 0, 100) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency) if(C) C.value = potency /obj/item/seeds/proc/adjust_weed_rate(adjustamt) - weed_rate = CLAMP(weed_rate + adjustamt, 0, 10) + weed_rate = clamp(weed_rate + adjustamt, 0, 10) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate) if(C) C.value = weed_rate /obj/item/seeds/proc/adjust_weed_chance(adjustamt) - weed_chance = CLAMP(weed_chance + adjustamt, 0, 67) + weed_chance = clamp(weed_chance + adjustamt, 0, 67) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance) if(C) C.value = weed_chance @@ -257,7 +257,7 @@ /obj/item/seeds/proc/set_yield(adjustamt) if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable - yield = CLAMP(adjustamt, 0, 10) + yield = clamp(adjustamt, 0, 10) if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) yield = 1 // Mushrooms always have a minimum yield of 1. @@ -266,39 +266,39 @@ C.value = yield /obj/item/seeds/proc/set_lifespan(adjustamt) - lifespan = CLAMP(adjustamt, 10, 100) + lifespan = clamp(adjustamt, 10, 100) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/lifespan) if(C) C.value = lifespan /obj/item/seeds/proc/set_endurance(adjustamt) - endurance = CLAMP(adjustamt, 10, 100) + endurance = clamp(adjustamt, 10, 100) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/endurance) if(C) C.value = endurance /obj/item/seeds/proc/set_production(adjustamt) if(yield != -1) - production = CLAMP(adjustamt, 1, 10) + production = clamp(adjustamt, 1, 10) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/production) if(C) C.value = production /obj/item/seeds/proc/set_potency(adjustamt) if(potency != -1) - potency = CLAMP(adjustamt, 0, 100) + potency = clamp(adjustamt, 0, 100) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency) if(C) C.value = potency /obj/item/seeds/proc/set_weed_rate(adjustamt) - weed_rate = CLAMP(adjustamt, 0, 10) + weed_rate = clamp(adjustamt, 0, 10) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_rate) if(C) C.value = weed_rate /obj/item/seeds/proc/set_weed_chance(adjustamt) - weed_chance = CLAMP(adjustamt, 0, 67) + weed_chance = clamp(adjustamt, 0, 67) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/weed_chance) if(C) C.value = weed_chance diff --git a/code/modules/jobs/job_types/paramedic.dm b/code/modules/jobs/job_types/paramedic.dm index ebdcdf9e71d..e750889f8be 100644 --- a/code/modules/jobs/job_types/paramedic.dm +++ b/code/modules/jobs/job_types/paramedic.dm @@ -31,7 +31,7 @@ belt = /obj/item/storage/belt/medical/paramedic id = /obj/item/card/id l_pocket = /obj/item/pda/medical - r_pocket = /obj/item/pinpointer/crew/prox + suit_store = /obj/item/flashlight/pen backpack_contents = list(/obj/item/roller=1) pda_slot = ITEM_SLOT_LPOCKET diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index c8ec5cbc736..a589d35b344 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -266,7 +266,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums dat += "(Order book by SS13BN)

" dat += "" dat += "" - dat += libcomp_menu[CLAMP(page,1,libcomp_menu.len)] + dat += libcomp_menu[clamp(page,1,libcomp_menu.len)] dat += "" dat += "
AUTHORTITLECATEGORY
<<<< >>>>
" dat += "
(Return to main menu)
" diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index 18bdd5e58b1..bd44d1a8adb 100644 --- a/code/modules/lighting/lighting_atom.dm +++ b/code/modules/lighting/lighting_atom.dm @@ -38,7 +38,7 @@ if (!light_power || !light_range) // We won't emit light anyways, destroy the light source. QDEL_NULL(light) else - if (!ismovableatom(loc)) // We choose what atom should be the top atom of the light here. + if (!ismovable(loc)) // We choose what atom should be the top atom of the light here. . = src else . = loc diff --git a/code/modules/mapping/reader.dm b/code/modules/mapping/reader.dm index 86b501c455d..e7d7fd4898d 100644 --- a/code/modules/mapping/reader.dm +++ b/code/modules/mapping/reader.dm @@ -93,7 +93,7 @@ gridSet.ycrd = text2num(dmmRegex.group[4]) gridSet.zcrd = text2num(dmmRegex.group[5]) - bounds[MAP_MINX] = min(bounds[MAP_MINX], CLAMP(gridSet.xcrd, x_lower, x_upper)) + bounds[MAP_MINX] = min(bounds[MAP_MINX], clamp(gridSet.xcrd, x_lower, x_upper)) bounds[MAP_MINZ] = min(bounds[MAP_MINZ], gridSet.zcrd) bounds[MAP_MAXZ] = max(bounds[MAP_MAXZ], gridSet.zcrd) @@ -113,15 +113,15 @@ if(gridLines.len && gridLines[gridLines.len] == "") gridLines.Cut(gridLines.len) // Remove only one blank line at the end. - bounds[MAP_MINY] = min(bounds[MAP_MINY], CLAMP(gridSet.ycrd, y_lower, y_upper)) + bounds[MAP_MINY] = min(bounds[MAP_MINY], clamp(gridSet.ycrd, y_lower, y_upper)) gridSet.ycrd += gridLines.len - 1 // Start at the top and work down - bounds[MAP_MAXY] = max(bounds[MAP_MAXY], CLAMP(gridSet.ycrd, y_lower, y_upper)) + bounds[MAP_MAXY] = max(bounds[MAP_MAXY], clamp(gridSet.ycrd, y_lower, y_upper)) var/maxx = gridSet.xcrd if(gridLines.len) //Not an empty map maxx = max(maxx, gridSet.xcrd + length(gridLines[1]) / key_len - 1) - bounds[MAP_MAXX] = CLAMP(max(bounds[MAP_MAXX], maxx), x_lower, x_upper) + bounds[MAP_MAXX] = clamp(max(bounds[MAP_MAXX], maxx), x_lower, x_upper) CHECK_TICK // Indicate failure to parse any coordinates by nulling bounds diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index 67e49a5d516..5b37d8b5265 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -49,7 +49,7 @@ if(15) new /obj/item/nullrod/armblade(src) if(16) - new /obj/item/guardiancreator(src) + new /obj/item/guardiancreator/hive(src) if(17) if(prob(50)) new /obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe(src) @@ -429,7 +429,7 @@ /obj/projectile/hook/on_hit(atom/target) . = ..() - if(ismovableatom(target)) + if(ismovable(target)) var/atom/movable/A = target if(A.anchored) return @@ -856,13 +856,13 @@ force = 0 var/ghost_counter = ghost_check() - force = CLAMP((ghost_counter * 4), 0, 75) + force = clamp((ghost_counter * 4), 0, 75) user.visible_message("[user] strikes with the force of [ghost_counter] vengeful spirits!") ..() /obj/item/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) var/ghost_counter = ghost_check() - final_block_chance += CLAMP((ghost_counter * 5), 0, 75) + final_block_chance += clamp((ghost_counter * 5), 0, 75) owner.visible_message("[owner] is protected by a ring of [ghost_counter] ghosts!") return ..() diff --git a/code/modules/mining/machine_silo.dm b/code/modules/mining/machine_silo.dm index 0f2b8d70613..87c9a769d1d 100644 --- a/code/modules/mining/machine_silo.dm +++ b/code/modules/mining/machine_silo.dm @@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs) var/list/logs = GLOB.silo_access_logs[REF(src)] var/len = LAZYLEN(logs) var/num_pages = 1 + round((len - 1) / 30) - var/page = CLAMP(log_page, 1, num_pages) + var/page = clamp(log_page, 1, num_pages) if(num_pages > 1) for(var/i in 1 to num_pages) if(i == page) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index fc70e23645c..b11cf37f123 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -503,7 +503,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp views |= i var/new_view = input("Choose your new view", "Modify view range", 7) as null|anything in views if(new_view) - client.change_view(CLAMP(new_view, 7, max_view)) + client.change_view(clamp(new_view, 7, max_view)) else client.change_view(CONFIG_GET(string/default_view)) diff --git a/code/modules/mob/living/carbon/alien/status_procs.dm b/code/modules/mob/living/carbon/alien/status_procs.dm index 7fd1d318723..0affc187a12 100644 --- a/code/modules/mob/living/carbon/alien/status_procs.dm +++ b/code/modules/mob/living/carbon/alien/status_procs.dm @@ -17,4 +17,4 @@ /mob/living/carbon/alien/AdjustStun(amount, updating = 1, ignore_canstun = 0) . = ..() if(!.) - move_delay_add = CLAMP(move_delay_add + round(amount/2), 0, 10) + move_delay_add = clamp(move_delay_add + round(amount/2), 0, 10) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index b4a6139b8a8..850a09dcb5c 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -101,19 +101,19 @@ for(var/obj/item/I in held_items) if(!istype(I, /obj/item/clothing)) - var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example + var/final_block_chance = I.block_chance - (clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example if(I.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type)) return TRUE if(wear_suit) - var/final_block_chance = wear_suit.block_chance - (CLAMP((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier + var/final_block_chance = wear_suit.block_chance - (clamp((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier if(wear_suit.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type)) return TRUE if(w_uniform) - var/final_block_chance = w_uniform.block_chance - (CLAMP((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier + var/final_block_chance = w_uniform.block_chance - (clamp((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier if(w_uniform.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type)) return TRUE if(wear_neck) - var/final_block_chance = wear_neck.block_chance - (CLAMP((armour_penetration-wear_neck.armour_penetration)/2,0,100)) + block_chance_modifier + var/final_block_chance = wear_neck.block_chance - (clamp((armour_penetration-wear_neck.armour_penetration)/2,0,100)) + block_chance_modifier if(wear_neck.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type)) return TRUE return FALSE diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 22e0bf0d448..81cca37a37e 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -397,7 +397,7 @@ var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2) // redirect the projectile P.firer = H - P.preparePixelProjectile(locate(CLAMP(new_x, 1, world.maxx), CLAMP(new_y, 1, world.maxy), H.z), H) + P.preparePixelProjectile(locate(clamp(new_x, 1, world.maxx), clamp(new_y, 1, world.maxy), H.z), H) return BULLET_ACT_FORCE_PIERCE return ..() diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index e4dff2269ec..8e9874d0faa 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -113,8 +113,8 @@ to_chat(victim, "[H] is draining your blood!") to_chat(H, "You drain some blood!") playsound(H, 'sound/items/drink.ogg', 30, TRUE, -2) - victim.blood_volume = CLAMP(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM) - H.blood_volume = CLAMP(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM) + victim.blood_volume = clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM) + H.blood_volume = clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM) if(!victim.blood_volume) to_chat(H, "You finish off [victim]'s blood supply.") diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 83709a8cc4d..64d05233ae5 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -212,7 +212,7 @@ //TOXINS/PLASMA if(Toxins_partialpressure > safe_tox_max) var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_tox_max) * 10 - adjustToxLoss(CLAMP(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE)) + adjustToxLoss(clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE)) throw_alert("too_much_tox", /obj/screen/alert/too_much_tox) else clear_alert("too_much_tox") @@ -681,7 +681,7 @@ All effects don't start immediately, but rather get worse over time; the rate is amount = (amount > 0) ? min(amount, BODYTEMP_HEATING_MAX) : max(amount, BODYTEMP_COOLING_MAX) if(bodytemperature >= min_temp && bodytemperature <= max_temp) - bodytemperature = CLAMP(bodytemperature + amount,min_temp,max_temp) + bodytemperature = clamp(bodytemperature + amount,min_temp,max_temp) ///////// diff --git a/code/modules/mob/living/carbon/status_procs.dm b/code/modules/mob/living/carbon/status_procs.dm index 43d611e9c87..352b2b86626 100644 --- a/code/modules/mob/living/carbon/status_procs.dm +++ b/code/modules/mob/living/carbon/status_procs.dm @@ -39,10 +39,10 @@ clear_alert("high") /mob/living/carbon/adjust_disgust(amount) - disgust = CLAMP(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT) + disgust = clamp(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT) /mob/living/carbon/set_disgust(amount) - disgust = CLAMP(amount, 0, DISGUST_LEVEL_MAXEDOUT) + disgust = clamp(amount, 0, DISGUST_LEVEL_MAXEDOUT) ////////////////////////////////////////TRAUMAS///////////////////////////////////////// diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 8a8e275e699..cac062b25ff 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -149,7 +149,7 @@ /mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE, required_status) if(!forced && (status_flags & GODMODE)) return FALSE - bruteloss = CLAMP((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) + bruteloss = clamp((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) if(updating_health) updatehealth() return amount @@ -160,7 +160,7 @@ /mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE) if(!forced && (status_flags & GODMODE)) return FALSE - oxyloss = CLAMP((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) + oxyloss = clamp((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) if(updating_health) updatehealth() return amount @@ -179,7 +179,7 @@ /mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE) if(!forced && (status_flags & GODMODE)) return FALSE - toxloss = CLAMP((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) + toxloss = clamp((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) if(updating_health) updatehealth() return amount @@ -198,7 +198,7 @@ /mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE) if(!forced && (status_flags & GODMODE)) return FALSE - fireloss = CLAMP((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) + fireloss = clamp((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) if(updating_health) updatehealth() return amount @@ -209,7 +209,7 @@ /mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE) if(!forced && ( (status_flags & GODMODE) || HAS_TRAIT(src, TRAIT_NOCLONELOSS)) ) return FALSE - cloneloss = CLAMP((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) + cloneloss = clamp((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2) if(updating_health) updatehealth() return amount diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3d139b23de7..2676de2a51d 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -70,7 +70,7 @@ var/obj/O = A if(ObjBump(O)) return - if(ismovableatom(A)) + if(ismovable(A)) var/atom/movable/AM = A if(PushAM(AM, move_force)) return @@ -1085,7 +1085,7 @@ update_fire() /mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person - fire_stacks = CLAMP(fire_stacks + add_fire_stacks, -20, 20) + fire_stacks = clamp(fire_stacks + add_fire_stacks, -20, 20) if(on_fire && fire_stacks <= 0) ExtinguishMob() diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index ee78a97f0ab..a5a5c7be6bd 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -58,9 +58,9 @@ /obj/item/proc/get_volume_by_throwforce_and_or_w_class() if(throwforce && w_class) - return CLAMP((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100 + return clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100 else if(w_class) - return CLAMP(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100 + return clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100 else return 0 diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index a78a3498e93..2498c376a3b 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -200,11 +200,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( spans |= L.spans if(message_mode == MODE_SING) - #if DM_VERSION < 513 - var/randomnote = "~" - #else var/randomnote = pick("\u2669", "\u266A", "\u266B") - #endif spans |= SPAN_SINGING message = "[randomnote] [message] [randomnote]" diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 0260e2ce78a..c2f8c9d824e 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -901,7 +901,7 @@ if(istype(A, /obj/machinery/camera)) current = A if(client) - if(ismovableatom(A)) + if(ismovable(A)) if(A != GLOB.ai_camera_room_landmark) end_multicam() client.perspective = EYE_PERSPECTIVE diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 89a627ce9e5..07aa17ea900 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -135,7 +135,7 @@ /mob/living/silicon/pai/proc/process_hack() if(cable && cable.machine && istype(cable.machine, /obj/machinery/door) && cable.machine == hackdoor && get_dist(src, hackdoor) <= 1) - hackprogress = CLAMP(hackprogress + 4, 0, 100) + hackprogress = clamp(hackprogress + 4, 0, 100) else temp = "Door Jack: Connection to airlock has been lost. Hack aborted." hackprogress = 0 @@ -283,7 +283,7 @@ update_stat() /mob/living/silicon/pai/process() - emitterhealth = CLAMP((emitterhealth + emitterregen), -50, emittermaxhealth) + emitterhealth = clamp((emitterhealth + emitterregen), -50, emittermaxhealth) /obj/item/paicard/attackby(obj/item/W, mob/user, params) ..() diff --git a/code/modules/mob/living/silicon/pai/pai_defense.dm b/code/modules/mob/living/silicon/pai/pai_defense.dm index 65d9ff11745..3272173da24 100644 --- a/code/modules/mob/living/silicon/pai/pai_defense.dm +++ b/code/modules/mob/living/silicon/pai/pai_defense.dm @@ -74,7 +74,7 @@ return FALSE //No we're not flammable /mob/living/silicon/pai/proc/take_holo_damage(amount) - emitterhealth = CLAMP((emitterhealth - amount), -50, emittermaxhealth) + emitterhealth = clamp((emitterhealth - amount), -50, emittermaxhealth) if(emitterhealth < 0) fold_in(force = TRUE) to_chat(src, "The impact degrades your holochassis!") diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index d071d6cf21d..aa148447b39 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -21,7 +21,7 @@ if(cell && cell.charge) if(cell.charge <= 100) uneq_all() - var/amt = CLAMP((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell. + var/amt = clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell. cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick else uneq_all() diff --git a/code/modules/mob/living/simple_animal/bot/vibebot.dm b/code/modules/mob/living/simple_animal/bot/vibebot.dm new file mode 100644 index 00000000000..648df275d62 --- /dev/null +++ b/code/modules/mob/living/simple_animal/bot/vibebot.dm @@ -0,0 +1,75 @@ +/mob/living/simple_animal/bot/vibebot + name = "\improper vibebot" + desc = "A little robot. It's just vibing, doing its thing." + icon = 'icons/mob/aibots.dmi' + icon_state = "vibebot" + density = FALSE + anchored = FALSE + health = 25 + maxHealth = 25 + damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0) + pass_flags = PASSMOB + + radio_key = /obj/item/encryptionkey/headset_service //doesn't have security key + radio_channel = RADIO_CHANNEL_SERVICE //Doesn't even use the radio anyway. + model = "Vibebot" + window_id = "vibebot" + window_name = "Discomatic Vibe Bot v1.05" + data_hud_type = DATA_HUD_DIAGNOSTIC_BASIC // show jobs + path_image_color = "#2cac12" + + var/current_color + var/range = 7 + var/power = 3 + auto_patrol = TRUE + +/mob/living/simple_animal/bot/vibebot/Initialize() + . = ..() + update_icon() + +/mob/living/simple_animal/bot/vibebot/get_controls(mob/user) + var/list/dat = list() + dat += hack(user) + dat += showpai(user) + dat += "DiscoMatic Vibebot v1.0

" + dat += "Status: [on ? "On" : "Off"]
" + dat += "Maintenance panel panel is [open ? "opened" : "closed"]
" + + dat += "Behaviour controls are [locked ? "locked" : "unlocked"]
" + if(!locked || issilicon(user) || IsAdminGhost(user)) + dat += "Patrol Station: [auto_patrol ? "Yes" : "No"]
" + + return dat.Join("") + +/mob/living/simple_animal/bot/vibebot/turn_off() + . = ..() + remove_atom_colour(TEMPORARY_COLOUR_PRIORITY) + update_icon() + +/mob/living/simple_animal/bot/vibebot/proc/Vibe() + remove_atom_colour(TEMPORARY_COLOUR_PRIORITY) + current_color = random_color() + set_light(range, power, current_color) + add_atom_colour("#[current_color]", TEMPORARY_COLOUR_PRIORITY) + update_icon() + +/mob/living/simple_animal/bot/vibebot/proc/retaliate(mob/living/carbon/human/H) + + +/mob/living/simple_animal/bot/vibebot/handle_automated_action() + if(!..()) + return + + if(auto_patrol) + + if(mode == BOT_IDLE || mode == BOT_START_PATROL) + start_patrol() + + if(mode == BOT_PATROL) + bot_patrol() + + if(on) + Vibe() + + else + remove_atom_colour(TEMPORARY_COLOUR_PRIORITY) diff --git a/code/modules/mob/living/simple_animal/damage_procs.dm b/code/modules/mob/living/simple_animal/damage_procs.dm index eda19be7af4..ee9fa2526bc 100644 --- a/code/modules/mob/living/simple_animal/damage_procs.dm +++ b/code/modules/mob/living/simple_animal/damage_procs.dm @@ -2,7 +2,7 @@ /mob/living/simple_animal/proc/adjustHealth(amount, updating_health = TRUE, forced = FALSE) if(!forced && (status_flags & GODMODE)) return FALSE - bruteloss = round(CLAMP(bruteloss + amount, 0, maxHealth),DAMAGE_PRECISION) + bruteloss = round(clamp(bruteloss + amount, 0, maxHealth),DAMAGE_PRECISION) if(updating_health) updatehealth() return amount diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index eea2a411d30..dbb8ff45980 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -19,9 +19,9 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians response_harm_continuous = "punches" response_harm_simple = "punch" icon = 'icons/mob/guardian.dmi' - icon_state = "magicOrange" - icon_living = "magicOrange" - icon_dead = "magicOrange" + icon_state = "magicbase" + icon_living = "magicbase" + icon_dead = "magicbase" speed = 0 a_intent = INTENT_HARM stop_automated_movement = 1 @@ -44,21 +44,25 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians AIStatus = AI_OFF hud_type = /datum/hud/guardian dextrous_hud_type = /datum/hud/dextrous/guardian //if we're set to dextrous, account for it. + var/mutable_appearance/cooloverlay + var/guardiancolor = "#ffffff" + var/recolorentiresprite + var/theme var/list/guardian_overlays[GUARDIAN_TOTAL_LAYERS] var/reset = 0 //if the summoner has reset the guardian already var/cooldown = 0 var/mob/living/summoner var/range = 10 //how far from the user the spirit can be var/toggle_button_type = /obj/screen/guardian/ToggleMode/Inactive //what sort of toggle button the hud uses - var/datum/guardianname/namedatum = new/datum/guardianname() var/playstyle_string = "You are a standard Guardian. You shouldn't exist!" var/magic_fluff_string = "You draw the Coder, symbolizing bugs and errors. This shouldn't happen! Submit a bug report!" var/tech_fluff_string = "BOOT SEQUENCE COMPLETE. ERROR MODULE LOADED. THIS SHOULDN'T HAPPEN. Submit a bug report!" var/carp_fluff_string = "CARP CARP CARP SOME SORT OF HORRIFIC BUG BLAME THE CODERS CARP CARP CARP" + var/hive_fluff_string = "The mass seems to be an anomaly, it shouldn't exist... Submit a bug report!" /mob/living/simple_animal/hostile/guardian/Initialize(mapload, theme) GLOB.parasites += src - setthemename(theme) + updatetheme(theme) . = ..() @@ -81,43 +85,52 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians GLOB.parasites -= src return ..() -/mob/living/simple_animal/hostile/guardian/proc/setthemename(pickedtheme) //set the guardian's theme to something cool! - if(!pickedtheme) - pickedtheme = pick("magic", "tech", "carp") - var/list/possible_names = list() - switch(pickedtheme) +/mob/living/simple_animal/hostile/guardian/proc/updatetheme(theme) //update the guardian's theme + if(!theme) + theme = pick("magic", "tech", "carp", "hive") + switch(theme)//should make it easier to create new stand designs in the future if anyone likes that if("magic") - for(var/type in (subtypesof(/datum/guardianname/magic) - namedatum.type)) - possible_names += new type + name = "Guardian Spirit" + real_name = "Guardian Spirit" + bubble_icon = "guardian" + icon_state = "magicbase" + icon_living = "magicbase" + icon_dead = "magicbase" if("tech") - for(var/type in (subtypesof(/datum/guardianname/tech) - namedatum.type)) - possible_names += new type + name = "Holoparasite" + real_name = "Holoparasite" + bubble_icon = "holo" + icon_state = "techbase" + icon_living = "techbase" + icon_dead = "techbase" if("carp") - for(var/type in (subtypesof(/datum/guardianname/carp) - namedatum.type)) - possible_names += new type - namedatum = pick(possible_names) - updatetheme(pickedtheme) - -/mob/living/simple_animal/hostile/guardian/proc/updatetheme(theme) //update the guardian's theme to whatever its datum is; proc for adminfuckery - name = "[namedatum.prefixname] [namedatum.suffixcolour]" - real_name = "[name]" - icon_living = "[namedatum.parasiteicon]" - icon_state = "[namedatum.parasiteicon]" - icon_dead = "[namedatum.parasiteicon]" - bubble_icon = "[namedatum.bubbleicon]" - - if (namedatum.stainself) - add_atom_colour(namedatum.colour, FIXED_COLOUR_PRIORITY) - - //Special case holocarp, because #snowflake code - if(theme == "carp") - speak_emote = list("gnashes") - desc = "A mysterious fish that stands by its charge, ever vigilant." - - attack_verb_continuous = "bites" - attack_verb_simple = "bite" - attack_sound = 'sound/weapons/bite.ogg' - + name = "Holocarp" + real_name = "Holocarp" + bubble_icon = "holo" + icon_state = "holocarp" + icon_living = "holocarp" + icon_dead = "holocarp" + speak_emote = list("gnashes") + desc = "A mysterious fish that stands by its charge, ever vigilant." + attack_verb_continuous = "bites" + attack_verb_simple = "bite" + attack_sound = 'sound/weapons/bite.ogg' + recolorentiresprite = TRUE + if("hive") + name = "Hivelord" + real_name = "Hivelord" + bubble_icon = "guardian" + icon_state = "hivebase" + icon_living = "hivebase" + icon_dead = "hivebase" + speak_emote = list("telepathically cries") + desc = "A truly alien creature, it is a mass of unknown organic material, standing by its' owner's side." + attack_verb_continuous = "lashes out at" + attack_verb_simple = "lash out at" + attack_sound = 'sound/weapons/pierce.ogg' + if(!recolorentiresprite) //we want this to proc before stand logs in, so the overlay isnt gone for some reason + cooloverlay = mutable_appearance(icon, theme) + add_overlay(cooloverlay) /mob/living/simple_animal/hostile/guardian/Login() //if we have a mind, set its name to ours when it logs in ..() @@ -126,10 +139,37 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians if(!summoner) to_chat(src, "For some reason, somehow, you have no summoner. Please report this bug immediately.") return - to_chat(src, "You are [real_name], bound to serve [summoner.real_name].") + to_chat(src, "You are a [real_name], bound to serve [summoner.real_name].") to_chat(src, "You are capable of manifesting or recalling to your master with the buttons on your HUD. You will also find a button to communicate with [summoner.p_them()] privately there.") to_chat(src, "While personally invincible, you will die if [summoner.real_name] does, and any damage dealt to you will have a portion passed on to [summoner.p_them()] as you feed upon [summoner.p_them()] to sustain yourself.") to_chat(src, playstyle_string) + guardiancustomize() + +/mob/living/simple_animal/hostile/guardian/proc/guardiancustomize() + guardianrecolor() + guardianrename() + +/mob/living/simple_animal/hostile/guardian/proc/guardianrecolor() + guardiancolor = input(src,"What would you like your color to be?","Choose Your Color","#ffffff") as color|null + if(!guardiancolor) //redo proc until we get a color + to_chat(src, "Not a valid color, please try again.") + guardianrecolor() + return + if(!recolorentiresprite) + cooloverlay.color = guardiancolor + cut_overlay(cooloverlay) //we need to get our new color + add_overlay(cooloverlay) + else + add_atom_colour(guardiancolor, FIXED_COLOUR_PRIORITY) + +/mob/living/simple_animal/hostile/guardian/proc/guardianrename() + var/new_name = sanitize_name(reject_bad_text(stripped_input(src, "What would you like your name to be?", "Choose Your Name", real_name, MAX_NAME_LEN))) + if(!new_name) //redo proc until we get a good name + to_chat(src, "Not a valid name, please try again.") + guardianrename() + return + visible_message("Your new name [new_name] anchors itself in your mind.") + fully_replace_character_name(null, new_name) /mob/living/simple_animal/hostile/guardian/Life() //Dies if the summoner dies . = ..() @@ -359,7 +399,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians return var/preliminary_message = "[input]" //apply basic color/bolding - var/my_message = "[src]: [preliminary_message]" //add source, color source with the guardian's color + var/my_message = "[src]: [preliminary_message]" //add source, color source with the guardian's color to_chat(summoner, my_message) var/list/guardians = summoner.hasparasites() @@ -386,7 +426,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians var/list/guardians = hasparasites() for(var/para in guardians) var/mob/living/simple_animal/hostile/guardian/G = para - to_chat(G, "[src]: [preliminary_message]" ) + to_chat(G, "[src]: [preliminary_message]" ) for(var/M in GLOB.dead_mob_list) var/link = FOLLOW_LINK(M, src) to_chat(M, "[link] [my_message]") @@ -417,27 +457,31 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians if(guardians.len) var/mob/living/simple_animal/hostile/guardian/G = input(src, "Pick the guardian you wish to reset", "Guardian Reset") as null|anything in sortNames(guardians) if(G) - to_chat(src, "You attempt to reset [G.real_name]'s personality...") + to_chat(src, "You attempt to reset [G.real_name]'s personality...") var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you want to play as [src.real_name]'s [G.real_name]?", ROLE_PAI, null, FALSE, 100) if(LAZYLEN(candidates)) var/mob/dead/observer/C = pick(candidates) to_chat(G, "Your user reset you, and your body was taken over by a ghost. Looks like they weren't happy with your performance.") - to_chat(src, "Your [G.real_name] has been successfully reset.") + to_chat(src, "Your [G.real_name] has been successfully reset.") message_admins("[key_name_admin(C)] has taken control of ([ADMIN_LOOKUPFLW(G)])") G.ghostize(0) - G.setthemename(G.namedatum.theme) //give it a new color, to show it's a new person + G.guardiancustomize() //give it a new color, to show it's a new person G.key = C.key G.reset = 1 - switch(G.namedatum.theme) + switch(G.theme) if("tech") - to_chat(src, "[G.real_name] is now online!") + to_chat(src, "[G.real_name] is now online!") if("magic") - to_chat(src, "[G.real_name] has been summoned!") + to_chat(src, "[G.real_name] has been summoned!") + if("carp") + to_chat(src, "[G.real_name] has been caught!") + if("hive") + to_chat(src, "[G.real_name] has been created from the core!") guardians -= G if(!guardians.len) verbs -= /mob/living/proc/guardian_reset else - to_chat(src, "There were no ghosts willing to take control of [G.real_name]. Looks like you're stuck with it for now.") + to_chat(src, "There were no ghosts willing to take control of [G.real_name]. Looks like you're stuck with it for now.") else to_chat(src, "You decide not to reset [guardians.len > 1 ? "any of your guardians":"your guardian"].") else @@ -554,6 +598,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians used = FALSE return var/mob/living/simple_animal/hostile/guardian/G = new pickedtype(user, theme) + G.name = mob_name G.summoner = user G.key = key G.mind.enslave_mind_to_creator(user) @@ -561,13 +606,16 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians switch(theme) if("tech") to_chat(user, "[G.tech_fluff_string]") - to_chat(user, "[G.real_name] is now online!") + to_chat(user, "[G.real_name] is now online!") if("magic") to_chat(user, "[G.magic_fluff_string]") - to_chat(user, "[G.real_name] has been summoned!") + to_chat(user, "[G.real_name] has been summoned!") if("carp") to_chat(user, "[G.carp_fluff_string]") - to_chat(user, "[G.real_name] has been caught!") + to_chat(user, "[G.real_name] has been caught!") + if("hive") + to_chat(user, "[G.hive_fluff_string]") + to_chat(user, "[G.real_name] has been created from the core!") user.verbs += /mob/living/proc/guardian_comm user.verbs += /mob/living/proc/guardian_recall user.verbs += /mob/living/proc/guardian_reset @@ -596,6 +644,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians /obj/item/guardiancreator/tech/choose/traitor possible_guardians = list("Assassin", "Chaos", "Charger", "Explosive", "Lightning", "Protector", "Ranged", "Standard", "Support", "Gravitokinetic") + allowling = FALSE /obj/item/guardiancreator/tech/choose random = FALSE @@ -680,8 +729,21 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians failure_message = "You couldn't catch any carp spirits from the seas of Lake Carp. Maybe there are none, maybe you fucked up." ling_failure = "Carp'sie is fine with changelings, so you shouldn't be seeing this message." allowmultiple = TRUE - allowling = TRUE - random = TRUE /obj/item/guardiancreator/carp/choose random = FALSE + +/obj/item/guardiancreator/hive + name = "mysterious core" + desc = "All that remains of a hivelord. It has a mysterious aura around it..." + icon = 'icons/obj/surgery.dmi' + icon_state = "roro core 2" + theme = "hive" + mob_name = "Hivelord" + use_message = "You place the core near your heart..." + used_message = "This core seems to have decayed and doesn't work anymore..." + failure_message = "You couldn't gather any mass with the core, maybe try again later." + ling_failure = "Even the dark energies seem to not want to be near your horrific body." + +/obj/item/guardiancreator/hive/choose + random = FALSE diff --git a/code/modules/mob/living/simple_animal/guardian/guardiannaming.dm b/code/modules/mob/living/simple_animal/guardian/guardiannaming.dm deleted file mode 100644 index f2e1b57255a..00000000000 --- a/code/modules/mob/living/simple_animal/guardian/guardiannaming.dm +++ /dev/null @@ -1,161 +0,0 @@ - -/datum/guardianname - var/prefixname = "Default" //the prefix the guardian uses for its name - var/suffixcolour = "Name" //the suffix the guardian uses for its name - var/parasiteicon = "techbase" //the icon of the guardian - var/bubbleicon = "holo" //the speechbubble icon of the guardian - var/theme = "tech" //what the actual theme of the guardian is - var/colour = "#C3C3C3" //what color the guardian's name is in chat and what color is used for effects from the guardian - var/stainself = 0 //whether to use the color var to literally dye ourself our chosen colour, for lazy spriting - -/datum/guardianname/carp - bubbleicon = "guardian" - theme = "carp" - parasiteicon = "holocarp" - stainself = 1 - -/datum/guardianname/carp/New() - prefixname = pick(GLOB.carp_names) - -/datum/guardianname/carp/sand - suffixcolour = "Sand" - colour = "#C2B280" - -/datum/guardianname/carp/seashell - suffixcolour = "Seashell" - colour = "#FFF5EE" - -/datum/guardianname/carp/coral - suffixcolour = "Coral" - colour = "#FF7F50" - -/datum/guardianname/carp/salmon - suffixcolour = "Salmon" - colour = "#FA8072" - -/datum/guardianname/carp/sunset - suffixcolour = "Sunset" - colour = "#FAD6A5" - -/datum/guardianname/carp/riptide - suffixcolour = "Riptide" - colour = "#89D9C8" - -/datum/guardianname/carp/seagreen - suffixcolour = "Sea Green" - colour = "#2E8B57" - -/datum/guardianname/carp/ultramarine - suffixcolour = "Ultramarine" - colour = "#3F00FF" - -/datum/guardianname/carp/cerulean - suffixcolour = "Cerulean" - colour = "#007BA7" - -/datum/guardianname/carp/aqua - suffixcolour = "Aqua" - colour = "#00FFFF" - -/datum/guardianname/carp/paleaqua - suffixcolour = "Pale Aqua" - colour = "#BCD4E6" - -/datum/guardianname/carp/hookergreen - suffixcolour = "Hooker Green" - colour = "#49796B" - -/datum/guardianname/magic - bubbleicon = "guardian" - theme = "magic" - -/datum/guardianname/magic/New() - prefixname = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces", "Ophiuchus") - -/datum/guardianname/magic/red - suffixcolour = "Red" - parasiteicon = "magicRed" - colour = "#E32114" - -/datum/guardianname/magic/pink - suffixcolour = "Pink" - parasiteicon = "magicPink" - colour = "#FB5F9B" - -/datum/guardianname/magic/orange - suffixcolour = "Orange" - parasiteicon = "magicOrange" - colour = "#F3CF24" - -/datum/guardianname/magic/green - suffixcolour = "Green" - parasiteicon = "magicGreen" - colour = "#A4E836" - -/datum/guardianname/magic/blue - suffixcolour = "Blue" - parasiteicon = "magicBlue" - colour = "#78C4DB" - -/datum/guardianname/tech/New() - prefixname = pick("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium") - -/datum/guardianname/tech/rose - suffixcolour = "Rose" - parasiteicon = "techRose" - colour = "#F62C6B" - -/datum/guardianname/tech/peony - suffixcolour = "Peony" - parasiteicon = "techPeony" - colour = "#E54750" - -/datum/guardianname/tech/lily - suffixcolour = "Lily" - parasiteicon = "techLily" - colour = "#F6562C" - -/datum/guardianname/tech/daisy - suffixcolour = "Daisy" - parasiteicon = "techDaisy" - colour = "#ECCD39" - -/datum/guardianname/tech/zinnia - suffixcolour = "Zinnia" - parasiteicon = "techZinnia" - colour = "#89F62C" - -/datum/guardianname/tech/ivy - suffixcolour = "Ivy" - parasiteicon = "techIvy" - colour = "#5DF62C" - -/datum/guardianname/tech/iris - suffixcolour = "Iris" - parasiteicon = "techIris" - colour = "#2CF6B8" - -/datum/guardianname/tech/petunia - suffixcolour = "Petunia" - parasiteicon = "techPetunia" - colour = "#51A9D4" - -/datum/guardianname/tech/violet - suffixcolour = "Violet" - parasiteicon = "techViolet" - colour = "#8A347C" - -/datum/guardianname/tech/lotus - suffixcolour = "Lotus" - parasiteicon = "techLotus" - colour = "#463546" - -/datum/guardianname/tech/lilac - suffixcolour = "Lilac" - parasiteicon = "techLilac" - colour = "#C7A0F6" - -/datum/guardianname/tech/orchid - suffixcolour = "Orchid" - parasiteicon = "techOrchid" - colour = "#F62CF5" diff --git a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm index 026fc1b1c04..44c2ab2e8e1 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm @@ -10,7 +10,7 @@ magic_fluff_string = "..And draw the Space Ninja, a lethal, invisible assassin." tech_fluff_string = "Boot sequence complete. Assassin modules loaded. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! Caught one! It's an assassin carp! Just when you thought it was safe to go back to the water... which is unhelpful, because we're in space." - + hive_fluff_string = "The mass seems to be able to attack with stealth causing massive damage." toggle_button_type = /obj/screen/guardian/ToggleMode/Assassin var/toggle = FALSE var/stealthcooldown = 160 diff --git a/code/modules/mob/living/simple_animal/guardian/types/charger.dm b/code/modules/mob/living/simple_animal/guardian/types/charger.dm index 01e16cb5027..12463e0bc6c 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/charger.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/charger.dm @@ -11,6 +11,7 @@ magic_fluff_string = "..And draw the Hunter, an alien master of rapid assault." tech_fluff_string = "Boot sequence complete. Charge modules loaded. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! Caught one! It's a charger carp, that likes running at people. But it doesn't have any legs..." + hive_fluff_string = "The mass seems to have primal senses, rapidly assaulting its' enemies." var/charging = 0 var/obj/screen/alert/chargealert diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index 7a164f1d6a0..182f45703c0 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -7,6 +7,7 @@ magic_fluff_string = "..And draw the Drone, a dextrous master of construction and repair." tech_fluff_string = "Boot sequence complete. Dextrous combat modules loaded. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! You caught one! It can hold stuff in its fins, sort of." + hive_fluff_string = "The mass seems to be able to... hold stuff?" dextrous = TRUE held_items = list(null, null) var/obj/item/internal_storage //what we're storing within ourself diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm index 840f247a5fb..f1e38dabbb4 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm @@ -14,6 +14,7 @@ magic_fluff_string = "..And draw the Scientist, master of explosive death." tech_fluff_string = "Boot sequence complete. Explosive modules active. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! Caught one! It's an explosive carp! Boom goes the fishy." + hive_fluff_string = "The mass seems to generate explosive energy, destroying everything in its' path." var/bomb_cooldown = 0 var/static/list/boom_signals = list(COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_BUMPED, COMSIG_ATOM_ATTACK_HAND) @@ -71,6 +72,6 @@ UNREGISTER_BOMB_SIGNALS(A) /mob/living/simple_animal/hostile/guardian/bomb/proc/display_examine(datum/source, mob/user, text) - text += "It glows with a strange light!" + text += "It glows with a strange light!" #undef UNREGISTER_BOMB_SIGNALS diff --git a/code/modules/mob/living/simple_animal/guardian/types/fire.dm b/code/modules/mob/living/simple_animal/guardian/types/fire.dm index 386c8300528..641e9664e94 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/fire.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/fire.dm @@ -12,6 +12,7 @@ magic_fluff_string = "..And draw the Wizard, bringer of endless chaos!" tech_fluff_string = "Boot sequence complete. Crowd control modules activated. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! You caught one! OH GOD, EVERYTHING'S ON FIRE. Except you and the fish." + hive_fluff_string = "The mass seems to generate lots of energy, causing everything except its' owner to burn to ash." /mob/living/simple_animal/hostile/guardian/fire/Life() . = ..() diff --git a/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm b/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm index 02f194500cc..768c50e73ee 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/gravitokinetic.dm @@ -7,6 +7,7 @@ magic_fluff_string = "..And draw the Singularity, an anomalous force of terror." tech_fluff_string = "Boot sequence complete. Gravitokinetic modules loaded. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! Caught one! It's a gravitokinetic carp! Now do you understand the gravity of the situation?" + hive_fluff_string = "The mass seems to be extremely heavy, and able to relay the heaviness to others." var/list/gravito_targets = list() var/gravity_power_range = 10 //how close the stand must stay to the target to keep the heavy gravity diff --git a/code/modules/mob/living/simple_animal/guardian/types/lightning.dm b/code/modules/mob/living/simple_animal/guardian/types/lightning.dm index bf626644c6f..62eb1a54300 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/lightning.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/lightning.dm @@ -16,6 +16,7 @@ magic_fluff_string = "..And draw the Tesla, a shocking, lethal source of power." tech_fluff_string = "Boot sequence complete. Lightning modules active. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! Caught one! It's a lightning carp! Everyone else goes zap zap." + hive_fluff_string = "The mass seems to cause lots of thunder strikes around itself." var/datum/beam/summonerchain var/list/enemychains = list() var/successfulshocks = 0 diff --git a/code/modules/mob/living/simple_animal/guardian/types/protector.dm b/code/modules/mob/living/simple_animal/guardian/types/protector.dm index f736d7784fc..b90e99de0e2 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/protector.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/protector.dm @@ -8,6 +8,7 @@ magic_fluff_string = "..And draw the Guardian, a stalwart protector that never leaves the side of its charge." tech_fluff_string = "Boot sequence complete. Protector modules loaded. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! You caught one! Wait, no... it caught you! The fisher has become the fishy." + hive_fluff_string = "The mass seems to be extremely resistant to damage and have a special connection with the owner." toggle_button_type = /obj/screen/guardian/ToggleMode var/toggle = FALSE @@ -25,8 +26,8 @@ . = ..() if(. > 0 && toggle) var/image/I = new('icons/effects/effects.dmi', src, "shield-flash", MOB_LAYER+0.01, dir = pick(GLOB.cardinals)) - if(namedatum) - I.color = namedatum.colour + if(guardiancolor) + I.color = guardiancolor flick_overlay_view(I, src, 5) /mob/living/simple_animal/hostile/guardian/protector/ToggleMode() @@ -43,8 +44,8 @@ toggle = FALSE else var/mutable_appearance/shield_overlay = mutable_appearance('icons/effects/effects.dmi', "shield-grey") - if(namedatum) - shield_overlay.color = namedatum.colour + if(guardiancolor) + shield_overlay.color = guardiancolor add_overlay(shield_overlay) melee_damage_lower = 2 melee_damage_upper = 2 @@ -63,7 +64,7 @@ visible_message("\The [src] jumps back to its user.") Recall(TRUE) else - to_chat(summoner, "You moved out of range, and were pulled back! You can only move [range] meters from [real_name]!") + to_chat(summoner, "You moved out of range, and were pulled back! You can only move [range] meters from [real_name]!") summoner.visible_message("\The [summoner] jumps back to [summoner.p_their()] protector.") new /obj/effect/temp_visual/guardian/phase/out(get_turf(summoner)) summoner.forceMove(get_turf(src)) diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm index a24da3d3d9b..996b21e8eb4 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm @@ -22,6 +22,7 @@ magic_fluff_string = "..And draw the Sentinel, an alien master of ranged combat." tech_fluff_string = "Boot sequence complete. Ranged combat modules active. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! Caught one, it's a ranged carp. This fishy can watch people pee in the ocean." + hive_fluff_string = "The mass seems to be able to create more mass and also hide at will." see_invisible = SEE_INVISIBLE_LIVING see_in_dark = 8 toggle_button_type = /obj/screen/guardian/ToggleMode @@ -57,8 +58,8 @@ . = ..() if(istype(., /obj/projectile)) var/obj/projectile/P = . - if(namedatum) - P.color = namedatum.colour + if(guardiancolor) + P.color = guardiancolor /mob/living/simple_animal/hostile/guardian/ranged/ToggleLight() var/msg diff --git a/code/modules/mob/living/simple_animal/guardian/types/standard.dm b/code/modules/mob/living/simple_animal/guardian/types/standard.dm index 27c528c1ae1..357c593695b 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/standard.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/standard.dm @@ -9,6 +9,7 @@ magic_fluff_string = "..And draw the Assistant, faceless and generic, but never to be underestimated." tech_fluff_string = "Boot sequence complete. Standard combat modules loaded. Holoparasite swarm online." carp_fluff_string = "CARP CARP CARP! You caught one! It's really boring and standard. Better punch some walls to ease the tension." + hive_fluff_string = "The mass seems to have immense strength and increased agility." var/battlecry = "AT" /mob/living/simple_animal/hostile/guardian/punch/verb/Battlecry() diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index 291ae7491c3..4cc09b47598 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -11,6 +11,7 @@ magic_fluff_string = "..And draw the CMO, a potent force of life... and death." carp_fluff_string = "CARP CARP CARP! You caught a support carp. It's a kleptocarp!" tech_fluff_string = "Boot sequence complete. Support modules active. Holoparasite swarm online." + hive_fluff_string = "The mass seems to have regenerative powers, while also possessing strength." toggle_button_type = /obj/screen/guardian/ToggleMode var/obj/structure/receiving_pad/beacon var/beacon_cooldown = 0 @@ -36,8 +37,8 @@ C.adjustOxyLoss(-5) C.adjustToxLoss(-5) var/obj/effect/temp_visual/heal/H = new /obj/effect/temp_visual/heal(get_turf(C)) - if(namedatum) - H.color = namedatum.colour + if(guardiancolor) + H.color = guardiancolor if(C == summoner) update_health_hud() med_hud_set_health() @@ -100,8 +101,8 @@ /obj/structure/receiving_pad/New(loc, mob/living/simple_animal/hostile/guardian/healer/G) . = ..() - if(G.namedatum) - add_atom_colour(G.namedatum.colour, FIXED_COLOUR_PRIORITY) + if(G.guardiancolor) + add_atom_colour(G.guardiancolor, FIXED_COLOUR_PRIORITY) /obj/structure/receiving_pad/proc/disappear() visible_message("[src] vanishes!") diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 428ebf0f31c..127ebada463 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -176,7 +176,7 @@ AddElement(/datum/element/cleaning) /mob/living/simple_animal/hostile/alien/maid/AttackingTarget() - if(ismovableatom(target)) + if(ismovable(target)) if(istype(target, /obj/effect/decal/cleanable)) visible_message("[src] cleans up \the [target].") qdel(target) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index e09e85c4d51..d5b0495a5eb 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -107,8 +107,8 @@ Difficulty: Hard if(charging) return - anger_modifier = CLAMP(((maxHealth - health)/60),0,20) - enrage_time = initial(enrage_time) * CLAMP(anger_modifier / 20, 0.5, 1) + anger_modifier = clamp(((maxHealth - health)/60),0,20) + enrage_time = initial(enrage_time) * clamp(anger_modifier / 20, 0.5, 1) ranged_cooldown = world.time + 50 if(client) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 954cd200999..8ea53032b44 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -88,7 +88,7 @@ Difficulty: Very Hard chosen_attack_num = 4 /mob/living/simple_animal/hostile/megafauna/colossus/OpenFire() - anger_modifier = CLAMP(((maxHealth - health)/50),0,20) + anger_modifier = clamp(((maxHealth - health)/50),0,20) ranged_cooldown = world.time + 120 if(client) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 8ba28edceaa..dca43d39498 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -104,7 +104,7 @@ Difficulty: Medium if(swooping) return - anger_modifier = CLAMP(((maxHealth - health)/50),0,20) + anger_modifier = clamp(((maxHealth - health)/50),0,20) ranged_cooldown = world.time + ranged_cooldown_time if(client) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 3d029161889..d861184b3c4 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -485,7 +485,7 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/hierophant/proc/calculate_rage() //how angry we are overall did_reset = FALSE //oh hey we're doing SOMETHING, clearly we might need to heal if we recall - anger_modifier = CLAMP(((maxHealth - health) / 42),0,50) + anger_modifier = clamp(((maxHealth - health) / 42),0,50) burst_range = initial(burst_range) + round(anger_modifier * 0.08) beam_range = initial(beam_range) + round(anger_modifier * 0.12) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index dc674ba56ff..5977bfe68be 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -199,7 +199,7 @@ /mob/living/simple_animal/updatehealth() ..() - health = CLAMP(health, 0, maxHealth) + health = clamp(health, 0, maxHealth) /mob/living/simple_animal/update_stat() if(status_flags & GODMODE) diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 96619bf5ca0..8ccf1fb6e4f 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -192,7 +192,7 @@ step_away(M,src) M.Friends = Friends.Copy() babies += M - M.mutation_chance = CLAMP(mutation_chance+(rand(5,-5)),0,100) + M.mutation_chance = clamp(mutation_chance+(rand(5,-5)),0,100) SSblackbox.record_feedback("tally", "slime_babies_born", 1, M.colour) if(original_nanites) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e28be1677db..182e2193604 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -364,7 +364,7 @@ /mob/proc/reset_perspective(atom/A) if(client) if(A) - if(ismovableatom(A)) + if(ismovable(A)) //Set the the thing unless it's us if(A != src) client.perspective = EYE_PERSPECTIVE diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index a1113001231..4cb0cbe892a 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -102,4 +102,4 @@ ///Adjust the body temperature of a mob, with min/max settings /mob/proc/adjust_bodytemperature(amount,min_temp=0,max_temp=INFINITY) if(bodytemperature >= min_temp && bodytemperature <= max_temp) - bodytemperature = CLAMP(bodytemperature + amount,min_temp,max_temp) + bodytemperature = clamp(bodytemperature + amount,min_temp,max_temp) diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm index b8e18fa465a..376e07aecfc 100644 --- a/code/modules/ninja/suit/ninjaDrainAct.dm +++ b/code/modules/ninja/suit/ninjaDrainAct.dm @@ -115,8 +115,7 @@ They *could* go in their appropriate files, but this is supposed to be modular update_icon() /obj/machinery/proc/AI_notify_hack() - var/turf/location = get_turf(src) - var/alertstr = "Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]." + var/alertstr = "Network Alert: Hacking attempt detected[get_area(src)?" in [get_area_name(src, TRUE)]":". Unable to pinpoint location"]." for(var/mob/living/silicon/ai/AI in GLOB.player_list) to_chat(AI, alertstr) diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index bfe738a5bd6..367aaca851f 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -22,7 +22,7 @@ Contents: armor = list("melee" = 60, "bullet" = 50, "laser" = 30,"energy" = 40, "bomb" = 30, "bio" = 30, "rad" = 30, "fire" = 100, "acid" = 100) strip_delay = 12 - actions_types = list(/datum/action/item_action/initialize_ninja_suit, /datum/action/item_action/ninjasmoke, /datum/action/item_action/ninjaboost, /datum/action/item_action/ninjapulse, /datum/action/item_action/ninjastar, /datum/action/item_action/ninjanet, /datum/action/item_action/ninja_sword_recall, /datum/action/item_action/ninja_stealth, /datum/action/item_action/toggle_glove) + actions_types = list(/datum/action/item_action/toggle_spacesuit, /datum/action/item_action/initialize_ninja_suit, /datum/action/item_action/ninjasmoke, /datum/action/item_action/ninjaboost, /datum/action/item_action/ninjapulse, /datum/action/item_action/ninjastar, /datum/action/item_action/ninjanet, /datum/action/item_action/ninja_sword_recall, /datum/action/item_action/ninja_stealth, /datum/action/item_action/toggle_glove) //Important parts of the suit. var/mob/living/carbon/human/affecting = null @@ -72,6 +72,7 @@ Contents: //Cell Init cell = new/obj/item/stock_parts/cell/high cell.charge = 60000 // larger as it now heats + cell.maxcharge = 60000 cell.name = "black power cell" cell.icon_state = "bscell" diff --git a/code/modules/photography/camera/camera.dm b/code/modules/photography/camera/camera.dm index 62ff1f78950..be8005cfc6a 100644 --- a/code/modules/photography/camera/camera.dm +++ b/code/modules/photography/camera/camera.dm @@ -55,12 +55,12 @@ return var/desired_y = input(user, "How wide do you want the camera to shoot, between [picture_size_y_min] and [picture_size_y_max]?", "Zoom", picture_size_y) as num|null - + if (isnull(desired_y)) return - picture_size_x = min(CLAMP(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) - picture_size_y = min(CLAMP(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) + picture_size_x = min(clamp(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) + picture_size_y = min(clamp(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT) /obj/item/camera/AltClick(mob/user) if(!user.canUseTopic(src, BE_CLOSE)) @@ -165,8 +165,8 @@ if(!isturf(target_turf)) blending = FALSE return FALSE - size_x = CLAMP(size_x, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT) - size_y = CLAMP(size_y, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT) + size_x = clamp(size_x, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT) + size_y = clamp(size_y, 0, CAMERA_PICTURE_SIZE_HARD_LIMIT) var/list/desc = list("This is a photo of an area of [size_x+1] meters by [size_y+1] meters.") var/list/mobs_spotted = list() var/list/dead_spotted = list() @@ -186,7 +186,7 @@ T = SSmapping.get_turf_below(T) if(!T) break - + if(T && ((ai_user && GLOB.cameranet.checkTurfVis(placeholder)) || (placeholder in seen))) turfs += T for(var/mob/M in T) diff --git a/code/modules/photography/camera/camera_image_capturing.dm b/code/modules/photography/camera/camera_image_capturing.dm index 685f6c49c73..bec09abb542 100644 --- a/code/modules/photography/camera/camera_image_capturing.dm +++ b/code/modules/photography/camera/camera_image_capturing.dm @@ -5,7 +5,7 @@ if(istype(A)) appearance = A.appearance dir = A.dir - if(ismovableatom(A)) + if(ismovable(A)) var/atom/movable/AM = A step_x = AM.step_x step_y = AM.step_y @@ -72,7 +72,7 @@ for(var/atom/A in sorted) var/xo = (A.x - center.x) * world.icon_size + A.pixel_x + xcomp var/yo = (A.y - center.y) * world.icon_size + A.pixel_y + ycomp - if(ismovableatom(A)) + if(ismovable(A)) var/atom/movable/AM = A xo += AM.step_x yo += AM.step_y diff --git a/code/modules/plumbing/plumbers/acclimator.dm b/code/modules/plumbing/plumbers/acclimator.dm index d2bc505d7d1..0c1c099090d 100644 --- a/code/modules/plumbing/plumbers/acclimator.dm +++ b/code/modules/plumbing/plumbers/acclimator.dm @@ -91,15 +91,15 @@ switch(action) if("set_target_temperature") var/target = text2num(params["temperature"]) - target_temperature = CLAMP(target, 0, 1000) + target_temperature = clamp(target, 0, 1000) if("set_allowed_temperature_difference") var/target = text2num(params["temperature"]) - allowed_temperature_difference = CLAMP(target, 0, 1000) + allowed_temperature_difference = clamp(target, 0, 1000) if("toggle_power") enabled = !enabled if("change_volume") var/target = text2num(params["volume"]) - reagents.maximum_volume = CLAMP(round(target), 1, buffer) + reagents.maximum_volume = clamp(round(target), 1, buffer) #undef COOLING #undef HEATING diff --git a/code/modules/plumbing/plumbers/pill_press.dm b/code/modules/plumbing/plumbers/pill_press.dm index 6731f2f3dcf..3cb51379ed1 100644 --- a/code/modules/plumbing/plumbers/pill_press.dm +++ b/code/modules/plumbing/plumbers/pill_press.dm @@ -92,9 +92,9 @@ . = TRUE switch(action) if("change_pill_style") - pill_number = CLAMP(text2num(params["id"]), 1 , PILL_STYLE_COUNT) + pill_number = clamp(text2num(params["id"]), 1 , PILL_STYLE_COUNT) if("change_pill_size") - pill_size = CLAMP(text2num(params["volume"]), minimum_pill, maximum_pill) + pill_size = clamp(text2num(params["volume"]), minimum_pill, maximum_pill) if("change_pill_name") var/new_name = html_encode(params["name"]) if(findtext(new_name, "pill")) //names like pillatron and Pilliam are thus valid diff --git a/code/modules/plumbing/plumbers/splitters.dm b/code/modules/plumbing/plumbers/splitters.dm index 825f794a3d8..03bb680116f 100644 --- a/code/modules/plumbing/plumbers/splitters.dm +++ b/code/modules/plumbing/plumbers/splitters.dm @@ -14,7 +14,7 @@ var/transfer_side = 5 //the maximum you can set the transfer to var/max_transfer = 9 - + ui_x = 220 ui_y = 105 @@ -42,7 +42,7 @@ switch(action) if("set_amount") var/direction = params["target"] - var/value = CLAMP(text2num(params["amount"]), 1, max_transfer) + var/value = clamp(text2num(params["amount"]), 1, max_transfer) switch(direction) if("straight") transfer_straight = value diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index cf087e4eb8d..675769dbd23 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -197,7 +197,7 @@ GLOB.apcs_list -= src if(malfai && operating) - malfai.malf_picker.processing_time = CLAMP(malfai.malf_picker.processing_time - 10,0,1000) + malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000) area.power_light = FALSE area.power_equip = FALSE area.power_environ = FALSE @@ -1374,7 +1374,7 @@ /obj/machinery/power/apc/proc/set_broken() if(malfai && operating) - malfai.malf_picker.processing_time = CLAMP(malfai.malf_picker.processing_time - 10,0,1000) + malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000) operating = FALSE obj_break() if(occupier) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 67e77ab776f..f080a894523 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -206,7 +206,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri /obj/structure/cable/proc/surplus() if(powernet) - return CLAMP(powernet.avail-powernet.load, 0, powernet.avail) + return clamp(powernet.avail-powernet.load, 0, powernet.avail) else return 0 @@ -222,7 +222,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri /obj/structure/cable/proc/delayed_surplus() if(powernet) - return CLAMP(powernet.newavail - powernet.delayedload, 0, powernet.newavail) + return clamp(powernet.newavail - powernet.delayedload, 0, powernet.newavail) else return 0 diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 271942a9906..892b62976e3 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -176,7 +176,7 @@ /obj/item/stock_parts/cell/proc/get_electrocute_damage() if(charge >= 1000) - return CLAMP(20 + round(charge/25000), 20, 195) + rand(-5,5) + return clamp(20 + round(charge/25000), 20, 195) + rand(-5,5) else return 0 @@ -370,7 +370,7 @@ . = ..() if(. & EMP_PROTECT_SELF) return - charge = CLAMP((charge-(10000/severity)),0,maxcharge) + charge = clamp((charge-(10000/severity)),0,maxcharge) /obj/item/stock_parts/cell/emergency_light name = "miniature power cell" diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 07cf134589b..34914b1c990 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -336,7 +336,7 @@ . = ..() if(on && status == LIGHT_OK) var/mutable_appearance/glowybit = mutable_appearance(overlayicon, base_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE) - glowybit.alpha = CLAMP(light_power*250, 30, 200) + glowybit.alpha = clamp(light_power*250, 30, 200) . += glowybit // update the icon_state and luminosity of the light depending on its state diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index d9eb4ac9fb7..f4b2208a5cb 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -47,7 +47,7 @@ /obj/machinery/power/proc/surplus() if(powernet) - return CLAMP(powernet.avail-powernet.load, 0, powernet.avail) + return clamp(powernet.avail-powernet.load, 0, powernet.avail) else return 0 @@ -63,7 +63,7 @@ /obj/machinery/power/proc/delayed_surplus() if(powernet) - return CLAMP(powernet.newavail - powernet.delayedload, 0, powernet.newavail) + return clamp(powernet.newavail - powernet.delayedload, 0, powernet.newavail) else return 0 diff --git a/code/modules/power/powernet.dm b/code/modules/power/powernet.dm index 9660e8359c5..1a6a725e4e7 100644 --- a/code/modules/power/powernet.dm +++ b/code/modules/power/powernet.dm @@ -96,6 +96,6 @@ /datum/powernet/proc/get_electrocute_damage() if(avail >= 1000) - return CLAMP(20 + round(avail/25000), 20, 195) + rand(-5,5) + return clamp(20 + round(avail/25000), 20, 195) + rand(-5,5) else return 0 diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 2a4cd291ed7..7ad94005381 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -218,7 +218,7 @@ // if(defer_powernet_rebuild != 2) // defer_powernet_rebuild = 1 for(var/atom/X in urange(consume_range,src,1)) - if(isturf(X) || ismovableatom(X)) + if(isturf(X) || ismovable(X)) consume(X) // if(defer_powernet_rebuild != 2) // defer_powernet_rebuild = 0 diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 3befc9d8271..0ef53491aae 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -229,7 +229,7 @@ /obj/machinery/power/smes/proc/chargedisplay() - return CLAMP(round(5.5*charge/capacity),0,5) + return clamp(round(5.5*charge/capacity),0,5) /obj/machinery/power/smes/process() if(machine_stat & BROKEN) @@ -381,7 +381,7 @@ target = text2num(target) . = TRUE if(.) - input_level = CLAMP(target, 0, input_level_max) + input_level = clamp(target, 0, input_level_max) log_smes(usr) if("output") var/target = params["target"] @@ -403,7 +403,7 @@ target = text2num(target) . = TRUE if(.) - output_level = CLAMP(target, 0, output_level_max) + output_level = clamp(target, 0, output_level_max) log_smes(usr) /obj/machinery/power/smes/proc/log_smes(mob/user) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index f0ef67dd92b..a82e3b946ab 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -26,10 +26,8 @@ /obj/machinery/power/solar/Initialize(mapload, obj/item/solar_assembly/S) . = ..() panel = new() -#if DM_VERSION >= 513 panel.vis_flags = VIS_INHERIT_ID|VIS_INHERIT_ICON|VIS_INHERIT_PLANE vis_contents += panel -#endif panel.icon = icon panel.icon_state = "solar_panel" panel.layer = FLY_LAYER @@ -116,9 +114,6 @@ panel.icon_state = "solar_panel-b" else panel.icon_state = "solar_panel" -#if DM_VERSION <= 512 - . += new /mutable_appearance(panel) -#endif /obj/machinery/power/solar/proc/queue_turn(azimuth) needs_to_turn = TRUE @@ -169,7 +164,7 @@ else //dot product of sun and panel -- Lambert's Cosine Law . = cos(azimuth_current - sun_azimuth) - . = CLAMP(round(., 0.01), 0, 1) + . = clamp(round(., 0.01), 0, 1) sunfrac = . /obj/machinery/power/solar/process() @@ -390,7 +385,7 @@ if(adjust) value = azimuth_rate + adjust if(value != null) - azimuth_rate = round(CLAMP(value, -2 * SSsun.base_rotation, 2 * SSsun.base_rotation), 0.01) + azimuth_rate = round(clamp(value, -2 * SSsun.base_rotation, 2 * SSsun.base_rotation), 0.01) return TRUE return FALSE if(action == "tracking") @@ -468,7 +463,7 @@ ///Rotates the panel to the passed angles /obj/machinery/power/solar_control/proc/set_panels(azimuth) - azimuth = CLAMP(round(azimuth, 0.01), -360, 719.99) + azimuth = clamp(round(azimuth, 0.01), -360, 719.99) if(azimuth >= 360) azimuth -= 360 if(azimuth < 0) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 989bdd03833..9f1357681da 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -336,7 +336,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //We vary volume by power, and handle OH FUCK FUSION IN COOLING LOOP noises. if(power) - soundloop.volume = CLAMP((50 + (power / 50)), 50, 100) + soundloop.volume = clamp((50 + (power / 50)), 50, 100) if(damage >= 300) soundloop.mid_sounds = list('sound/machines/sm/loops/delamming.ogg' = 1) else @@ -375,7 +375,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //((((some value between 0.5 and 1 * temp - ((273.15 + 40) * some values between 1 and 6)) * some number between 0.25 and knock your socks off / 150) * 0.25 //Heat and mols account for each other, a lot of hot mols are more damaging then a few //Mols start to have a positive effect on damage after 350 - damage = max(damage + (max(CLAMP(removed.total_moles() / 200, 0.5, 1) * removed.temperature - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0) + damage = max(damage + (max(clamp(removed.total_moles() / 200, 0.5, 1) * removed.temperature - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0) //Power only starts affecting damage when it is above 5000 damage = max(damage + (max(power - POWER_PENALTY_THRESHOLD, 0)/500) * DAMAGE_INCREASE_MULTIPLIER, 0) //Molar count only starts affecting damage when it is above 1800 @@ -405,14 +405,14 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //Can cause an overestimation of mol count, should stabalize things though. //Prevents huge bursts of gas/heat when a large amount of something is introduced //They range between 0 and 1 - plasmacomp += CLAMP(max(removed.gases[/datum/gas/plasma][MOLES]/combined_gas, 0) - plasmacomp, -1, gas_change_rate) - o2comp += CLAMP(max(removed.gases[/datum/gas/oxygen][MOLES]/combined_gas, 0) - o2comp, -1, gas_change_rate) - co2comp += CLAMP(max(removed.gases[/datum/gas/carbon_dioxide][MOLES]/combined_gas, 0) - co2comp, -1, gas_change_rate) - pluoxiumcomp += CLAMP(max(removed.gases[/datum/gas/pluoxium][MOLES]/combined_gas, 0) - pluoxiumcomp, -1, gas_change_rate) - tritiumcomp += CLAMP(max(removed.gases[/datum/gas/tritium][MOLES]/combined_gas, 0) - tritiumcomp, -1, gas_change_rate) - bzcomp += CLAMP(max(removed.gases[/datum/gas/bz][MOLES]/combined_gas, 0) - bzcomp, -1, gas_change_rate) - n2ocomp += CLAMP(max(removed.gases[/datum/gas/nitrous_oxide][MOLES]/combined_gas, 0) - n2ocomp, -1, gas_change_rate) - n2comp += CLAMP(max(removed.gases[/datum/gas/nitrogen][MOLES]/combined_gas, 0) - n2comp, -1, gas_change_rate) + plasmacomp += clamp(max(removed.gases[/datum/gas/plasma][MOLES]/combined_gas, 0) - plasmacomp, -1, gas_change_rate) + o2comp += clamp(max(removed.gases[/datum/gas/oxygen][MOLES]/combined_gas, 0) - o2comp, -1, gas_change_rate) + co2comp += clamp(max(removed.gases[/datum/gas/carbon_dioxide][MOLES]/combined_gas, 0) - co2comp, -1, gas_change_rate) + pluoxiumcomp += clamp(max(removed.gases[/datum/gas/pluoxium][MOLES]/combined_gas, 0) - pluoxiumcomp, -1, gas_change_rate) + tritiumcomp += clamp(max(removed.gases[/datum/gas/tritium][MOLES]/combined_gas, 0) - tritiumcomp, -1, gas_change_rate) + bzcomp += clamp(max(removed.gases[/datum/gas/bz][MOLES]/combined_gas, 0) - bzcomp, -1, gas_change_rate) + n2ocomp += clamp(max(removed.gases[/datum/gas/nitrous_oxide][MOLES]/combined_gas, 0) - n2ocomp, -1, gas_change_rate) + n2comp += clamp(max(removed.gases[/datum/gas/nitrogen][MOLES]/combined_gas, 0) - n2comp, -1, gas_change_rate) //We're concerned about pluoxium being too easy to abuse at low percents, so we make sure there's a substantial amount. if(pluoxiumcomp >= 0.15) @@ -436,12 +436,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //Given infinite time, powerloss_dynamic_scaling = co2comp //Some value between 0 and 1 if (combined_gas > POWERLOSS_INHIBITION_MOLE_THRESHOLD && co2comp > POWERLOSS_INHIBITION_GAS_THRESHOLD) //If there are more then 20 mols, or more then 20% co2 - powerloss_dynamic_scaling = CLAMP(powerloss_dynamic_scaling + CLAMP(co2comp - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1) + powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling + clamp(co2comp - powerloss_dynamic_scaling, -0.02, 0.02), 0, 1) else - powerloss_dynamic_scaling = CLAMP(powerloss_dynamic_scaling - 0.05,0, 1) + powerloss_dynamic_scaling = clamp(powerloss_dynamic_scaling - 0.05,0, 1) //Ranges from 0 to 1(1-(value between 0 and 1 * ranges from 1 to 1.5(mol / 500))) //We take the mol count, and scale it to be our inhibitor - powerloss_inhibitor = CLAMP(1-(powerloss_dynamic_scaling * CLAMP(combined_gas/POWERLOSS_INHIBITION_MOLE_BOOST_THRESHOLD,1 ,1.5)),0 ,1) + powerloss_inhibitor = clamp(1-(powerloss_dynamic_scaling * clamp(combined_gas/POWERLOSS_INHIBITION_MOLE_BOOST_THRESHOLD,1 ,1.5)),0 ,1) //Releases stored power into the general pool //We get this by consuming shit or being scalpeled @@ -501,7 +501,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) var/D = sqrt(1 / max(1, get_dist(l, src))) l.hallucination += power * config_hallucination_power * D - l.hallucination = CLAMP(l.hallucination, 0, 200) + l.hallucination = clamp(l.hallucination, 0, 200) for(var/mob/living/l in range(src, round((power / 100) ** 0.25))) var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) ) @@ -515,12 +515,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //Handle high power zaps/anomaly generation if(power > POWER_PENALTY_THRESHOLD || damage > damage_penalty_point) //If the power is above 5000 or if the damage is above 550 if(removed && removed.temperature) - zap_cutoff = CLAMP(3000 - (power * (env.total_moles()) / 10) / env.return_temperature(), 350, 3000)//If the core is cold, it's easier to jump, ditto if there are a lot of mols + zap_cutoff = clamp(3000 - (power * (env.total_moles()) / 10) / env.return_temperature(), 350, 3000)//If the core is cold, it's easier to jump, ditto if there are a lot of mols else zap_cutoff = 1500 //We should always be able to zap our way out of the default enclosure //See supermatter_zap() for more details - var/range = CLAMP(power / env.return_pressure() * 10, 2, 8) + var/range = clamp(power / env.return_pressure() * 10, 2, 8) if(power > POWER_PENALTY_THRESHOLD) playsound(src.loc, 'sound/weapons/emitter2.ogg', 100, TRUE, extrarange = 10) supermatter_zap(src, range, min(power*2, 20000)) @@ -531,7 +531,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) supermatter_zap(src, range, min(power*2, 20000)) else if (damage > damage_penalty_point && prob(20)) playsound(src.loc, 'sound/weapons/emitter2.ogg', 100, TRUE, extrarange = 10) - supermatter_zap(src, range, CLAMP(power*2, 4000, 20000)) + supermatter_zap(src, range, clamp(power*2, 4000, 20000)) if(prob(15) && power > POWER_PENALTY_THRESHOLD) supermatter_pull(src, power/750) @@ -939,7 +939,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) var/turf/T = get_turf(target) var/pressure = max(1,T.return_air().return_pressure()) //We get our range with the strength of the zap and the pressure, the lower the former and the higher the latter the better - var/new_range = CLAMP(zap_str / pressure * 10, 2, 7) + var/new_range = clamp(zap_str / pressure * 10, 2, 7) if(prob(5)) zap_str = zap_str - (zap_str/10) supermatter_zap(target, new_range, zap_str, targets_copy) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 2ce2369f5b9..ab7a9ad61ae 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -65,7 +65,7 @@ pixel_x = -32 pixel_y = -32 for (var/ball in orbiting_balls) - var/range = rand(1, CLAMP(orbiting_balls.len, 3, 7)) + var/range = rand(1, clamp(orbiting_balls.len, 3, 7)) tesla_zap(ball, range, TESLA_MINI_POWER/7*range) else energy = 0 // ensure we dont have miniballs of miniballs diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index dab74c0031e..636486ed471 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -85,6 +85,7 @@ var/tac_reloads = TRUE //Snowflake mechanic no more. ///Whether the gun can be sawn off by sawing tools var/can_be_sawn_off = FALSE + var/flip_cooldown = 0 /obj/item/gun/ballistic/Initialize() . = ..() @@ -339,6 +340,18 @@ return ..() /obj/item/gun/ballistic/attack_self(mob/living/user) + if(HAS_TRAIT(user, TRAIT_GUNFLIP)) + if(flip_cooldown <= world.time) + if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40)) + to_chat(user, "While trying to flip the [src] you pull the trigger and accidently shoot yourself!") + var/flip_mistake = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_CHEST) + process_fire(user, user, FALSE, flip_mistake) + user.dropItemToGround(src, TRUE) + return + flip_cooldown = (world.time + 30) + user.visible_message("[user] spins the [src] around their finger by the trigger. That’s pretty badass.") + playsound(src, 'sound/items/handling/ammobox_pickup.ogg', 20, FALSE) + return if(!internal_magazine && magazine) if(!magazine.ammo_count()) eject_magazine(user) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 570e7566f8a..15238bfb3e8 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -175,7 +175,7 @@ ///Used by update_icon_state() and update_overlays() /obj/item/gun/energy/proc/get_charge_ratio() - return can_shoot() ? CEILING(CLAMP(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0 + return can_shoot() ? CEILING(clamp(cell.charge / cell.maxcharge, 0, 1) * charge_sections, 1) : 0 // Sets the ratio to 0 if the gun doesn't have enough charge to fire, or if its power cell is removed. /obj/item/gun/energy/suicide_act(mob/living/user) diff --git a/code/modules/projectiles/guns/misc/beam_rifle.dm b/code/modules/projectiles/guns/misc/beam_rifle.dm index 099d6db4f50..5e5fa7a0c06 100644 --- a/code/modules/projectiles/guns/misc/beam_rifle.dm +++ b/code/modules/projectiles/guns/misc/beam_rifle.dm @@ -317,7 +317,7 @@ AC.sync_stats() /obj/item/gun/energy/beam_rifle/proc/delay_penalty(amount) - aiming_time_left = CLAMP(aiming_time_left + amount, 0, aiming_time) + aiming_time_left = clamp(aiming_time_left + amount, 0, aiming_time) /obj/item/ammo_casing/energy/beam_rifle name = "particle acceleration lens" @@ -368,11 +368,11 @@ HS_BB.stun = projectile_stun HS_BB.impact_structure_damage = impact_structure_damage HS_BB.aoe_mob_damage = aoe_mob_damage - HS_BB.aoe_mob_range = CLAMP(aoe_mob_range, 0, 15) //Badmin safety lock + HS_BB.aoe_mob_range = clamp(aoe_mob_range, 0, 15) //Badmin safety lock HS_BB.aoe_fire_chance = aoe_fire_chance HS_BB.aoe_fire_range = aoe_fire_range HS_BB.aoe_structure_damage = aoe_structure_damage - HS_BB.aoe_structure_range = CLAMP(aoe_structure_range, 0, 15) //Badmin safety lock + HS_BB.aoe_structure_range = clamp(aoe_structure_range, 0, 15) //Badmin safety lock HS_BB.wall_devastate = wall_devastate HS_BB.wall_pierce_amount = wall_pierce_amount HS_BB.structure_pierce_amount = structure_piercing @@ -464,7 +464,7 @@ else target.ex_act(EXPLODE_HEAVY) return TRUE - if(ismovableatom(target)) + if(ismovable(target)) var/atom/movable/AM = target if(AM.density && !AM.CanPass(src, get_turf(target)) && !ismob(AM)) if(structure_pierce < structure_pierce_amount) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 3155af49079..f2d081e30ca 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -210,7 +210,7 @@ /obj/projectile/proc/vol_by_damage() if(src.damage) - return CLAMP((src.damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then CLAMP the value between 30 and 100 + return clamp((src.damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then CLAMP the value between 30 and 100 else return 50 //if the projectile doesn't do damage, play its hitsound at 50% volume @@ -240,7 +240,7 @@ def_zone = ran_zone(def_zone, max(100-(7*distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use. if(isturf(A) && hitsound_wall) - var/volume = CLAMP(vol_by_damage() + 20, 0, 100) + var/volume = clamp(vol_by_damage() + 20, 0, 100) if(suppressed) volume = 5 playsound(loc, hitsound_wall, volume, TRUE, -1) @@ -379,7 +379,7 @@ stack_trace("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!") qdel(src) return - var/turf/target = locate(CLAMP(starting + xo, 1, world.maxx), CLAMP(starting + yo, 1, world.maxy), starting.z) + var/turf/target = locate(clamp(starting + xo, 1, world.maxx), clamp(starting + yo, 1, world.maxy), starting.z) setAngle(Get_Angle(src, target)) original_angle = Angle if(!nondirectional_sprite) @@ -509,10 +509,10 @@ if(!homing_target) return FALSE var/datum/point/PT = RETURN_PRECISE_POINT(homing_target) - PT.x += CLAMP(homing_offset_x, 1, world.maxx) - PT.y += CLAMP(homing_offset_y, 1, world.maxy) + PT.x += clamp(homing_offset_x, 1, world.maxx) + PT.y += clamp(homing_offset_y, 1, world.maxy) var/angle = closer_angle_difference(Angle, angle_between_points(RETURN_PRECISE_POINT(src), PT)) - setAngle(Angle + CLAMP(angle, -homing_turn_speed, homing_turn_speed)) + setAngle(Angle + clamp(angle, -homing_turn_speed, homing_turn_speed)) /obj/projectile/proc/set_homing_target(atom/A) if(!A || (!isturf(A) && !isturf(A.loc))) diff --git a/code/modules/projectiles/projectile/bullets/shotgun.dm b/code/modules/projectiles/projectile/bullets/shotgun.dm index d291da83ecd..551e4ebc4f1 100644 --- a/code/modules/projectiles/projectile/bullets/shotgun.dm +++ b/code/modules/projectiles/projectile/bullets/shotgun.dm @@ -36,7 +36,7 @@ /obj/projectile/bullet/shotgun_meteorslug/on_hit(atom/target, blocked = FALSE) . = ..() - if(ismovableatom(target)) + if(ismovable(target)) var/atom/movable/M = target var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src))) M.safe_throw_at(throw_target, 3, 2) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index abe386a511e..3c03b53a770 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -31,12 +31,11 @@ var/datum/chemical_reaction/D = new path() var/list/reaction_ids = list() - if(!D.id) + if(!D.required_reagents || !D.required_reagents.len) //Skip impossible reactions continue - if(D.required_reagents && D.required_reagents.len) - for(var/reaction in D.required_reagents) - reaction_ids += reaction + for(var/reaction in D.required_reagents) + reaction_ids += reaction // Create filters based on each reagent id in the required reagents list for(var/id in reaction_ids) @@ -647,7 +646,7 @@ /datum/reagents/proc/adjust_thermal_energy(J, min_temp = 2.7, max_temp = 1000) var/S = specific_heat() - chem_temp = CLAMP(chem_temp + (J / (S * total_volume)), 2.7, 1000) + chem_temp = clamp(chem_temp + (J / (S * total_volume)), 2.7, 1000) /datum/reagents/proc/add_reagent(reagent, amount, list/data=null, reagtemp = 300, no_react = 0) if(!isnum(amount) || !amount) @@ -738,7 +737,7 @@ if (R.type == reagent) //clamp the removal amount to be between current reagent amount //and zero, to prevent removing more than the holder has stored - amount = CLAMP(amount, 0, R.volume) + amount = clamp(amount, 0, R.volume) R.volume -= amount update_total() if(!safety)//So it does not handle reactions when it need not to diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 6dde3fa2fdd..408d79e2323 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -135,7 +135,7 @@ target = text2num(target) . = TRUE if(.) - target_temperature = CLAMP(target, 0, 1000) + target_temperature = clamp(target, 0, 1000) if("eject") on = FALSE replace_beaker(usr) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index a6fa79938c3..fd993154675 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -246,7 +246,7 @@ amount = text2num(input(usr, "Max 10. Buffer content will be split evenly.", "How many to make?", 1)) - amount = CLAMP(round(amount), 0, 10) + amount = clamp(round(amount), 0, 10) if (amount <= 0) return FALSE // Get units per item @@ -272,7 +272,7 @@ "Maximum [vol_each_max] units per item.", "How many units to fill?", vol_each_max)) - vol_each = CLAMP(vol_each, 0, vol_each_max) + vol_each = clamp(vol_each, 0, vol_each_max) if(vol_each <= 0) return FALSE // Get item name diff --git a/code/modules/reagents/chemistry/reagents.dm b/code/modules/reagents/chemistry/reagents.dm index d7b8f3958ec..aadaa3d500f 100644 --- a/code/modules/reagents/chemistry/reagents.dm +++ b/code/modules/reagents/chemistry/reagents.dm @@ -59,7 +59,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent()) return 0 if(method == VAPOR) //smoke, foam, spray if(M.reagents) - var/modifier = CLAMP((1 - touch_protection), 0, 1) + var/modifier = clamp((1 - touch_protection), 0, 1) var/amount = round(reac_volume*modifier, 0.1) if(amount >= 0.5) M.reagents.add_reagent(type, amount) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index f473bdfd21b..5c0b69b4296 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -1085,7 +1085,7 @@ All effects don't start immediately, but rather get worse over time; the rate is var/datum/antagonist/changeling/changeling = M.mind.has_antag_datum(/datum/antagonist/changeling) if(changeling) changeling.chem_charges += metabolization_rate - changeling.chem_charges = CLAMP(changeling.chem_charges, 0, changeling.chem_storage) + changeling.chem_charges = clamp(changeling.chem_charges, 0, changeling.chem_storage) return ..() /datum/reagent/consumable/ethanol/irishcarbomb @@ -1115,6 +1115,17 @@ All effects don't start immediately, but rather get worse over time; the rate is playsound(get_turf(M), 'sound/effects/explosionfar.ogg', 100, TRUE) return ..() +/datum/reagent/consumable/ethanol/hiveminderaser + name = "Hivemind Eraser" + description = "A vessel of pure flavor." + color = "#FF80FC" // rgb: 255, 128, 252 + boozepwr = 40 + quality = DRINK_GOOD + taste_description = "psychic links" + glass_icon_state = "hiveminderaser" + glass_name = "Hivemind Eraser" + glass_desc = "For when even mindshields can't save you." + /datum/reagent/consumable/ethanol/erikasurprise name = "Erika Surprise" description = "The surprise is, it's green!" diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 87c1fe954a0..c04a1d618bd 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -199,7 +199,7 @@ . = 1 /datum/reagent/drug/methamphetamine/overdose_process(mob/living/M) - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i in 1 to 4) step(M, pick(GLOB.cardinals)) if(prob(20)) @@ -226,7 +226,7 @@ ..() /datum/reagent/drug/methamphetamine/addiction_act_stage3(mob/living/M) - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i = 0, i < 4, i++) step(M, pick(GLOB.cardinals)) M.Jitter(15) @@ -236,7 +236,7 @@ ..() /datum/reagent/drug/methamphetamine/addiction_act_stage4(mob/living/carbon/human/M) - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i = 0, i < 8, i++) step(M, pick(GLOB.cardinals)) M.Jitter(20) @@ -281,7 +281,7 @@ M.adjustStaminaLoss(-5, 0) M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 4) M.hallucination += 5 - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) step(M, pick(GLOB.cardinals)) step(M, pick(GLOB.cardinals)) ..() @@ -289,7 +289,7 @@ /datum/reagent/drug/bath_salts/overdose_process(mob/living/M) M.hallucination += 5 - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i in 1 to 8) step(M, pick(GLOB.cardinals)) if(prob(20)) @@ -300,7 +300,7 @@ /datum/reagent/drug/bath_salts/addiction_act_stage1(mob/living/M) M.hallucination += 10 - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i = 0, i < 8, i++) step(M, pick(GLOB.cardinals)) M.Jitter(5) @@ -311,7 +311,7 @@ /datum/reagent/drug/bath_salts/addiction_act_stage2(mob/living/M) M.hallucination += 20 - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i = 0, i < 8, i++) step(M, pick(GLOB.cardinals)) M.Jitter(10) @@ -323,7 +323,7 @@ /datum/reagent/drug/bath_salts/addiction_act_stage3(mob/living/M) M.hallucination += 30 - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i = 0, i < 12, i++) step(M, pick(GLOB.cardinals)) M.Jitter(15) @@ -335,7 +335,7 @@ /datum/reagent/drug/bath_salts/addiction_act_stage4(mob/living/carbon/human/M) M.hallucination += 30 - if((M.mobility_flags & MOBILITY_MOVE) && !ismovableatom(M.loc)) + if((M.mobility_flags & MOBILITY_MOVE) && !ismovable(M.loc)) for(var/i = 0, i < 16, i++) step(M, pick(GLOB.cardinals)) M.Jitter(50) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 21d30148e4e..ffffd95e74a 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1932,9 +1932,9 @@ /datum/reagent/peaceborg/confuse/on_mob_life(mob/living/carbon/M) if(M.confused < 6) - M.confused = CLAMP(M.confused + 3, 0, 5) + M.confused = clamp(M.confused + 3, 0, 5) if(M.dizziness < 6) - M.dizziness = CLAMP(M.dizziness + 3, 0, 5) + M.dizziness = clamp(M.dizziness + 3, 0, 5) if(prob(20)) to_chat(M, "You feel confused and disoriented.") ..() diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 802b1c109ec..7ca683dac98 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -1,6 +1,4 @@ /datum/chemical_reaction - var/name = null - var/id = null var/list/results = new/list() var/list/required_reagents = new/list() var/list/required_catalysts = new/list() @@ -24,7 +22,7 @@ if(holder && holder.my_atom) var/atom/A = holder.my_atom var/turf/T = get_turf(A) - var/message = "A [reaction_name] reaction has occurred in [ADMIN_VERBOSEJMP(T)]" + var/message = "Mobs have been spawned in [ADMIN_VERBOSEJMP(T)] by a [reaction_name] reaction." message += " (VV)" var/mob/M = get(A, /mob) diff --git a/code/modules/reagents/chemistry/recipes/cat2_medicines.dm b/code/modules/reagents/chemistry/recipes/cat2_medicines.dm index 7fa667e7797..1b85aa6bb2d 100644 --- a/code/modules/reagents/chemistry/recipes/cat2_medicines.dm +++ b/code/modules/reagents/chemistry/recipes/cat2_medicines.dm @@ -3,45 +3,33 @@ /*****BRUTE*****/ /datum/chemical_reaction/helbital - name = "helbital" - id = /datum/reagent/medicine/C2/helbital results = list(/datum/reagent/medicine/C2/helbital = 3) required_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/fluorine = 1, /datum/reagent/carbon = 1) mix_message = "The mixture turns into a thick, yellow powder." /datum/chemical_reaction/libital - name = "Libital" - id = /datum/reagent/medicine/C2/libital results = list(/datum/reagent/medicine/C2/libital = 3) required_reagents = list(/datum/reagent/phenol = 1, /datum/reagent/oxygen = 1, /datum/reagent/nitrogen = 1) /*****BURN*****/ /datum/chemical_reaction/lenturi - name = "Lenturi" - id = /datum/reagent/medicine/C2/lenturi results = list(/datum/reagent/medicine/C2/lenturi = 5) required_reagents = list(/datum/reagent/ammonia = 1, /datum/reagent/silver = 1, /datum/reagent/sulfur = 1, /datum/reagent/oxygen = 1, /datum/reagent/chlorine = 1) /datum/chemical_reaction/aiuri - name = "Aiuri" - id = /datum/reagent/medicine/C2/aiuri results = list(/datum/reagent/medicine/C2/aiuri = 4) required_reagents = list(/datum/reagent/ammonia = 1, /datum/reagent/toxin/acid = 1, /datum/reagent/hydrogen = 2) /*****OXY*****/ /datum/chemical_reaction/convermol - name = "Convermol" - id = /datum/reagent/medicine/C2/convermol results = list(/datum/reagent/medicine/C2/convermol = 3) required_reagents = list(/datum/reagent/hydrogen = 1, /datum/reagent/fluorine = 1, /datum/reagent/fuel/oil = 1) required_temp = 370 mix_message = "The mixture rapidly turns into a dense pink liquid." /datum/chemical_reaction/tirimol - name = "Tirimol" - id = /datum/reagent/medicine/C2/tirimol results = list(/datum/reagent/medicine/C2/tirimol = 5) required_reagents = list(/datum/reagent/nitrogen = 3, /datum/reagent/acetone = 2) required_catalysts = list(/datum/reagent/toxin/acid = 1) @@ -49,27 +37,19 @@ /*****TOX*****/ /datum/chemical_reaction/seiver - name = "Seiver" - id = /datum/reagent/medicine/C2/seiver results = list(/datum/reagent/medicine/C2/seiver = 3) required_reagents = list(/datum/reagent/nitrogen = 1, /datum/reagent/potassium = 1, /datum/reagent/aluminium = 1) /datum/chemical_reaction/multiver - name = "Multiver" - id = /datum/reagent/medicine/C2/multiver results = list(/datum/reagent/medicine/C2/multiver = 2) required_reagents = list(/datum/reagent/ash = 1, /datum/reagent/consumable/sodiumchloride = 1) mix_message = "The mixture yields a fine black powder." required_temp = 380 /datum/chemical_reaction/syriniver - name = "Syriniver" - id = /datum/reagent/medicine/C2/syriniver results = list(/datum/reagent/medicine/C2/syriniver = 5) required_reagents = list(/datum/reagent/sulfur = 1, /datum/reagent/fluorine = 1, /datum/reagent/toxin = 1, /datum/reagent/nitrous_oxide = 2) /datum/chemical_reaction/penthrite - name = "Penthrite" - id = /datum/reagent/medicine/C2/penthrite results = list(/datum/reagent/medicine/C2/penthrite = 4) required_reagents = list(/datum/reagent/pentaerythritol = 4, /datum/reagent/acetone = 1, /datum/reagent/toxin/acid/nitracid = 1) diff --git a/code/modules/reagents/chemistry/recipes/drugs.dm b/code/modules/reagents/chemistry/recipes/drugs.dm index 0b66c232c85..6d3d1f794ff 100644 --- a/code/modules/reagents/chemistry/recipes/drugs.dm +++ b/code/modules/reagents/chemistry/recipes/drugs.dm @@ -1,12 +1,8 @@ /datum/chemical_reaction/space_drugs - name = "Space Drugs" - id = /datum/reagent/drug/space_drugs results = list(/datum/reagent/drug/space_drugs = 3) required_reagents = list(/datum/reagent/mercury = 1, /datum/reagent/consumable/sugar = 1, /datum/reagent/lithium = 1) /datum/chemical_reaction/crank - name = "Crank" - id = /datum/reagent/drug/crank results = list(/datum/reagent/drug/crank = 5) required_reagents = list(/datum/reagent/medicine/diphenhydramine = 1, /datum/reagent/ammonia = 1, /datum/reagent/lithium = 1, /datum/reagent/toxin/acid = 1, /datum/reagent/fuel = 1) mix_message = "The mixture violently reacts, leaving behind a few crystalline shards." @@ -14,42 +10,30 @@ /datum/chemical_reaction/krokodil - name = "Krokodil" - id = /datum/reagent/drug/krokodil results = list(/datum/reagent/drug/krokodil = 6) required_reagents = list(/datum/reagent/medicine/diphenhydramine = 1, /datum/reagent/medicine/morphine = 1, /datum/reagent/space_cleaner = 1, /datum/reagent/potassium = 1, /datum/reagent/phosphorus = 1, /datum/reagent/fuel = 1) mix_message = "The mixture dries into a pale blue powder." required_temp = 380 /datum/chemical_reaction/methamphetamine - name = /datum/reagent/drug/methamphetamine - id = /datum/reagent/drug/methamphetamine results = list(/datum/reagent/drug/methamphetamine = 4) required_reagents = list(/datum/reagent/medicine/ephedrine = 1, /datum/reagent/iodine = 1, /datum/reagent/phosphorus = 1, /datum/reagent/hydrogen = 1) required_temp = 374 /datum/chemical_reaction/bath_salts - name = /datum/reagent/drug/bath_salts - id = /datum/reagent/drug/bath_salts results = list(/datum/reagent/drug/bath_salts = 7) required_reagents = list(/datum/reagent/toxin/bad_food = 1, /datum/reagent/saltpetre = 1, /datum/reagent/consumable/nutriment = 1, /datum/reagent/space_cleaner = 1, /datum/reagent/consumable/enzyme = 1, /datum/reagent/consumable/tea = 1, /datum/reagent/mercury = 1) required_temp = 374 /datum/chemical_reaction/aranesp - name = /datum/reagent/drug/aranesp - id = /datum/reagent/drug/aranesp results = list(/datum/reagent/drug/aranesp = 3) required_reagents = list(/datum/reagent/medicine/epinephrine = 1, /datum/reagent/medicine/atropine = 1, /datum/reagent/medicine/morphine = 1) /datum/chemical_reaction/happiness - name = "Happiness" - id = /datum/reagent/drug/happiness results = list(/datum/reagent/drug/happiness = 4) required_reagents = list(/datum/reagent/nitrous_oxide = 2, /datum/reagent/medicine/epinephrine = 1, /datum/reagent/consumable/ethanol = 1) required_catalysts = list(/datum/reagent/toxin/plasma = 5) /datum/chemical_reaction/pumpup - name = "Pump-Up" - id = /datum/reagent/drug/pumpup results = list(/datum/reagent/drug/pumpup = 5) required_reagents = list(/datum/reagent/medicine/epinephrine = 2, /datum/reagent/consumable/coffee = 5) diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 7c3c81eed71..c3e0186be74 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -1,248 +1,170 @@ /datum/chemical_reaction/leporazine - name = "Leporazine" - id = /datum/reagent/medicine/leporazine results = list(/datum/reagent/medicine/leporazine = 2) required_reagents = list(/datum/reagent/silicon = 1, /datum/reagent/copper = 1) required_catalysts = list(/datum/reagent/toxin/plasma = 5) /datum/chemical_reaction/rezadone - name = "Rezadone" - id = /datum/reagent/medicine/rezadone results = list(/datum/reagent/medicine/rezadone = 3) required_reagents = list(/datum/reagent/toxin/carpotoxin = 1, /datum/reagent/cryptobiolin = 1, /datum/reagent/copper = 1) /datum/chemical_reaction/spaceacillin - name = "Spaceacillin" - id = /datum/reagent/medicine/spaceacillin results = list(/datum/reagent/medicine/spaceacillin = 2) required_reagents = list(/datum/reagent/cryptobiolin = 1, /datum/reagent/medicine/epinephrine = 1) /datum/chemical_reaction/oculine - name = "Oculine" - id = /datum/reagent/medicine/oculine results = list(/datum/reagent/medicine/oculine = 3) required_reagents = list(/datum/reagent/medicine/C2/multiver = 1, /datum/reagent/carbon = 1, /datum/reagent/hydrogen = 1) mix_message = "The mixture bubbles noticeably and becomes a dark grey color!" /datum/chemical_reaction/inacusiate - name = /datum/reagent/medicine/inacusiate - id = /datum/reagent/medicine/inacusiate results = list(/datum/reagent/medicine/inacusiate = 2) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/carbon = 1, /datum/reagent/medicine/C2/multiver = 1) mix_message = "The mixture sputters loudly and becomes a light grey color!" /datum/chemical_reaction/synaptizine - name = "Synaptizine" - id = /datum/reagent/medicine/synaptizine results = list(/datum/reagent/medicine/synaptizine = 3) required_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/lithium = 1, /datum/reagent/water = 1) /datum/chemical_reaction/salglu_solution - name = "Saline-Glucose Solution" - id = /datum/reagent/medicine/salglu_solution results = list(/datum/reagent/medicine/salglu_solution = 3) required_reagents = list(/datum/reagent/consumable/sodiumchloride = 1, /datum/reagent/water = 1, /datum/reagent/consumable/sugar = 1) /datum/chemical_reaction/mine_salve - name = "Miner's Salve" - id = /datum/reagent/medicine/mine_salve results = list(/datum/reagent/medicine/mine_salve = 3) required_reagents = list(/datum/reagent/fuel/oil = 1, /datum/reagent/water = 1, /datum/reagent/iron = 1) /datum/chemical_reaction/mine_salve2 - name = "Miner's Salve" - id = /datum/reagent/medicine/mine_salve results = list(/datum/reagent/medicine/mine_salve = 15) required_reagents = list(/datum/reagent/toxin/plasma = 5, /datum/reagent/iron = 5, /datum/reagent/consumable/sugar = 1) // A sheet of plasma, a twinkie and a sheet of metal makes four of these /datum/chemical_reaction/instabitaluri - name = "Synthflesh (Instabitaluri)" - id = /datum/reagent/medicine/C2/instabitaluri results = list(/datum/reagent/medicine/C2/instabitaluri = 3) required_reagents = list(/datum/reagent/blood = 1, /datum/reagent/carbon = 1, /datum/reagent/medicine/C2/libital = 1) /datum/chemical_reaction/calomel - name = "Calomel" - id = /datum/reagent/medicine/calomel results = list(/datum/reagent/medicine/calomel = 2) required_reagents = list(/datum/reagent/mercury = 1, /datum/reagent/chlorine = 1) required_temp = 374 /datum/chemical_reaction/potass_iodide - name = "Potassium Iodide" - id = /datum/reagent/medicine/potass_iodide results = list(/datum/reagent/medicine/potass_iodide = 2) required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/iodine = 1) /datum/chemical_reaction/pen_acid - name = "Pentetic Acid" - id = /datum/reagent/medicine/pen_acid results = list(/datum/reagent/medicine/pen_acid = 6) required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/chlorine = 1, /datum/reagent/ammonia = 1, /datum/reagent/toxin/formaldehyde = 1, /datum/reagent/sodium = 1, /datum/reagent/toxin/cyanide = 1) /datum/chemical_reaction/sal_acid - name = "Salicylic Acid" - id = /datum/reagent/medicine/sal_acid results = list(/datum/reagent/medicine/sal_acid = 5) required_reagents = list(/datum/reagent/sodium = 1, /datum/reagent/phenol = 1, /datum/reagent/carbon = 1, /datum/reagent/oxygen = 1, /datum/reagent/toxin/acid = 1) /datum/chemical_reaction/oxandrolone - name = "Oxandrolone" - id = /datum/reagent/medicine/oxandrolone results = list(/datum/reagent/medicine/oxandrolone = 6) required_reagents = list(/datum/reagent/carbon = 3, /datum/reagent/phenol = 1, /datum/reagent/hydrogen = 1, /datum/reagent/oxygen = 1) /datum/chemical_reaction/salbutamol - name = "Salbutamol" - id = /datum/reagent/medicine/salbutamol results = list(/datum/reagent/medicine/salbutamol = 5) required_reagents = list(/datum/reagent/medicine/sal_acid = 1, /datum/reagent/lithium = 1, /datum/reagent/aluminium = 1, /datum/reagent/bromine = 1, /datum/reagent/ammonia = 1) /datum/chemical_reaction/ephedrine - name = "Ephedrine" - id = /datum/reagent/medicine/ephedrine results = list(/datum/reagent/medicine/ephedrine = 4) required_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/fuel/oil = 1, /datum/reagent/hydrogen = 1, /datum/reagent/diethylamine = 1) mix_message = "The solution fizzes and gives off toxic fumes." /datum/chemical_reaction/diphenhydramine - name = "Diphenhydramine" - id = /datum/reagent/medicine/diphenhydramine results = list(/datum/reagent/medicine/diphenhydramine = 4) required_reagents = list(/datum/reagent/fuel/oil = 1, /datum/reagent/carbon = 1, /datum/reagent/bromine = 1, /datum/reagent/diethylamine = 1, /datum/reagent/consumable/ethanol = 1) mix_message = "The mixture dries into a pale blue powder." /datum/chemical_reaction/atropine - name = "Atropine" - id = /datum/reagent/medicine/atropine results = list(/datum/reagent/medicine/atropine = 5) required_reagents = list(/datum/reagent/consumable/ethanol = 1, /datum/reagent/acetone = 1, /datum/reagent/diethylamine = 1, /datum/reagent/phenol = 1, /datum/reagent/toxin/acid = 1) /datum/chemical_reaction/epinephrine - name = "Epinephrine" - id = /datum/reagent/medicine/epinephrine results = list(/datum/reagent/medicine/epinephrine = 6) required_reagents = list(/datum/reagent/phenol = 1, /datum/reagent/acetone = 1, /datum/reagent/diethylamine = 1, /datum/reagent/oxygen = 1, /datum/reagent/chlorine = 1, /datum/reagent/hydrogen = 1) /datum/chemical_reaction/strange_reagent - name = "Strange Reagent" - id = /datum/reagent/medicine/strange_reagent results = list(/datum/reagent/medicine/strange_reagent = 3) required_reagents = list(/datum/reagent/medicine/omnizine = 1, /datum/reagent/water/holywater = 1, /datum/reagent/toxin/mutagen = 1) /datum/chemical_reaction/strange_reagent/alt - name = "Strange Reagent" - id = /datum/reagent/medicine/strange_reagent results = list(/datum/reagent/medicine/strange_reagent = 2) required_reagents = list(/datum/reagent/medicine/omnizine/protozine = 1, /datum/reagent/water/holywater = 1, /datum/reagent/toxin/mutagen = 1) /datum/chemical_reaction/mannitol - name = "Mannitol" - id = /datum/reagent/medicine/mannitol results = list(/datum/reagent/medicine/mannitol = 3) required_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/hydrogen = 1, /datum/reagent/water = 1) mix_message = "The solution slightly bubbles, becoming thicker." /datum/chemical_reaction/neurine - name = "Neurine" - id = /datum/reagent/medicine/neurine results = list(/datum/reagent/medicine/neurine = 3) required_reagents = list(/datum/reagent/medicine/mannitol = 1, /datum/reagent/acetone = 1, /datum/reagent/oxygen = 1) /datum/chemical_reaction/mutadone - name = "Mutadone" - id = /datum/reagent/medicine/mutadone results = list(/datum/reagent/medicine/mutadone = 3) required_reagents = list(/datum/reagent/toxin/mutagen = 1, /datum/reagent/acetone = 1, /datum/reagent/bromine = 1) /datum/chemical_reaction/antihol - name = /datum/reagent/medicine/antihol - id = /datum/reagent/medicine/antihol results = list(/datum/reagent/medicine/antihol = 3) required_reagents = list(/datum/reagent/consumable/ethanol = 1, /datum/reagent/medicine/C2/multiver = 1, /datum/reagent/copper = 1) /datum/chemical_reaction/cryoxadone - name = "Cryoxadone" - id = /datum/reagent/medicine/cryoxadone results = list(/datum/reagent/medicine/cryoxadone = 3) required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/acetone = 1, /datum/reagent/toxin/mutagen = 1) /datum/chemical_reaction/pyroxadone - name = "Pyroxadone" - id = /datum/reagent/medicine/pyroxadone results = list(/datum/reagent/medicine/pyroxadone = 2) required_reagents = list(/datum/reagent/medicine/cryoxadone = 1, /datum/reagent/toxin/slimejelly = 1) /datum/chemical_reaction/clonexadone - name = "Clonexadone" - id = /datum/reagent/medicine/clonexadone results = list(/datum/reagent/medicine/clonexadone = 2) required_reagents = list(/datum/reagent/medicine/cryoxadone = 1, /datum/reagent/sodium = 1) required_catalysts = list(/datum/reagent/toxin/plasma = 5) /datum/chemical_reaction/haloperidol - name = "Haloperidol" - id = /datum/reagent/medicine/haloperidol results = list(/datum/reagent/medicine/haloperidol = 5) required_reagents = list(/datum/reagent/chlorine = 1, /datum/reagent/fluorine = 1, /datum/reagent/aluminium = 1, /datum/reagent/medicine/potass_iodide = 1, /datum/reagent/fuel/oil = 1) /datum/chemical_reaction/regen_jelly - name = "Regenerative Jelly" - id = /datum/reagent/medicine/regen_jelly results = list(/datum/reagent/medicine/regen_jelly = 2) required_reagents = list(/datum/reagent/medicine/omnizine = 1, /datum/reagent/toxin/slimejelly = 1) /datum/chemical_reaction/higadrite - name = "Higadrite" - id = /datum/reagent/medicine/higadrite results = list(/datum/reagent/medicine/higadrite = 3) required_reagents = list(/datum/reagent/phenol = 2, /datum/reagent/lithium = 1) /datum/chemical_reaction/morphine - name = "Morphine" - id = /datum/reagent/medicine/morphine results = list(/datum/reagent/medicine/morphine = 2) required_reagents = list(/datum/reagent/carbon = 2, /datum/reagent/hydrogen = 2, /datum/reagent/consumable/ethanol = 1, /datum/reagent/oxygen = 1) required_temp = 480 /datum/chemical_reaction/modafinil - name = "Modafinil" - id = /datum/reagent/medicine/modafinil results = list(/datum/reagent/medicine/modafinil = 5) required_reagents = list(/datum/reagent/diethylamine = 1, /datum/reagent/ammonia = 1, /datum/reagent/phenol = 1, /datum/reagent/acetone = 1, /datum/reagent/toxin/acid = 1) required_catalysts = list(/datum/reagent/bromine = 1) // as close to the real world synthesis as possible /datum/chemical_reaction/psicodine - name = "Psicodine" - id = /datum/reagent/medicine/psicodine results = list(/datum/reagent/medicine/psicodine = 5) required_reagents = list( /datum/reagent/medicine/mannitol = 2, /datum/reagent/water = 2, /datum/reagent/impedrezene = 1) /datum/chemical_reaction/rhigoxane - name = "Rhigoxane" - id = /datum/reagent/medicine/rhigoxane results = list(/datum/reagent/medicine/rhigoxane/ = 5) required_reagents = list(/datum/reagent/cryostylane = 3, /datum/reagent/bromine = 1, /datum/reagent/lye = 1) required_temp = 47 is_cold_recipe = TRUE /datum/chemical_reaction/trophazole - name = "Trophazole" - id = /datum/reagent/medicine/trophazole results = list(/datum/reagent/medicine/trophazole = 4) required_reagents = list(/datum/reagent/copper = 1, /datum/reagent/acetone = 2, /datum/reagent/phosphorus = 1) /datum/chemical_reaction/granibitaluri - name = "Granibitaluri" - id = /datum/reagent/medicine/granibitaluri results = list(/datum/reagent/medicine/granibitaluri = 3) required_reagents = list(/datum/reagent/acetone = 1, /datum/reagent/phenol = 1, /datum/reagent/nitrogen = 1) required_catalysts = list(/datum/reagent/iron = 5) /datum/chemical_reaction/medsuture - name = "Medicated Suture" - id = "med_suture" required_reagents = list(/datum/reagent/cellulose = 10, /datum/reagent/toxin/formaldehyde = 30, /datum/reagent/medicine/polypyr = 30) //This might be a bit much, reagent cost should be reviewed after implementation. /datum/chemical_reaction/medsuture/on_reaction(datum/reagents/holder, created_volume) diff --git a/code/modules/reagents/chemistry/recipes/others.dm b/code/modules/reagents/chemistry/recipes/others.dm index 63d0b216e0d..cb800c6a62f 100644 --- a/code/modules/reagents/chemistry/recipes/others.dm +++ b/code/modules/reagents/chemistry/recipes/others.dm @@ -1,55 +1,37 @@ /datum/chemical_reaction/sterilizine - name = "Sterilizine" - id = /datum/reagent/space_cleaner/sterilizine results = list(/datum/reagent/space_cleaner/sterilizine = 3) required_reagents = list(/datum/reagent/consumable/ethanol = 1, /datum/reagent/medicine/C2/multiver = 1, /datum/reagent/chlorine = 1) /datum/chemical_reaction/lube - name = "Space Lube" - id = /datum/reagent/lube results = list(/datum/reagent/lube = 4) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/silicon = 1, /datum/reagent/oxygen = 1) /datum/chemical_reaction/spraytan - name = "Spray Tan" - id = /datum/reagent/spraytan results = list(/datum/reagent/spraytan = 2) required_reagents = list(/datum/reagent/consumable/orangejuice = 1, /datum/reagent/fuel/oil = 1) /datum/chemical_reaction/spraytan2 - name = "Spray Tan" - id = /datum/reagent/spraytan results = list(/datum/reagent/spraytan = 2) required_reagents = list(/datum/reagent/consumable/orangejuice = 1, /datum/reagent/consumable/cornoil = 1) /datum/chemical_reaction/impedrezene - name = "Impedrezene" - id = /datum/reagent/impedrezene results = list(/datum/reagent/impedrezene = 2) required_reagents = list(/datum/reagent/mercury = 1, /datum/reagent/oxygen = 1, /datum/reagent/consumable/sugar = 1) /datum/chemical_reaction/cryptobiolin - name = "Cryptobiolin" - id = /datum/reagent/cryptobiolin results = list(/datum/reagent/cryptobiolin = 3) required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/oxygen = 1, /datum/reagent/consumable/sugar = 1) /datum/chemical_reaction/glycerol - name = "Glycerol" - id = /datum/reagent/glycerol results = list(/datum/reagent/glycerol = 1) required_reagents = list(/datum/reagent/consumable/cornoil = 3, /datum/reagent/toxin/acid = 1) /datum/chemical_reaction/sodiumchloride - name = "Sodium Chloride" - id = /datum/reagent/consumable/sodiumchloride results = list(/datum/reagent/consumable/sodiumchloride = 3) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/sodium = 1, /datum/reagent/chlorine = 1) /datum/chemical_reaction/plasmasolidification - name = "Solid Plasma" - id = "solidplasma" required_reagents = list(/datum/reagent/iron = 5, /datum/reagent/consumable/frostoil = 5, /datum/reagent/toxin/plasma = 20) mob_react = FALSE @@ -59,8 +41,6 @@ new /obj/item/stack/sheet/mineral/plasma(location) /datum/chemical_reaction/goldsolidification - name = "Solid Gold" - id = "solidgold" required_reagents = list(/datum/reagent/consumable/frostoil = 5, /datum/reagent/gold = 20, /datum/reagent/iron = 1) mob_react = FALSE @@ -70,14 +50,10 @@ new /obj/item/stack/sheet/mineral/gold(location) /datum/chemical_reaction/capsaicincondensation - name = "Capsaicincondensation" - id = "capsaicincondensation" results = list(/datum/reagent/consumable/condensedcapsaicin = 5) required_reagents = list(/datum/reagent/consumable/capsaicin = 1, /datum/reagent/consumable/ethanol = 5) /datum/chemical_reaction/soapification - name = "Soapification" - id = "soapification" required_reagents = list(/datum/reagent/liquidgibs = 10, /datum/reagent/lye = 10) // requires two scooped gib tiles required_temp = 374 mob_react = FALSE @@ -88,8 +64,6 @@ new /obj/item/soap/homemade(location) /datum/chemical_reaction/omegasoapification - name = "Omega Soap" - id = "omegasoap" required_reagents = list(/datum/reagent/consumable/potato_juice = 10, /datum/reagent/consumable/ethanol/lizardwine = 10, /datum/reagent/monkey_powder = 10, /datum/reagent/drug/krokodil = 10, /datum/reagent/toxin/acid/nitracid = 10, /datum/reagent/baldium = 10, /datum/reagent/consumable/ethanol/hooch = 10, /datum/reagent/bluespace = 10, /datum/reagent/drug/pumpup = 10, /datum/reagent/consumable/space_cola = 10) required_temp = 999 mob_react = FALSE @@ -100,8 +74,6 @@ new /obj/item/soap/omega(location) /datum/chemical_reaction/candlefication - name = "Candlefication" - id = "candlefication" required_reagents = list(/datum/reagent/liquidgibs = 5, /datum/reagent/oxygen = 5) // required_temp = 374 mob_react = FALSE @@ -112,8 +84,6 @@ new /obj/item/candle(location) /datum/chemical_reaction/meatification - name = "Meatification" - id = "meatification" required_reagents = list(/datum/reagent/liquidgibs = 10, /datum/reagent/consumable/nutriment = 10, /datum/reagent/carbon = 10) mob_react = FALSE @@ -124,23 +94,17 @@ return /datum/chemical_reaction/carbondioxide - name = "Direct Carbon Oxidation" - id = "burningcarbon" results = list(/datum/reagent/carbondioxide = 3) required_reagents = list(/datum/reagent/carbon = 1, /datum/reagent/oxygen = 2) required_temp = 777 // pure carbon isn't especially reactive. /datum/chemical_reaction/nitrous_oxide - name = "Nitrous Oxide" - id = /datum/reagent/nitrous_oxide results = list(/datum/reagent/nitrous_oxide = 5) required_reagents = list(/datum/reagent/ammonia = 2, /datum/reagent/nitrogen = 1, /datum/reagent/oxygen = 2) required_temp = 525 //Technically a mutation toxin /datum/chemical_reaction/mulligan - name = "Mulligan" - id = /datum/reagent/mulligan results = list(/datum/reagent/mulligan = 1) required_reagents = list(/datum/reagent/mutationtoxin/jelly = 1, /datum/reagent/toxin/mutagen = 1) @@ -148,74 +112,50 @@ ////////////////////////////////// VIROLOGY ////////////////////////////////////////// /datum/chemical_reaction/virus_food - name = "Virus Food" - id = /datum/reagent/consumable/virus_food results = list(/datum/reagent/consumable/virus_food = 15) required_reagents = list(/datum/reagent/water = 5, /datum/reagent/consumable/milk = 5) /datum/chemical_reaction/virus_food_mutagen - name = "mutagenic agar" - id = /datum/reagent/toxin/mutagen/mutagenvirusfood results = list(/datum/reagent/toxin/mutagen/mutagenvirusfood = 1) required_reagents = list(/datum/reagent/toxin/mutagen = 1, /datum/reagent/consumable/virus_food = 1) /datum/chemical_reaction/virus_food_synaptizine - name = "virus rations" - id = /datum/reagent/medicine/synaptizine/synaptizinevirusfood results = list(/datum/reagent/medicine/synaptizine/synaptizinevirusfood = 1) required_reagents = list(/datum/reagent/medicine/synaptizine = 1, /datum/reagent/consumable/virus_food = 1) /datum/chemical_reaction/virus_food_plasma - name = "virus plasma" - id = /datum/reagent/toxin/plasma/plasmavirusfood results = list(/datum/reagent/toxin/plasma/plasmavirusfood = 1) required_reagents = list(/datum/reagent/toxin/plasma = 1, /datum/reagent/consumable/virus_food = 1) /datum/chemical_reaction/virus_food_plasma_synaptizine - name = "weakened virus plasma" - id = /datum/reagent/toxin/plasma/plasmavirusfood/weak results = list(/datum/reagent/toxin/plasma/plasmavirusfood/weak = 2) required_reagents = list(/datum/reagent/medicine/synaptizine = 1, /datum/reagent/toxin/plasma/plasmavirusfood = 1) /datum/chemical_reaction/virus_food_mutagen_sugar - name = "sucrose agar" - id = /datum/reagent/toxin/mutagen/mutagenvirusfood/sugar results = list(/datum/reagent/toxin/mutagen/mutagenvirusfood/sugar = 2) required_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/toxin/mutagen/mutagenvirusfood = 1) /datum/chemical_reaction/virus_food_mutagen_salineglucose - name = "sucrose agar" - id = "salineglucosevirusfood" results = list(/datum/reagent/toxin/mutagen/mutagenvirusfood/sugar = 2) required_reagents = list(/datum/reagent/medicine/salglu_solution = 1, /datum/reagent/toxin/mutagen/mutagenvirusfood = 1) /datum/chemical_reaction/virus_food_uranium - name = "Decaying uranium gel" - id = /datum/reagent/uranium/uraniumvirusfood results = list(/datum/reagent/uranium/uraniumvirusfood = 1) required_reagents = list(/datum/reagent/uranium = 1, /datum/reagent/consumable/virus_food = 1) /datum/chemical_reaction/virus_food_uranium_plasma - name = "Unstable uranium gel" - id = "uraniumvirusfood_plasma" results = list(/datum/reagent/uranium/uraniumvirusfood/unstable = 1) required_reagents = list(/datum/reagent/uranium = 5, /datum/reagent/toxin/plasma/plasmavirusfood = 1) /datum/chemical_reaction/virus_food_uranium_plasma_gold - name = "Stable uranium gel" - id = "uraniumvirusfood_gold" results = list(/datum/reagent/uranium/uraniumvirusfood/stable = 1) required_reagents = list(/datum/reagent/uranium = 10, /datum/reagent/gold = 10, /datum/reagent/toxin/plasma = 1) /datum/chemical_reaction/virus_food_uranium_plasma_silver - name = "Stable uranium gel" - id = "uraniumvirusfood_silver" results = list(/datum/reagent/uranium/uraniumvirusfood/stable = 1) required_reagents = list(/datum/reagent/uranium = 10, /datum/reagent/silver = 10, /datum/reagent/toxin/plasma = 1) /datum/chemical_reaction/mix_virus - name = "Mix Virus" - id = "mixvirus" results = list(/datum/reagent/blood = 1) required_reagents = list(/datum/reagent/consumable/virus_food = 1) required_catalysts = list(/datum/reagent/blood = 1) @@ -223,7 +163,6 @@ var/level_max = 2 /datum/chemical_reaction/mix_virus/on_reaction(datum/reagents/holder, created_volume) - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list if(B && B.data) var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] @@ -232,102 +171,65 @@ /datum/chemical_reaction/mix_virus/mix_virus_2 - - name = "Mix Virus 2" - id = "mixvirus2" required_reagents = list(/datum/reagent/toxin/mutagen = 1) level_min = 2 level_max = 4 /datum/chemical_reaction/mix_virus/mix_virus_3 - - name = "Mix Virus 3" - id = "mixvirus3" required_reagents = list(/datum/reagent/toxin/plasma = 1) level_min = 4 level_max = 6 /datum/chemical_reaction/mix_virus/mix_virus_4 - - name = "Mix Virus 4" - id = "mixvirus4" required_reagents = list(/datum/reagent/uranium = 1) level_min = 5 level_max = 6 /datum/chemical_reaction/mix_virus/mix_virus_5 - - name = "Mix Virus 5" - id = "mixvirus5" required_reagents = list(/datum/reagent/toxin/mutagen/mutagenvirusfood = 1) level_min = 3 level_max = 3 /datum/chemical_reaction/mix_virus/mix_virus_6 - - name = "Mix Virus 6" - id = "mixvirus6" required_reagents = list(/datum/reagent/toxin/mutagen/mutagenvirusfood/sugar = 1) level_min = 4 level_max = 4 /datum/chemical_reaction/mix_virus/mix_virus_7 - - name = "Mix Virus 7" - id = "mixvirus7" required_reagents = list(/datum/reagent/toxin/plasma/plasmavirusfood/weak = 1) level_min = 5 level_max = 5 /datum/chemical_reaction/mix_virus/mix_virus_8 - - name = "Mix Virus 8" - id = "mixvirus8" required_reagents = list(/datum/reagent/toxin/plasma/plasmavirusfood = 1) level_min = 6 level_max = 6 /datum/chemical_reaction/mix_virus/mix_virus_9 - - name = "Mix Virus 9" - id = "mixvirus9" required_reagents = list(/datum/reagent/medicine/synaptizine/synaptizinevirusfood = 1) level_min = 1 level_max = 1 /datum/chemical_reaction/mix_virus/mix_virus_10 - - name = "Mix Virus 10" - id = "mixvirus10" required_reagents = list(/datum/reagent/uranium/uraniumvirusfood = 1) level_min = 6 level_max = 7 /datum/chemical_reaction/mix_virus/mix_virus_11 - - name = "Mix Virus 11" - id = "mixvirus11" required_reagents = list(/datum/reagent/uranium/uraniumvirusfood/unstable = 1) level_min = 7 level_max = 7 /datum/chemical_reaction/mix_virus/mix_virus_12 - - name = "Mix Virus 12" - id = "mixvirus12" required_reagents = list(/datum/reagent/uranium/uraniumvirusfood/stable = 1) level_min = 8 level_max = 8 /datum/chemical_reaction/mix_virus/rem_virus - - name = "Devolve Virus" - id = "remvirus" required_reagents = list(/datum/reagent/medicine/synaptizine = 1) required_catalysts = list(/datum/reagent/blood = 1) /datum/chemical_reaction/mix_virus/rem_virus/on_reaction(datum/reagents/holder, created_volume) - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list if(B && B.data) var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] @@ -335,13 +237,10 @@ D.Devolve() /datum/chemical_reaction/mix_virus/neuter_virus - name = "Neuter Virus" - id = "neutervirus" required_reagents = list(/datum/reagent/toxin/formaldehyde = 1) required_catalysts = list(/datum/reagent/blood = 1) /datum/chemical_reaction/mix_virus/neuter_virus/on_reaction(datum/reagents/holder, created_volume) - var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list if(B && B.data) var/datum/disease/advance/D = locate(/datum/disease/advance) in B.data["viruses"] @@ -354,14 +253,10 @@ /datum/chemical_reaction/surfactant - name = "Foam surfactant" - id = "foam surfactant" results = list(/datum/reagent/fluorosurfactant = 5) required_reagents = list(/datum/reagent/fluorine = 2, /datum/reagent/carbon = 2, /datum/reagent/toxin/acid = 1) /datum/chemical_reaction/foam - name = "Foam" - id = "foam" required_reagents = list(/datum/reagent/fluorosurfactant = 1, /datum/reagent/water = 1) mob_react = FALSE @@ -369,8 +264,6 @@ holder.create_foam(/datum/effect_system/foam_spread,2*created_volume,notification="The solution spews out foam!") /datum/chemical_reaction/metalfoam - name = "Metal Foam" - id = "metalfoam" required_reagents = list(/datum/reagent/aluminium = 3, /datum/reagent/foaming_agent = 1, /datum/reagent/toxin/acid/fluacid = 1) mob_react = FALSE @@ -378,8 +271,6 @@ holder.create_foam(/datum/effect_system/foam_spread/metal,5*created_volume,1,"The solution spews out a metallic foam!") /datum/chemical_reaction/smart_foam - name = "Smart Metal Foam" - id = "smart_metal_foam" required_reagents = list(/datum/reagent/aluminium = 3, /datum/reagent/smart_foaming_agent = 1, /datum/reagent/toxin/acid/fluacid = 1) mob_react = TRUE @@ -387,8 +278,6 @@ holder.create_foam(/datum/effect_system/foam_spread/metal/smart,5*created_volume,1,"The solution spews out metallic foam!") /datum/chemical_reaction/ironfoam - name = "Iron Foam" - id = "ironlfoam" required_reagents = list(/datum/reagent/iron = 3, /datum/reagent/foaming_agent = 1, /datum/reagent/toxin/acid/fluacid = 1) mob_react = FALSE @@ -396,14 +285,10 @@ holder.create_foam(/datum/effect_system/foam_spread/metal,5*created_volume,2,"The solution spews out a metallic foam!") /datum/chemical_reaction/foaming_agent - name = "Foaming Agent" - id = /datum/reagent/foaming_agent results = list(/datum/reagent/foaming_agent = 1) required_reagents = list(/datum/reagent/lithium = 1, /datum/reagent/hydrogen = 1) /datum/chemical_reaction/smart_foaming_agent - name = "Smart foaming Agent" - id = /datum/reagent/smart_foaming_agent results = list(/datum/reagent/smart_foaming_agent = 3) required_reagents = list(/datum/reagent/foaming_agent = 3, /datum/reagent/acetone = 1, /datum/reagent/iron = 1) mix_message = "The solution mixes into a frothy metal foam and conforms to the walls of its container." @@ -412,147 +297,101 @@ /////////////////////////////// Cleaning and hydroponics ///////////////////////////////////////////////// /datum/chemical_reaction/ammonia - name = "Ammonia" - id = /datum/reagent/ammonia results = list(/datum/reagent/ammonia = 3) required_reagents = list(/datum/reagent/hydrogen = 3, /datum/reagent/nitrogen = 1) /datum/chemical_reaction/diethylamine - name = "Diethylamine" - id = /datum/reagent/diethylamine results = list(/datum/reagent/diethylamine = 2) required_reagents = list (/datum/reagent/ammonia = 1, /datum/reagent/consumable/ethanol = 1) /datum/chemical_reaction/space_cleaner - name = "Space cleaner" - id = /datum/reagent/space_cleaner results = list(/datum/reagent/space_cleaner = 2) required_reagents = list(/datum/reagent/ammonia = 1, /datum/reagent/water = 1) /datum/chemical_reaction/plantbgone - name = "Plant-B-Gone" - id = /datum/reagent/toxin/plantbgone results = list(/datum/reagent/toxin/plantbgone = 5) required_reagents = list(/datum/reagent/toxin = 1, /datum/reagent/water = 4) /datum/chemical_reaction/weedkiller - name = "Weed Killer" - id = /datum/reagent/toxin/plantbgone/weedkiller results = list(/datum/reagent/toxin/plantbgone/weedkiller = 5) required_reagents = list(/datum/reagent/toxin = 1, /datum/reagent/ammonia = 4) /datum/chemical_reaction/pestkiller - name = "Pest Killer" - id = /datum/reagent/toxin/pestkiller results = list(/datum/reagent/toxin/pestkiller = 5) required_reagents = list(/datum/reagent/toxin = 1, /datum/reagent/consumable/ethanol = 4) /datum/chemical_reaction/drying_agent - name = "Drying agent" - id = /datum/reagent/drying_agent results = list(/datum/reagent/drying_agent = 3) required_reagents = list(/datum/reagent/stable_plasma = 2, /datum/reagent/consumable/ethanol = 1, /datum/reagent/sodium = 1) //////////////////////////////////// Other goon stuff /////////////////////////////////////////// /datum/chemical_reaction/acetone - name = /datum/reagent/acetone - id = /datum/reagent/acetone results = list(/datum/reagent/acetone = 3) required_reagents = list(/datum/reagent/fuel/oil = 1, /datum/reagent/fuel = 1, /datum/reagent/oxygen = 1) /datum/chemical_reaction/carpet - name = /datum/reagent/carpet - id = /datum/reagent/carpet results = list(/datum/reagent/carpet = 2) required_reagents = list(/datum/reagent/drug/space_drugs = 1, /datum/reagent/blood = 1) /datum/chemical_reaction/carpet/black - name = /datum/reagent/carpet/black - id = /datum/reagent/carpet/black results = list(/datum/reagent/carpet/black = 2) required_reagents = list(/datum/reagent/carpet = 1, /datum/reagent/fuel/oil = 1) /datum/chemical_reaction/carpet/blue - name = /datum/reagent/carpet/blue - id = /datum/reagent/carpet/blue results = list(/datum/reagent/carpet/blue = 2) required_reagents = list(/datum/reagent/carpet = 1, /datum/reagent/cryostylane = 1) /datum/chemical_reaction/carpet/cyan - name = /datum/reagent/carpet/cyan - id = /datum/reagent/carpet/cyan results = list(/datum/reagent/carpet/cyan = 2) required_reagents = list(/datum/reagent/carpet = 1, /datum/reagent/toxin/cyanide = 1) //cyan = cyanide get it huehueuhuehuehheuhe /datum/chemical_reaction/carpet/green - name = /datum/reagent/carpet/green - id = /datum/reagent/carpet/green results = list(/datum/reagent/carpet/green = 2) required_reagents = list(/datum/reagent/carpet = 1, /datum/reagent/consumable/ethanol/beer/green = 1) //make green beer by grinding up green crayons and mixing with beer /datum/chemical_reaction/carpet/orange - name = /datum/reagent/carpet/orange - id = /datum/reagent/carpet/orange results = list(/datum/reagent/carpet/orange = 2) required_reagents = list(/datum/reagent/carpet = 1, /datum/reagent/consumable/orangejuice = 1) /datum/chemical_reaction/carpet/purple - name = /datum/reagent/carpet/purple - id = /datum/reagent/carpet/purple results = list(/datum/reagent/carpet/purple = 2) required_reagents = list(/datum/reagent/carpet = 1, /datum/reagent/medicine/regen_jelly = 1) //slimes only party /datum/chemical_reaction/carpet/red - name = /datum/reagent/carpet/red - id = /datum/reagent/carpet/red results = list(/datum/reagent/carpet/red = 2) required_reagents = list(/datum/reagent/carpet/ = 1, /datum/reagent/liquidgibs = 1) /datum/chemical_reaction/carpet/royalblack - name = /datum/reagent/carpet/royal/black - id = /datum/reagent/carpet/royal/black results = list(/datum/reagent/carpet/royal/black = 2) required_reagents = list(/datum/reagent/carpet/black = 1, /datum/reagent/royal_bee_jelly = 1) /datum/chemical_reaction/carpet/royalblue - name = /datum/reagent/carpet/royal/blue - id = /datum/reagent/carpet/royal/blue results = list(/datum/reagent/carpet/royal/blue = 2) required_reagents = list(/datum/reagent/carpet/blue = 1, /datum/reagent/royal_bee_jelly = 1) /datum/chemical_reaction/oil - name = "Oil" - id = /datum/reagent/fuel/oil results = list(/datum/reagent/fuel/oil = 3) required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/carbon = 1, /datum/reagent/hydrogen = 1) /datum/chemical_reaction/phenol - name = /datum/reagent/phenol - id = /datum/reagent/phenol results = list(/datum/reagent/phenol = 3) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/chlorine = 1, /datum/reagent/fuel/oil = 1) /datum/chemical_reaction/ash - name = "Ash" - id = /datum/reagent/ash results = list(/datum/reagent/ash = 1) required_reagents = list(/datum/reagent/fuel/oil = 1) required_temp = 480 /datum/chemical_reaction/colorful_reagent - name = /datum/reagent/colorful_reagent - id = /datum/reagent/colorful_reagent results = list(/datum/reagent/colorful_reagent = 5) required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/uranium/radium = 1, /datum/reagent/drug/space_drugs = 1, /datum/reagent/medicine/cryoxadone = 1, /datum/reagent/consumable/triple_citrus = 1) /datum/chemical_reaction/life - name = "Life" - id = "life" required_reagents = list(/datum/reagent/medicine/strange_reagent = 1, /datum/reagent/medicine/C2/instabitaluri = 1, /datum/reagent/blood = 1) required_temp = 374 @@ -560,8 +399,6 @@ chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life (hostile)") //defaults to HOSTILE_SPAWN /datum/chemical_reaction/life_friendly - name = "Life (Friendly)" - id = "life_friendly" required_reagents = list(/datum/reagent/medicine/strange_reagent = 1, /datum/reagent/medicine/C2/instabitaluri = 1, /datum/reagent/consumable/sugar = 1) required_temp = 374 @@ -569,8 +406,6 @@ chemical_mob_spawn(holder, rand(1, round(created_volume, 1)), "Life (friendly)", FRIENDLY_SPAWN) /datum/chemical_reaction/corgium - name = "corgium" - id = "corgium" required_reagents = list(/datum/reagent/consumable/nutriment = 1, /datum/reagent/colorful_reagent = 1, /datum/reagent/medicine/strange_reagent = 1, /datum/reagent/blood = 1) required_temp = 374 @@ -582,14 +417,10 @@ //monkey powder heehoo /datum/chemical_reaction/monkey_powder - name = /datum/reagent/monkey_powder - id = /datum/reagent/monkey_powder results = list(/datum/reagent/monkey_powder = 3) required_reagents = list(/datum/reagent/consumable/banana = 1, /datum/reagent/consumable/nutriment=2,/datum/reagent/liquidgibs = 1) /datum/chemical_reaction/monkey - name = "monkey" - id = "monkey" required_reagents = list(/datum/reagent/monkey_powder = 30, /datum/reagent/water = 1) /datum/chemical_reaction/monkey/on_reaction(datum/reagents/holder, created_volume) @@ -597,16 +428,13 @@ new /mob/living/carbon/monkey(location) //water electrolysis /datum/chemical_reaction/electrolysis - name = "electrolysis" - id = "electrolysis" results = list(/datum/reagent/oxygen = 10, /datum/reagent/hydrogen = 20) required_reagents = list(/datum/reagent/consumable/liquidelectricity = 1, /datum/reagent/water = 5) //butterflium /datum/chemical_reaction/butterflium - name = "butterflium" - id = "butterflium" required_reagents = list(/datum/reagent/colorful_reagent = 1, /datum/reagent/medicine/omnizine = 1, /datum/reagent/medicine/strange_reagent = 1, /datum/reagent/consumable/nutriment = 1) + /datum/chemical_reaction/butterflium/on_reaction(datum/reagents/holder, created_volume) var/location = get_turf(holder.my_atom) for(var/i = rand(1, created_volume), i <= created_volume, i++) @@ -614,8 +442,6 @@ ..() //scream powder /datum/chemical_reaction/scream - name = "scream" - id = "scream" required_reagents = list(/datum/reagent/medicine/strange_reagent = 1, /datum/reagent/consumable/cream = 5, /datum/reagent/consumable/ethanol/lizardwine = 5 ) required_temp = 374 @@ -623,63 +449,43 @@ playsound(holder.my_atom, pick(list( 'sound/voice/human/malescream_1.ogg', 'sound/voice/human/malescream_2.ogg', 'sound/voice/human/malescream_3.ogg', 'sound/voice/human/malescream_4.ogg', 'sound/voice/human/malescream_5.ogg', 'sound/voice/human/malescream_6.ogg', 'sound/voice/human/femalescream_1.ogg', 'sound/voice/human/femalescream_2.ogg', 'sound/voice/human/femalescream_3.ogg', 'sound/voice/human/femalescream_4.ogg', 'sound/voice/human/femalescream_5.ogg', 'sound/voice/human/wilhelm_scream.ogg')), created_volume*5,TRUE) /datum/chemical_reaction/hair_dye - name = /datum/reagent/hair_dye - id = /datum/reagent/hair_dye results = list(/datum/reagent/hair_dye = 5) required_reagents = list(/datum/reagent/colorful_reagent = 1, /datum/reagent/uranium/radium = 1, /datum/reagent/drug/space_drugs = 1) /datum/chemical_reaction/barbers_aid - name = /datum/reagent/barbers_aid - id = /datum/reagent/barbers_aid results = list(/datum/reagent/barbers_aid = 5) required_reagents = list(/datum/reagent/carpet = 1, /datum/reagent/uranium/radium = 1, /datum/reagent/drug/space_drugs = 1) /datum/chemical_reaction/concentrated_barbers_aid - name = /datum/reagent/concentrated_barbers_aid - id = /datum/reagent/concentrated_barbers_aid results = list(/datum/reagent/concentrated_barbers_aid = 2) required_reagents = list(/datum/reagent/barbers_aid = 1, /datum/reagent/toxin/mutagen = 1) /datum/chemical_reaction/baldium - name = /datum/reagent/baldium - id = /datum/reagent/baldium results = list(/datum/reagent/baldium = 1) required_reagents = list(/datum/reagent/uranium/radium = 1, /datum/reagent/toxin/acid = 1, /datum/reagent/lye = 1) required_temp = 395 /datum/chemical_reaction/saltpetre - name = /datum/reagent/saltpetre - id = /datum/reagent/saltpetre results = list(/datum/reagent/saltpetre = 3) required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/nitrogen = 1, /datum/reagent/oxygen = 3) /datum/chemical_reaction/lye - name = /datum/reagent/lye - id = /datum/reagent/lye results = list(/datum/reagent/lye = 3) required_reagents = list(/datum/reagent/sodium = 1, /datum/reagent/hydrogen = 1, /datum/reagent/oxygen = 1) /datum/chemical_reaction/lye2 - name = /datum/reagent/lye - id = /datum/reagent/lye results = list(/datum/reagent/lye = 2) required_reagents = list(/datum/reagent/ash = 1, /datum/reagent/water = 1, /datum/reagent/carbon = 1) /datum/chemical_reaction/royal_bee_jelly - name = "royal bee jelly" - id = /datum/reagent/royal_bee_jelly results = list(/datum/reagent/royal_bee_jelly = 5) required_reagents = list(/datum/reagent/toxin/mutagen = 10, /datum/reagent/consumable/honey = 40) /datum/chemical_reaction/laughter - name = /datum/reagent/consumable/laughter - id = /datum/reagent/consumable/laughter results = list(/datum/reagent/consumable/laughter = 10) // Fuck it. I'm not touching this one. required_reagents = list(/datum/reagent/consumable/sugar = 1, /datum/reagent/consumable/banana = 1) /datum/chemical_reaction/plastic_polymers - name = "plastic polymers" - id = /datum/reagent/plastic_polymers required_reagents = list(/datum/reagent/fuel/oil = 5, /datum/reagent/toxin/acid = 2, /datum/reagent/ash = 3) required_temp = 374 //lazily consistent with soap & other crafted objects generically created with heat. @@ -689,30 +495,22 @@ new /obj/item/stack/sheet/plastic(location) /datum/chemical_reaction/pax - name = /datum/reagent/pax - id = /datum/reagent/pax results = list(/datum/reagent/pax = 3) required_reagents = list(/datum/reagent/toxin/mindbreaker = 1, /datum/reagent/medicine/synaptizine = 1, /datum/reagent/water = 1) /datum/chemical_reaction/yuck - name = "Organic Fluid" - id = /datum/reagent/yuck results = list(/datum/reagent/yuck = 4) required_reagents = list(/datum/reagent/fuel = 3) required_container = /obj/item/reagent_containers/food/snacks/deadmouse /datum/chemical_reaction/slimejelly - name = "artificial slime jelly" - id = /datum/reagent/toxin/slimejelly results = list(/datum/reagent/toxin/slimejelly = 5) required_reagents = list(/datum/reagent/fuel/oil = 3, /datum/reagent/uranium/radium = 2, /datum/reagent/consumable/tinlux =1) required_container = /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom mix_message = "The mushroom's insides bubble and pop and it becomes very limp." /datum/chemical_reaction/slime_extractification - name = "slime extractification" - id = "slime extractification" required_reagents = list(/datum/reagent/toxin/slimejelly = 30, /datum/reagent/consumable/frostoil = 5, /datum/reagent/toxin/plasma = 5) mix_message = "The mixture condenses into a ball." @@ -721,14 +519,10 @@ new /obj/item/slime_extract/grey(location) /datum/chemical_reaction/metalgen - name = "metalgen" - id = /datum/reagent/metalgen required_reagents = list(/datum/reagent/wittel = 1, /datum/reagent/bluespace = 1, /datum/reagent/toxin/mutagen = 1) results = list(/datum/reagent/metalgen = 1) /datum/chemical_reaction/metalgen_imprint - name = "metalgen imprint" - id = /datum/reagent/metalgen required_reagents = list(/datum/reagent/metalgen = 1, /datum/reagent/liquid_dark_matter = 1) results = list(/datum/reagent/metalgen = 1) @@ -740,46 +534,32 @@ holder.remove_reagent(R.type, 40) /datum/chemical_reaction/gravitum - name = "gravitum" - id = /datum/reagent/gravitum required_reagents = list(/datum/reagent/wittel = 1, /datum/reagent/sorium = 10) results = list(/datum/reagent/gravitum = 10) /datum/chemical_reaction/cellulose_carbonization - name = "Cellulose_Carbonization" - id = /datum/reagent/carbon results = list(/datum/reagent/carbon = 1) required_reagents = list(/datum/reagent/cellulose = 1) required_temp = 512 /datum/chemical_reaction/hydrogen_peroxide - name = "Hydrogen peroxide" - id = /datum/reagent/hydrogen_peroxide results = list(/datum/reagent/hydrogen_peroxide = 3) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/oxygen = 1, /datum/reagent/chlorine = 1) /datum/chemical_reaction/acetone_oxide - name = "Acetone peroxide" - id = /datum/reagent/acetone_oxide results = list(/datum/reagent/acetone_oxide = 2) required_reagents = list(/datum/reagent/acetone = 2, /datum/reagent/oxygen = 1, /datum/reagent/hydrogen_peroxide = 1) /datum/chemical_reaction/pentaerythritol - name = "Pentaerythritol" - id = /datum/reagent/pentaerythritol results = list(/datum/reagent/pentaerythritol = 2) required_reagents = list(/datum/reagent/acetaldehyde = 1, /datum/reagent/toxin/formaldehyde = 3, /datum/reagent/water = 1 ) /datum/chemical_reaction/acetaldehyde - name = "Acetaldehyde" - id = /datum/reagent/acetaldehyde results = list(/datum/reagent/acetaldehyde = 3) required_reagents = list(/datum/reagent/acetone = 1, /datum/reagent/toxin/formaldehyde = 1, /datum/reagent/water = 1) required_temp = 450 /datum/chemical_reaction/holywater - name = "Holy Water" - id = /datum/reagent/water/holywater results = list(/datum/reagent/water/holywater = 1) required_reagents = list(/datum/reagent/water/hollowwater = 1) required_catalysts = list(/datum/reagent/water/holywater = 1) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index 121ab55ee48..49815c5e8d8 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -1,6 +1,4 @@ /datum/chemical_reaction/reagent_explosion - name = "Generic explosive" - id = "reagent_explosion" var/strengthdiv = 10 var/modifier = 0 @@ -27,8 +25,6 @@ /datum/chemical_reaction/reagent_explosion/nitroglycerin - name = "Nitroglycerin" - id = /datum/reagent/nitroglycerin results = list(/datum/reagent/nitroglycerin = 2) required_reagents = list(/datum/reagent/glycerol = 1, /datum/reagent/toxin/acid/nitracid = 1, /datum/reagent/toxin/acid = 1) strengthdiv = 2 @@ -40,15 +36,11 @@ ..() /datum/chemical_reaction/reagent_explosion/nitroglycerin_explosion - name = "Nitroglycerin explosion" - id = "nitroglycerin_explosion" required_reagents = list(/datum/reagent/nitroglycerin = 1) required_temp = 474 strengthdiv = 2 /datum/chemical_reaction/reagent_explosion/rdx - name = "RDX" - id = /datum/reagent/rdx results = list(/datum/reagent/rdx= 2) required_reagents = list(/datum/reagent/phenol = 2, /datum/reagent/toxin/acid/nitracid = 1, /datum/reagent/acetone_oxide = 1 ) required_temp = 404 @@ -61,15 +53,11 @@ ..() /datum/chemical_reaction/reagent_explosion/rdx_explosion - name = "Heat RDX explosion" - id = "rdx_explosion" required_reagents = list(/datum/reagent/rdx = 1) required_temp = 474 strengthdiv = 8 /datum/chemical_reaction/reagent_explosion/rdx_explosion2 //makes rdx unique , on its own it is a good bomb, but when combined with liquid electricity it becomes truly destructive - name = "Electric RDX explosion" - id = "rdx_explosion2" required_reagents = list(/datum/reagent/rdx = 1 , /datum/reagent/consumable/liquidelectricity = 1) strengthdiv = 4 modifier = 2 @@ -83,8 +71,6 @@ ..() /datum/chemical_reaction/reagent_explosion/rdx_explosion3 - name = "Teslium RDX explosion" - id = "rdx_explosion3" required_reagents = list(/datum/reagent/rdx = 1 , /datum/reagent/teslium = 1) modifier = 4 strengthdiv = 4 @@ -98,8 +84,6 @@ ..() /datum/chemical_reaction/reagent_explosion/tatp - name = "TaTP" - id = /datum/reagent/tatp results = list(/datum/reagent/tatp= 1) required_reagents = list(/datum/reagent/acetone_oxide = 1, /datum/reagent/toxin/acid/nitracid = 1, /datum/reagent/pentaerythritol = 1 ) required_temp = 450 @@ -119,8 +103,6 @@ ..() /datum/chemical_reaction/reagent_explosion/tatp_explosion - name = "TaTP explosion" - id = "tatp_explosion" required_reagents = list(/datum/reagent/tatp = 1) required_temp = 550 // this makes making tatp before pyro nades, and extreme pain in the ass to make strengthdiv = 3 @@ -134,21 +116,15 @@ /datum/chemical_reaction/reagent_explosion/penthrite_explosion - name = "Penthrite explosion" - id = "penthrite_explosion" required_reagents = list(/datum/reagent/medicine/C2/penthrite = 1, /datum/reagent/phenol = 1, /datum/reagent/acetone_oxide = 1) required_temp = 315 strengthdiv = 5 /datum/chemical_reaction/reagent_explosion/potassium_explosion - name = "Explosion" - id = "potassium_explosion" required_reagents = list(/datum/reagent/water = 1, /datum/reagent/potassium = 1) strengthdiv = 20 /datum/chemical_reaction/reagent_explosion/potassium_explosion/holyboom - name = "Holy Explosion" - id = "holyboom" required_reagents = list(/datum/reagent/water/holywater = 1, /datum/reagent/potassium = 1) /datum/chemical_reaction/reagent_explosion/potassium_explosion/holyboom/on_reaction(datum/reagents/holder, created_volume) @@ -176,14 +152,10 @@ /datum/chemical_reaction/gunpowder - name = "Gunpowder" - id = /datum/reagent/gunpowder results = list(/datum/reagent/gunpowder = 3) required_reagents = list(/datum/reagent/saltpetre = 1, /datum/reagent/medicine/C2/multiver = 1, /datum/reagent/sulfur = 1) /datum/chemical_reaction/reagent_explosion/gunpowder_explosion - name = "Gunpowder Kaboom" - id = "gunpowder_explosion" required_reagents = list(/datum/reagent/gunpowder = 1) required_temp = 474 strengthdiv = 6 @@ -195,14 +167,10 @@ ..() /datum/chemical_reaction/thermite - name = "Thermite" - id = /datum/reagent/thermite results = list(/datum/reagent/thermite = 3) required_reagents = list(/datum/reagent/aluminium = 1, /datum/reagent/iron = 1, /datum/reagent/oxygen = 1) /datum/chemical_reaction/emp_pulse - name = "EMP Pulse" - id = "emp_pulse" required_reagents = list(/datum/reagent/uranium = 1, /datum/reagent/iron = 1) // Yes, laugh, it's the best recipe I could think of that makes a little bit of sense /datum/chemical_reaction/emp_pulse/on_reaction(datum/reagents/holder, created_volume) @@ -214,8 +182,6 @@ /datum/chemical_reaction/beesplosion - name = "Bee Explosion" - id = "beesplosion" required_reagents = list(/datum/reagent/consumable/honey = 1, /datum/reagent/medicine/strange_reagent = 1, /datum/reagent/uranium/radium = 1) /datum/chemical_reaction/beesplosion/on_reaction(datum/reagents/holder, created_volume) @@ -237,14 +203,10 @@ /datum/chemical_reaction/stabilizing_agent - name = /datum/reagent/stabilizing_agent - id = /datum/reagent/stabilizing_agent results = list(/datum/reagent/stabilizing_agent = 3) required_reagents = list(/datum/reagent/iron = 1, /datum/reagent/oxygen = 1, /datum/reagent/hydrogen = 1) /datum/chemical_reaction/clf3 - name = "Chlorine Trifluoride" - id = /datum/reagent/clf3 results = list(/datum/reagent/clf3 = 4) required_reagents = list(/datum/reagent/chlorine = 1, /datum/reagent/fluorine = 3) required_temp = 424 @@ -256,8 +218,6 @@ holder.chem_temp = 1000 // hot as shit /datum/chemical_reaction/reagent_explosion/methsplosion - name = "Meth explosion" - id = "methboom1" required_temp = 380 //slightly above the meth mix time. required_reagents = list(/datum/reagent/drug/methamphetamine = 1) strengthdiv = 6 @@ -272,13 +232,10 @@ ..() /datum/chemical_reaction/reagent_explosion/methsplosion/methboom2 - id = "methboom2" required_reagents = list(/datum/reagent/diethylamine = 1, /datum/reagent/iodine = 1, /datum/reagent/phosphorus = 1, /datum/reagent/hydrogen = 1) //diethylamine is often left over from mixing the ephedrine. required_temp = 300 //room temperature, chilling it even a little will prevent the explosion /datum/chemical_reaction/sorium - name = "Sorium" - id = /datum/reagent/sorium results = list(/datum/reagent/sorium = 4) required_reagents = list(/datum/reagent/mercury = 1, /datum/reagent/oxygen = 1, /datum/reagent/nitrogen = 1, /datum/reagent/carbon = 1) @@ -287,23 +244,19 @@ return holder.remove_reagent(/datum/reagent/sorium, created_volume*4) var/turf/T = get_turf(holder.my_atom) - var/range = CLAMP(sqrt(created_volume*4), 1, 6) + var/range = clamp(sqrt(created_volume*4), 1, 6) goonchem_vortex(T, 1, range) /datum/chemical_reaction/sorium_vortex - name = "sorium_vortex" - id = "sorium_vortex" required_reagents = list(/datum/reagent/sorium = 1) required_temp = 474 /datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/T = get_turf(holder.my_atom) - var/range = CLAMP(sqrt(created_volume), 1, 6) + var/range = clamp(sqrt(created_volume), 1, 6) goonchem_vortex(T, 1, range) /datum/chemical_reaction/liquid_dark_matter - name = "Liquid Dark Matter" - id = /datum/reagent/liquid_dark_matter results = list(/datum/reagent/liquid_dark_matter = 3) required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/uranium/radium = 1, /datum/reagent/carbon = 1) @@ -312,23 +265,19 @@ return holder.remove_reagent(/datum/reagent/liquid_dark_matter, created_volume*3) var/turf/T = get_turf(holder.my_atom) - var/range = CLAMP(sqrt(created_volume*3), 1, 6) + var/range = clamp(sqrt(created_volume*3), 1, 6) goonchem_vortex(T, 0, range) /datum/chemical_reaction/ldm_vortex - name = "LDM Vortex" - id = "ldm_vortex" required_reagents = list(/datum/reagent/liquid_dark_matter = 1) required_temp = 474 /datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume) var/turf/T = get_turf(holder.my_atom) - var/range = CLAMP(sqrt(created_volume/2), 1, 6) + var/range = clamp(sqrt(created_volume/2), 1, 6) goonchem_vortex(T, 0, range) /datum/chemical_reaction/flash_powder - name = "Flash powder" - id = /datum/reagent/flash_powder results = list(/datum/reagent/flash_powder = 3) required_reagents = list(/datum/reagent/aluminium = 1, /datum/reagent/potassium = 1, /datum/reagent/sulfur = 1 ) @@ -350,8 +299,6 @@ holder.remove_reagent(/datum/reagent/flash_powder, created_volume*3) /datum/chemical_reaction/flash_powder_flash - name = "Flash powder activation" - id = "flash_powder_flash" required_reagents = list(/datum/reagent/flash_powder = 1) required_temp = 374 @@ -370,8 +317,6 @@ C.Stun(100) /datum/chemical_reaction/smoke_powder - name = /datum/reagent/smoke_powder - id = /datum/reagent/smoke_powder results = list(/datum/reagent/smoke_powder = 3) required_reagents = list(/datum/reagent/potassium = 1, /datum/reagent/consumable/sugar = 1, /datum/reagent/phosphorus = 1) @@ -391,8 +336,6 @@ holder.clear_reagents() /datum/chemical_reaction/smoke_powder_smoke - name = "smoke_powder_smoke" - id = "smoke_powder_smoke" required_reagents = list(/datum/reagent/smoke_powder = 1) required_temp = 374 mob_react = FALSE @@ -410,8 +353,6 @@ holder.clear_reagents() /datum/chemical_reaction/sonic_powder - name = /datum/reagent/sonic_powder - id = /datum/reagent/sonic_powder results = list(/datum/reagent/sonic_powder = 3) required_reagents = list(/datum/reagent/oxygen = 1, /datum/reagent/consumable/space_cola = 1, /datum/reagent/phosphorus = 1) @@ -425,8 +366,6 @@ C.soundbang_act(1, 100, rand(0, 5)) /datum/chemical_reaction/sonic_powder_deafen - name = "sonic_powder_deafen" - id = "sonic_powder_deafen" required_reagents = list(/datum/reagent/sonic_powder = 1) required_temp = 374 @@ -437,8 +376,6 @@ C.soundbang_act(1, 100, rand(0, 5)) /datum/chemical_reaction/phlogiston - name = /datum/reagent/phlogiston - id = /datum/reagent/phlogiston results = list(/datum/reagent/phlogiston = 3) required_reagents = list(/datum/reagent/phosphorus = 1, /datum/reagent/toxin/acid = 1, /datum/reagent/stable_plasma = 1) @@ -452,14 +389,10 @@ return /datum/chemical_reaction/napalm - name = "Napalm" - id = /datum/reagent/napalm results = list(/datum/reagent/napalm = 3) required_reagents = list(/datum/reagent/fuel/oil = 1, /datum/reagent/fuel = 1, /datum/reagent/consumable/ethanol = 1 ) /datum/chemical_reaction/cryostylane - name = /datum/reagent/cryostylane - id = /datum/reagent/cryostylane results = list(/datum/reagent/cryostylane = 3) required_reagents = list(/datum/reagent/water = 1, /datum/reagent/stable_plasma = 1, /datum/reagent/nitrogen = 1) @@ -468,8 +401,6 @@ return /datum/chemical_reaction/cryostylane_oxygen - name = "ephemeral cryostylane reaction" - id = "cryostylane_oxygen" results = list(/datum/reagent/cryostylane = 1) required_reagents = list(/datum/reagent/cryostylane = 1, /datum/reagent/oxygen = 1) mob_react = FALSE @@ -478,8 +409,6 @@ holder.chem_temp = max(holder.chem_temp - 10*created_volume,0) /datum/chemical_reaction/pyrosium_oxygen - name = "ephemeral pyrosium reaction" - id = "pyrosium_oxygen" results = list(/datum/reagent/pyrosium = 1) required_reagents = list(/datum/reagent/pyrosium = 1, /datum/reagent/oxygen = 1) mob_react = FALSE @@ -488,8 +417,6 @@ holder.chem_temp += 10*created_volume /datum/chemical_reaction/pyrosium - name = /datum/reagent/pyrosium - id = /datum/reagent/pyrosium results = list(/datum/reagent/pyrosium = 3) required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/uranium/radium = 1, /datum/reagent/phosphorus = 1) @@ -498,23 +425,17 @@ return /datum/chemical_reaction/teslium - name = "Teslium" - id = /datum/reagent/teslium results = list(/datum/reagent/teslium = 3) required_reagents = list(/datum/reagent/stable_plasma = 1, /datum/reagent/silver = 1, /datum/reagent/gunpowder = 1) mix_message = "A jet of sparks flies from the mixture as it merges into a flickering slurry." required_temp = 400 /datum/chemical_reaction/energized_jelly - name = "Energized Jelly" - id = /datum/reagent/teslium/energized_jelly results = list(/datum/reagent/teslium/energized_jelly = 2) required_reagents = list(/datum/reagent/toxin/slimejelly = 1, /datum/reagent/teslium = 1) mix_message = "The slime jelly starts glowing intermittently." /datum/chemical_reaction/reagent_explosion/teslium_lightning - name = "Teslium Destabilization" - id = "teslium_lightning" required_reagents = list(/datum/reagent/teslium = 1, /datum/reagent/water = 1) strengthdiv = 100 modifier = -100 @@ -541,21 +462,16 @@ ..() /datum/chemical_reaction/reagent_explosion/teslium_lightning/heat - id = "teslium_lightning2" required_temp = 474 required_reagents = list(/datum/reagent/teslium = 1) /datum/chemical_reaction/reagent_explosion/nitrous_oxide - name = "N2O explosion" - id = "n2o_explosion" required_reagents = list(/datum/reagent/nitrous_oxide = 1) strengthdiv = 7 required_temp = 575 modifier = 1 /datum/chemical_reaction/firefighting_foam - name = "Firefighting Foam" - id = /datum/reagent/firefighting_foam results = list(/datum/reagent/firefighting_foam = 3) required_reagents = list(/datum/reagent/stabilizing_agent = 1,/datum/reagent/fluorosurfactant = 1,/datum/reagent/carbon = 1) required_temp = 200 diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 153130b5ea5..afe035e42d4 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -14,8 +14,6 @@ //Grey /datum/chemical_reaction/slime/slimespawn - name = "Slime Spawn" - id = "m_spawn" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/grey required_other = TRUE @@ -26,16 +24,12 @@ ..() /datum/chemical_reaction/slime/slimeinaprov - name = "Slime epinephrine" - id = "m_inaprov" results = list(/datum/reagent/medicine/epinephrine = 3) required_reagents = list(/datum/reagent/water = 5) required_other = TRUE required_container = /obj/item/slime_extract/grey /datum/chemical_reaction/slime/slimemonkey - name = "Slime Monkey" - id = "m_monkey" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/grey required_other = TRUE @@ -47,24 +41,18 @@ //Green /datum/chemical_reaction/slime/slimemutate - name = "Mutation Toxin" - id = "slimetoxin" results = list(/datum/reagent/mutationtoxin/jelly = 1) required_reagents = list(/datum/reagent/toxin/plasma = 1) required_other = TRUE required_container = /obj/item/slime_extract/green /datum/chemical_reaction/slime/slimehuman - name = "Human Mutation Toxin" - id = "humanmuttoxin" results = list(/datum/reagent/mutationtoxin = 1) required_reagents = list(/datum/reagent/blood = 1) required_other = TRUE required_container = /obj/item/slime_extract/green /datum/chemical_reaction/slime/slimelizard - name = "Lizard Mutation Toxin" - id = "lizardmuttoxin" results = list(/datum/reagent/mutationtoxin/lizard = 1) required_reagents = list(/datum/reagent/uranium/radium = 1) required_other = TRUE @@ -72,8 +60,6 @@ //Metal /datum/chemical_reaction/slime/slimemetal - name = "Slime Metal" - id = "m_metal" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/metal required_other = TRUE @@ -85,8 +71,6 @@ ..() /datum/chemical_reaction/slime/slimeglass - name = "Slime Glass" - id = "m_glass" required_reagents = list(/datum/reagent/water = 1) required_container = /obj/item/slime_extract/metal required_other = TRUE @@ -99,8 +83,6 @@ //Gold /datum/chemical_reaction/slime/slimemobspawn - name = "Slime Crit" - id = "m_tele" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/gold required_other = TRUE @@ -119,8 +101,6 @@ addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 5, "Gold Slime", HOSTILE_SPAWN), 50) /datum/chemical_reaction/slime/slimemobspawn/lesser - name = "Slime Crit Lesser" - id = "m_tele3" required_reagents = list(/datum/reagent/blood = 1) /datum/chemical_reaction/slime/slimemobspawn/lesser/summon_mobs(datum/reagents/holder, turf/T) @@ -128,8 +108,6 @@ addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 3, "Lesser Gold Slime", HOSTILE_SPAWN, "neutral"), 50) /datum/chemical_reaction/slime/slimemobspawn/friendly - name = "Slime Crit Friendly" - id = "m_tele5" required_reagents = list(/datum/reagent/water = 1) /datum/chemical_reaction/slime/slimemobspawn/friendly/summon_mobs(datum/reagents/holder, turf/T) @@ -137,8 +115,6 @@ addtimer(CALLBACK(src, .proc/chemical_mob_spawn, holder, 1, "Friendly Gold Slime", FRIENDLY_SPAWN, "neutral"), 50) /datum/chemical_reaction/slime/slimemobspawn/spider - name = "Slime Crit Traitor Spider" - id = "m_tele6" required_reagents = list(/datum/reagent/spider_extract = 1) /datum/chemical_reaction/slime/slimemobspawn/spider/summon_mobs(datum/reagents/holder, turf/T) @@ -148,8 +124,6 @@ //Silver /datum/chemical_reaction/slime/slimebork - name = "Slime Bork" - id = "m_tele2" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/silver required_other = TRUE @@ -180,8 +154,6 @@ return get_random_food() /datum/chemical_reaction/slime/slimebork/drinks - name = "Slime Bork 2" - id = "m_tele4" required_reagents = list(/datum/reagent/water = 1) /datum/chemical_reaction/slime/slimebork/drinks/getbork() @@ -189,16 +161,12 @@ //Blue /datum/chemical_reaction/slime/slimefrost - name = "Slime Frost Oil" - id = "m_frostoil" results = list(/datum/reagent/consumable/frostoil = 10) required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/blue required_other = TRUE /datum/chemical_reaction/slime/slimestabilizer - name = "Slime Stabilizer" - id = "m_slimestabilizer" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/blue required_other = TRUE @@ -208,8 +176,6 @@ ..() /datum/chemical_reaction/slime/slimefoam - name = "Slime Foam" - id = "m_foam" required_reagents = list(/datum/reagent/water = 5) required_container = /obj/item/slime_extract/blue required_other = TRUE @@ -219,8 +185,6 @@ //Dark Blue /datum/chemical_reaction/slime/slimefreeze - name = "Slime Freeze" - id = "m_freeze" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/darkblue required_other = TRUE @@ -243,8 +207,6 @@ T.atmos_spawn_air("[initial(gastype.id)]=50;TEMP=2.7") /datum/chemical_reaction/slime/slimefireproof - name = "Slime Fireproof" - id = "m_fireproof" required_reagents = list(/datum/reagent/water = 1) required_container = /obj/item/slime_extract/darkblue required_other = TRUE @@ -255,16 +217,12 @@ //Orange /datum/chemical_reaction/slime/slimecasp - name = "Slime Capsaicin Oil" - id = "m_capsaicinoil" results = list(/datum/reagent/consumable/capsaicin = 10) required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/orange required_other = TRUE /datum/chemical_reaction/slime/slimefire - name = "Slime fire" - id = "m_fire" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/orange required_other = TRUE @@ -287,8 +245,6 @@ /datum/chemical_reaction/slime/slimesmoke - name = "Slime Smoke" - id = "m_smoke" results = list(/datum/reagent/phosphorus = 10, /datum/reagent/potassium = 10, /datum/reagent/consumable/sugar = 10) required_reagents = list(/datum/reagent/water = 5) required_container = /obj/item/slime_extract/orange @@ -296,8 +252,6 @@ //Yellow /datum/chemical_reaction/slime/slimeoverload - name = "Slime EMP" - id = "m_emp" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/yellow required_other = TRUE @@ -307,8 +261,6 @@ ..() /datum/chemical_reaction/slime/slimecell - name = "Slime Powercell" - id = "m_cell" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/yellow required_other = TRUE @@ -318,8 +270,6 @@ ..() /datum/chemical_reaction/slime/slimeglow - name = "Slime Glow" - id = "m_glow" required_reagents = list(/datum/reagent/water = 1) required_container = /obj/item/slime_extract/yellow required_other = TRUE @@ -332,8 +282,6 @@ //Purple /datum/chemical_reaction/slime/slimepsteroid - name = "Slime Steroid" - id = "m_steroid" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/purple required_other = TRUE @@ -343,8 +291,6 @@ ..() /datum/chemical_reaction/slime/slimeregen - name = "Slime Regen" - id = "m_regen" results = list(/datum/reagent/medicine/regen_jelly = 5) required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/purple @@ -352,8 +298,6 @@ //Dark Purple /datum/chemical_reaction/slime/slimeplasma - name = "Slime Plasma" - id = "m_plasma" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/darkpurple required_other = TRUE @@ -364,8 +308,6 @@ //Red /datum/chemical_reaction/slime/slimemutator - name = "Slime Mutator" - id = "m_slimemutator" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/red required_other = TRUE @@ -375,8 +317,6 @@ ..() /datum/chemical_reaction/slime/slimebloodlust - name = "Bloodlust" - id = "m_bloodlust" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/red required_other = TRUE @@ -393,8 +333,6 @@ ..() /datum/chemical_reaction/slime/slimespeed - name = "Slime Speed" - id = "m_speed" required_reagents = list(/datum/reagent/water = 1) required_container = /obj/item/slime_extract/red required_other = TRUE @@ -405,8 +343,6 @@ //Pink /datum/chemical_reaction/slime/docility - name = "Docility Potion" - id = "m_potion" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/pink required_other = TRUE @@ -416,8 +352,6 @@ ..() /datum/chemical_reaction/slime/gender - name = "Gender Potion" - id = "m_gender" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/pink required_other = TRUE @@ -428,8 +362,6 @@ //Black /datum/chemical_reaction/slime/slimemutate2 - name = "Advanced Mutation Toxin" - id = "mutationtoxin2" results = list(/datum/reagent/aslimetoxin = 1) required_reagents = list(/datum/reagent/toxin/plasma = 1) required_other = TRUE @@ -437,8 +369,6 @@ //Oil /datum/chemical_reaction/slime/slimeexplosion - name = "Slime Explosion" - id = "m_explosion" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/oil required_other = TRUE @@ -466,8 +396,6 @@ /datum/chemical_reaction/slime/slimecornoil - name = "Slime Corn Oil" - id = "m_cornoil" results = list(/datum/reagent/consumable/cornoil = 10) required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/oil @@ -475,8 +403,6 @@ //Light Pink /datum/chemical_reaction/slime/slimepotion2 - name = "Slime Potion 2" - id = "m_potion2" required_container = /obj/item/slime_extract/lightpink required_reagents = list(/datum/reagent/toxin/plasma = 1) required_other = TRUE @@ -486,8 +412,6 @@ ..() /datum/chemical_reaction/slime/renaming - name = "Renaming Potion" - id = "m_renaming_potion" required_container = /obj/item/slime_extract/lightpink required_reagents = list(/datum/reagent/water = 1) required_other = TRUE @@ -499,8 +423,6 @@ //Adamantine /datum/chemical_reaction/slime/adamantine - name = "Adamantine" - id = "adamantine" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/adamantine required_other = TRUE @@ -511,8 +433,6 @@ //Bluespace /datum/chemical_reaction/slime/slimefloor2 - name = "Bluespace Floor" - id = "m_floor2" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/bluespace required_other = TRUE @@ -523,8 +443,6 @@ /datum/chemical_reaction/slime/slimecrystal - name = "Slime Crystal" - id = "m_crystal" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/bluespace required_other = TRUE @@ -535,8 +453,6 @@ ..() /datum/chemical_reaction/slime/slimeradio - name = "Slime Radio" - id = "m_radio" required_reagents = list(/datum/reagent/water = 1) required_container = /obj/item/slime_extract/bluespace required_other = TRUE @@ -547,8 +463,6 @@ //Cerulean /datum/chemical_reaction/slime/slimepsteroid2 - name = "Slime Steroid 2" - id = "m_steroid2" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/cerulean required_other = TRUE @@ -558,8 +472,6 @@ ..() /datum/chemical_reaction/slime/slime_territory - name = "Slime Territory" - id = "s_territory" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/cerulean required_other = TRUE @@ -570,8 +482,6 @@ //Sepia /datum/chemical_reaction/slime/slimestop - name = "Slime Stop" - id = "m_stop" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/sepia required_other = TRUE @@ -590,8 +500,6 @@ ..() /datum/chemical_reaction/slime/slimecamera - name = "Slime Camera" - id = "m_camera" required_reagents = list(/datum/reagent/water = 1) required_container = /obj/item/slime_extract/sepia required_other = TRUE @@ -602,8 +510,6 @@ ..() /datum/chemical_reaction/slime/slimefloor - name = "Sepia Floor" - id = "m_floor" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/sepia required_other = TRUE @@ -614,8 +520,6 @@ //Pyrite /datum/chemical_reaction/slime/slimepaint - name = "Slime Paint" - id = "s_paint" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_container = /obj/item/slime_extract/pyrite required_other = TRUE @@ -626,8 +530,6 @@ ..() /datum/chemical_reaction/slime/slimecrayon - name = "Slime Crayon" - id = "s_crayon" required_reagents = list(/datum/reagent/blood = 1) required_container = /obj/item/slime_extract/pyrite required_other = TRUE @@ -639,8 +541,6 @@ //Rainbow :o) /datum/chemical_reaction/slime/slimeRNG - name = "Random Core" - id = "slimerng" required_reagents = list(/datum/reagent/toxin/plasma = 1) required_other = TRUE required_container = /obj/item/slime_extract/rainbow @@ -658,8 +558,6 @@ ..() /datum/chemical_reaction/slime/slimebomb - name = "Clusterblorble" - id = "slimebomb" required_reagents = list(/datum/reagent/toxin/slimejelly = 1) required_other = TRUE required_container = /obj/item/slime_extract/rainbow @@ -681,8 +579,6 @@ ..() /datum/chemical_reaction/slime/slime_transfer - name = "Transfer Potion" - id = "slimetransfer" required_reagents = list(/datum/reagent/blood = 1) required_other = TRUE required_container = /obj/item/slime_extract/rainbow @@ -692,8 +588,6 @@ ..() /datum/chemical_reaction/slime/flight_potion - name = "Flight Potion" - id = /datum/reagent/flightpotion required_reagents = list(/datum/reagent/water/holywater = 5, /datum/reagent/uranium = 5) required_other = TRUE required_container = /obj/item/slime_extract/rainbow diff --git a/code/modules/reagents/chemistry/recipes/special.dm b/code/modules/reagents/chemistry/recipes/special.dm index 891d75962d4..2549257946e 100644 --- a/code/modules/reagents/chemistry/recipes/special.dm +++ b/code/modules/reagents/chemistry/recipes/special.dm @@ -24,7 +24,6 @@ GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related #define RNGCHEM_OUTPUT "output" /datum/chemical_reaction/randomized - name = "semi randomized reaction" var/persistent = FALSE var/persistence_period = 7 //Will reset every x days @@ -147,8 +146,6 @@ GLOBAL_LIST_INIT(food_reagents, build_reagents_to_food()) //reagentid = related return TRUE /datum/chemical_reaction/randomized/secret_sauce - name = "secret sauce creation" - id = "secretsauce" persistent = TRUE persistence_period = 7 //Reset every week randomize_container = TRUE diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm index 2e64c5b4166..2f42ed6f4c0 100644 --- a/code/modules/reagents/chemistry/recipes/toxins.dm +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -1,128 +1,88 @@ /datum/chemical_reaction/formaldehyde - name = /datum/reagent/toxin/formaldehyde - id = "Formaldehyde" results = list(/datum/reagent/toxin/formaldehyde = 3) required_reagents = list(/datum/reagent/consumable/ethanol = 1, /datum/reagent/oxygen = 1, /datum/reagent/silver = 1) required_temp = 420 /datum/chemical_reaction/fentanyl - name = /datum/reagent/toxin/fentanyl - id = /datum/reagent/toxin/fentanyl results = list(/datum/reagent/toxin/fentanyl = 1) required_reagents = list(/datum/reagent/drug/space_drugs = 1) required_temp = 674 /datum/chemical_reaction/cyanide - name = "Cyanide" - id = /datum/reagent/toxin/cyanide results = list(/datum/reagent/toxin/cyanide = 3) required_reagents = list(/datum/reagent/fuel/oil = 1, /datum/reagent/ammonia = 1, /datum/reagent/oxygen = 1) required_temp = 380 /datum/chemical_reaction/itching_powder - name = "Itching Powder" - id = /datum/reagent/toxin/itching_powder results = list(/datum/reagent/toxin/itching_powder = 3) required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/ammonia = 1, /datum/reagent/medicine/C2/multiver = 1) /datum/chemical_reaction/facid - name = "Fluorosulfuric acid" - id = /datum/reagent/toxin/acid/fluacid results = list(/datum/reagent/toxin/acid/fluacid = 4) required_reagents = list(/datum/reagent/toxin/acid = 1, /datum/reagent/fluorine = 1, /datum/reagent/hydrogen = 1, /datum/reagent/potassium = 1) required_temp = 380 /datum/chemical_reaction/nitracid - name = "Nitric Acid" - id = /datum/reagent/toxin/acid/nitracid results = list(/datum/reagent/toxin/acid/nitracid = 2) required_reagents = list(/datum/reagent/toxin/acid/fluacid = 1, /datum/reagent/nitrogen = 1, /datum/reagent/oxygen = 1) required_temp = 380 /datum/chemical_reaction/sulfonal - name = /datum/reagent/toxin/sulfonal - id = /datum/reagent/toxin/sulfonal results = list(/datum/reagent/toxin/sulfonal = 3) required_reagents = list(/datum/reagent/acetone = 1, /datum/reagent/diethylamine = 1, /datum/reagent/sulfur = 1) /datum/chemical_reaction/lipolicide - name = /datum/reagent/toxin/lipolicide - id = /datum/reagent/toxin/lipolicide results = list(/datum/reagent/toxin/lipolicide = 3) required_reagents = list(/datum/reagent/mercury = 1, /datum/reagent/diethylamine = 1, /datum/reagent/medicine/ephedrine = 1) /datum/chemical_reaction/mutagen - name = "Unstable mutagen" - id = /datum/reagent/toxin/mutagen results = list(/datum/reagent/toxin/mutagen = 3) required_reagents = list(/datum/reagent/uranium/radium = 1, /datum/reagent/phosphorus = 1, /datum/reagent/chlorine = 1) /datum/chemical_reaction/lexorin - name = "Lexorin" - id = /datum/reagent/toxin/lexorin results = list(/datum/reagent/toxin/lexorin = 3) required_reagents = list(/datum/reagent/toxin/plasma = 1, /datum/reagent/hydrogen = 1, /datum/reagent/medicine/salbutamol = 1) /datum/chemical_reaction/chloralhydrate - name = "Chloral Hydrate" - id = /datum/reagent/toxin/chloralhydrate results = list(/datum/reagent/toxin/chloralhydrate = 1) required_reagents = list(/datum/reagent/consumable/ethanol = 1, /datum/reagent/chlorine = 3, /datum/reagent/water = 1) /datum/chemical_reaction/mutetoxin //i'll just fit this in here snugly between other unfun chemicals :v - name = "Mute Toxin" - id = /datum/reagent/toxin/mutetoxin results = list(/datum/reagent/toxin/mutetoxin = 2) required_reagents = list(/datum/reagent/uranium = 2, /datum/reagent/water = 1, /datum/reagent/carbon = 1) /datum/chemical_reaction/zombiepowder - name = "Zombie Powder" - id = /datum/reagent/toxin/zombiepowder results = list(/datum/reagent/toxin/zombiepowder = 2) required_reagents = list(/datum/reagent/toxin/carpotoxin = 5, /datum/reagent/medicine/morphine = 5, /datum/reagent/copper = 5) /datum/chemical_reaction/ghoulpowder - name = "Ghoul Powder" - id = /datum/reagent/toxin/ghoulpowder results = list(/datum/reagent/toxin/ghoulpowder = 2) required_reagents = list(/datum/reagent/toxin/zombiepowder = 1, /datum/reagent/medicine/epinephrine = 1) /datum/chemical_reaction/mindbreaker - name = "Mindbreaker Toxin" - id = /datum/reagent/toxin/mindbreaker results = list(/datum/reagent/toxin/mindbreaker = 5) required_reagents = list(/datum/reagent/silicon = 1, /datum/reagent/hydrogen = 1, /datum/reagent/medicine/C2/multiver = 1) /datum/chemical_reaction/heparin - name = "Heparin" - id = "Heparin" results = list(/datum/reagent/toxin/heparin = 4) required_reagents = list(/datum/reagent/toxin/formaldehyde = 1, /datum/reagent/sodium = 1, /datum/reagent/chlorine = 1, /datum/reagent/lithium = 1) mix_message = "The mixture thins and loses all color." /datum/chemical_reaction/rotatium - name = "Rotatium" - id = "Rotatium" results = list(/datum/reagent/toxin/rotatium = 3) required_reagents = list(/datum/reagent/toxin/mindbreaker = 1, /datum/reagent/teslium = 1, /datum/reagent/toxin/fentanyl = 1) mix_message = "After sparks, fire, and the smell of mindbreaker, the mix is constantly spinning with no stop in sight." /datum/chemical_reaction/anacea - name = "Anacea" - id = /datum/reagent/toxin/anacea results = list(/datum/reagent/toxin/anacea = 3) required_reagents = list(/datum/reagent/medicine/haloperidol = 1, /datum/reagent/impedrezene = 1, /datum/reagent/uranium/radium = 1) /datum/chemical_reaction/mimesbane - name = "Mime's Bane" - id = /datum/reagent/toxin/mimesbane results = list(/datum/reagent/toxin/mimesbane = 3) required_reagents = list(/datum/reagent/uranium/radium = 1, /datum/reagent/toxin/mutetoxin = 1, /datum/reagent/consumable/nothing = 1) /datum/chemical_reaction/bonehurtingjuice - name = "Bone Hurting Juice" - id = /datum/reagent/toxin/bonehurtingjuice results = list(/datum/reagent/toxin/bonehurtingjuice = 5) required_reagents = list(/datum/reagent/toxin/mutagen = 1, /datum/reagent/toxin/itching_powder = 3, /datum/reagent/consumable/milk = 1) mix_message = "The mixture suddenly becomes clear and looks a lot like water. You feel a strong urge to drink it." diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 1883878aac9..14724c41786 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -152,7 +152,7 @@ if(total_reagent_weight && amount_of_reagents) //don't bother if the container is empty - DIV/0 var/average_reagent_weight = total_reagent_weight / amount_of_reagents - spray_range = CLAMP(round((initial(spray_range) / average_reagent_weight) - ((amount_of_reagents - 1) * 1)), 3, 5) //spray distance between 3 and 5 tiles rounded down; extra reagents lose a tile + spray_range = clamp(round((initial(spray_range) / average_reagent_weight) - ((amount_of_reagents - 1) * 1)), 3, 5) //spray distance between 3 and 5 tiles rounded down; extra reagents lose a tile else spray_range = initial(spray_range) if(stream_mode == 0) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index e444d7f2784..63ec7618bed 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -179,7 +179,7 @@ ///Used by update_icon() and update_overlays() /obj/item/reagent_containers/syringe/proc/get_rounded_vol() if(reagents && reagents.total_volume) - return CLAMP(round((reagents.total_volume / volume * 15),5), 1, 15) + return clamp(round((reagents.total_volume / volume * 15),5), 1, 15) else return 0 diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index d8573ee7030..7560cd0eba8 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -82,7 +82,7 @@ return ..() /obj/structure/bigDelivery/relay_container_resist(mob/living/user, obj/O) - if(ismovableatom(loc)) + if(ismovable(loc)) var/atom/movable/AM = loc //can't unwrap the wrapped container if it's inside something. AM.relay_container_resist(user, O) return diff --git a/code/modules/research/bepis.dm b/code/modules/research/bepis.dm index dcf9be28e91..79d8a1bfe2f 100644 --- a/code/modules/research/bepis.dm +++ b/code/modules/research/bepis.dm @@ -92,7 +92,7 @@ update_icon_state() say("Attempting to deposit 0 credits. Aborting.") return - deposit_value = CLAMP(round(deposit_value, 1), 1, 15000) + deposit_value = clamp(round(deposit_value, 1), 1, 15000) if(!account) say("Cannot find user account. Please swipe a valid ID.") return diff --git a/code/modules/research/designs/biogenerator_designs.dm b/code/modules/research/designs/biogenerator_designs.dm index 9e8f5dd2078..b5ad324b110 100644 --- a/code/modules/research/designs/biogenerator_designs.dm +++ b/code/modules/research/designs/biogenerator_designs.dm @@ -10,6 +10,14 @@ make_reagents = list(/datum/reagent/consumable/milk = 10) category = list("initial","Food") +/datum/design/soymilk + name = "10u Soy Milk" + id = "soymilk" + build_type = BIOGENERATOR + materials = list(/datum/material/biomass= 20) + make_reagents = list(/datum/reagent/consumable/soymilk = 10) + category = list("initial","Food") + /datum/design/ethanol name = "10u Ethanol" id = "ethanol" @@ -56,7 +64,7 @@ build_type = BIOGENERATOR materials = list(/datum/material/biomass= 250) build_path = /obj/item/reagent_containers/food/snacks/monkeycube - category = list("initial", "Food") + category = list("initial","Food") /datum/design/ez_nut //easy nut :) name = "30u E-Z Nutrient" diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index be80d0eea38..efc10ae0ba3 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -73,7 +73,7 @@ materials.set_local_size(total_storage) var/total_rating = 1.2 for(var/obj/item/stock_parts/manipulator/M in component_parts) - total_rating = CLAMP(total_rating - (M.rating * 0.1), 0, 1) + total_rating = clamp(total_rating - (M.rating * 0.1), 0, 1) if(total_rating == 0) efficiency_coeff = INFINITY else @@ -136,7 +136,7 @@ say("Mineral access is on hold, please contact the quartermaster.") return FALSE var/power = 1000 - amount = CLAMP(amount, 1, 50) + amount = clamp(amount, 1, 50) for(var/M in D.materials) power += round(D.materials[M] * amount / 35) power = min(3000, power) diff --git a/code/modules/research/nanites/extra_settings/number.dm b/code/modules/research/nanites/extra_settings/number.dm index 6e63ae067ed..75489635f55 100644 --- a/code/modules/research/nanites/extra_settings/number.dm +++ b/code/modules/research/nanites/extra_settings/number.dm @@ -16,7 +16,7 @@ value = text2num(value) if(!value || !isnum(value)) return - src.value = CLAMP(value, min, max) + src.value = clamp(value, min, max) /datum/nanite_extra_setting/number/get_copy() return new /datum/nanite_extra_setting/number(value, min, max, unit) diff --git a/code/modules/research/nanites/nanite_chamber_computer.dm b/code/modules/research/nanites/nanite_chamber_computer.dm index 69809f80cc0..79ccee7555c 100644 --- a/code/modules/research/nanites/nanite_chamber_computer.dm +++ b/code/modules/research/nanites/nanite_chamber_computer.dm @@ -72,14 +72,14 @@ if("set_safety") var/threshold = text2num(params["value"]) if(!isnull(threshold)) - chamber.set_safety(CLAMP(round(threshold, 1),0,500)) + chamber.set_safety(clamp(round(threshold, 1),0,500)) playsound(src, "terminal_type", 25, FALSE) chamber.occupant.investigate_log("'s nanites' safety threshold was set to [threshold] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) . = TRUE if("set_cloud") var/cloud_id = text2num(params["value"]) if(!isnull(cloud_id)) - chamber.set_cloud(CLAMP(round(cloud_id, 1),0,100)) + chamber.set_cloud(clamp(round(cloud_id, 1),0,100)) playsound(src, "terminal_type", 25, FALSE) chamber.occupant.investigate_log("'s nanites' cloud id was set to [cloud_id] by [key_name(usr)] via [src] at [AREACOORD(src)].", INVESTIGATE_NANITES) . = TRUE diff --git a/code/modules/research/nanites/nanite_cloud_controller.dm b/code/modules/research/nanites/nanite_cloud_controller.dm index 208f562c12a..0a9f48021cb 100644 --- a/code/modules/research/nanites/nanite_cloud_controller.dm +++ b/code/modules/research/nanites/nanite_cloud_controller.dm @@ -174,7 +174,7 @@ var/cloud_id = new_backup_id if(!isnull(cloud_id)) playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE) - cloud_id = CLAMP(round(cloud_id, 1),1,100) + cloud_id = clamp(round(cloud_id, 1),1,100) generate_backup(cloud_id, usr) . = TRUE if("delete_backup") diff --git a/code/modules/research/nanites/nanite_programmer.dm b/code/modules/research/nanites/nanite_programmer.dm index f84f8247ee6..68d87bc02e2 100644 --- a/code/modules/research/nanites/nanite_programmer.dm +++ b/code/modules/research/nanites/nanite_programmer.dm @@ -86,13 +86,13 @@ var/target_code = params["target_code"] switch(target_code) if("activation") - program.activation_code = CLAMP(round(new_code, 1),0,9999) + program.activation_code = clamp(round(new_code, 1),0,9999) if("deactivation") - program.deactivation_code = CLAMP(round(new_code, 1),0,9999) + program.deactivation_code = clamp(round(new_code, 1),0,9999) if("kill") - program.kill_code = CLAMP(round(new_code, 1),0,9999) + program.kill_code = clamp(round(new_code, 1),0,9999) if("trigger") - program.trigger_code = CLAMP(round(new_code, 1),0,9999) + program.trigger_code = clamp(round(new_code, 1),0,9999) . = TRUE if("set_extra_setting") program.set_extra_setting(params["target_setting"], params["value"]) @@ -102,7 +102,7 @@ var/timer = text2num(params["delay"]) if(!isnull(timer)) playsound(src, "terminal_type", 25, FALSE) - timer = CLAMP(round(timer, 1), 0, 3600) + timer = clamp(round(timer, 1), 0, 3600) timer *= 10 //convert to deciseconds program.timer_restart = timer . = TRUE @@ -110,7 +110,7 @@ var/timer = text2num(params["delay"]) if(!isnull(timer)) playsound(src, "terminal_type", 25, FALSE) - timer = CLAMP(round(timer, 1), 0, 3600) + timer = clamp(round(timer, 1), 0, 3600) timer *= 10 //convert to deciseconds program.timer_shutdown = timer . = TRUE @@ -118,7 +118,7 @@ var/timer = text2num(params["delay"]) if(!isnull(timer)) playsound(src, "terminal_type", 25, FALSE) - timer = CLAMP(round(timer, 1), 0, 3600) + timer = clamp(round(timer, 1), 0, 3600) timer *= 10 //convert to deciseconds program.timer_trigger = timer . = TRUE @@ -126,7 +126,7 @@ var/timer = text2num(params["delay"]) if(!isnull(timer)) playsound(src, "terminal_type", 25, FALSE) - timer = CLAMP(round(timer, 1), 0, 3600) + timer = clamp(round(timer, 1), 0, 3600) timer *= 10 //convert to deciseconds program.timer_trigger_delay = timer . = TRUE diff --git a/code/modules/research/nanites/nanite_programs/weapon.dm b/code/modules/research/nanites/nanite_programs/weapon.dm index 69b9411a2a8..16f87bc6bde 100644 --- a/code/modules/research/nanites/nanite_programs/weapon.dm +++ b/code/modules/research/nanites/nanite_programs/weapon.dm @@ -84,7 +84,7 @@ /datum/nanite_program/explosive/on_trigger(comm_message) host_mob.visible_message("[host_mob] starts emitting a high-pitched buzzing, and [host_mob.p_their()] skin begins to glow...",\ "You start emitting a high-pitched buzzing, and your skin begins to glow...") - addtimer(CALLBACK(src, .proc/boom), CLAMP((nanites.nanite_volume * 0.35), 25, 150)) + addtimer(CALLBACK(src, .proc/boom), clamp((nanites.nanite_volume * 0.35), 25, 150)) /datum/nanite_program/explosive/proc/boom() var/nanite_amount = nanites.nanite_volume diff --git a/code/modules/research/nanites/nanite_remote.dm b/code/modules/research/nanites/nanite_remote.dm index 71aecc8f2cd..0d9361b5348 100644 --- a/code/modules/research/nanites/nanite_remote.dm +++ b/code/modules/research/nanites/nanite_remote.dm @@ -106,7 +106,7 @@ return var/new_code = text2num(params["code"]) if(!isnull(new_code)) - new_code = CLAMP(round(new_code, 1),0,9999) + new_code = clamp(round(new_code, 1),0,9999) code = new_code . = TRUE if("set_relay_code") @@ -114,7 +114,7 @@ return var/new_code = text2num(params["code"]) if(!isnull(new_code)) - new_code = CLAMP(round(new_code, 1),0,9999) + new_code = clamp(round(new_code, 1),0,9999) relay_code = new_code . = TRUE if("update_name") diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index 2c265031e13..cc8c020152f 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -827,7 +827,7 @@ return to_chat(user, "You feed the slime the stabilizer. It is now less likely to mutate.") - M.mutation_chance = CLAMP(M.mutation_chance-15,0,100) + M.mutation_chance = clamp(M.mutation_chance-15,0,100) qdel(src) /obj/item/slimepotion/slime/mutator @@ -851,7 +851,7 @@ return to_chat(user, "You feed the slime the mutator. It is now more likely to mutate.") - M.mutation_chance = CLAMP(M.mutation_chance+12,0,100) + M.mutation_chance = clamp(M.mutation_chance+12,0,100) M.mutator_used = TRUE qdel(src) diff --git a/code/modules/ruins/spaceruin_code/TheDerelict.dm b/code/modules/ruins/spaceruin_code/TheDerelict.dm index 5d9dd2b25f5..81aa4dcadf8 100644 --- a/code/modules/ruins/spaceruin_code/TheDerelict.dm +++ b/code/modules/ruins/spaceruin_code/TheDerelict.dm @@ -76,7 +76,7 @@ ///Tries to charge from powernet excess, no upper limit except max charge. /obj/machinery/computer/vaultcontroller/proc/attempt_siphon() - var/surpluspower = CLAMP(attached_cable.surplus(), 0, (siphon_max - siphoned_power)) + var/surpluspower = clamp(attached_cable.surplus(), 0, (siphon_max - siphoned_power)) if(surpluspower) attached_cable.add_load(surpluspower) siphoned_power += surpluspower diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index e532631a3af..f107963ac8a 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -832,13 +832,13 @@ var/change_per_engine = (1 - ENGINE_COEFF_MIN) / ENGINE_DEFAULT_MAXSPEED_ENGINES // 5 by default if(initial_engines > 0) change_per_engine = (1 - ENGINE_COEFF_MIN) / initial_engines // or however many it had - return CLAMP(1 - delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX) + return clamp(1 - delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX) if(new_value < initial_engines) var/delta = initial_engines - new_value var/change_per_engine = 1 //doesn't really matter should not be happening for 0 engine shuttles if(initial_engines > 0) change_per_engine = (ENGINE_COEFF_MAX - 1) / initial_engines //just linear drop to max delay - return CLAMP(1 + delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX) + return clamp(1 + delta * change_per_engine,ENGINE_COEFF_MIN,ENGINE_COEFF_MAX) /obj/docking_port/mobile/proc/in_flight() diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm index 29dd3193fca..51cb0faaf35 100644 --- a/code/modules/spells/spell_types/wizard.dm +++ b/code/modules/spells/spell_types/wizard.dm @@ -313,7 +313,7 @@ var/mob/living/M = AM M.Paralyze(stun_amt) to_chat(M, "You're thrown back by [user]!") - AM.safe_throw_at(throwtarget, ((CLAMP((maxthrow - (CLAMP(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user, force = repulse_force)//So stuff gets tossed around at the same time. + AM.safe_throw_at(throwtarget, ((clamp((maxthrow - (clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user, force = repulse_force)//So stuff gets tossed around at the same time. /obj/effect/proc_holder/spell/aoe_turf/repulse/xeno //i fixed conflicts only to find out that this is in the WIZARD file instead of the xeno file?! name = "Tail Sweep" diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 53968e64f8e..e6836c403c9 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -183,7 +183,7 @@ burn_dam += burn //We've dealt the physical damages, if there's room lets apply the stamina damage. - stamina_dam += round(CLAMP(stamina, 0, max_stamina_damage - stamina_dam), DAMAGE_PRECISION) + stamina_dam += round(clamp(stamina, 0, max_stamina_damage - stamina_dam), DAMAGE_PRECISION) if(owner && updating_health) @@ -288,7 +288,7 @@ C = source if(!original_owner) original_owner = source - else + else C = owner if(original_owner && owner != original_owner) //Foreign limb no_update = TRUE diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index 4eaeebd7f94..d58499279a6 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -16,7 +16,7 @@ return FALSE var/obj/item/bodypart/affecting = C.get_bodypart(BODY_ZONE_CHEST) - affecting.receive_damage(CLAMP(brute_dam/2 * affecting.body_damage_coeff, 15, 50), CLAMP(burn_dam/2 * affecting.body_damage_coeff, 0, 50)) //Damage the chest based on limb's existing damage + affecting.receive_damage(clamp(brute_dam/2 * affecting.body_damage_coeff, 15, 50), clamp(burn_dam/2 * affecting.body_damage_coeff, 0, 50)) //Damage the chest based on limb's existing damage C.visible_message("[C]'s [src.name] has been violently dismembered!") C.emote("scream") SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "dismembered", /datum/mood_event/dismembered) diff --git a/code/modules/surgery/organic_steps.dm b/code/modules/surgery/organic_steps.dm index 8196217ee4b..7768846ff7e 100644 --- a/code/modules/surgery/organic_steps.dm +++ b/code/modules/surgery/organic_steps.dm @@ -103,7 +103,7 @@ /datum/surgery_step/saw name = "saw bone" implements = list(TOOL_SAW = 100,/obj/item/melee/arm_blade = 75, - /obj/item/twohanded/fireaxe = 50, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25) + /obj/item/twohanded/fireaxe = 50, /obj/item/hatchet = 35, /obj/item/kitchen/knife/butcher = 25, /obj/item = 20) //20% success (sort of) with any sharp item with a force>=10 time = 54 /datum/surgery_step/saw/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) @@ -111,7 +111,12 @@ "[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].", "[user] begins to saw through the bone in [target]'s [parse_zone(target_zone)].") -/datum/surgery_step/saw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) +/datum/surgery_step/saw/tool_check(mob/user, obj/item/tool) + if(implement_type == /obj/item && !(tool.get_sharpness() && (tool.force >= 10))) + return FALSE + return TRUE + +/datum/surgery_step/saw/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results) target.apply_damage(50, BRUTE, "[target_zone]") display_results(user, target, "You saw [target]'s [parse_zone(target_zone)] open.", "[user] saws [target]'s [parse_zone(target_zone)] open!", diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index dcb11a7b567..15a51392606 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -164,10 +164,10 @@ desc = "A sleek, sturdy box." icon_state = "cyber_implants" var/list/boxed = list( - /obj/item/autosurgeon/thermal_eyes, - /obj/item/autosurgeon/xray_eyes, - /obj/item/autosurgeon/anti_stun, - /obj/item/autosurgeon/reviver) + /obj/item/autosurgeon/syndicate/thermal_eyes, + /obj/item/autosurgeon/syndicate/xray_eyes, + /obj/item/autosurgeon/syndicate/anti_stun, + /obj/item/autosurgeon/syndicate/reviver) var/amount = 5 /obj/item/storage/box/cyber_implants/PopulateContents() diff --git a/code/modules/surgery/organs/autosurgeon.dm b/code/modules/surgery/organs/autosurgeon.dm index fe4e7965d21..13bb0fb46ee 100644 --- a/code/modules/surgery/organs/autosurgeon.dm +++ b/code/modules/surgery/organs/autosurgeon.dm @@ -12,6 +12,10 @@ var/uses = INFINITE var/starting_organ +/obj/item/autosurgeon/syndicate + name = "suspicious autosurgeon" + icon_state = "syndicate_autoimplanter" + /obj/item/autosurgeon/Initialize(mapload) . = ..() if(starting_organ) @@ -82,15 +86,19 @@ uses = 1 starting_organ = /obj/item/organ/cyberimp/eyes/hud/medical +/obj/item/autosurgeon/syndicate/laser_arm + desc = "A single use autosurgeon that contains a combat arms-up laser augment. A screwdriver can be used to remove it, but implants can't be placed back in." + uses = 1 + starting_organ = /obj/item/organ/cyberimp/arm/gun/laser -/obj/item/autosurgeon/thermal_eyes +/obj/item/autosurgeon/syndicate/thermal_eyes starting_organ = /obj/item/organ/eyes/robotic/thermals -/obj/item/autosurgeon/xray_eyes +/obj/item/autosurgeon/syndicate/xray_eyes starting_organ = /obj/item/organ/eyes/robotic/xray -/obj/item/autosurgeon/anti_stun +/obj/item/autosurgeon/syndicate/anti_stun starting_organ = /obj/item/organ/cyberimp/brain/anti_stun -/obj/item/autosurgeon/reviver +/obj/item/autosurgeon/syndicate/reviver starting_organ = /obj/item/organ/cyberimp/chest/reviver diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 3c51ad92998..e0808c33c44 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -252,7 +252,7 @@ return var/range = input(user, "Enter range (0 - [max_light_beam_distance])", "Range Select", 0) as null|num - set_distance(CLAMP(range, 0, max_light_beam_distance)) + set_distance(clamp(range, 0, max_light_beam_distance)) assume_rgb(C) /obj/item/organ/eyes/robotic/glow/proc/assume_rgb(newcolor) diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 57879cd6203..3cd63729c54 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -113,7 +113,7 @@ if(safe_oxygen_max) if(O2_pp > safe_oxygen_max) var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10 - H.apply_damage_type(CLAMP(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type) + H.apply_damage_type(clamp(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type) H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy) else H.clear_alert("too_much_oxy") @@ -141,7 +141,7 @@ if(safe_nitro_max) if(N2_pp > safe_nitro_max) var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10 - H.apply_damage_type(CLAMP(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type) + H.apply_damage_type(clamp(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type) H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro) else H.clear_alert("too_much_nitro") @@ -207,7 +207,7 @@ if(safe_toxins_max) if(Toxins_pp > safe_toxins_max) var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_toxins_max) * 10 - H.apply_damage_type(CLAMP(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type) + H.apply_damage_type(clamp(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type) H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox) else H.clear_alert("too_much_tox") diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 998acb13a03..3c0c658a572 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -135,7 +135,7 @@ return if(maximum < damage) return - damage = CLAMP(damage + d, 0, maximum) + damage = clamp(damage + d, 0, maximum) var/mess = check_damage_thresholds(owner) prev_damage = damage if(mess && owner) diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm index 5863eedf6bb..6757d141031 100755 --- a/code/modules/surgery/organs/stomach.dm +++ b/code/modules/surgery/organs/stomach.dm @@ -124,4 +124,4 @@ to_chat(owner, "You absorb some of the shock into your body!") /obj/item/organ/stomach/ethereal/proc/adjust_charge(amount) - crystal_charge = CLAMP(crystal_charge + amount, ETHEREAL_CHARGE_NONE, ETHEREAL_CHARGE_DANGEROUS) + crystal_charge = clamp(crystal_charge + amount, ETHEREAL_CHARGE_NONE, ETHEREAL_CHARGE_DANGEROUS) diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index a53aaa22075..b5dafecf530 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -632,6 +632,12 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) surplus = 10 exclude_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/stealthy_weapons/holster + name = "Syndicate Holster" + desc = "A useful little device that allows for inconspicuous carrying of guns using chameleon technology. It also allows for badass gun-spinning." + item = /obj/item/storage/belt/holster/chameleon + cost = 1 + // Ammunition /datum/uplink_item/ammo category = "Ammunition" @@ -1491,7 +1497,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/implants/antistun name = "CNS Rebooter Implant" desc = "This implant will help you get back up on your feet faster after being stunned. Comes with an autosurgeon." - item = /obj/item/autosurgeon/anti_stun + item = /obj/item/autosurgeon/syndicate/anti_stun cost = 12 surplus = 0 include_modes = list(/datum/game_mode/nuclear) @@ -1532,7 +1538,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/implants/reviver name = "Reviver Implant" desc = "This implant will attempt to revive and heal you if you lose consciousness. Comes with an autosurgeon." - item = /obj/item/autosurgeon/reviver + item = /obj/item/autosurgeon/syndicate/reviver cost = 8 surplus = 0 include_modes = list(/datum/game_mode/nuclear) @@ -1554,7 +1560,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/implants/thermals name = "Thermal Eyes" desc = "These cybernetic eyes will give you thermal vision. Comes with a free autosurgeon." - item = /obj/item/autosurgeon/thermal_eyes + item = /obj/item/autosurgeon/syndicate/thermal_eyes cost = 8 surplus = 0 include_modes = list(/datum/game_mode/nuclear) @@ -1572,7 +1578,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/implants/xray name = "X-ray Vision Implant" desc = "These cybernetic eyes will give you X-ray vision. Comes with an autosurgeon." - item = /obj/item/autosurgeon/xray_eyes + item = /obj/item/autosurgeon/syndicate/xray_eyes cost = 10 surplus = 0 include_modes = list(/datum/game_mode/nuclear) @@ -1786,6 +1792,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/storage/box/hug/reverse_revolver restricted_roles = list("Clown") +/datum/uplink_item/role_restricted/laser_arm + name = "Laser Arm Implant" + desc = "An implant that grants you a recharging laser gun inside your arm. Weak to EMPs. Comes with a syndicate autosurgeon for immediate self-application." + cost = 10 + item = /obj/item/autosurgeon/syndicate/laser_arm + restricted_roles = list("Roboticist") + + // Pointless /datum/uplink_item/badass category = "(Pointless) Badassery" diff --git a/code/modules/vehicles/speedbike.dm b/code/modules/vehicles/speedbike.dm index dd5a4b325dc..0c611a273bf 100644 --- a/code/modules/vehicles/speedbike.dm +++ b/code/modules/vehicles/speedbike.dm @@ -71,7 +71,7 @@ if(A.density && has_buckled_mobs()) var/atom/throw_target = get_edge_target_turf(A, dir) if(crash_all) - if(ismovableatom(A)) + if(ismovable(A)) var/atom/movable/AM = A AM.throw_at(throw_target, 4, 3) visible_message("[src] crashes into [A]!") diff --git a/code/modules/vending/clothesmate.dm b/code/modules/vending/clothesmate.dm index 7cd36e3388c..504a3572f8c 100644 --- a/code/modules/vending/clothesmate.dm +++ b/code/modules/vending/clothesmate.dm @@ -126,7 +126,7 @@ /obj/item/clothing/under/pants/mustangjeans = 1, /obj/item/clothing/neck/necklace/dope = 3, /obj/item/clothing/suit/jacket/letterman_nanotrasen = 1, - /obj/item/clothing/ears/earmuffs/spacepods = 1) + /obj/item/instrument/piano_synth/headphones/spacepods = 1) refill_canister = /obj/item/vending_refill/clothing default_price = 60 extra_price = 120 diff --git a/config/config.txt b/config/config.txt index d61d9b0f4a6..3e838ade6b0 100644 --- a/config/config.txt +++ b/config/config.txt @@ -500,3 +500,19 @@ DEFAULT_VIEW_SQUARE 15x15 ## Enable automatic profiling - Byond 513.1506 and newer only. #AUTO_PROFILE + +#### DISCORD STUFFS #### +## MAKE SURE ALL SECTIONS OF THIS ARE FILLED OUT BEFORE ENABLING +## Discord IDs can be obtained by following this guide: https://support.discordapp.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID- + +## Uncomment to enable discord auto-roling when users link their BYOND and Discord accounts +#ENABLE_DISCORD_AUTOROLE + +## Add your discord bot token here. Make sure it has the ability to manage roles +#DISCORD_TOKEN someDiscordToken + +## Add the ID of your guild (server) here +#DISCORD_GUILDID 000000000000000000 + +## Add the ID of the role you want assigning here +#DISCORD_ROLEID 000000000000000000 diff --git a/dependencies.sh b/dependencies.sh index 488504b2887..4a950af3146 100755 --- a/dependencies.sh +++ b/dependencies.sh @@ -23,4 +23,4 @@ export NODE_VERSION=12 export PHP_VERSION=5.6 # SpacemanDMM git tag -export SPACEMAN_DMM_VERSION=suite-1.2 +export SPACEMAN_DMM_VERSION=suite-1.3 diff --git a/html/changelog.html b/html/changelog.html index a4a449f13be..6dfe744a0c3 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -51,6 +51,171 @@ -->
+

19 February 2020

+

ATHATH updated:

+ +

ArcaneMusic updated:

+ +

Arkatos updated:

+ +

Bokkiewokkie updated:

+ +

Buggy123 updated:

+ +

Capsandi updated:

+ +

Dennok updated:

+ +

EOBGames updated:

+ +

Fikou updated:

+ +

Iamgoofball updated:

+ +

Improvedname & JustRandomGuy updated:

+ +

JAremko updated:

+ +

JDawg1290 updated:

+ +

JJRcop updated:

+ +

Mickyan updated:

+ +

NecromancerAnne and Kyrsonism updated:

+ +

NikNak updated:

+ +

RaveRadbury updated:

+ +

Skoglol updated:

+ +

TheVekter updated:

+ +

Thunder12345 updated:

+ +

Time-Green updated:

+ +

XDTM updated:

+ +

cacogen updated:

+ +

itseasytosee updated:

+ +

necromanceranne updated:

+ +

nightred updated:

+ +

plapatin updated:

+ +

stylemistake updated:

+ +

wesoda25 updated:

+ +

with thanks to HugBug and Buggy for helping with bug-squashing updated:

+ +

yeeyeh updated:

+ +

15 February 2020

BadSS13Player updated: