From ddab3e96f569fdca40fbaed0a2c2c83d39550879 Mon Sep 17 00:00:00 2001 From: BadAtThisGame <79063506+BadAtThisGame302@users.noreply.github.com> Date: Sat, 13 Jan 2024 05:18:07 +0200 Subject: [PATCH 01/32] Florina Moment (#5427) # About the pull request Replaces the _Florina_ Survivor job text to the maps actual name **Fiorina** # Explain why it's good for the game I wonder why. (I also wonder why I didn't notice this earlier) # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: fixed the survs being Florina X even though the mapes name is Fiorina. /:cl: Co-authored-by: Jeff Watchson --- .../preset_fiorina_sciannex.dm | 36 +++++++++---------- maps/fiorina_sciannex.json | 10 +++--- maps/prison_station_fop.json | 8 ++--- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/code/modules/gear_presets/survivors/fiorina_sciannex/preset_fiorina_sciannex.dm b/code/modules/gear_presets/survivors/fiorina_sciannex/preset_fiorina_sciannex.dm index f0d812026491..248c1a00d353 100644 --- a/code/modules/gear_presets/survivors/fiorina_sciannex/preset_fiorina_sciannex.dm +++ b/code/modules/gear_presets/survivors/fiorina_sciannex/preset_fiorina_sciannex.dm @@ -1,9 +1,9 @@ -/datum/equipment_preset/survivor/scientist/florina - name = "Survivor - Florina Researcher" - assignment = "Florina Researcher" +/datum/equipment_preset/survivor/scientist/fiorina + name = "Survivor - Fiorina Researcher" + assignment = "Fiorina Researcher" -/datum/equipment_preset/survivor/scientist/florina/load_gear(mob/living/carbon/human/new_human) +/datum/equipment_preset/survivor/scientist/fiorina/load_gear(mob/living/carbon/human/new_human) new_human.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(new_human), WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/purple(new_human), WEAR_HEAD) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(new_human), WEAR_JACKET) @@ -15,20 +15,20 @@ ..() -/datum/equipment_preset/survivor/doctor/florina - name = "Survivor - Florina Doctor" - assignment = "Florina Doctor" +/datum/equipment_preset/survivor/doctor/fiorina + name = "Survivor - Fiorina Doctor" + assignment = "Fiorina Doctor" -/datum/equipment_preset/survivor/doctor/florina/load_gear(mob/living/carbon/human/new_human) +/datum/equipment_preset/survivor/doctor/fiorina/load_gear(mob/living/carbon/human/new_human) new_human.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(new_human), WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/pmc(new_human), WEAR_HEAD) ..() -/datum/equipment_preset/survivor/security/florina - name = "Survivor - Florina Prison Guard" - assignment = "Florina Prison Guard" +/datum/equipment_preset/survivor/security/fiorina + name = "Survivor - Fiorina Prison Guard" + assignment = "Fiorina Prison Guard" -/datum/equipment_preset/survivor/security/florina/load_gear(mob/living/carbon/human/new_human) +/datum/equipment_preset/survivor/security/fiorina/load_gear(mob/living/carbon/human/new_human) new_human.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(new_human), WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/sec(new_human), WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/security(new_human), WEAR_JACKET) @@ -37,11 +37,11 @@ new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(new_human), WEAR_FEET) ..() -/datum/equipment_preset/survivor/colonial_marshal/florina +/datum/equipment_preset/survivor/colonial_marshal/fiorina name = "Survivor - United Americas Riot Officer" assignment = "United Americas Riot Officer" -/datum/equipment_preset/survivor/colonial_marshal/florina/load_gear(mob/living/carbon/human/new_human) +/datum/equipment_preset/survivor/colonial_marshal/fiorina/load_gear(mob/living/carbon/human/new_human) new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/ua_riot(new_human), WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/sec(new_human), WEAR_BACK) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/ua_riot(new_human), WEAR_JACKET) @@ -52,11 +52,11 @@ ..() -/datum/equipment_preset/survivor/engineer/florina - name = "Survivor - Florina Engineer" - assignment = "Florina Engineer" +/datum/equipment_preset/survivor/engineer/fiorina + name = "Survivor - Fiorina Engineer" + assignment = "Fiorina Engineer" -/datum/equipment_preset/survivor/engineer/florina/load_gear(mob/living/carbon/human/new_human) +/datum/equipment_preset/survivor/engineer/fiorina/load_gear(mob/living/carbon/human/new_human) new_human.equip_to_slot_or_del(new /obj/item/clothing/under/color/white(new_human), WEAR_BODY) new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/apron/overalls(new_human), WEAR_JACKET) new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/eng(new_human), WEAR_BACK) diff --git a/maps/fiorina_sciannex.json b/maps/fiorina_sciannex.json index 89997cc9d668..61212c433be0 100644 --- a/maps/fiorina_sciannex.json +++ b/maps/fiorina_sciannex.json @@ -4,15 +4,15 @@ "map_file": "Fiorina_SciAnnex.dmm", "webmap_url": "Fiorina", "survivor_types": [ - "/datum/equipment_preset/survivor/scientist/florina", - "/datum/equipment_preset/survivor/doctor/florina", + "/datum/equipment_preset/survivor/scientist/fiorina", + "/datum/equipment_preset/survivor/doctor/fiorina", "/datum/equipment_preset/survivor/interstellar_human_rights_observer", - "/datum/equipment_preset/survivor/security/florina", - "/datum/equipment_preset/survivor/colonial_marshal/florina", + "/datum/equipment_preset/survivor/security/fiorina", + "/datum/equipment_preset/survivor/colonial_marshal/fiorina", "/datum/equipment_preset/survivor/prisoner", "/datum/equipment_preset/survivor/prisoner", "/datum/equipment_preset/survivor/gangleader", - "/datum/equipment_preset/survivor/engineer/florina", + "/datum/equipment_preset/survivor/engineer/fiorina", "/datum/equipment_preset/survivor/clf", "/datum/equipment_preset/survivor/civilian" ], diff --git a/maps/prison_station_fop.json b/maps/prison_station_fop.json index f2c22dbe4bb8..69469ea2fd03 100644 --- a/maps/prison_station_fop.json +++ b/maps/prison_station_fop.json @@ -3,14 +3,14 @@ "map_path": "map_files/FOP_v2_Cellblocks", "map_file": "Prison_Station_FOP.dmm", "survivor_types": [ - "/datum/equipment_preset/survivor/scientist/florina", - "/datum/equipment_preset/survivor/doctor/florina", + "/datum/equipment_preset/survivor/scientist/fiorina", + "/datum/equipment_preset/survivor/doctor/fiorina", "/datum/equipment_preset/survivor/interstellar_human_rights_observer", - "/datum/equipment_preset/survivor/security/florina", + "/datum/equipment_preset/survivor/security/fiorina", "/datum/equipment_preset/survivor/prisoner", "/datum/equipment_preset/survivor/prisoner", "/datum/equipment_preset/survivor/gangleader", - "/datum/equipment_preset/survivor/engineer/florina", + "/datum/equipment_preset/survivor/engineer/fiorina", "/datum/equipment_preset/survivor/clf", "/datum/equipment_preset/survivor/civilian" ], From 9d26b11f26228e023d324d04c892223f266e01af Mon Sep 17 00:00:00 2001 From: BadAtThisGame <79063506+BadAtThisGame302@users.noreply.github.com> Date: Sat, 13 Jan 2024 05:18:39 +0200 Subject: [PATCH 02/32] Adds three new zippo lighters in the code (#5412) # About the pull request Adds a black, blue and Wey-Yu Zippo Lighter to the code. Adds the black and blue variant to the gear select menu next to the normal zippo. # Explain why it's good for the game We have these sprites and they aren't used, I don't see what's wrong with a bit of variety in zippos apart from the normal and the golden one. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: add: Added three new Zippo Lighter sprites into the code. add: Added black and blue variants to the gear pref menu. fix: fixed the NV Zippo Lighter being black. /:cl: Co-authored-by: Jeff Watchson --- code/game/objects/items/tools/flame_tools.dm | 25 ++++++++++++++++++++ code/modules/client/preferences_gear.dm | 10 +++++++- maps/map_files/New_Varadero/New_Varadero.dmm | 5 +--- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/tools/flame_tools.dm b/code/game/objects/items/tools/flame_tools.dm index 8fc97f973702..d5cd708f29b3 100644 --- a/code/game/objects/items/tools/flame_tools.dm +++ b/code/game/objects/items/tools/flame_tools.dm @@ -721,6 +721,22 @@ CIGARETTE PACKETS ARE IN FANCY.DM log_admin("[user] has engraved \the [src] with engraving \"[str]\". (CKEY: ([user.ckey]))") +/obj/item/tool/lighter/zippo/black + name = "black Zippo lighter" + desc = "A fancy black Zippo lighter. Ignite in style." + icon_state = "blackzippo" + item_state = "blackzippo" + icon_on = "blackzippoon" + icon_off = "blackzippo" + +/obj/item/tool/lighter/zippo/blue + name = "blue Zippo lighter" + desc = "A fancy blue Zippo lighter. Ignite in style." + icon_state = "bluezippo" + item_state = "bluezippo" + icon_on = "bluezippoon" + icon_off = "bluezippo" + /obj/item/tool/lighter/zippo/gold name = "golden Zippo lighter" desc = "A gold-anodized Zippo lighter. Ostentatious, but it certainly stands out." @@ -730,6 +746,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_off = "goldzippo" black_market_value = 30 +/obj/item/tool/lighter/zippo/executive + name = "Weyland-Yutani executive Zippo lighter" + desc = "A remarkable Zippo lighter embellished in the Company's black and gold shade." + icon_state = "execzippo" + item_state = "execzippo" + icon_on = "execzippoon" + icon_off = "execzippo" + black_market_value = 40 + /obj/item/tool/lighter/random /obj/item/tool/lighter/random/Initialize() diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index a71f7dbcb3e9..1337cadf5228 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -863,6 +863,14 @@ GLOBAL_LIST_EMPTY(gear_datums_by_name) display_name = "Lighter, zippo" path = /obj/item/tool/lighter/zippo +/datum/gear/smoking/zippo/black + display_name = "Black lighter, zippo" + path = /obj/item/tool/lighter/zippo/black + +/datum/gear/smoking/zippo/blue + display_name = "Blue lighter, zippo" + path = /obj/item/tool/lighter/zippo/blue + /datum/gear/smoking/electronic_cigarette display_name = "Electronic cigarette" path = /obj/item/clothing/mask/electronic_cigarette @@ -891,7 +899,7 @@ GLOBAL_LIST_EMPTY(gear_datums_by_name) /datum/gear/misc/facepaint_skull display_name = "Facepaint, skull" path = /obj/item/facepaint/skull - cost = 3 + cost = 3 /datum/gear/misc/facepaint_body display_name = "Fullbody paint" diff --git a/maps/map_files/New_Varadero/New_Varadero.dmm b/maps/map_files/New_Varadero/New_Varadero.dmm index a56328df85f0..c6131febd8f5 100644 --- a/maps/map_files/New_Varadero/New_Varadero.dmm +++ b/maps/map_files/New_Varadero/New_Varadero.dmm @@ -6074,10 +6074,7 @@ pixel_x = -7; pixel_y = 8 }, -/obj/item/tool/lighter/zippo{ - icon_off = "blackzippo"; - icon_on = "blackzippoon"; - icon_state = "blackzippo"; +/obj/item/tool/lighter/zippo/black{ pixel_x = -5; pixel_y = 7 }, From daed6cc73b59b5ca9f24d1b1fe9594cf81526bd7 Mon Sep 17 00:00:00 2001 From: Birdtalon Date: Sat, 13 Jan 2024 03:19:01 +0000 Subject: [PATCH 03/32] Allows for trailing or leading whitespace in VV edits (#5417) # About the pull request Removes trimming from VV edits for strings. As a byproduct you can now provide the argument of `trim = FALSE` to `tgui_input_text()` to return untrimmed input. # Explain why it's good for the game VV editors shouldn't have the input box arbitrarily trim their leading or trailing whitespace from editing variables. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: code: Changing a string in VV no longer trims whitespace. /:cl: --- .../admin/view_variables/get_variables.dm | 4 ++-- code/modules/tgui_input/text.dm | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/code/modules/admin/view_variables/get_variables.dm b/code/modules/admin/view_variables/get_variables.dm index a2b87b0909d0..9ec449e4c3f6 100644 --- a/code/modules/admin/view_variables/get_variables.dm +++ b/code/modules/admin/view_variables/get_variables.dm @@ -121,12 +121,12 @@ switch(.["class"]) if(VV_TEXT) - .["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value, encode = FALSE) + .["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value, encode = FALSE, trim = FALSE) if(.["value"] == null) .["class"] = null return if(VV_MESSAGE) - .["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value, encode = FALSE) + .["value"] = tgui_input_text(usr, "Enter new text:", "Text", current_value, encode = FALSE, trim = FALSE) if(.["value"] == null) .["class"] = null return diff --git a/code/modules/tgui_input/text.dm b/code/modules/tgui_input/text.dm index 2a9b7f6dfff4..f60691860d79 100644 --- a/code/modules/tgui_input/text.dm +++ b/code/modules/tgui_input/text.dm @@ -14,8 +14,9 @@ * * multiline - Bool that determines if the input box is much larger. Good for large messages, laws, etc. * * encode - Toggling this determines if input is filtered via html_encode. Setting this to FALSE gives raw input. * * timeout - The timeout of the textbox, after which the modal will close and qdel itself. Set to zero for no timeout. + * * trim - Whether or not to trim leading and trailing whitespace from your input. Defaults to TRUE */ -/proc/tgui_input_text(mob/user, message = "", title = "Text Input", default, max_length = MAX_MESSAGE_LEN, multiline = FALSE, encode = TRUE, timeout = 0) +/proc/tgui_input_text(mob/user, message = "", title = "Text Input", default, max_length = MAX_MESSAGE_LEN, multiline = FALSE, encode = TRUE, timeout = 0, trim = TRUE) if (!user) user = usr if (!istype(user)) @@ -39,7 +40,7 @@ return input(user, message, title, default) as text|null */ - var/datum/tgui_input_text/text_input = new(user, message, title, default, max_length, multiline, encode, timeout) + var/datum/tgui_input_text/text_input = new(user, message, title, default, max_length, multiline, encode, timeout, trim) text_input.tgui_interact(user) text_input.wait() if (text_input) @@ -73,14 +74,17 @@ var/timeout /// The title of the TGUI window var/title + /// Whether to trim leading and trailing spaces + var/trim -/datum/tgui_input_text/New(mob/user, message, title, default, max_length, multiline, encode, timeout) +/datum/tgui_input_text/New(mob/user, message, title, default, max_length, multiline, encode, timeout, trim) src.default = default src.encode = encode src.max_length = max_length src.message = message src.multiline = multiline src.title = title + src.trim = trim if (timeout) src.timeout = timeout start_time = world.time @@ -141,7 +145,7 @@ CRASH("[usr] typed a text string longer than the max length") if(encode && (length(html_encode(params["entry"])) > max_length)) to_chat(usr, SPAN_NOTICE("Your message was clipped due to special character usage.")) - set_entry(params["entry"]) + set_entry(params["entry"], trim) closed = TRUE SStgui.close_uis(src) return TRUE @@ -156,7 +160,10 @@ * This can sometimes result in a string that is longer than the max length. * If the string is longer than the max length, it will be clipped. */ -/datum/tgui_input_text/proc/set_entry(entry) +/datum/tgui_input_text/proc/set_entry(entry, trim) if(!isnull(entry)) var/converted_entry = encode ? html_encode(entry) : entry - src.entry = trim(converted_entry, max_length) + if(trim) + src.entry = trim(converted_entry) + else + src.entry = converted_entry From 093aea36d621e3d07806bcd64177461b9041117b Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Sat, 13 Jan 2024 10:23:35 +0000 Subject: [PATCH 04/32] Allows larvae and huggers to crawl through acid holes (#5431) # About the pull request Makes larvae and facehuggers able to crawl through acid holes in walls. # Explain why it's good for the game All xenomorphs below a certain size (other than these two) can crawl through wall holes, so it feels like this is just an oversight. # Testing Photographs and Procedure
Screenshots & Videos https://github.com/cmss13-devs/cmss13/assets/57483089/1316b609-3598-4af9-8b31-64edea2a28bb
# Changelog :cl: add: Made xeno larvae and facehuggers able to crawl through acid holes in walls. /:cl: --- code/game/objects/effects/acid_hole.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/objects/effects/acid_hole.dm b/code/game/objects/effects/acid_hole.dm index a4db9ef5c0e0..db24c1c9c56a 100644 --- a/code/game/objects/effects/acid_hole.dm +++ b/code/game/objects/effects/acid_hole.dm @@ -40,7 +40,7 @@ /obj/effect/acid_hole/attack_alien(mob/living/carbon/xenomorph/user) - if (!holed_wall) + if(!holed_wall) qdel(src) //no wall?! then cease existence... return @@ -49,6 +49,9 @@ expand_hole(user) return XENO_NO_DELAY_ACTION +/obj/effect/acid_hole/attack_larva(mob/living/carbon/xenomorph/larva/M) + attack_alien(M) + /obj/effect/acid_hole/proc/expand_hole(mob/living/carbon/xenomorph/user) if(user.action_busy || user.is_mob_incapacitated()) return From 84957c5819975bbea022b1581af5f63846d82b83 Mon Sep 17 00:00:00 2001 From: Julian56 <117036822+Huffie56@users.noreply.github.com> Date: Sat, 13 Jan 2024 15:07:15 +0100 Subject: [PATCH 05/32] refactor files to change variable name using colour to color. (#5396) # About the pull request refactor files to change variable name using colour to color on those files: 1-misc_tools.dm, robot_items.dm, paper.dm # Explain why it's good for the game # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: refactor: refactored files to change variable name using colour to color. /:cl: Co-authored-by: Julien --- code/game/objects/items/tools/misc_tools.dm | 22 +++++++++---------- .../mob/living/silicon/robot/robot_items.dm | 8 +++---- code/modules/paperwork/paper.dm | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/code/game/objects/items/tools/misc_tools.dm b/code/game/objects/items/tools/misc_tools.dm index f868c6d5ab24..06f42aacd56c 100644 --- a/code/game/objects/items/tools/misc_tools.dm +++ b/code/game/objects/items/tools/misc_tools.dm @@ -161,7 +161,7 @@ matter = list("metal" = 10) inherent_traits = list(TRAIT_TOOL_PEN) /// what color the ink is! - var/pen_colour = "black" + var/pen_color = "black" var/on = TRUE var/clicky = FALSE @@ -180,7 +180,7 @@ /obj/item/tool/pen/proc/update_pen_state() overlays.Cut() if(on) - overlays += "+[pen_colour]_tip" + overlays += "+[pen_color]_tip" /obj/item/tool/pen/afterattack(atom/target, mob/user, proximity_flag, click_parameters) . = ..() @@ -246,7 +246,7 @@ /obj/item/tool/pen/blue desc = "It's a normal blue ink pen." - pen_colour = "blue" + pen_color = "blue" /obj/item/tool/pen/blue/clicky desc = "It's a WY brand extra clicky blue ink pen." @@ -255,7 +255,7 @@ /obj/item/tool/pen/red desc = "It's a normal red ink pen." - pen_colour = "red" + pen_color = "red" /obj/item/tool/pen/red/clicky desc = "It's a WY brand extra clicky red ink pen." @@ -264,7 +264,7 @@ /obj/item/tool/pen/green desc = "It's a normal green ink pen." - pen_colour = "green" + pen_color = "green" /obj/item/tool/pen/green/clicky desc = "It's a WY brand extra clicky green ink pen." @@ -273,7 +273,7 @@ /obj/item/tool/pen/invisible desc = "It's an invisible pen marker." - pen_colour = "white" + pen_color = "white" /obj/item/tool/pen/fountain desc = "A lavish testament to the ingenuity of ARMAT's craftsmanship, this fountain pen is a paragon of design and functionality. Detailed with golden accents and intricate mechanics, the pen allows for a swift change between a myriad of ink colors with a simple twist. A product of precision engineering, each mechanism inside the pen is designed to provide a seamless, effortless transition from one color to the next, creating an instrument of luxurious versatility." @@ -282,8 +282,8 @@ icon_state = "fountain_pen" item_state = "fountain_pen" matter = list("metal" = 20, "gold" = 10) - var/static/list/colour_list = list("red", "blue", "green", "yellow", "purple", "pink", "brown", "black", "orange") // Can add more colors as required - var/current_colour_index = 1 + var/static/list/color_list = list("red", "blue", "green", "yellow", "purple", "pink", "brown", "black", "orange") // Can add more colors as required + var/current_color_index = 1 var/owner_name /obj/item/tool/pen/fountain/pickup(mob/user, silent) @@ -305,9 +305,9 @@ /obj/item/tool/pen/fountain/attack_self(mob/living/carbon/human/user) if(on) - current_colour_index = (current_colour_index % length(colour_list)) + 1 - pen_colour = colour_list[current_colour_index] - balloon_alert(user,"you twist the pen and change the ink color to [pen_colour].") + current_color_index = (current_color_index % length(color_list)) + 1 + pen_color = color_list[current_color_index] + balloon_alert(user,"you twist the pen and change the ink color to [pen_color].") if(clicky) playsound(user.loc, 'sound/items/pen_click_on.ogg', 100, 1, 5) update_pen_state() diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 6b29a47be3ea..3838386c634c 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -9,16 +9,16 @@ /obj/item/tool/pen/robopen/attack_self(mob/user) ..() - var/choice = tgui_input_list(usr, "Would you like to change color or mode?", "Change Mode", list("Colour","Mode")) + var/choice = tgui_input_list(usr, "Would you like to change color or mode?", "Change Mode", list("Color","Mode")) if(!choice) return playsound(src.loc, 'sound/effects/pop.ogg', 25, FALSE) switch(choice) - if("Colour") - var/newcolour = tgui_input_list(usr, "Which color would you like to use?", list("black","blue","red","green","yellow")) - if(newcolour) pen_colour = newcolour + if("Color") + var/newcolor = tgui_input_list(usr, "Which color would you like to use?", list("black","blue","red","green","yellow")) + if(newcolor) pen_color = newcolor if("Mode") if (mode == 1) mode = 2 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 2adfa1bde4c9..106d3df3e786 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -258,7 +258,7 @@ t = replacetext(t, "\[upp\]", "") t = replacetext(t, "\[cmb\]", "") - t = "[t]" + t = "[t]" else // If it is a crayon, and he still tries to use these, make them empty! t = replacetext(t, "\[*\]", "") t = replacetext(t, "\[hr\]", "") @@ -272,7 +272,7 @@ t = replacetext(t, "\[cell\]", "") t = replacetext(t, "\[logo\]", "") - t = "[t]" + t = "[t]" // t = replacetext(t, "#", "") // Junk converted to nothing! From 8a44ffd2f19cc88e863a3121a4b83f0db78b542a Mon Sep 17 00:00:00 2001 From: BlackDragon <31581761+blackdragonTOW@users.noreply.github.com> Date: Sat, 13 Jan 2024 06:09:51 -0800 Subject: [PATCH 06/32] Character name max length increase by 2. (#5358) # About the pull request Bumping the max name length by two. I've seen a few people who drop the quotations on their nickname to save characters to fit the name they want. This would help allow them to have quotations on their nick again. # Explain why it's good for the game Letting people have the names they want without having to gimmick the quotation character count. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: qol: increased name character limit by two. /:cl: --- code/__DEFINES/text.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__DEFINES/text.dm b/code/__DEFINES/text.dm index 0ce7e508daac..26567be26255 100644 --- a/code/__DEFINES/text.dm +++ b/code/__DEFINES/text.dm @@ -23,4 +23,4 @@ #define MAX_EMOTE_LEN 256 #define MAX_PAPER_MESSAGE_LEN 3072 #define MAX_BOOK_MESSAGE_LEN 9216 -#define MAX_NAME_LEN 26 +#define MAX_NAME_LEN 28 From ca0659887e6e12ccdd2b457bce051b5c2f322ec7 Mon Sep 17 00:00:00 2001 From: Julian56 <117036822+Huffie56@users.noreply.github.com> Date: Sun, 14 Jan 2024 12:19:22 +0100 Subject: [PATCH 07/32] refactor change some color by using defines already there (#5398) # About the pull request remove the lie that was color_pink(magenta) and color_beige(light_beige).... basically use current define to where it was possible... # Explain why it's good for the game # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: refactor: change some color by using defines already implemented. /:cl: --------- Co-authored-by: Julien --- code/__DEFINES/colours.dm | 32 ++++++++++------- code/__DEFINES/minimap.dm | 1 - .../effects/decals/cleanable/blood/robots.dm | 6 ++-- code/game/objects/effects/decals/crayon.dm | 2 +- code/game/objects/items.dm | 2 +- .../items/devices/radio/listening_bugs.dm | 2 +- code/game/objects/items/paint.dm | 4 +-- .../objects/items/reagent_containers/food.dm | 2 +- .../items/reagent_containers/food/snacks.dm | 10 +++--- .../reagent_containers/food/snacks/grown.dm | 12 +++---- code/game/objects/items/stacks/cable_coil.dm | 6 ++-- code/game/objects/items/toys/crayons.dm | 14 ++++---- .../structures/crates_lockers/largecrate.dm | 2 +- code/modules/animations/animation_library.dm | 24 ++++++------- code/modules/cm_tech/tech_tiers.dm | 26 +++++++------- code/modules/gear_presets/uscm_ship.dm | 2 +- .../mob/living/carbon/human/examine.dm | 4 +-- code/modules/reagents/Chemistry-Reagents.dm | 2 +- .../reagents/chemistry_reagents/alcohol.dm | 4 +-- .../reagents/chemistry_reagents/drink.dm | 4 +-- .../reagents/chemistry_reagents/food.dm | 8 ++--- .../reagents/chemistry_reagents/other.dm | 34 +++++++++---------- .../reagents/chemistry_reagents/toxin.dm | 8 ++--- 23 files changed, 108 insertions(+), 103 deletions(-) diff --git a/code/__DEFINES/colours.dm b/code/__DEFINES/colours.dm index e96546cdf7d2..e9a03a6382da 100644 --- a/code/__DEFINES/colours.dm +++ b/code/__DEFINES/colours.dm @@ -14,31 +14,37 @@ // BLACK AND WHITE COLOR DEFINE. -/// Full white. rgb(255, 255, 255) +/// White rgb(255, 255, 255) #define COLOR_WHITE "#FFFFFF" -/// Full black. rgb(0, 0, 0) +/// Black rgb(0, 0, 0) #define COLOR_BLACK "#000000" // THE THREE PRIMARIES COLORS DEFINES. -/// Full red. rgb(255, 0, 0) +/// Red rgb(255, 0, 0) #define COLOR_RED "#FF0000" -/// Full green. rgb(0, 255, 0) +/// Green rgb(0, 255, 0) #define COLOR_GREEN "#00FF00" -/// Full blue. rgb(0, 0, 255) +/// Blue rgb(0, 0, 255) #define COLOR_BLUE "#0000FF" //mix of two full primary colors -/// full cyan rgb(0, 255, 255) B + G +/// Cyan rgb(0, 255, 255) B + G #define COLOR_CYAN "#00FFFF" -/// full magenta(not pink) rgb(255, 0, 255) R+B -#define COLOR_PINK "#FF00FF" -/// full yellow rgb(255, 255, 0) R+G +/// Magenta rgb(255, 0, 255) R+B +#define COLOR_MAGENTA "#FF00FF" +/// Yellow rgb(255, 255, 0) R+G #define COLOR_YELLOW "#FFFF00" // colors define in use bellow + +/// Olive rgb(128, 128, 0) +#define COLOR_OLIVE "#808000" +/// Silver rgb(192, 192, 192) shade of grey #define COLOR_SILVER "#C0C0C0" +/// Gray rgb(128, 128, 128) +#define COLOR_GRAY "#808080" #define COLOR_FLOORTILE_GRAY "#8D8B8B" @@ -46,15 +52,15 @@ #define COLOR_DARK_RED "#A50824" +/// Maroon rgb(128, 0, 0) shade of red #define COLOR_MAROON "#800000" + #define COLOR_VIVID_RED "#FF3232" #define COLOR_LIGHT_GRAYISH_RED "#E4C7C5" #define COLOR_SOFT_RED "#FA8282" #define COLOR_VERY_SOFT_YELLOW "#FAE48E" -#define COLOR_OLIVE "#808000" - ///light green rgb( 0, 128, 0) #define COLOR_LIGHT_GREEN "#008000" #define COLOR_DARK_MODERATE_LIME_GREEN "#44964A" @@ -62,11 +68,11 @@ #define COLOR_TEAL "#008080" #define COLOR_MODERATE_BLUE "#555CC2" - +/// Purple rgb( 128, 0, 128) #define COLOR_PURPLE "#800080" #define COLOR_STRONG_VIOLET "#6927c5" -#define COLOR_BEIGE "#CEB689" +#define LIGHT_BEIGE "#CEB689" #define COLOR_DARK_MODERATE_ORANGE "#8B633B" #define COLOR_BROWN "#BA9F6D" diff --git a/code/__DEFINES/minimap.dm b/code/__DEFINES/minimap.dm index 003d723600c4..57c5ffeba38a 100644 --- a/code/__DEFINES/minimap.dm +++ b/code/__DEFINES/minimap.dm @@ -71,7 +71,6 @@ GLOBAL_LIST_INIT(all_minimap_flags, bitfield2list(MINIMAP_FLAG_ALL)) #define MINIMAP_ICON_COLOR_COMMANDER "#c6fcfc" #define MINIMAP_ICON_COLOR_HEAD "#F0C542" -#define MINIMAP_ICON_COLOR_SILVER "#c0c0c0" #define MINIMAP_ICON_COLOR_BRONZE "#eb9545" #define MINIMAP_ICON_COLOR_DOCTOR "#b83737" diff --git a/code/game/objects/effects/decals/cleanable/blood/robots.dm b/code/game/objects/effects/decals/cleanable/blood/robots.dm index 1bbadb1461b6..3ee3c9e07f9a 100644 --- a/code/game/objects/effects/decals/cleanable/blood/robots.dm +++ b/code/game/objects/effects/decals/cleanable/blood/robots.dm @@ -3,11 +3,11 @@ desc = "It's a useless heap of junk... or is it?" icon = 'icons/mob/robots.dmi' icon_state = "gib1" - basecolor="#030303" + basecolor=COLOR_OIL random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7") /obj/effect/decal/cleanable/blood/gibs/robot/update_icon() - color = "#FFFFFF" + color = COLOR_WHITE /obj/effect/decal/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like return @@ -39,7 +39,7 @@ /obj/effect/decal/cleanable/blood/oil name = "motor oil" desc = "It's black and greasy." - basecolor="#030303" + basecolor=COLOR_OIL /obj/effect/decal/cleanable/blood/oil/dry() return diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index cfe5f27da9a7..35e354c121bb 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -5,7 +5,7 @@ layer = ABOVE_TURF_LAYER anchored = TRUE -/obj/effect/decal/cleanable/crayon/New(location, main = "#FFFFFF",shade = "#000000", type = "rune") +/obj/effect/decal/cleanable/crayon/New(location, main = COLOR_WHITE,shade = COLOR_BLACK, type = "rune") ..() forceMove(location) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 7cb2781b253b..fcd431c33d26 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -275,7 +275,7 @@ cases. Override_icon_state should be a list.*/ size = "huge" if(SIZE_MASSIVE) size = "massive" - . += "This is a [blood_color ? blood_color != "#030303" ? "bloody " : "oil-stained " : ""][icon2html(src, user)][src.name]. It is a [size] item." + . += "This is a [blood_color ? blood_color != COLOR_OIL ? "bloody " : "oil-stained " : ""][icon2html(src, user)][src.name]. It is a [size] item." if(desc) . += desc if(desc_lore) diff --git a/code/game/objects/items/devices/radio/listening_bugs.dm b/code/game/objects/items/devices/radio/listening_bugs.dm index 67a91de1bd56..9492188a14f0 100644 --- a/code/game/objects/items/devices/radio/listening_bugs.dm +++ b/code/game/objects/items/devices/radio/listening_bugs.dm @@ -126,7 +126,7 @@ size = "small" if(SIZE_MEDIUM) size = "normal-sized" - . += "This is a [blood_color ? blood_color != "#030303" ? "bloody " : "oil-stained " : ""][icon2html(src, user)][src.name]. It is a [size] item." + . += "This is a [blood_color ? blood_color != COLOR_OIL ? "bloody " : "oil-stained " : ""][icon2html(src, user)][src.name]. It is a [size] item." if(desc) . += desc if(desc_lore) diff --git a/code/game/objects/items/paint.dm b/code/game/objects/items/paint.dm index c538cbf3944f..804d258bdcb4 100644 --- a/code/game/objects/items/paint.dm +++ b/code/game/objects/items/paint.dm @@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(cached_icons) name = "Paint" id = "paint_" reagent_state = 2 - color = "#808080" + color = COLOR_GRAY description = "This paint will only adhere to floor tiles." /datum/reagent/paint/reaction_turf(turf/T, volume) @@ -128,7 +128,7 @@ GLOBAL_LIST_EMPTY(cached_icons) id = "paint_remover" description = "Paint remover is used to remove floor paint from floor tiles." reagent_state = 2 - color = "#808080" + color = COLOR_GRAY /datum/reagent/paint_remover/reaction_turf(turf/T, volume) if(istype(T) && T.icon != initial(T.icon)) diff --git a/code/game/objects/items/reagent_containers/food.dm b/code/game/objects/items/reagent_containers/food.dm index ded1b90b106f..f4b2213904d2 100644 --- a/code/game/objects/items/reagent_containers/food.dm +++ b/code/game/objects/items/reagent_containers/food.dm @@ -9,7 +9,7 @@ possible_transfer_amounts = null volume = 50 //Sets the default container amount for all food items. flags_atom = CAN_BE_SYRINGED - var/filling_color = "#FFFFFF" //Used by sandwiches. + var/filling_color = COLOR_WHITE //Used by sandwiches. /obj/item/reagent_container/food/Initialize() . = ..() diff --git a/code/game/objects/items/reagent_containers/food/snacks.dm b/code/game/objects/items/reagent_containers/food/snacks.dm index 076a4f77cf01..4d1c82764fb6 100644 --- a/code/game/objects/items/reagent_containers/food/snacks.dm +++ b/code/game/objects/items/reagent_containers/food/snacks.dm @@ -569,7 +569,7 @@ name = "Boiled egg" desc = "A hard-boiled egg." icon_state = "egg" - filling_color = "#FFFFFF" + filling_color = COLOR_WHITE /obj/item/reagent_container/food/snacks/boiledegg/Initialize() . = ..() @@ -865,7 +865,7 @@ name = "Clown Burger" desc = "This tastes funny..." icon_state = "clownburger" - filling_color = "#FF00FF" + filling_color = COLOR_MAGENTA /obj/item/reagent_container/food/snacks/clownburger/Initialize() . = ..() @@ -881,7 +881,7 @@ name = "Mime Burger" desc = "Its taste defies language." icon_state = "mimeburger" - filling_color = "#FFFFFF" + filling_color = COLOR_WHITE /obj/item/reagent_container/food/snacks/mimeburger/Initialize() . = ..() @@ -1368,7 +1368,7 @@ name = "Tomato soup" desc = "Smells like copper" icon_state = "tomatosoup" - filling_color = "#FF0000" + filling_color = COLOR_RED /obj/item/reagent_container/food/snacks/bloodsoup/Initialize() . = ..() @@ -2128,7 +2128,7 @@ desc = "A tasty dessert that won't make it through a metal detector." icon_state = "gappletart" trash = /obj/item/trash/plate - filling_color = "#FFFF00" + filling_color = COLOR_YELLOW /obj/item/reagent_container/food/snacks/appletart/Initialize() . = ..() diff --git a/code/game/objects/items/reagent_containers/food/snacks/grown.dm b/code/game/objects/items/reagent_containers/food/snacks/grown.dm index 32423c121b61..4c988f18ac7c 100644 --- a/code/game/objects/items/reagent_containers/food/snacks/grown.dm +++ b/code/game/objects/items/reagent_containers/food/snacks/grown.dm @@ -62,7 +62,7 @@ name = "cherries" desc = "Great for toppings!" icon_state = "cherry" - filling_color = "#FF0000" + filling_color = COLOR_RED gender = PLURAL plantname = "cherry" @@ -357,7 +357,7 @@ name = "chili" desc = "It's spicy! Wait... IT'S BURNING ME!!" icon_state = "chilipepper" - filling_color = "#FF0000" + filling_color = COLOR_RED plantname = "chili" /obj/item/reagent_container/food/snacks/grown/eggplant @@ -379,7 +379,7 @@ name = "tomato" desc = "I say to-mah-to, you say tom-mae-to." icon_state = "tomato" - filling_color = "#FF0000" + filling_color = COLOR_RED potency = 10 plantname = "tomato" @@ -395,7 +395,7 @@ desc = "I say to-mah-to, you say tom-mae-to... OH GOD IT'S EATING MY LEGS!!" icon_state = "killertomato" potency = 10 - filling_color = "#FF0000" + filling_color = COLOR_RED potency = 30 plantname = "killertomato" @@ -414,7 +414,7 @@ desc = "So bloody...so...very...bloody....AHHHH!!!!" icon_state = "bloodtomato" potency = 10 - filling_color = "#FF0000" + filling_color = COLOR_RED plantname = "bloodtomato" /obj/item/reagent_container/food/snacks/grown/bloodtomato/launch_impact(atom/hit_atom) @@ -502,7 +502,7 @@ desc = "Amanita Muscaria: Learn poisonous mushrooms by heart. Only pick mushrooms you know." icon_state = "amanita" potency = 10 - filling_color = "#FF0000" + filling_color = COLOR_RED plantname = "amanita" /obj/item/reagent_container/food/snacks/grown/mushroom/angel diff --git a/code/game/objects/items/stacks/cable_coil.dm b/code/game/objects/items/stacks/cable_coil.dm index e846979c00b4..077cb801c90d 100644 --- a/code/game/objects/items/stacks/cable_coil.dm +++ b/code/game/objects/items/stacks/cable_coil.dm @@ -33,7 +33,7 @@ /obj/item/stack/cable_coil/proc/updateicon() if (!color) - color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) + color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_MAGENTA, COLOR_YELLOW, COLOR_CYAN) if(amount == 1) icon_state = "coil1" name = "cable piece" @@ -298,11 +298,11 @@ color = "#a8c1dd" /obj/item/stack/cable_coil/white - color = "#FFFFFF" + color = COLOR_WHITE /obj/item/stack/cable_coil/random/Initialize() . = ..() - color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) + color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_MAGENTA, COLOR_YELLOW, COLOR_CYAN) /obj/item/stack/cable_coil/attack(mob/M as mob, mob/user as mob) if(ishuman(M)) diff --git a/code/game/objects/items/toys/crayons.dm b/code/game/objects/items/toys/crayons.dm index c02b59289fa1..c8dc85b95a1a 100644 --- a/code/game/objects/items/toys/crayons.dm +++ b/code/game/objects/items/toys/crayons.dm @@ -37,21 +37,21 @@ /obj/item/toy/crayon/mime icon_state = "crayonmime" desc = "A very sad-looking crayon." - crayon_color = "#FFFFFF" - shadeColour = "#000000" + crayon_color = COLOR_WHITE + shadeColour = COLOR_BLACK colourName = "mime" uses = 0 /obj/item/toy/crayon/mime/attack_self(mob/living/user) //inversion ..() - if(crayon_color != "#FFFFFF" && shadeColour != "#000000") - crayon_color = "#FFFFFF" - shadeColour = "#000000" + if(crayon_color != COLOR_WHITE && shadeColour != COLOR_BLACK) + crayon_color = COLOR_WHITE + shadeColour = COLOR_BLACK to_chat(user, "You will now draw in white and black with this crayon.") else - crayon_color = "#000000" - shadeColour = "#FFFFFF" + crayon_color = COLOR_BLACK + shadeColour = COLOR_WHITE to_chat(user, "You will now draw in black and white with this crayon.") /obj/item/toy/crayon/rainbow diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index e9e3a9a7b5d6..39a659c5f397 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -280,7 +280,7 @@ GLOBAL_LIST_INIT(rbarrel_color_list, list(COLOR_SILVER, COLOR_MODERATE_BLUE, COLOR_PURPLE, COLOR_STRONG_VIOLET, - COLOR_BEIGE, + LIGHT_BEIGE, COLOR_DARK_MODERATE_ORANGE, COLOR_BROWN, COLOR_DARK_BROWN)) diff --git a/code/modules/animations/animation_library.dm b/code/modules/animations/animation_library.dm index d4fd8feeaf24..f153338487cd 100644 --- a/code/modules/animations/animation_library.dm +++ b/code/modules/animations/animation_library.dm @@ -47,22 +47,22 @@ Instead of being uniform, it starts out a littler slower, goes fast in the middl animate(A, alpha = 175, pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3) //Flashes a color, then goes back to regular. -/proc/animation_flash_color(atom/A, flash_color = "#FF0000", speed = 3) //Flashes red on default. +/proc/animation_flash_color(atom/A, flash_color = COLOR_RED, speed = 3) //Flashes red on default. var/oldcolor = A.color animate(A, color = flash_color, time = speed, flags = ANIMATION_PARALLEL) animate(color = oldcolor, time = speed) /* fuck this, only halloween uses this -spookydonut //Gives it a spooky overlay and animation. Same as above, mostly, only adds a cool overlay effect. -/proc/animation_horror_flick(atom/A, flash_color = "#000000", speed = 4) +/proc/animation_horror_flick(atom/A, flash_color = COLOR_BLACK, speed = 4) animate(A, color = flash_color, time = speed) - animate(color = "#FFFFFF", time = speed) + animate(color = COLOR_WHITE, time = speed) var/image/I = image('icons/mob/mob.dmi',A,"spook") I.flick_overlay(A,7) /proc/animation_blood_spatter(atom/A, flash_color = "#8A0707", speed = 4) animate(A, color = flash_color, time = speed) - animate(color = "#FFFFFF", time = speed) + animate(color = COLOR_WHITE, time = speed) var/image/I = image('icons/mob/mob.dmi',A,"blood_spatter") if(prob(50)) I.transform = matrix(rand(0,45), MATRIX_ROTATE) @@ -91,13 +91,13 @@ Instead of being uniform, it starts out a littler slower, goes fast in the middl /proc/animation_teleport_quick_in(atom/A, speed = 10) A.transform = matrix(0, 4, MATRIX_SCALE) A.alpha = 0 //Start with transparency, just in case. - animate(A, alpha = 255, transform = null, color = "#FFFFFF", time = speed, easing = BACK_EASING) + animate(A, alpha = 255, transform = null, color = COLOR_WHITE, time = speed, easing = BACK_EASING) /*A magical teleport animation, for when the person is transported with some magic. Good for Halloween type events. Can look good elsewhere as well.*/ /*proc/animation_teleport_magic_out(atom/A, speed = 6) animate(A, transform = matrix(1.5, 0, MATRIX_SCALE), time = speed, easing = BACK_EASING) - animate(transform = matrix(0, 4, MATRIX_SCALE) * matrix(0, 6, MATRIX_TRANSLATE), color = "#FFFF00", time = speed, alpha = 100, easing = BOUNCE_EASING|EASE_IN) + animate(transform = matrix(0, 4, MATRIX_SCALE) * matrix(0, 6, MATRIX_TRANSLATE), color = COLOR_YELLOW, time = speed, alpha = 100, easing = BOUNCE_EASING|EASE_IN) animate(alpha = 0, time = speed) var/image/I = image('icons/effects/effects.dmi',A,"sparkle") I.flick_overlay(A,9) @@ -106,8 +106,8 @@ Can look good elsewhere as well.*/ /proc/animation_teleport_magic_in(atom/A, speed = 6) A.transform = matrix(0,3.5, MATRIX_SCALE) A.alpha = 0 - animate(A, alpha = 255, color = "#FFFF00", time = speed, easing = BACK_EASING) - animate(transform = matrix(1.5, 0, MATRIX_SCALE), color = "#FFFFFF", time = speed, easing = CIRCULAR_EASING|EASE_OUT) + animate(A, alpha = 255, color = COLOR_YELLOW, time = speed, easing = BACK_EASING) + animate(transform = matrix(1.5, 0, MATRIX_SCALE), color = COLOR_WHITE, time = speed, easing = CIRCULAR_EASING|EASE_OUT) animate(transform = null, time = speed-1) var/image/I = image('icons/effects/effects.dmi',A,"sparkle") I.flick_overlay(A,10) @@ -115,7 +115,7 @@ Can look good elsewhere as well.*/ //A spooky teleport for evil dolls, horrors, and whatever else. Halloween type stuff. /proc/animation_teleport_spooky_out(atom/A, speed = 6, sleep_duration = 0) animate(A, transform = matrix() * 1.5, color = "#551a8b", time = speed, easing = BACK_EASING) - animate(transform = matrix() * 0.2, alpha = 100, color = "#000000", time = speed, easing = BACK_EASING) + animate(transform = matrix() * 0.2, alpha = 100, color = COLOR_BLACK, time = speed, easing = BACK_EASING) animate(alpha = 0, time = speed) var/image/I = image('icons/effects/effects.dmi',A,"spooky") I.flick_overlay(A,9,RESET_COLOR|RESET_ALPHA|TILE_BOUND) @@ -125,7 +125,7 @@ Can look good elsewhere as well.*/ A.transform *= 1.2 A.alpha = 0 animate(A, alpha = 255, color = "#551a8b", time = speed) - animate(transform = null, color = "#FFFFFF", time = speed, easing = QUAD_EASING|EASE_OUT) + animate(transform = null, color = COLOR_WHITE, time = speed, easing = QUAD_EASING|EASE_OUT) var/image/I = image('icons/effects/effects.dmi',A,"spooky") I.flick_overlay(A,10)*/ @@ -135,7 +135,7 @@ Can look good elsewhere as well.*/ A.mouse_opacity = MOUSE_OPACITY_TRANSPARENT //We don't want them to click this while the animation is still playing. A.density = FALSE //So it doesn't block anything. var/i = 1 + (0.1 * rand(1,5)) - animate(A, transform = matrix() * i, color = "#808080", time = speed, easing = SINE_EASING) + animate(A, transform = matrix() * i, color = COLOR_GRAY, time = speed, easing = SINE_EASING) animate(alpha = 0, time = speed) return speed @@ -166,7 +166,7 @@ Can look good elsewhere as well.*/ animate(alpha = 100, matrix(rand(45,90) * pick(1,-1), MATRIX_ROTATE), time = speed) animate(pixel_x = x_o+rand(-x_n, x_n), pixel_y = y_o+rand(-y_n, y_n), time = speed, easing = ELASTIC_EASING|EASE_IN) animate(pixel_x = x_o, pixel_y = y_o, time = speed, easing = CIRCULAR_EASING|EASE_OUT) - animate(alpha = 0, color = "#808080", time = speed) + animate(alpha = 0, color = COLOR_GRAY, time = speed) var/image/I = image('icons/effects/effects.dmi',A,"red_particles") I.flick_overlay(A,25) return speed*9*/ diff --git a/code/modules/cm_tech/tech_tiers.dm b/code/modules/cm_tech/tech_tiers.dm index 498c267afa05..b2d2c0a08de3 100644 --- a/code/modules/cm_tech/tech_tiers.dm +++ b/code/modules/cm_tech/tech_tiers.dm @@ -4,8 +4,8 @@ var/flags = NO_FLAGS - var/disabled_color = "#FFFFFF" - var/color = "#FFFFFF" + var/disabled_color = COLOR_WHITE + var/color = COLOR_WHITE var/max_techs = INFINITE_TECHS // Infinite var/list/turf/tier_turfs @@ -19,22 +19,22 @@ /datum/tier/free name = "Initial Tier" tier = 0 - color = "#000000" - disabled_color = "#000000" + color = COLOR_BLACK + disabled_color = COLOR_BLACK flags = TIER_FLAG_TRANSITORY /datum/tier/one name = "Tier 1" tier = 1 - color = "#00FF00" + color = COLOR_GREEN disabled_color = "#007d00" /datum/tier/one_transition_two name = "Tier 1 to Tier 2 transition" tier = 1 - color = "#000000" - disabled_color = "#000000" + color = COLOR_BLACK + disabled_color = COLOR_BLACK flags = TIER_FLAG_TRANSITORY /datum/tier/two @@ -47,27 +47,27 @@ /datum/tier/two_transition_three name = "Tier 2 to Tier 3 transition" tier = 2 - color = "#000000" - disabled_color = "#000000" + color = COLOR_BLACK + disabled_color = COLOR_BLACK flags = TIER_FLAG_TRANSITORY /datum/tier/three name = "Tier 3" tier = 3 - color = "#FF0000" + color = COLOR_RED disabled_color = "#7d0000" /datum/tier/three_transition_four name = "Tier 3 to Tier 4 transition" tier = 3 - color = "#000000" - disabled_color = "#000000" + color = COLOR_BLACK + disabled_color = COLOR_BLACK flags = TIER_FLAG_TRANSITORY /datum/tier/four name = "Tier 4" tier = 4 - color = "#FF00FF" + color = COLOR_MAGENTA disabled_color = "#7d007d" max_techs = 1 diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index b5ef13f35b2b..0b6a3b4b1ed7 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -624,7 +624,7 @@ minimum_age = 27 skills = /datum/skills/auxiliary_officer - minimap_icon = list("cic" = MINIMAP_ICON_COLOR_SILVER) + minimap_icon = list("cic" = COLOR_SILVER) minimap_background = MINIMAP_ICON_BACKGROUND_CIC /datum/equipment_preset/uscm_ship/auxiliary_officer/New() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 77f33b999924..d116aa741d2f 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -129,7 +129,7 @@ if(gloves && !skipgloves) msg += "[t_He] [t_has] [gloves.get_examine_line(user)] [gloves.get_examine_location(src, user, WEAR_HANDS, t_He, t_his, t_him, t_has, t_is)].\n" else if(hands_blood_color) - msg += SPAN_WARNING("[t_He] [t_has] [(hands_blood_color != "#030303") ? "blood" : "oil"]-stained hands!\n") + msg += SPAN_WARNING("[t_He] [t_has] [(hands_blood_color != COLOR_OIL) ? "blood" : "oil"]-stained hands!\n") //belt if(belt) @@ -139,7 +139,7 @@ if(shoes && !skipshoes) msg += "[t_He] [t_is] wearing [shoes.get_examine_line(user)] [shoes.get_examine_location(src, user, WEAR_FEET, t_He, t_his, t_him, t_has, t_is)].\n" else if(feet_blood_color) - msg += SPAN_WARNING("[t_He] [t_has] [(feet_blood_color != "#030303") ? "blood" : "oil"]-stained feet!\n") + msg += SPAN_WARNING("[t_He] [t_has] [(feet_blood_color != COLOR_OIL) ? "blood" : "oil"]-stained feet!\n") //mask if(wear_mask && !skipmask) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 4e3f3a91449d..c5650ad001a2 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -28,7 +28,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent()) var/overdose_dam = 1//Handeled by heart damage var/spray_warning = FALSE //whether spraying that reagent creates an admin message. //var/list/viruses = list() - var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!) + var/color = COLOR_BLACK //(does not support alpha channels - yet!) var/datum/weakref/last_source_mob // For explosions var/explosive = FALSE diff --git a/code/modules/reagents/chemistry_reagents/alcohol.dm b/code/modules/reagents/chemistry_reagents/alcohol.dm index 08beb42fa410..b5db671b626c 100644 --- a/code/modules/reagents/chemistry_reagents/alcohol.dm +++ b/code/modules/reagents/chemistry_reagents/alcohol.dm @@ -234,7 +234,7 @@ name = "Poison Wine" id = "pwine" description = "Is this even wine? Toxic! Hallucinogenic! Probably consumed in boatloads by your superiors!" - color = "#000000" // rgb: 0, 0, 0 SHOCKER + color = COLOR_BLACK properties = list(PROPERTY_ALCOHOLIC = 1, PROPERTY_FUELING = 3, PROPERTY_OXIDIZING = 3, PROPERTY_FLOWING = 2) boozepwr = 1 @@ -559,7 +559,7 @@ name = "Snow White" id = "snowwhite" description = "A cold refreshment" - color = "#FFFFFF" // rgb: 255, 255, 255 + color = COLOR_WHITE properties = list(PROPERTY_ALCOHOLIC = 1.5, PROPERTY_FUELING = 3, PROPERTY_OXIDIZING = 3, PROPERTY_FLOWING = 2) boozepwr = 1.5 diff --git a/code/modules/reagents/chemistry_reagents/drink.dm b/code/modules/reagents/chemistry_reagents/drink.dm index 3a49429d664e..9577f61a3dcd 100644 --- a/code/modules/reagents/chemistry_reagents/drink.dm +++ b/code/modules/reagents/chemistry_reagents/drink.dm @@ -222,7 +222,7 @@ name = "Cherry Souto" id = "souto_cherry" description = "A cherry flavored soda that's canned in Havanna" - color = "#800000" + color = COLOR_MAROON /datum/reagent/drink/souto/lime name = "Lime Souto" @@ -494,7 +494,7 @@ name = "Lemonade" description = "Oh the nostalgia..." id = "lemonade" - color = "#FFFF00" // rgb: 255, 255, 0 + color = COLOR_YELLOW //*****************************************************************************************************/ //***************************************Remove When Safe**********************************************/ diff --git a/code/modules/reagents/chemistry_reagents/food.dm b/code/modules/reagents/chemistry_reagents/food.dm index 0ec3a2250260..2ee2a05bef32 100644 --- a/code/modules/reagents/chemistry_reagents/food.dm +++ b/code/modules/reagents/chemistry_reagents/food.dm @@ -184,7 +184,7 @@ id = "sodiumchloride" description = "A salt made of sodium chloride. Commonly used to season food." reagent_state = SOLID - color = "#FFFFFF" // rgb: 255,255,255 + color = COLOR_WHITE chemfiresupp = TRUE intensitymod = 0.1 burncolor = "#ffff00" @@ -227,7 +227,7 @@ id = "sprinkles" description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops." nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FF00FF" // rgb: 255, 0, 255 + color = COLOR_MAGENTA properties = list(PROPERTY_NUTRITIOUS = 2) flags = REAGENT_NO_GENERATION @@ -288,7 +288,7 @@ description = "The most widely consumed staple food on Earth. Rice is the most important grain with regard to human nutrition and caloric intake." reagent_state = SOLID nutriment_factor = 1 * REAGENTS_METABOLISM - color = "#FFFFFF" // rgb: 0, 0, 0 + color = COLOR_WHITE properties = list(PROPERTY_NUTRITIOUS = 2) /datum/reagent/cherryjelly @@ -304,6 +304,6 @@ name = "Honey" id = "honey" description = "Honey is a natural sweet, viscous food substance composed of mainly fructose and glucose." - color = "#FFFF00" + color = COLOR_YELLOW chemclass = CHEM_CLASS_RARE flags = REAGENT_NO_GENERATION diff --git a/code/modules/reagents/chemistry_reagents/other.dm b/code/modules/reagents/chemistry_reagents/other.dm index 45e66c182e6a..2416e9e84fe3 100644 --- a/code/modules/reagents/chemistry_reagents/other.dm +++ b/code/modules/reagents/chemistry_reagents/other.dm @@ -185,7 +185,7 @@ id = "oxygen" description = "Chemical element of atomic number 8. It is an oxidizing agent that forms oxides with most elements and many other compounds. Dioxygen is used in cellular respiration and is nessesary to sustain organic life." reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY chemfiresupp = TRUE properties = list(PROPERTY_OXIDIZING = 2) intensitymod = 0.75 @@ -212,7 +212,7 @@ id = "nitrogen" description = "Chemical element of atomic number 7. Liquid nitrogen is commonly used in cryogenics, with its melting point of 63.15 kelvin. Nitrogen is a component of many explosive compounds and fertilizers." reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY chemclass = CHEM_CLASS_BASIC custom_metabolism = AMOUNT_PER_TIME(1, 200 SECONDS) @@ -223,7 +223,7 @@ id = "hydrogen" description = "Chemical element of atomic number 1. Is the most abundant chemical element in the Universe. Liquid hydrogen was used as one of the first fuel sources for space travel. Very combustible and is used in many chemical reactions." reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY chemfiresupp = TRUE durationmod = -0.5 radiusmod = 0.2 @@ -295,7 +295,7 @@ id = "chlorine" description = "Chemical element of atomic number 17. High concentrations of elemental chlorine is highly reactive and poisonous for all living organisms. Chlorine gas has been used as a chemical warfare agent. Industrially used in the production of disinfectants, medicines, plastics and purification of water." reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY overdose = REAGENTS_OVERDOSE overdose_critical = REAGENTS_OVERDOSE_CRITICAL chemclass = CHEM_CLASS_BASIC @@ -306,7 +306,7 @@ id = "fluorine" description = "Chemical element of atomic number 9. It is a very reactive and highly toxic pale yellow gas at standard conditions. Mostly used for medical and dental purposes." reagent_state = GAS - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY overdose = REAGENTS_OVERDOSE overdose_critical = REAGENTS_OVERDOSE_CRITICAL chemclass = CHEM_CLASS_BASIC @@ -317,7 +317,7 @@ id = "sodium" description = "Chemical element of atomic number 11. Pure it is a soft and very reactive metal. Many salt compounds contain sodium, such as sodium chloride and sodium bicarbonate. There are more uses for sodium as a salt than as a metal." reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY chemclass = CHEM_CLASS_BASIC custom_metabolism = AMOUNT_PER_TIME(1, 200 SECONDS) @@ -343,7 +343,7 @@ id = "lithium" description = "Chemical element of atomic number 3. Is a soft alkali metal commonly used in the production of batteries. Highly reactive and flammable. Used as an antidepressant and for treating bipolar disorder." reagent_state = SOLID - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY chemfiresupp = TRUE intensitymod = 0.15 burncolor = "#ff356f" @@ -358,7 +358,7 @@ id = "sugar" description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste. The most simple form of sugar, glucose, is the only form of nutriment for red blood cells as they have no mitocondria. Sugar can therefore be used to improve blood regeneration as a nutriment, although ineffective." reagent_state = SOLID - color = "#FFFFFF" // rgb: 255, 255, 255 + color = COLOR_WHITE chemclass = CHEM_CLASS_BASIC properties = list(PROPERTY_NUTRITIOUS = 1) flags = REAGENT_TYPE_MEDICAL @@ -368,7 +368,7 @@ id = "glycerol" description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity, often used in medicines and beverages. Used in the production of plastic, nitroglycerin and other explosives." reagent_state = LIQUID - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY chemclass = CHEM_CLASS_RARE custom_metabolism = AMOUNT_PER_TIME(1, 200 SECONDS) @@ -720,8 +720,8 @@ id = "napalmgel" description = "Unlike its liquid contemporaries, this gelled variant of napalm is easily extinguished, but shoots far and lingers on the ground in a viscous mess, while reacting with inorganic materials to ignite them." flameshape = FLAMESHAPE_LINE - color = "#00ff00" - burncolor = "#00ff00" + color = COLOR_GREEN + burncolor = COLOR_GREEN burn_sprite = "green" properties = list( PROPERTY_INTENSITY = BURN_LEVEL_TIER_2, @@ -750,8 +750,8 @@ id = "napalmb" description = "A special variant of napalm that's unable to cling well to anything, but disperses over a wide area while burning slowly. The composition reacts with inorganic materials to ignite them, causing severe damage." flameshape = FLAMESHAPE_TRIANGLE - color = "#00ff00" - burncolor = "#00ff00" + color = COLOR_GREEN + burncolor = COLOR_GREEN burn_sprite = "green" properties = list( PROPERTY_INTENSITY = BURN_LEVEL_TIER_2, @@ -764,8 +764,8 @@ name = "Napalm E" id = "napalme" description = "A sticky combustible liquid chemical that penetrates the best fire retardants." - color = "#800080" - burncolor = "#800080" + color = COLOR_PURPLE + burncolor = COLOR_PURPLE burn_sprite = "dynamic" properties = list( PROPERTY_INTENSITY = BURN_LEVEL_TIER_2, @@ -807,7 +807,7 @@ id = "chlorine trifluoride" description = "A highly reactive interhalogen compound capaple of self ignition. A very strong oxidizer and is extremely reactive with most organic and inorganic materials." reagent_state = LIQUID - color = "#00FFFF" + color = COLOR_CYAN custom_metabolism = 100 chemfiresupp = TRUE burncolor = "#ff9300" @@ -874,7 +874,7 @@ id = "nitroglycerin" description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol. Despite being a highly volatile material, it is used for many medical purposes." reagent_state = LIQUID - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY custom_metabolism = AMOUNT_PER_TIME(1, 200 SECONDS) explosive = TRUE power = 1 diff --git a/code/modules/reagents/chemistry_reagents/toxin.dm b/code/modules/reagents/chemistry_reagents/toxin.dm index 445918ef284d..53ccb53f1748 100644 --- a/code/modules/reagents/chemistry_reagents/toxin.dm +++ b/code/modules/reagents/chemistry_reagents/toxin.dm @@ -205,10 +205,10 @@ id = "potassium_chloride" description = "A bitter tasting salt that can be used as a spice, but can cause cardiac arrest in larger quantities. It has for this reason been used as a component in lethal injections for many years." reagent_state = SOLID - color = "#FFFFFF" // rgb: 255,255,255 + color = COLOR_WHITE chemfiresupp = TRUE intensitymod = 0.1 - burncolor = "#800080" + burncolor = COLOR_PURPLE burncolormod = 5 overdose = 30 chemclass = CHEM_CLASS_UNCOMMON @@ -219,7 +219,7 @@ id = "potassium_chlorophoride" description = "A specific chemical based on Potassium Chloride used to stop the heart for surgery. Causes instant cardiac arrest. Not safe to eat!" reagent_state = SOLID - color = "#FFFFFF" // rgb: 255,255,255 + color = COLOR_WHITE overdose = 20 chemclass = CHEM_CLASS_UNCOMMON properties = list(PROPERTY_RELAXING = 8, PROPERTY_HYPOXEMIC = 4, PROPERTY_TOXIC = 2) @@ -261,7 +261,7 @@ name = "Formaldehyde" id = "formaldehyde" description = "Formaldehyde is a toxic organic gas that is mostly used in making resins, polymers and explosives. It is known to be a natural carcinogen." - color = "#808080" // rgb: 128, 128, 128 + color = COLOR_GRAY reagent_state = GAS chemclass = CHEM_CLASS_UNCOMMON properties = list(PROPERTY_TOXIC = 1, PROPERTY_CARCINOGENIC = 1) From 392dac2bdda8026a02be7e51db3f1dd9b3fdca27 Mon Sep 17 00:00:00 2001 From: forest2001 <41653574+realforest2001@users.noreply.github.com> Date: Sun, 14 Jan 2024 15:59:35 +0000 Subject: [PATCH 08/32] Requisitions delivery outlet fix (#5436) # About the pull request Fixes the sprite overlay when requisitions delivery tube spits out items. # Explain why it's good for the game # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: Fixes requisitions delivery tube output overlaying default sprite. /:cl: --- code/modules/recycling/disposal.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 88efcf7a37ba..4a6b98e8b5cf 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -1377,7 +1377,7 @@ //Expel the contents of the holder object, then delete it. Called when the holder exits the outlet /obj/structure/disposaloutlet/proc/expel(obj/structure/disposalholder/H) - flick("outlet-open", src) + flick("[icon_state]-open", src) playsound(src, 'sound/machines/warning-buzzer.ogg', 25, 0) sleep(20) //Wait until correct animation frame playsound(src, 'sound/machines/hiss.ogg', 25, 0) From f76b5c5e967912e2042600932f9243cd0015df99 Mon Sep 17 00:00:00 2001 From: Staykeu <79605233+Staykeu@users.noreply.github.com> Date: Sun, 14 Jan 2024 17:30:42 -0500 Subject: [PATCH 09/32] Adds the ability to put prescription lenses in role-related optics (#5367) ## About the pull request Adds the ability to apply lenses from prescription eyewear into HUDs/mesons/specialist optics. ## Explain why it's good for the game QoL change that makes life easier for those that have characters with impaired vision, allows the use of these eyepieces without obscuring the mask slot, be it reserved for smokes, scarfs, coifs, etc. # Testing Photographs and Procedure
Screenshots & Videos N/A
# Changelog :cl: Stakeyng add: Added the ability to combine prescription glasses with eyewear for varying roles /:cl: --------- Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/clothing/glasses/glasses.dm | 32 +++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index dae7f633f05d..b5345795644e 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -87,6 +87,36 @@ if(istype(A, /datum/action/item_action/toggle)) A.update_button_icon() +/obj/item/clothing/glasses/proc/try_make_offhand_prescription(mob/user) + if(!prescription) + return FALSE + + var/obj/item/clothing/glasses/offhand = user.get_inactive_hand() + if(istype(offhand) && !offhand.prescription) + if(tgui_alert(user, "Do you wish to take out the prescription lenses and put them in [offhand]?", "Insert Prescription Lenses", list("Yes", "No")) == "Yes") + if(QDELETED(src) || offhand != user.get_inactive_hand()) + return FALSE + offhand.prescription = TRUE + offhand.AddElement(/datum/element/poor_eyesight_correction) + offhand.desc += " Fitted with prescription lenses." + user.visible_message(SPAN_DANGER("[user] takes the lenses out of [src] and puts them in [offhand]."), SPAN_NOTICE("You take the lenses out of [src] and put them in [offhand].")) + qdel(src) + return TRUE + + return FALSE + +/obj/item/clothing/glasses/sunglasses/prescription/attack_self(mob/user) + if(try_make_offhand_prescription(user)) + return + + return ..() + +/obj/item/clothing/glasses/regular/attack_self(mob/user) + if(try_make_offhand_prescription(user)) + return + + return ..() + /obj/item/clothing/glasses/equipped(mob/user, slot) if(active && slot == WEAR_EYES) if(!can_use_active_effect(user)) @@ -225,7 +255,7 @@ desc = "The Corps may call them Regulation Prescription Glasses but you know them as Rut Prevention Glasses. These ones actually have a proper prescribed lens." icon_state = "mBCG" item_state = "mBCG" - prescription = 1 + prescription = TRUE flags_equip_slot = SLOT_EYES|SLOT_FACE /obj/item/clothing/glasses/m42_goggles From 20f49ec6ea7ad8aa4047d36d90ec3b611be2c66b Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Sun, 14 Jan 2024 22:39:02 +0000 Subject: [PATCH 10/32] Automatic changelog for PR #5367 [ci skip] --- html/changelogs/AutoChangeLog-pr-5367.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5367.yml diff --git a/html/changelogs/AutoChangeLog-pr-5367.yml b/html/changelogs/AutoChangeLog-pr-5367.yml new file mode 100644 index 000000000000..4d23adfdc824 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5367.yml @@ -0,0 +1,4 @@ +author: "Stakeyng" +delete-after: True +changes: + - rscadd: "Added the ability to combine prescription glasses with eyewear for varying roles" \ No newline at end of file From 4c496bfd446a39130a8a4969a188ef08f294fa7e Mon Sep 17 00:00:00 2001 From: private-tristan <54422837+private-tristan@users.noreply.github.com> Date: Sun, 14 Jan 2024 19:24:17 -0500 Subject: [PATCH 11/32] Alamayer Perma chair faces the right way (#5450) # About the pull request chairs in permabrig now face south (towards their table) instead of north, towards the wall # Explain why it's good for the game perma prisoners should be able to sit at their chair and be facing the paper and pen instead of the wall?? # Changelog :cl: maptweak: Alamayer PermaBrig Chairs face the right way /:cl: --- maps/map_files/USS_Almayer/USS_Almayer.dmm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index d637d1fa9b91..0fe5f4da8064 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -23180,12 +23180,10 @@ }, /area/almayer/hallways/port_hallway) "cjz" = ( -/obj/structure/bed/chair/bolted{ - dir = 1 - }, /obj/structure/machinery/light{ dir = 8 }, +/obj/structure/bed/chair/bolted, /turf/open/floor/almayer{ icon_state = "plate" }, @@ -70528,12 +70526,10 @@ /turf/open/floor/wood/ship, /area/almayer/living/commandbunks) "tYW" = ( -/obj/structure/bed/chair/bolted{ - dir = 1 - }, /obj/structure/machinery/light{ dir = 4 }, +/obj/structure/bed/chair/bolted, /turf/open/floor/almayer{ icon_state = "plate" }, From d484e2c1b1da890ac253dd68684a62f4e344d147 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 00:34:26 +0000 Subject: [PATCH 12/32] Automatic changelog for PR #5450 [ci skip] --- html/changelogs/AutoChangeLog-pr-5450.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5450.yml diff --git a/html/changelogs/AutoChangeLog-pr-5450.yml b/html/changelogs/AutoChangeLog-pr-5450.yml new file mode 100644 index 000000000000..1f4c00b9f6c9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5450.yml @@ -0,0 +1,4 @@ +author: "private-tristan" +delete-after: True +changes: + - maptweak: "Alamayer PermaBrig Chairs face the right way" \ No newline at end of file From 123af76ae41de79c4dec4bd391bea0eb0f796aa3 Mon Sep 17 00:00:00 2001 From: private-tristan <54422837+private-tristan@users.noreply.github.com> Date: Sun, 14 Jan 2024 19:25:10 -0500 Subject: [PATCH 13/32] trijent double light removal, moves some lights (#5448) # About the pull request removed double lights near engineering workshop: ![image](https://github.com/cmss13-devs/cmss13/assets/54422837/2ecb3a4a-2925-45ba-b93e-e14fea494880) moved some lights that were on the marshals reinforced windows to nearby walls because I don't like windows on walls before: ![image](https://github.com/cmss13-devs/cmss13/assets/54422837/c011477b-b3e2-4841-813c-8c3d0633ef76) after: ![image](https://github.com/cmss13-devs/cmss13/assets/54422837/7222e0f4-d83c-4e7e-92e6-14c9647ead54) # Explain why it's good for the game double lights bad. for the marshals light movement I just didn't like it, and I don't think there's anywhere else where lights are on windows(?) # Changelog :cl: fix: removed a light fixture being doubled on trijent maptweak: moved some trijent lights in marshals off windows /:cl: --- maps/map_files/DesertDam/Desert_Dam.dmm | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/maps/map_files/DesertDam/Desert_Dam.dmm b/maps/map_files/DesertDam/Desert_Dam.dmm index bf1d64fbc499..806cffd28a01 100644 --- a/maps/map_files/DesertDam/Desert_Dam.dmm +++ b/maps/map_files/DesertDam/Desert_Dam.dmm @@ -15516,6 +15516,9 @@ pixel_y = 24; start_charge = 0 }, +/obj/structure/machinery/light{ + dir = 4 + }, /turf/open/floor/prison{ dir = 5; icon_state = "red" @@ -16765,17 +16768,11 @@ }, /area/desert_dam/building/security/lobby) "aZt" = ( -/obj/structure/bed/chair{ - dir = 8 - }, /obj/structure/machinery/light{ - dir = 4 - }, -/turf/open/floor/prison{ - dir = 4; - icon_state = "red" + dir = 8 }, -/area/desert_dam/building/security/lobby) +/turf/open/floor/interior/wood, +/area/desert_dam/building/security/detective) "aZu" = ( /obj/structure/pipes/vents/pump{ dir = 4 @@ -18109,9 +18106,6 @@ "bdL" = ( /obj/item/reagent_container/food/drinks/flask/detflask, /obj/item/clothing/head/det_hat, -/obj/structure/machinery/light{ - dir = 8 - }, /obj/structure/surface/table/woodentable/fancy, /turf/open/floor/interior/wood, /area/desert_dam/building/security/detective) @@ -74482,7 +74476,7 @@ ceA act aVz aXD -aZt +aXD aXD aXD blY @@ -74953,7 +74947,7 @@ aXE aZJ bdL bjI -aXM +aZt aVB boW bqy From 8bda67e3bcfad1a049bd970a81fe09463ab8687d Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 00:48:28 +0000 Subject: [PATCH 14/32] Automatic changelog for PR #5448 [ci skip] --- html/changelogs/AutoChangeLog-pr-5448.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5448.yml diff --git a/html/changelogs/AutoChangeLog-pr-5448.yml b/html/changelogs/AutoChangeLog-pr-5448.yml new file mode 100644 index 000000000000..ef5100d1a7a9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5448.yml @@ -0,0 +1,5 @@ +author: "private-tristan" +delete-after: True +changes: + - bugfix: "removed a light fixture being doubled on trijent" + - maptweak: "moved some trijent lights in marshals off windows" \ No newline at end of file From 0cad49f519bb4617c1da1048f6a47536ebdc3562 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Mon, 15 Jan 2024 01:15:03 +0000 Subject: [PATCH 15/32] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-5350.yml | 4 ---- html/changelogs/AutoChangeLog-pr-5367.yml | 4 ---- html/changelogs/AutoChangeLog-pr-5448.yml | 5 ----- html/changelogs/AutoChangeLog-pr-5450.yml | 4 ---- html/changelogs/archive/2024-01.yml | 11 +++++++++++ 5 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-5350.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5367.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5448.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5450.yml diff --git a/html/changelogs/AutoChangeLog-pr-5350.yml b/html/changelogs/AutoChangeLog-pr-5350.yml deleted file mode 100644 index 94cad78f7e71..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5350.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "InsaneRed" -delete-after: True -changes: - - qol: "Moves \"Banish, Re-admit and De-evolving\" queen abilities into one list, making the queen ui less clutterier" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5367.yml b/html/changelogs/AutoChangeLog-pr-5367.yml deleted file mode 100644 index 4d23adfdc824..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5367.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Stakeyng" -delete-after: True -changes: - - rscadd: "Added the ability to combine prescription glasses with eyewear for varying roles" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5448.yml b/html/changelogs/AutoChangeLog-pr-5448.yml deleted file mode 100644 index ef5100d1a7a9..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5448.yml +++ /dev/null @@ -1,5 +0,0 @@ -author: "private-tristan" -delete-after: True -changes: - - bugfix: "removed a light fixture being doubled on trijent" - - maptweak: "moved some trijent lights in marshals off windows" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5450.yml b/html/changelogs/AutoChangeLog-pr-5450.yml deleted file mode 100644 index 1f4c00b9f6c9..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5450.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "private-tristan" -delete-after: True -changes: - - maptweak: "Alamayer PermaBrig Chairs face the right way" \ No newline at end of file diff --git a/html/changelogs/archive/2024-01.yml b/html/changelogs/archive/2024-01.yml index 0223446c6c38..b16cf15ac751 100644 --- a/html/changelogs/archive/2024-01.yml +++ b/html/changelogs/archive/2024-01.yml @@ -154,3 +154,14 @@ options for all maps and new item descriptions that are lore friendly. realforest2001: - rscadd: Added the X17 Riot Breaching Charge. +2024-01-15: + InsaneRed: + - qol: Moves "Banish, Re-admit and De-evolving" queen abilities into one list, making + the queen ui less clutterier + Stakeyng: + - rscadd: Added the ability to combine prescription glasses with eyewear for varying + roles + private-tristan: + - bugfix: removed a light fixture being doubled on trijent + - maptweak: moved some trijent lights in marshals off windows + - maptweak: Alamayer PermaBrig Chairs face the right way From ea8b7f1a4e2c3551851943d5fe6a69d77a030f44 Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Mon, 15 Jan 2024 01:11:58 -0800 Subject: [PATCH 16/32] SG ammo no longer uses vendor points (#5449) # About the pull request SG kit now has 3 drums inside, and removes the drums purchasable from the vendor. # Explain why it's good for the game Similar rationale to https://github.com/cmss13-devs/cmss13/pull/4454 It's a bad choice to take anything but SG drums. By removing the mandatory purchases, smartgunners can now spend their points on utility instead. # Changelog :cl: balance: 3 smartgun drums now spawn in the SG's equipment crate. Smartgun drums cannot be purchased from the SG vendor. /:cl: --- .../vending/vendor_types/squad_prep/squad_smartgunner.dm | 3 --- code/modules/cm_marines/equipment/weapons.dm | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm index 8a1b77103cad..04061370168d 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_smartgunner.dm @@ -4,9 +4,6 @@ GLOBAL_LIST_INIT(cm_vending_gear_smartgun, list( list("SMARTGUN SET (MANDATORY)", 0, null, null, null), list("Essential Smartgunner Set", 0, /obj/item/storage/box/m56_system, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY), - list("SMARTGUN AMMUNITION", 0, null, null, null), - list("M56 Smartgun Drum", 15, /obj/item/ammo_magazine/smartgun, null, VENDOR_ITEM_RECOMMENDED), - list("GUN ATTACHMENTS (CHOOSE 1)", 0, null, null, null), list("Laser Sight", 0, /obj/item/attachable/lasersight, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), list("Red-Dot Sight", 0, /obj/item/attachable/reddot, MARINE_CAN_BUY_ATTACHMENT, VENDOR_ITEM_REGULAR), diff --git a/code/modules/cm_marines/equipment/weapons.dm b/code/modules/cm_marines/equipment/weapons.dm index 858b9dbeb79d..50ad5dcaf385 100644 --- a/code/modules/cm_marines/equipment/weapons.dm +++ b/code/modules/cm_marines/equipment/weapons.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/items/storage.dmi' icon_state = "kit_case" w_class = SIZE_HUGE - storage_slots = 4 + storage_slots = 7 slowdown = 1 can_hold = list() //Nada. Once you take the stuff out it doesn't fit back in. foldable = null @@ -16,6 +16,8 @@ new /obj/item/weapon/gun/smartgun(src) new /obj/item/smartgun_battery(src) new /obj/item/clothing/suit/storage/marine/smartgunner(src) + for(var/i in 1 to 3) + new /obj/item/ammo_magazine/smartgun(src) update_icon() /obj/item/storage/box/m56_system/update_icon() From b2413c93c89bde1e15addde1515d28f42084499b Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 09:20:25 +0000 Subject: [PATCH 17/32] Automatic changelog for PR #5449 [ci skip] --- html/changelogs/AutoChangeLog-pr-5449.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5449.yml diff --git a/html/changelogs/AutoChangeLog-pr-5449.yml b/html/changelogs/AutoChangeLog-pr-5449.yml new file mode 100644 index 000000000000..86fbc5f1b0db --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5449.yml @@ -0,0 +1,4 @@ +author: "Zonespace27" +delete-after: True +changes: + - balance: "3 smartgun drums now spawn in the SG's equipment crate. Smartgun drums cannot be purchased from the SG vendor." \ No newline at end of file From 0a8467c431bbda88782b5e509a1093fbf648a39f Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Mon, 15 Jan 2024 01:12:15 -0800 Subject: [PATCH 18/32] Fix all hands on deck message not targeting those in cryopods (#5440) # About the pull request This PR simply allows the all hands on deck message for a CO spawning in to send the message and sound to those inside containers on the ship (e.g. cryopods). # Explain why it's good for the game Restores old behavior before cryopods (though I swear this worked before with people in cryopods) # Testing Photographs and Procedure
Screenshots & Videos ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/70562355-4c46-41c2-8b7a-613029625b92)
# Changelog :cl: Drathek fix: Fix all hands on deck message not sending to those in cryopods /:cl: --- code/defines/procs/announcement.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/defines/procs/announcement.dm b/code/defines/procs/announcement.dm index 3dd918abbc6b..3eae6076f610 100644 --- a/code/defines/procs/announcement.dm +++ b/code/defines/procs/announcement.dm @@ -145,7 +145,7 @@ for(var/mob/T in targets) if(isobserver(T)) continue - if(!ishuman(T) || isyautja(T) || !is_mainship_level(T.z)) + if(!ishuman(T) || isyautja(T) || !is_mainship_level((get_turf(T))?.z)) targets.Remove(T) log_ares_announcement("[title] Shipwide Update", message) From b82feaf61a6c2bfb92b4836f344d2764b31c198f Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 09:34:05 +0000 Subject: [PATCH 19/32] Automatic changelog for PR #5440 [ci skip] --- html/changelogs/AutoChangeLog-pr-5440.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5440.yml diff --git a/html/changelogs/AutoChangeLog-pr-5440.yml b/html/changelogs/AutoChangeLog-pr-5440.yml new file mode 100644 index 000000000000..f84625d30849 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5440.yml @@ -0,0 +1,4 @@ +author: "Drathek" +delete-after: True +changes: + - bugfix: "Fix all hands on deck message not sending to those in cryopods" \ No newline at end of file From 5a11150e954bb06946d64b6c36dd0f8c7b774b8c Mon Sep 17 00:00:00 2001 From: Doubleumc Date: Mon, 15 Jan 2024 04:14:08 -0500 Subject: [PATCH 20/32] Defines cleanup (#5439) # About the pull request Cleans up some duplicate, unused, and/or obsolete (due to native DM implementation) defines. Each change is isolated in its own commit if any are objectionable. - `Clamp()` - functionally identical to and replaced by native `clamp()`, introduced in 513: https://www.byond.com/docs/ref/#/proc/clamp - `Tan()` - functionally identical to and replaced by native `tan()`, introduced in 513: https://www.byond.com/docs/ref/#/proc/tan - `roundNearest()` - functionally identical to and replaced by native 2-argument `round(x, 1)`: https://www.byond.com/docs/ref/#/proc/round - `IsInRange()` - never used and identical to `ISINRANGE()` define, elected to keep the latter as it is in the DEFINES folder - `CEILING(x, 1)` - when 1 is the second argument, replaced by the functionally identical and simpler `Ceiling()` define, which itself can be replaced by native `ceil()` when we move to 515: https://www.byond.com/docs/ref/#/proc/ceil - `n_ceil()` - functionally identical to and replaced by `Ceiling()` - `FLOOR(x, 1)` - when 1 is the second argument, replaced by the functionally identical and simpler `Floor()` define, which itself can be replaced by native `floor()` when we move to 515: https://www.byond.com/docs/ref/#/proc/floor - `LERP()` - a version was implemented in projectile code, moved it out to the DEFINES folder and switched to a slightly more robust version from TGMC: https://github.com/tgstation/TerraGov-Marine-Corps/blob/2da5c237640d73e3e66ad79e34861e9682f4609c/code/__DEFINES/maths.dm#L87-L90 # Explain why it's good for the game Less duplication leads to greater maintainability. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog No player-facing changes. --- code/__DEFINES/_math.dm | 3 +++ code/__HELPERS/#maths.dm | 18 +------------ code/__HELPERS/_time.dm | 8 +++--- code/__HELPERS/icons.dm | 6 ++--- code/__HELPERS/unsorted.dm | 10 +++---- code/_onclick/click.dm | 4 +-- code/controllers/subsystem/minimap.dm | 4 +-- code/controllers/subsystem/timer.dm | 2 +- code/controllers/subsystem/x_evolution.dm | 2 +- code/datums/beam.dm | 4 +-- code/datums/components/overlay_lighting.dm | 2 +- code/datums/diseases/advance/advance.dm | 6 ++--- code/datums/stamina/_stamina.dm | 2 +- .../jobs/job/civilians/other/survivors.dm | 2 +- code/game/jobs/slot_scaling.dm | 2 +- code/game/machinery/computer/research.dm | 2 +- code/game/machinery/telecomms/presets.dm | 2 +- .../objects/items/devices/motion_detector.dm | 2 +- code/game/objects/items/fulton.dm | 4 +-- .../reagent_containers/food/drinks/bottle.dm | 2 +- .../items/reagent_containers/food/sandwich.dm | 2 +- code/game/objects/items/storage/pouch.dm | 4 +-- .../objects/structures/barricade/barricade.dm | 2 +- .../objects/structures/pipes/vents/vents.dm | 2 +- code/game/objects/structures/surface.dm | 4 +-- code/game/turfs/open.dm | 4 +-- code/modules/buildmode/buildmode.dm | 2 +- code/modules/clothing/suits/marine_armor.dm | 4 +-- code/modules/cm_aliens/structures/fruit.dm | 2 +- code/modules/cm_aliens/weeds.dm | 6 ++--- .../cm_marines/altitude_control_console.dm | 2 +- code/modules/cm_marines/orbital_cannon.dm | 4 +-- code/modules/cm_marines/shuttle_backend.dm | 4 +-- code/modules/cm_tech/resources/resource.dm | 2 +- code/modules/defenses/bell_tower.dm | 2 +- code/modules/economy/cash.dm | 2 +- .../lighting_mask/shadow_calculator.dm | 2 +- .../lighting_static/static_lighting_source.dm | 4 +-- code/modules/mob/dead/observer/orbit.dm | 4 +-- .../mob/living/carbon/human/human_damage.dm | 4 +-- .../carbon/human/life/handle_environment.dm | 2 +- .../living/carbon/human/powers/issue_order.dm | 6 ++--- .../mob/living/carbon/human/species/human.dm | 4 +-- .../abilities/ravager/ravager_powers.dm | 8 +++--- .../carbon/xenomorph/abilities/xeno_action.dm | 4 +-- .../living/carbon/xenomorph/castes/Warrior.dm | 2 +- .../living/carbon/xenomorph/hive_status.dm | 2 +- .../mutators/strains/praetorian/warden.dm | 2 +- .../living/carbon/xenomorph/update_icons.dm | 2 +- code/modules/mob/living/living_defense.dm | 2 +- .../modules/mob/living/living_health_procs.dm | 2 +- .../mob/living/simple_animal/hostile/alien.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 2 +- code/modules/mob/mob_helpers.dm | 2 +- code/modules/mob/mob_movement.dm | 2 +- code/modules/movement/launching/launching.dm | 2 +- code/modules/nightmare/nmnodes/mapload.dm | 2 +- code/modules/organs/limbs.dm | 2 +- code/modules/projectiles/ammunition.dm | 2 +- .../modules/projectiles/guns/flamer/flamer.dm | 8 +++--- code/modules/projectiles/magazines/flamer.dm | 4 +-- code/modules/projectiles/projectile.dm | 26 +++++++------------ .../chemistry_machinery/chem_master.dm | 2 +- .../chemistry_machinery/chem_simulator.dm | 2 +- .../chemistry_properties/prop_neutral.dm | 2 +- .../shuttle/computers/dropship_computer.dm | 2 +- .../vehicles/hardpoints/primary/minigun.dm | 2 +- 67 files changed, 115 insertions(+), 134 deletions(-) diff --git a/code/__DEFINES/_math.dm b/code/__DEFINES/_math.dm index 6fb634e66720..138adeeda451 100644 --- a/code/__DEFINES/_math.dm +++ b/code/__DEFINES/_math.dm @@ -32,3 +32,6 @@ /// Gets the sign of x, returns -1 if negative, 0 if 0, 1 if positive #define SIGN(x) ( ((x) > 0) - ((x) < 0) ) + +/// Performs a linear interpolation between a and b. Note that amount=0 returns a, amount=1 returns b, and amount=0.5 returns the mean of a and b. +#define LERP(a, b, amount) ( amount ? ((a) + ((b) - (a)) * (amount)) : a ) diff --git a/code/__HELPERS/#maths.dm b/code/__HELPERS/#maths.dm index 6ea534a79923..7eea79742148 100644 --- a/code/__HELPERS/#maths.dm +++ b/code/__HELPERS/#maths.dm @@ -9,11 +9,10 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, // MATH DEFINES #define Ceiling(x) (-round(-x)) -#define Clamp(val, min_val, max_val) (max(min_val, min(val, max_val))) #define CLAMP01(x) (clamp(x, 0, 1)) // cotangent -#define Cot(x) (1 / Tan(x)) +#define Cot(x) (1 / tan(x)) // cosecant #define Csc(x) (1 / sin(x)) @@ -21,19 +20,12 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, #define Default(a, b) (a ? a : b) #define Floor(x) (round(x)) -//Finds nearest integer to x, above or below -//something.5 or higher, round up, else round down -#define roundNearest(x) (((Ceiling(x) - x) <= (x - Floor(x))) ? Ceiling(x) : Floor(x)) - // Greatest Common Divisor - Euclid's algorithm #define Gcd(a, b) (b ? Gcd(b, a % b) : a) #define Inverse(x) (1 / x) #define IsEven(x) (x % 2 == 0) -// Returns true if val is from min to max, inclusive. -#define IsInRange(val, min, max) (min <= val && val <= max) - #define IsInteger(x) (Floor(x) == x) #define IsOdd(x) (!IsEven(x)) #define IsMultiple(x, y) (x % y == 0) @@ -47,9 +39,6 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, // secant #define Sec(x) (1 / cos(x)) -// tangent -#define Tan(x) (sin(x) / cos(x)) - // 57.2957795 = 180 / Pi #define ToDegrees(radians) (radians * 57.2957795) @@ -85,11 +74,6 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, return rotated_point -// Round up -/proc/n_ceil(num) - if(isnum(num)) - return round(num)+1 - ///Format a power value in W, kW, MW, or GW. /proc/display_power(powerused) if(powerused < 1000) //Less than a kW diff --git a/code/__HELPERS/_time.dm b/code/__HELPERS/_time.dm index 8386feff41c2..733ca659501b 100644 --- a/code/__HELPERS/_time.dm +++ b/code/__HELPERS/_time.dm @@ -48,7 +48,7 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) return gameTimestamp("mm:ss", time) /proc/time_left_until(target_time, current_time, time_unit) - return CEILING(target_time - current_time, 1) / time_unit + return Ceiling(target_time - current_time) / time_unit /proc/text2duration(text = "00:00") // Attempts to convert time text back to time value var/split_text = splittext(text, ":") @@ -91,21 +91,21 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) return "right now" if(second < 60) return "[second] second[(second != 1)? "s":""]" - var/minute = FLOOR(second / 60, 1) + var/minute = Floor(second / 60) second = FLOOR(MODULUS(second, 60), round_seconds_to) var/secondT if(second) secondT = " and [second] second[(second != 1)? "s":""]" if(minute < 60) return "[minute] minute[(minute != 1)? "s":""][secondT]" - var/hour = FLOOR(minute / 60, 1) + var/hour = Floor(minute / 60) minute = MODULUS(minute, 60) var/minuteT if(minute) minuteT = " and [minute] minute[(minute != 1)? "s":""]" if(hour < 24) return "[hour] hour[(hour != 1)? "s":""][minuteT][secondT]" - var/day = FLOOR(hour / 24, 1) + var/day = Floor(hour / 24) hour = MODULUS(hour, 24) var/hourT if(hour) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 97243002740d..29755683165c 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -548,9 +548,9 @@ world if (!value) return color var/list/RGB = ReadRGB(color) - RGB[1] = Clamp(RGB[1]+value,0,255) - RGB[2] = Clamp(RGB[2]+value,0,255) - RGB[3] = Clamp(RGB[3]+value,0,255) + RGB[1] = clamp(RGB[1]+value,0,255) + RGB[2] = clamp(RGB[2]+value,0,255) + RGB[3] = clamp(RGB[3]+value,0,255) return rgb(RGB[1],RGB[2],RGB[3]) /proc/sort_atoms_by_layer(list/atoms) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 05fa7c69e50f..3d8b35de6304 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -40,11 +40,11 @@ #define skillcheckexplicit(user, skill, req_level) ((!user.skills || user.skills.is_skilled(skill, req_level, TRUE))) // Ensure the frequency is within bounds of what it should be sending/receiving at -// Sets f within bounds via `Clamp(round(f), 1441, 1489)` +// Sets f within bounds via `clamp(round(f), 1441, 1489)` // If f is even, adds 1 to its value to make it odd -#define sanitize_frequency(f) ((Clamp(round(f), 1441, 1489) % 2) == 0 ? \ - Clamp(round(f), 1441, 1489) + 1 : \ - Clamp(round(f), 1441, 1489) \ +#define sanitize_frequency(f) ((clamp(round(f), 1441, 1489) % 2) == 0 ? \ + clamp(round(f), 1441, 1489) + 1 : \ + clamp(round(f), 1441, 1489) \ ) //Turns 1479 into 147.9 @@ -1633,7 +1633,7 @@ GLOBAL_LIST_INIT(WALLITEMS, list( . = 0 var/i = DS2TICKS(initial_delay) do - . += CEILING(i*DELTA_CALC, 1) + . += Ceiling(i*DELTA_CALC) sleep(i*world.tick_lag*DELTA_CALC) i *= 2 while (TICK_USAGE > min(TICK_LIMIT_TO_RUN, Master.current_ticklimit)) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index b99d52086e36..72e298d32729 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -376,8 +376,8 @@ var/shiftX = C.pixel_x / world.icon_size var/shiftY = C.pixel_y / world.icon_size var/list/actual_view = getviewsize(C ? C.view : GLOB.world_view_size) - tX = Clamp(origin.x + text2num(tX) + shiftX - round(actual_view[1] / 2) - 1, 1, world.maxx) - tY = Clamp(origin.y + text2num(tY) + shiftY - round(actual_view[2] / 2) - 1, 1, world.maxy) + tX = clamp(origin.x + text2num(tX) + shiftX - round(actual_view[1] / 2) - 1, 1, world.maxx) + tY = clamp(origin.y + text2num(tY) + shiftY - round(actual_view[2] / 2) - 1, 1, world.maxy) return locate(tX, tY, tZ) diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index f3b141c0d9f8..3255c7db2fc5 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -88,8 +88,8 @@ SUBSYSTEM_DEF(minimaps) else if(yval < smallest_y) smallest_y = yval - minimaps_by_z["[level]"].x_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_x-smallest_x) / MINIMAP_SCALE, 1) - minimaps_by_z["[level]"].y_offset = FLOOR((SCREEN_PIXEL_SIZE-largest_y-smallest_y) / MINIMAP_SCALE, 1) + minimaps_by_z["[level]"].x_offset = Floor((SCREEN_PIXEL_SIZE-largest_x-smallest_x) / MINIMAP_SCALE) + minimaps_by_z["[level]"].y_offset = Floor((SCREEN_PIXEL_SIZE-largest_y-smallest_y) / MINIMAP_SCALE) icon_gen.Shift(EAST, minimaps_by_z["[level]"].x_offset) icon_gen.Shift(NORTH, minimaps_by_z["[level]"].y_offset) diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index e7e17876d9db..47403f3379fb 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -583,7 +583,7 @@ SUBSYSTEM_DEF(timer) be supported and may refuse to run or run with a 0 wait") if (flags & TIMER_CLIENT_TIME) // REALTIMEOFDAY has a resolution of 1 decisecond - wait = max(CEILING(wait, 1), 1) // so if we use tick_lag timers may be inserted in the "past" + wait = max(Ceiling(wait), 1) // so if we use tick_lag timers may be inserted in the "past" else wait = max(CEILING(wait, world.tick_lag), world.tick_lag) diff --git a/code/controllers/subsystem/x_evolution.dm b/code/controllers/subsystem/x_evolution.dm index 2232147d2eb8..857af8117df2 100644 --- a/code/controllers/subsystem/x_evolution.dm +++ b/code/controllers/subsystem/x_evolution.dm @@ -47,7 +47,7 @@ SUBSYSTEM_DEF(xevolution) //Add on any bonuses from thie hivecore after applying upgrade progress boost_power_new += (0.5 * HS.has_special_structure(XENO_STRUCTURE_CORE)) - boost_power_new = Clamp(boost_power_new, BOOST_POWER_MIN, BOOST_POWER_MAX) + boost_power_new = clamp(boost_power_new, BOOST_POWER_MIN, BOOST_POWER_MAX) boost_power_new += HS.evolution_bonus if(!force_boost_power) diff --git a/code/datums/beam.dm b/code/datums/beam.dm index e51dcafa0218..08b5ea9f9a64 100644 --- a/code/datums/beam.dm +++ b/code/datums/beam.dm @@ -125,11 +125,11 @@ //Position the effect so the beam is one continous line var/a if(abs(Pixel_x)>world.icon_size) - a = Pixel_x > 0 ? round(Pixel_x/32) : CEILING(Pixel_x/world.icon_size, 1) + a = Pixel_x > 0 ? round(Pixel_x/32) : Ceiling(Pixel_x/world.icon_size) X.x += a Pixel_x %= world.icon_size if(abs(Pixel_y)>world.icon_size) - a = Pixel_y > 0 ? round(Pixel_y/32) : CEILING(Pixel_y/world.icon_size, 1) + a = Pixel_y > 0 ? round(Pixel_y/32) : Ceiling(Pixel_y/world.icon_size) X.y += a Pixel_y %= world.icon_size diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index 9bc5b019b5cd..8288453f7b24 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -340,7 +340,7 @@ turn_off() range = clamp(CEILING(new_range, 0.5), 1, 7) var/pixel_bounds = ((range - 1) * 64) + 32 - lumcount_range = CEILING(range, 1) + lumcount_range = Ceiling(range) if(current_holder && overlay_lighting_flags & LIGHTING_ON) current_holder.underlays -= visible_mask visible_mask.icon = light_overlays["[pixel_bounds]"] diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index d933b81eb620..8b84513169e6 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -204,9 +204,9 @@ GLOBAL_LIST_INIT(advance_cures, list( hidden = list( (properties["stealth"] > 2), (properties["stealth"] > 3) ) // The more symptoms we have, the less transmittable it is but some symptoms can make up for it. - SetSpread(Clamp(properties["transmittable"] - symptoms.len, BLOOD, AIRBORNE)) + SetSpread(clamp(properties["transmittable"] - symptoms.len, BLOOD, AIRBORNE)) permeability_mod = max(Ceiling(0.4 * properties["transmittable"]), 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) @@ -254,7 +254,7 @@ GLOBAL_LIST_INIT(advance_cures, list( // Will generate a random cure, the less resistance the symptoms have, the harder the cure. /datum/disease/advance/proc/GenerateCure(list/properties = list()) if(properties && properties.len) - var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, GLOB.advance_cures.len) + var/res = clamp(properties["resistance"] - (symptoms.len / 2), 1, GLOB.advance_cures.len) cure_id = GLOB.advance_cures[res] // Get the cure name from the cure_id diff --git a/code/datums/stamina/_stamina.dm b/code/datums/stamina/_stamina.dm index e233aaa81676..80e7df74e86b 100644 --- a/code/datums/stamina/_stamina.dm +++ b/code/datums/stamina/_stamina.dm @@ -34,7 +34,7 @@ if(!has_stamina) return - current_stamina = Clamp(current_stamina - amount, 0, max_stamina) + current_stamina = clamp(current_stamina - amount, 0, max_stamina) if(current_stamina < max_stamina) START_PROCESSING(SSobj, src) diff --git a/code/game/jobs/job/civilians/other/survivors.dm b/code/game/jobs/job/civilians/other/survivors.dm index 23097e139eda..a85731aa781a 100644 --- a/code/game/jobs/job/civilians/other/survivors.dm +++ b/code/game/jobs/job/civilians/other/survivors.dm @@ -14,7 +14,7 @@ var/hostile = FALSE /datum/job/civilian/survivor/set_spawn_positions(count) - spawn_positions = Clamp((round(count * SURVIVOR_TO_TOTAL_SPAWN_RATIO)), 2, 8) + spawn_positions = clamp((round(count * SURVIVOR_TO_TOTAL_SPAWN_RATIO)), 2, 8) total_positions = spawn_positions /datum/job/civilian/survivor/equip_job(mob/living/survivor) diff --git a/code/game/jobs/slot_scaling.dm b/code/game/jobs/slot_scaling.dm index 2d444d06e5ab..8bd4af908c07 100644 --- a/code/game/jobs/slot_scaling.dm +++ b/code/game/jobs/slot_scaling.dm @@ -10,7 +10,7 @@ /proc/job_slot_formula(marine_count, factor, c, min, max) if(marine_count <= factor) return min - return round(Clamp((marine_count/factor)+c, min, max)) + return round(clamp((marine_count/factor)+c, min, max)) /proc/medic_slot_formula(playercount) return job_slot_formula(playercount,40,1,3,5) diff --git a/code/game/machinery/computer/research.dm b/code/game/machinery/computer/research.dm index 1ba696eeee9c..d5158cb76451 100644 --- a/code/game/machinery/computer/research.dm +++ b/code/game/machinery/computer/research.dm @@ -179,7 +179,7 @@ if("purchase_document") if(!photocopier) return - var/purchase_tier = FLOOR(text2num(params["purchase_document"]), 1) + var/purchase_tier = Floor(text2num(params["purchase_document"])) if(purchase_tier <= 0 || purchase_tier > 5) return if(purchase_tier > GLOB.chemical_data.clearance_level) diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm index 7621d55e3645..ebf627cbf629 100644 --- a/code/game/machinery/telecomms/presets.dm +++ b/code/game/machinery/telecomms/presets.dm @@ -91,7 +91,7 @@ return // Leave the poor thing alone health -= damage - health = Clamp(health, 0, initial(health)) + health = clamp(health, 0, initial(health)) if(health <= 0) toggled = FALSE // requires flipping on again once repaired diff --git a/code/game/objects/items/devices/motion_detector.dm b/code/game/objects/items/devices/motion_detector.dm index 9776eae11c8f..f9fa0224cbd6 100644 --- a/code/game/objects/items/devices/motion_detector.dm +++ b/code/game/objects/items/devices/motion_detector.dm @@ -280,7 +280,7 @@ DB.icon_state = "[blip_icon]_blip" DB.setDir(initial(DB.dir)) - DB.screen_loc = "[Clamp(c_view + 1 - view_x_offset + (target.x - user.x), 1, 2*c_view+1)],[Clamp(c_view + 1 - view_y_offset + (target.y - user.y), 1, 2*c_view+1)]" + DB.screen_loc = "[clamp(c_view + 1 - view_x_offset + (target.x - user.x), 1, 2*c_view+1)],[clamp(c_view + 1 - view_y_offset + (target.y - user.y), 1, 2*c_view+1)]" user.client.add_to_screen(DB) addtimer(CALLBACK(src, PROC_REF(clear_pings), user, DB), 1 SECONDS) diff --git a/code/game/objects/items/fulton.dm b/code/game/objects/items/fulton.dm index 788613cf4c6e..e36d269c8b90 100644 --- a/code/game/objects/items/fulton.dm +++ b/code/game/objects/items/fulton.dm @@ -141,8 +141,8 @@ GLOBAL_LIST_EMPTY(deployed_fultons) original_location = get_turf(attached_atom) playsound(loc, 'sound/items/fulton.ogg', 50, 1) reservation = SSmapping.RequestBlockReservation(3, 3, turf_type_override = /turf/open/space) - var/middle_x = reservation.bottom_left_coords[1] + FLOOR((reservation.top_right_coords[1] - reservation.bottom_left_coords[1]) / 2, 1) - var/middle_y = reservation.bottom_left_coords[2] + FLOOR((reservation.top_right_coords[2] - reservation.bottom_left_coords[2]) / 2, 1) + var/middle_x = reservation.bottom_left_coords[1] + Floor((reservation.top_right_coords[1] - reservation.bottom_left_coords[1]) / 2) + var/middle_y = reservation.bottom_left_coords[2] + Floor((reservation.top_right_coords[2] - reservation.bottom_left_coords[2]) / 2) var/turf/space_tile = locate(middle_x, middle_y, reservation.bottom_left_coords[3]) if(!space_tile) visible_message(SPAN_WARNING("[src] begins beeping like crazy. Something is wrong!")) diff --git a/code/game/objects/items/reagent_containers/food/drinks/bottle.dm b/code/game/objects/items/reagent_containers/food/drinks/bottle.dm index 0e63a19c7ef1..b522d8d2ed81 100644 --- a/code/game/objects/items/reagent_containers/food/drinks/bottle.dm +++ b/code/game/objects/items/reagent_containers/food/drinks/bottle.dm @@ -107,7 +107,7 @@ if(alcohol_potency < BURN_LEVEL_TIER_1) to_chat(user, SPAN_NOTICE("There's not enough flammable liquid in \the [src]!")) return - alcohol_potency = Clamp(alcohol_potency, BURN_LEVEL_TIER_1, BURN_LEVEL_TIER_7) + alcohol_potency = clamp(alcohol_potency, BURN_LEVEL_TIER_1, BURN_LEVEL_TIER_7) if(!do_after(user, 20, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD)) return diff --git a/code/game/objects/items/reagent_containers/food/sandwich.dm b/code/game/objects/items/reagent_containers/food/sandwich.dm index 511c0c042be1..b3f68bd299a9 100644 --- a/code/game/objects/items/reagent_containers/food/sandwich.dm +++ b/code/game/objects/items/reagent_containers/food/sandwich.dm @@ -74,7 +74,7 @@ name = lowertext("[fullname] sandwich") if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich" - w_class = n_ceil(Clamp((ingredients.len/2),1,3)) + w_class = Ceiling(clamp((ingredients.len/2),1,3)) /obj/item/reagent_container/food/snacks/csandwich/Destroy() QDEL_NULL_LIST(ingredients) diff --git a/code/game/objects/items/storage/pouch.dm b/code/game/objects/items/storage/pouch.dm index acb87e988879..7369df548045 100644 --- a/code/game/objects/items/storage/pouch.dm +++ b/code/game/objects/items/storage/pouch.dm @@ -976,7 +976,7 @@ to_chat(user, SPAN_WARNING("[O] is empty!")) return - var/amt_to_remove = Clamp(O.reagents.total_volume, 0, inner.volume) + var/amt_to_remove = clamp(O.reagents.total_volume, 0, inner.volume) if(!amt_to_remove) to_chat(user, SPAN_WARNING("[O] is empty!")) return @@ -989,7 +989,7 @@ fill_autoinjector(contents[1]) //Top up our inner reagent canister after filling up the injector - amt_to_remove = Clamp(O.reagents.total_volume, 0, inner.volume) + amt_to_remove = clamp(O.reagents.total_volume, 0, inner.volume) if(amt_to_remove) O.reagents.trans_to(inner, amt_to_remove) diff --git a/code/game/objects/structures/barricade/barricade.dm b/code/game/objects/structures/barricade/barricade.dm index b23e07f707f2..1206148b7b78 100644 --- a/code/game/objects/structures/barricade/barricade.dm +++ b/code/game/objects/structures/barricade/barricade.dm @@ -341,7 +341,7 @@ /obj/structure/barricade/update_health(damage, nomessage) health -= damage - health = Clamp(health, 0, maxhealth) + health = clamp(health, 0, maxhealth) if(!health) if(!nomessage) diff --git a/code/game/objects/structures/pipes/vents/vents.dm b/code/game/objects/structures/pipes/vents/vents.dm index 298fbc57f4ad..d7e090c581c5 100644 --- a/code/game/objects/structures/pipes/vents/vents.dm +++ b/code/game/objects/structures/pipes/vents/vents.dm @@ -176,7 +176,7 @@ addtimer(CALLBACK(src, PROC_REF(release_gas), radius), warning_time) /obj/structure/pipes/vents/proc/release_gas(radius = 4) - radius = Clamp(radius, 1, 10) + radius = clamp(radius, 1, 10) if(!gas_holder || welded) return FALSE playsound(loc, 'sound/effects/smoke.ogg', 25, 1, 4) diff --git a/code/game/objects/structures/surface.dm b/code/game/objects/structures/surface.dm index 13a81af2dc3d..ac8cf51a407e 100644 --- a/code/game/objects/structures/surface.dm +++ b/code/game/objects/structures/surface.dm @@ -27,8 +27,8 @@ var/mouse_x = text2num(click_data["icon-x"])-1 // Ranging from 0 to 31 var/mouse_y = text2num(click_data["icon-y"])-1 - var/cell_x = Clamp(round(mouse_x/CELLSIZE), 0, CELLS-1) // Ranging from 0 to CELLS-1 - var/cell_y = Clamp(round(mouse_y/CELLSIZE), 0, CELLS-1) + var/cell_x = clamp(round(mouse_x/CELLSIZE), 0, CELLS-1) // Ranging from 0 to CELLS-1 + var/cell_y = clamp(round(mouse_y/CELLSIZE), 0, CELLS-1) var/list/center = cached_key_number_decode(new_item.center_of_mass) diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index 7d9dd6303c64..ac1635f151dd 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -115,10 +115,10 @@ scorchedness = 1 if(2 to 30) - scorchedness = Clamp(scorchedness + 1, 0, 3) //increase scorch by 1 (not that hot of a fire) + scorchedness = clamp(scorchedness + 1, 0, 3) //increase scorch by 1 (not that hot of a fire) if(31 to 60) - scorchedness = Clamp(scorchedness + 2, 0, 3) //increase scorch by 2 (hotter fire) + scorchedness = clamp(scorchedness + 2, 0, 3) //increase scorch by 2 (hotter fire) if(61 to INFINITY) scorchedness = 3 //max out the scorchedness (hottest fire) diff --git a/code/modules/buildmode/buildmode.dm b/code/modules/buildmode/buildmode.dm index eeab65ec031a..bc20a714027d 100644 --- a/code/modules/buildmode/buildmode.dm +++ b/code/modules/buildmode/buildmode.dm @@ -80,7 +80,7 @@ var/pos_idx = 0 for(var/thing in elements) var/x = pos_idx % switch_width - var/y = FLOOR(pos_idx / switch_width, 1) + var/y = Floor(pos_idx / switch_width) var/atom/movable/screen/buildmode/B = new buttontype(src, thing) // extra .5 for a nice offset look B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]" diff --git a/code/modules/clothing/suits/marine_armor.dm b/code/modules/clothing/suits/marine_armor.dm index 844655049a69..afefa2903ab4 100644 --- a/code/modules/clothing/suits/marine_armor.dm +++ b/code/modules/clothing/suits/marine_armor.dm @@ -190,7 +190,7 @@ if(. != CHECKS_PASSED) return set_light_range(initial(light_range)) - set_light_power(FLOOR(initial(light_power) * 0.5, 1)) + set_light_power(Floor(initial(light_power) * 0.5)) set_light_on(toggle_on) flags_marine_armor ^= ARMOR_LAMP_ON @@ -1011,7 +1011,7 @@ if(camo_active) if(current_camo < full_camo_alpha) current_camo = full_camo_alpha - current_camo = Clamp(current_camo + incremental_shooting_camo_penalty, full_camo_alpha, 255) + current_camo = clamp(current_camo + incremental_shooting_camo_penalty, full_camo_alpha, 255) H.alpha = current_camo addtimer(CALLBACK(src, PROC_REF(fade_out_finish), H), camouflage_break, TIMER_OVERRIDE|TIMER_UNIQUE) animate(H, alpha = full_camo_alpha + 5, time = camouflage_break, easing = LINEAR_EASING, flags = ANIMATION_END_NOW) diff --git a/code/modules/cm_aliens/structures/fruit.dm b/code/modules/cm_aliens/structures/fruit.dm index 408ed5d951cc..00272cf90341 100644 --- a/code/modules/cm_aliens/structures/fruit.dm +++ b/code/modules/cm_aliens/structures/fruit.dm @@ -239,7 +239,7 @@ /obj/effect/alien/resin/fruit/unstable/consume_effect(mob/living/carbon/xenomorph/recipient, do_consume = TRUE) if(mature && recipient && !QDELETED(recipient)) - recipient.add_xeno_shield(Clamp(overshield_amount, 0, recipient.maxHealth * 0.3), XENO_SHIELD_SOURCE_GARDENER, duration = shield_duration, decay_amount_per_second = shield_decay) + recipient.add_xeno_shield(clamp(overshield_amount, 0, recipient.maxHealth * 0.3), XENO_SHIELD_SOURCE_GARDENER, duration = shield_duration, decay_amount_per_second = shield_decay) to_chat(recipient, SPAN_XENONOTICE("We feel our defense being bolstered, and begin to regenerate rapidly.")) // Every seconds, heal him for 5. new /datum/effects/heal_over_time(recipient, regeneration_amount_total, regeneration_ticks, 1) diff --git a/code/modules/cm_aliens/weeds.dm b/code/modules/cm_aliens/weeds.dm index 45c78b979105..5298e7ab02f1 100644 --- a/code/modules/cm_aliens/weeds.dm +++ b/code/modules/cm_aliens/weeds.dm @@ -58,9 +58,9 @@ if(spread_on_semiweedable && weed_strength < WEED_LEVEL_HIVE) if(color) var/list/RGB = ReadRGB(color) - RGB[1] = Clamp(RGB[1] + 35, 0, 255) - RGB[2] = Clamp(RGB[2] + 35, 0, 255) - RGB[3] = Clamp(RGB[3] + 35, 0, 255) + RGB[1] = clamp(RGB[1] + 35, 0, 255) + RGB[2] = clamp(RGB[2] + 35, 0, 255) + RGB[3] = clamp(RGB[3] + 35, 0, 255) color = rgb(RGB[1], RGB[2], RGB[3]) else color = "#a1a1a1" diff --git a/code/modules/cm_marines/altitude_control_console.dm b/code/modules/cm_marines/altitude_control_console.dm index a8281806be10..7e0a8c395152 100644 --- a/code/modules/cm_marines/altitude_control_console.dm +++ b/code/modules/cm_marines/altitude_control_console.dm @@ -63,7 +63,7 @@ GLOBAL_VAR_INIT(ship_alt, SHIP_ALT_MED) temperature_change = COOLING if(SHIP_ALT_HIGH) temperature_change = COOLING - GLOB.ship_temp = Clamp(GLOB.ship_temp += temperature_change, 0, 120) + GLOB.ship_temp = clamp(GLOB.ship_temp += temperature_change, 0, 120) if(prob(50)) return if(GLOB.ship_alt == SHIP_ALT_LOW) diff --git a/code/modules/cm_marines/orbital_cannon.dm b/code/modules/cm_marines/orbital_cannon.dm index b003237f68ee..23bce06fdc1a 100644 --- a/code/modules/cm_marines/orbital_cannon.dm +++ b/code/modules/cm_marines/orbital_cannon.dm @@ -224,8 +224,8 @@ GLOBAL_LIST_EMPTY(orbital_cannon_cancellation) var/area/area = get_area(T) var/off_x = (inaccurate_fuel + 1) * round(rand(-3,3), 1) var/off_y = (inaccurate_fuel + 1) * round(rand(-3,3), 1) - var/target_x = Clamp(T.x + off_x, 1, world.maxx) - var/target_y = Clamp(T.y + off_y, 1, world.maxy) + var/target_x = clamp(T.x + off_x, 1, world.maxx) + var/target_y = clamp(T.y + off_y, 1, world.maxy) var/turf/target = locate(target_x, target_y, T.z) var/area/target_area = get_area(target) diff --git a/code/modules/cm_marines/shuttle_backend.dm b/code/modules/cm_marines/shuttle_backend.dm index 142caa81eb8a..6974e078e2de 100644 --- a/code/modules/cm_marines/shuttle_backend.dm +++ b/code/modules/cm_marines/shuttle_backend.dm @@ -123,8 +123,8 @@ DOCUMENTATION ON HOW TO ADD A NEW SHUTTLE: Fourkhan, 6/7/19 y = C.y_pos C1.x_pos = x*cos(deg) + y*sin(deg) C1.y_pos = y*cos(deg) - x*sin(deg) - C1.x_pos = roundNearest(C.x_pos) //Sometimes you get very close to the right number but off by around 1e-15 and I want integers dammit - C1.y_pos = roundNearest(C.y_pos) + C1.x_pos = round(C.x_pos, 1) //Sometimes you get very close to the right number but off by around 1e-15 and I want integers dammit + C1.y_pos = round(C.y_pos, 1) toReturn += i toReturn[i] = C1 diff --git a/code/modules/cm_tech/resources/resource.dm b/code/modules/cm_tech/resources/resource.dm index 44af2234afd3..02c46e3e8910 100644 --- a/code/modules/cm_tech/resources/resource.dm +++ b/code/modules/cm_tech/resources/resource.dm @@ -82,7 +82,7 @@ update_icon() /obj/structure/resource_node/proc/take_damage(damage) - health = Clamp(health - damage, 0, max_health) + health = clamp(health - damage, 0, max_health) healthcheck() /obj/structure/resource_node/bullet_act(obj/projectile/P) diff --git a/code/modules/defenses/bell_tower.dm b/code/modules/defenses/bell_tower.dm index 52207298c4b0..8ef4fe913079 100644 --- a/code/modules/defenses/bell_tower.dm +++ b/code/modules/defenses/bell_tower.dm @@ -210,7 +210,7 @@ if(turned_on) if(cloak_alpha_current < cloak_alpha_max) cloak_alpha_current = cloak_alpha_max - cloak_alpha_current = Clamp(cloak_alpha_current + incremental_ring_camo_penalty, cloak_alpha_max, 255) + cloak_alpha_current = clamp(cloak_alpha_current + incremental_ring_camo_penalty, cloak_alpha_max, 255) cloakebelltower.alpha = cloak_alpha_current addtimer(CALLBACK(src, PROC_REF(cloaker_fade_out_finish), cloakebelltower), camouflage_break, TIMER_OVERRIDE|TIMER_UNIQUE) animate(cloakebelltower, alpha = cloak_alpha_max, time = camouflage_break, easing = LINEAR_EASING, flags = ANIMATION_END_NOW) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index ad09eaf3fa09..6ab8164c248d 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -88,7 +88,7 @@ ..() var/oldloc = loc var/amount = tgui_input_number(user, "How many dollars do you want to take? (0 to [src.worth])", "Take Money", 0, src.worth, 0) - amount = round(Clamp(amount, 0, src.worth)) + amount = round(clamp(amount, 0, src.worth)) if(amount == 0) return if(QDELETED(src) || loc != oldloc) diff --git a/code/modules/lighting/lighting_mask/shadow_calculator.dm b/code/modules/lighting/lighting_mask/shadow_calculator.dm index 42f98b47e789..cfd4a86f5f3a 100644 --- a/code/modules/lighting/lighting_mask/shadow_calculator.dm +++ b/code/modules/lighting/lighting_mask/shadow_calculator.dm @@ -95,7 +95,7 @@ SSlighting.total_shadow_calculations ++ //Ceiling the range since we need it in integer form - var/range = CEILING(radius, 1) + var/range = Ceiling(radius) DO_SOMETHING_IF_DEBUGGING_SHADOWS(var/timer = TICK_USAGE) //Work out our position diff --git a/code/modules/lighting/lighting_static/static_lighting_source.dm b/code/modules/lighting/lighting_static/static_lighting_source.dm index e650a432fc63..cfbfb49ceda3 100644 --- a/code/modules/lighting/lighting_static/static_lighting_source.dm +++ b/code/modules/lighting/lighting_static/static_lighting_source.dm @@ -223,8 +223,8 @@ var/list/turf/turfs = list() if (source_turf) var/oldlum = source_turf.luminosity - source_turf.luminosity = CEILING(light_range, 1) - for(var/turf/T in view(CEILING(light_range, 1), source_turf)) + source_turf.luminosity = Ceiling(light_range) + for(var/turf/T in view(Ceiling(light_range), source_turf)) if(!IS_OPAQUE_TURF(T)) if (!T.lighting_corners_initialised) T.static_generate_missing_corners() diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm index 50496cef31c5..bad8e74d4ff1 100644 --- a/code/modules/mob/dead/observer/orbit.dm +++ b/code/modules/mob/dead/observer/orbit.dm @@ -110,7 +110,7 @@ if(isliving(M)) var/mob/living/player = M - serialized["health"] = FLOOR((player.health / player.maxHealth * 100), 1) + serialized["health"] = Floor(player.health / player.maxHealth * 100) if(isxeno(player)) var/mob/living/carbon/xenomorph/xeno = player @@ -126,7 +126,7 @@ var/obj/item/card/id/id_card = human.get_idcard() var/datum/species/human_species = human.species var/max_health = human_species.total_health != human.maxHealth ? human_species.total_health : human.maxHealth - serialized["health"] = FLOOR((player.health / max_health * 100), 1) + serialized["health"] = Floor(player.health / max_health * 100) serialized["job"] = id_card?.assignment ? id_card.assignment : human.job serialized["nickname"] = human.real_name diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index cebbbd6086bb..942c20482230 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -34,7 +34,7 @@ var/datum/internal_organ/brain/sponge = internal_organs_by_name["brain"] if(sponge) sponge.take_damage(amount) - sponge.damage = Clamp(sponge.damage, 0, maxHealth*2) + sponge.damage = clamp(sponge.damage, 0, maxHealth*2) brainloss = sponge.damage else brainloss = 200 @@ -49,7 +49,7 @@ if(species.has_organ["brain"]) var/datum/internal_organ/brain/sponge = internal_organs_by_name["brain"] if(sponge) - sponge.damage = Clamp(amount, 0, maxHealth*2) + sponge.damage = clamp(amount, 0, maxHealth*2) brainloss = sponge.damage else brainloss = 200 diff --git a/code/modules/mob/living/carbon/human/life/handle_environment.dm b/code/modules/mob/living/carbon/human/life/handle_environment.dm index 143d9d500793..65bc7213810e 100644 --- a/code/modules/mob/living/carbon/human/life/handle_environment.dm +++ b/code/modules/mob/living/carbon/human/life/handle_environment.dm @@ -19,7 +19,7 @@ if(thermal_protection < 1) temp_adj = (1 - thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR) - bodytemperature += Clamp(temp_adj, BODYTEMP_COOLING_MAX, BODYTEMP_HEATING_MAX) + bodytemperature += clamp(temp_adj, BODYTEMP_COOLING_MAX, BODYTEMP_HEATING_MAX) //+/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt. if(bodytemperature > species.heat_level_1) diff --git a/code/modules/mob/living/carbon/human/powers/issue_order.dm b/code/modules/mob/living/carbon/human/powers/issue_order.dm index 775c4f645516..1becf805c027 100644 --- a/code/modules/mob/living/carbon/human/powers/issue_order.dm +++ b/code/modules/mob/living/carbon/human/powers/issue_order.dm @@ -72,14 +72,14 @@ switch(order) if(COMMAND_ORDER_MOVE) mobility_aura_count++ - mobility_aura = Clamp(mobility_aura, strength, ORDER_MOVE_MAX_LEVEL) + mobility_aura = clamp(mobility_aura, strength, ORDER_MOVE_MAX_LEVEL) if(COMMAND_ORDER_HOLD) protection_aura_count++ - protection_aura = Clamp(protection_aura, strength, ORDER_HOLD_MAX_LEVEL) + protection_aura = clamp(protection_aura, strength, ORDER_HOLD_MAX_LEVEL) pain.apply_pain_reduction(protection_aura * PAIN_REDUCTION_AURA) if(COMMAND_ORDER_FOCUS) marksman_aura_count++ - marksman_aura = Clamp(marksman_aura, strength, ORDER_FOCUS_MAX_LEVEL) + marksman_aura = clamp(marksman_aura, strength, ORDER_FOCUS_MAX_LEVEL) hud_set_order() diff --git a/code/modules/mob/living/carbon/human/species/human.dm b/code/modules/mob/living/carbon/human/species/human.dm index add78365a350..684bfa672b19 100644 --- a/code/modules/mob/living/carbon/human/species/human.dm +++ b/code/modules/mob/living/carbon/human/species/human.dm @@ -28,7 +28,7 @@ else if(chem_effect_flags & CHEM_EFFECT_ORGAN_STASIS) b_volume *= 1 else if(heart.damage >= heart.organ_status >= ORGAN_BRUISED) - b_volume *= Clamp(100 - (2 * heart.damage), 30, 100) / 100 + b_volume *= clamp(100 - (2 * heart.damage), 30, 100) / 100 //Effects of bloodloss if(b_volume <= BLOOD_VOLUME_SAFE) @@ -37,7 +37,7 @@ /// How much oxyloss will there be from the next time blood processes var/additional_oxyloss = (100 - blood_percentage) / 5 /// The limit of the oxyloss gained, ignoring oxyloss from the switch statement - var/maximum_oxyloss = Clamp((100 - blood_percentage) / 2, oxyloss, 100) + var/maximum_oxyloss = clamp((100 - blood_percentage) / 2, oxyloss, 100) if(oxyloss < maximum_oxyloss) oxyloss += round(max(additional_oxyloss, 0)) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm index 3ec07014b2d1..daad0362e91e 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ravager/ravager_powers.dm @@ -366,9 +366,9 @@ if (behavior.rage == 0) to_chat(xeno, SPAN_XENODANGER("We cannot eviscerate when we have 0 rage!")) return - damage = damage_at_rage_levels[Clamp(behavior.rage, 1, behavior.max_rage)] - range = range_at_rage_levels[Clamp(behavior.rage, 1, behavior.max_rage)] - windup_reduction = windup_reduction_at_rage_levels[Clamp(behavior.rage, 1, behavior.max_rage)] + damage = damage_at_rage_levels[clamp(behavior.rage, 1, behavior.max_rage)] + range = range_at_rage_levels[clamp(behavior.rage, 1, behavior.max_rage)] + windup_reduction = windup_reduction_at_rage_levels[clamp(behavior.rage, 1, behavior.max_rage)] behavior.decrement_rage(behavior.rage) apply_cooldown() @@ -420,7 +420,7 @@ // This is the heal if(!xeno.on_fire) - xeno.gain_health(Clamp(valid_count * lifesteal_per_marine, 0, max_lifesteal)) + xeno.gain_health(clamp(valid_count * lifesteal_per_marine, 0, max_lifesteal)) REMOVE_TRAIT(xeno, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Eviscerate")) xeno.anchored = FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm b/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm index ca15c6e37306..8ed720c7ed91 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/xeno_action.dm @@ -231,7 +231,7 @@ if(!cooldown_to_apply) return - cooldown_to_apply = cooldown_to_apply * (1 - Clamp(X.cooldown_reduction_percentage, 0, 0.5)) + cooldown_to_apply = cooldown_to_apply * (1 - clamp(X.cooldown_reduction_percentage, 0, 0.5)) // Add a unique timer cooldown_timer_id = addtimer(CALLBACK(src, PROC_REF(on_cooldown_end)), cooldown_to_apply, TIMER_UNIQUE|TIMER_STOPPABLE) @@ -253,7 +253,7 @@ var/mob/living/carbon/xenomorph/X = owner // Note: no check to see if we're already on CD. we just flat override whatever's there - cooldown_duration = cooldown_duration * (1 - Clamp(X.cooldown_reduction_percentage, 0, 0.5)) + cooldown_duration = cooldown_duration * (1 - clamp(X.cooldown_reduction_percentage, 0, 0.5)) cooldown_timer_id = addtimer(CALLBACK(src, PROC_REF(on_cooldown_end)), cooldown_duration, TIMER_OVERRIDE|TIMER_UNIQUE|TIMER_STOPPABLE) current_cooldown_duration = cooldown_duration current_cooldown_start_time = world.time diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Warrior.dm b/code/modules/mob/living/carbon/xenomorph/castes/Warrior.dm index 04996af8f8db..b19978a33766 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Warrior.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Warrior.dm @@ -161,7 +161,7 @@ emote_cooldown = world.time + 5 SECONDS addtimer(CALLBACK(src, PROC_REF(lifesteal_lock)), lifesteal_lock_duration/2) - bound_xeno.gain_health(Clamp(final_lifesteal / 100 * (bound_xeno.maxHealth - bound_xeno.health), 20, 40)) + bound_xeno.gain_health(clamp(final_lifesteal / 100 * (bound_xeno.maxHealth - bound_xeno.health), 20, 40)) /datum/behavior_delegate/warrior_base/proc/lifesteal_lock() bound_xeno.remove_filter("empower_rage") diff --git a/code/modules/mob/living/carbon/xenomorph/hive_status.dm b/code/modules/mob/living/carbon/xenomorph/hive_status.dm index 7cc5850e3701..ab812cba5c97 100644 --- a/code/modules/mob/living/carbon/xenomorph/hive_status.dm +++ b/code/modules/mob/living/carbon/xenomorph/hive_status.dm @@ -737,7 +737,7 @@ if(is_mainship_level(turf?.z)) shipside_humans_weighted_count += GLOB.RoleAuthority.calculate_role_weight(job) hijack_burrowed_surge = TRUE - hijack_burrowed_left = max(n_ceil(shipside_humans_weighted_count * 0.5) - xenos_count, 5) + hijack_burrowed_left = max(Ceiling(shipside_humans_weighted_count * 0.5) - xenos_count, 5) hivecore_cooldown = FALSE xeno_message(SPAN_XENOBOLDNOTICE("The weeds have recovered! A new hive core can be built!"),3,hivenumber) diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/warden.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/warden.dm index 1db9ad6550e2..4328058c8a8e 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/warden.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/praetorian/warden.dm @@ -88,7 +88,7 @@ if (internal_hitpoints >= internal_hitpoints_max) return to_chat(bound_xeno, SPAN_XENODANGER("You feel your internal health reserves increase!")) - internal_hitpoints = Clamp(internal_hitpoints + amount, 0, internal_hitpoints_max) + internal_hitpoints = clamp(internal_hitpoints + amount, 0, internal_hitpoints_max) /datum/behavior_delegate/praetorian_warden/proc/remove_internal_hitpoints(amount) add_internal_hitpoints(-1*amount) diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index 65795634a27c..55995ec0b264 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -301,7 +301,7 @@ return var/health_threshold - health_threshold = max(CEILING((health * 4) / (maxHealth), 1), 0) //From 0 to 4, in 25% chunks + health_threshold = max(Ceiling((health * 4) / (maxHealth)), 0) //From 0 to 4, in 25% chunks if(health > HEALTH_THRESHOLD_DEAD) if(health_threshold > 3) wound_icon_holder.icon_state = "none" diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 4061f26f7bb1..b19afb0450cd 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -174,7 +174,7 @@ switch(fire_reagent.fire_type) if(FIRE_VARIANT_TYPE_B) max_stacks = 10 //Armor Shredding Greenfire caps at 1 resist/pat - fire_stacks = Clamp(fire_stacks + add_fire_stacks, min_stacks, max_stacks) + fire_stacks = clamp(fire_stacks + add_fire_stacks, min_stacks, max_stacks) if(on_fire && fire_stacks <= 0) ExtinguishMob() diff --git a/code/modules/mob/living/living_health_procs.dm b/code/modules/mob/living/living_health_procs.dm index fb80c50042a3..819b3397c289 100644 --- a/code/modules/mob/living/living_health_procs.dm +++ b/code/modules/mob/living/living_health_procs.dm @@ -359,7 +359,7 @@ switch(client.prefs?.pain_overlay_pref_level) if(PAIN_OVERLAY_IMPAIR) - overlay_fullscreen("eye_blur", /atom/movable/screen/fullscreen/impaired, CEILING(clamp(eye_blurry * 0.3, 1, 6), 1)) + overlay_fullscreen("eye_blur", /atom/movable/screen/fullscreen/impaired, Ceiling(clamp(eye_blurry * 0.3, 1, 6))) if(PAIN_OVERLAY_LEGACY) overlay_fullscreen("eye_blur", /atom/movable/screen/fullscreen/blurry) else // PAIN_OVERLAY_BLURRY diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 6e8d0b8a2867..ba7bf741f6c0 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -110,7 +110,7 @@ wound_icon_holder.layer = layer + 0.01 wound_icon_holder.dir = dir - var/health_threshold = max(CEILING((health * 4) / (maxHealth), 1), 0) //From 0 to 4, in 25% chunks + var/health_threshold = max(Ceiling((health * 4) / (maxHealth)), 0) //From 0 to 4, in 25% chunks if(health > HEALTH_THRESHOLD_DEAD) if(health_threshold > 3) wound_icon_holder.icon_state = "none" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index a1ef9032e435..caf47b2824bb 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -323,7 +323,7 @@ explosion_throw(severity, direction) /mob/living/simple_animal/adjustBruteLoss(damage) - health = Clamp(health - damage, 0, maxHealth) + health = clamp(health - damage, 0, maxHealth) /mob/living/simple_animal/proc/SA_attackable(target_mob) if (isliving(target_mob)) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 4f9244126c36..ce9e16e3747e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -331,7 +331,7 @@ GLOBAL_LIST_INIT(limb_types_by_name, list( while(i < steps) animate(pixel_x = old_X + rand(-(strength), strength), pixel_y = old_y + rand(-(strength), strength), easing = JUMP_EASING, time = time_per_step) i++ - animate(pixel_x = old_X, pixel_y = old_y,time = Clamp(Floor(strength/PIXELS_PER_STRENGTH_VAL),2,4))//ease it back + animate(pixel_x = old_X, pixel_y = old_y,time = clamp(Floor(strength/PIXELS_PER_STRENGTH_VAL),2,4))//ease it back #undef PIXELS_PER_STRENGTH_VAL diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 8e9a513fdc88..0629ef47de01 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -181,7 +181,7 @@ if((mob.flags_atom & DIRLOCK) && mob.dir != direct) move_delay += MOVE_REDUCTION_DIRECTION_LOCKED // by Geeves - mob.cur_speed = Clamp(10/(move_delay + 0.5), MIN_SPEED, MAX_SPEED) + mob.cur_speed = clamp(10/(move_delay + 0.5), MIN_SPEED, MAX_SPEED) next_movement = world.time + MINIMAL_MOVEMENT_INTERVAL // We pre-set this now for the crawling case. If crawling do_after fails, next_movement would be set after the attempt end instead of now. //Try to crawl first diff --git a/code/modules/movement/launching/launching.dm b/code/modules/movement/launching/launching.dm index f72a7c773490..e3eccf8dd1c2 100644 --- a/code/modules/movement/launching/launching.dm +++ b/code/modules/movement/launching/launching.dm @@ -164,7 +164,7 @@ animation_spin(5, 1 + min(1, LM.range/20)) var/old_speed = cur_speed - cur_speed = Clamp(LM.speed, MIN_SPEED, MAX_SPEED) // Sanity check, also ~1 sec delay between each launch move is not very reasonable + cur_speed = clamp(LM.speed, MIN_SPEED, MAX_SPEED) // Sanity check, also ~1 sec delay between each launch move is not very reasonable var/delay = 10/cur_speed - 0.5 // scales delay back to deciseconds for when sleep is called var/pass_flags = LM.pass_flags diff --git a/code/modules/nightmare/nmnodes/mapload.dm b/code/modules/nightmare/nmnodes/mapload.dm index 6f75a46ed125..4b9ae2a3014b 100644 --- a/code/modules/nightmare/nmnodes/mapload.dm +++ b/code/modules/nightmare/nmnodes/mapload.dm @@ -100,7 +100,7 @@ if(!matcher.Find(filename)) continue #if !defined(UNIT_TESTS) - var/fprob = Clamp(text2num(matcher.group[1]) / 100, 0, 1) + var/fprob = clamp(text2num(matcher.group[1]) / 100, 0, 1) if(fprob < rand()) continue #endif // Remove the possibility of chance for testing diff --git a/code/modules/organs/limbs.dm b/code/modules/organs/limbs.dm index 949104c5d673..f2d73c8ce0ec 100644 --- a/code/modules/organs/limbs.dm +++ b/code/modules/organs/limbs.dm @@ -1091,7 +1091,7 @@ treat_grafted var tells it to apply to grafted but unsalved wounds, for burn kit //if the chance was not set by what called fracture(), the endurance check is done instead if(bonebreak_probability == null) //bone break chance is based on endurance, 25% for survivors, erts, 100% for most everyone else. - bonebreak_probability = 100 / Clamp(owner.skills?.get_skill_level(SKILL_ENDURANCE)-1,1,100) //can't be zero + bonebreak_probability = 100 / clamp(owner.skills?.get_skill_level(SKILL_ENDURANCE)-1,1,100) //can't be zero var/list/bonebreak_data = list("bonebreak_probability" = bonebreak_probability) SEND_SIGNAL(owner, COMSIG_HUMAN_BONEBREAK_PROBABILITY, bonebreak_data) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 594ad6b69dce..a3ba517c0cae 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -199,7 +199,7 @@ They're all essentially identical when it comes to getting the job done. var/severity = round(current_rounds / 50) //the more ammo inside, the faster and harder it cooks off if(severity > 0) - addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(explosion), loc, -1, ((severity > 4) ? 0 : -1), Clamp(severity, 0, 1), Clamp(severity, 0, 2), 1, 0, 0, flame_cause_data), max(5 - severity, 2)) + addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(explosion), loc, -1, ((severity > 4) ? 0 : -1), clamp(severity, 0, 1), clamp(severity, 0, 2), 1, 0, 0, flame_cause_data), max(5 - severity, 2)) if(!QDELETED(src)) qdel(src) diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm index 282edcab9fd6..b9582cf5adb2 100644 --- a/code/modules/projectiles/guns/flamer/flamer.dm +++ b/code/modules/projectiles/guns/flamer/flamer.dm @@ -205,12 +205,12 @@ var/flameshape = R.flameshape var/fire_type = R.fire_type - R.intensityfire = Clamp(R.intensityfire, current_mag.reagents.min_fire_int, current_mag.reagents.max_fire_int) - R.durationfire = Clamp(R.durationfire, current_mag.reagents.min_fire_dur, current_mag.reagents.max_fire_dur) - R.rangefire = Clamp(R.rangefire, current_mag.reagents.min_fire_rad, current_mag.reagents.max_fire_rad) + R.intensityfire = clamp(R.intensityfire, current_mag.reagents.min_fire_int, current_mag.reagents.max_fire_int) + R.durationfire = clamp(R.durationfire, current_mag.reagents.min_fire_dur, current_mag.reagents.max_fire_dur) + R.rangefire = clamp(R.rangefire, current_mag.reagents.min_fire_rad, current_mag.reagents.max_fire_rad) var/max_range = R.rangefire if (max_range < fuel_pressure) //Used for custom tanks, allows for higher ranges - max_range = Clamp(fuel_pressure, 0, current_mag.reagents.max_fire_rad) + max_range = clamp(fuel_pressure, 0, current_mag.reagents.max_fire_rad) if(R.rangefire == -1) max_range = current_mag.reagents.max_fire_rad diff --git a/code/modules/projectiles/magazines/flamer.dm b/code/modules/projectiles/magazines/flamer.dm index 787a0585640a..7fba325177c6 100644 --- a/code/modules/projectiles/magazines/flamer.dm +++ b/code/modules/projectiles/magazines/flamer.dm @@ -94,7 +94,7 @@ to_chat(user, SPAN_WARNING("This chemical is not potent enough to be used in a flamethrower!")) return - var/fuel_amt_to_remove = Clamp(to_add.volume, 0, max_rounds - reagents.get_reagent_amount(to_add.id)) + var/fuel_amt_to_remove = clamp(to_add.volume, 0, max_rounds - reagents.get_reagent_amount(to_add.id)) if(!fuel_amt_to_remove) if(!max_rounds) to_chat(user, SPAN_WARNING("[target] is empty!")) @@ -171,7 +171,7 @@ if(usr.get_active_hand() != src) return - var/set_pressure = Clamp(tgui_input_number(usr, "Change fuel pressure to: (max: [max_pressure])", "Fuel pressure", fuel_pressure, 10, 1), 1 ,max_pressure) + var/set_pressure = clamp(tgui_input_number(usr, "Change fuel pressure to: (max: [max_pressure])", "Fuel pressure", fuel_pressure, 10, 1), 1 ,max_pressure) if(!set_pressure) to_chat(usr, SPAN_WARNING("You can't find that setting on the regulator!")) else diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index ee9caa61d7a7..f87b86a20c1f 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -217,15 +217,15 @@ ammo.fire_bonus_projectiles(src) path = getline2(starting, target_turf) - p_x += Clamp((rand()-0.5)*scatter*3, -8, 8) - p_y += Clamp((rand()-0.5)*scatter*3, -8, 8) + p_x += clamp((rand()-0.5)*scatter*3, -8, 8) + p_y += clamp((rand()-0.5)*scatter*3, -8, 8) update_angle(starting, target_turf) src.speed = speed // Randomize speed by a small factor to help bullet animations look okay // Otherwise you get a s t r e a m of warping bullets in same positions src.speed *= (1 + (rand()-0.5) * 0.30) // 15.0% variance either way - src.speed = Clamp(src.speed, 0.1, 100) // Safety to avoid loop hazards + src.speed = clamp(src.speed, 0.1, 100) // Safety to avoid loop hazards // Also give it some headstart, flying it now ahead of tick var/delta_time = world.tick_lag * rand() * 0.4 @@ -237,8 +237,8 @@ SSprojectiles.queue_projectile(src) /obj/projectile/proc/update_angle(turf/source_turf, turf/aim_turf) - p_x = Clamp(p_x, -16, 16) - p_y = Clamp(p_y, -16, 16) + p_x = clamp(p_x, -16, 16) + p_y = clamp(p_y, -16, 16) if(process_start_turf != vis_source) vis_travelled = 0 @@ -274,9 +274,6 @@ return FALSE -//#define LERP(a, b, t) (a + (b - a) * CLAMP01(t)) -#define LERP_UNCLAMPED(a, b, t) (a + (b - a) * t) - /// Animates the projectile across the process'ed flight. /obj/projectile/proc/animate_flight(turf/start_turf, start_pixel_x, start_pixel_y, delta_time) //Get pixelspace coordinates of start and end of visual path @@ -301,8 +298,8 @@ var/vis_current = vis_travelled + speed * (time_carry * 0.1) //speed * (time_carry * 0.1) for remainder time movement, visually "catching up" to where it should be var/vis_interpolant = vis_current / vis_length - var/pixel_x_lerped = LERP_UNCLAMPED(pixel_x_source, pixel_x_target, vis_interpolant) - var/pixel_y_lerped = LERP_UNCLAMPED(pixel_y_source, pixel_y_target, vis_interpolant) + var/pixel_x_lerped = LERP(pixel_x_source, pixel_x_target, vis_interpolant) + var/pixel_y_lerped = LERP(pixel_y_source, pixel_y_target, vis_interpolant) //Convert pixelspace to pixel offset relative to current loc @@ -319,7 +316,7 @@ var/dist_current = distance_travelled + speed * (time_carry * 0.1) //speed * (time_carry * 0.1) for remainder time fade-in var/alpha_interpolant = dist_current - 1 //-1 so it transitions from transparent to opaque between dist 1-2 - var/alpha_new = LERP_UNCLAMPED(0, 255, alpha_interpolant) + var/alpha_new = LERP(0, 255, alpha_interpolant) //Animate the visuals from starting position to new position @@ -332,9 +329,6 @@ var/anim_time = delta_time * 0.1 animate(src, pixel_x = pixel_x_rel_new, pixel_y = pixel_y_rel_new, alpha = alpha_new, time = anim_time, flags = ANIMATION_END_NOW) -//#undef LERP -#undef LERP_UNCLAMPED - /// Flies the projectile forward one single turf /obj/projectile/proc/fly() SHOULD_NOT_SLEEP(TRUE) @@ -1208,8 +1202,8 @@ if(P.ammo.sound_bounce) playsound(src, P.ammo.sound_bounce, 50, 1) var/image/I = image('icons/obj/items/weapons/projectiles.dmi', src, P.ammo.ping, 10) - var/offset_x = Clamp(P.pixel_x + pixel_x_offset, -10, 10) - var/offset_y = Clamp(P.pixel_y + pixel_y_offset, -10, 10) + var/offset_x = clamp(P.pixel_x + pixel_x_offset, -10, 10) + var/offset_y = clamp(P.pixel_y + pixel_y_offset, -10, 10) I.pixel_x += round(rand(-4,4) + offset_x, 1) I.pixel_y += round(rand(-4,4) + offset_y, 1) diff --git a/code/modules/reagents/chemistry_machinery/chem_master.dm b/code/modules/reagents/chemistry_machinery/chem_master.dm index 1e7e3bb08384..dc5206bb2df5 100644 --- a/code/modules/reagents/chemistry_machinery/chem_master.dm +++ b/code/modules/reagents/chemistry_machinery/chem_master.dm @@ -215,7 +215,7 @@ return if(href_list["createpill_multiple"]) - count = Clamp(tgui_input_number(user, "Select the number of pills to make. (max: [max_pill_count])", "Pills to make", pillamount, max_pill_count, 1), 0, max_pill_count) + count = clamp(tgui_input_number(user, "Select the number of pills to make. (max: [max_pill_count])", "Pills to make", pillamount, max_pill_count, 1), 0, max_pill_count) if(!count) return diff --git a/code/modules/reagents/chemistry_machinery/chem_simulator.dm b/code/modules/reagents/chemistry_machinery/chem_simulator.dm index 8dc34f208549..8a95e3f3b07e 100644 --- a/code/modules/reagents/chemistry_machinery/chem_simulator.dm +++ b/code/modules/reagents/chemistry_machinery/chem_simulator.dm @@ -443,7 +443,7 @@ for(var/datum/chem_property/P in creation_template) creation_cost += max(abs(P.value), 1) * P.level if(P.level > 5) // a penalty is added at each level above 5 (+1 at 6, +2 at 7, +4 at 8, +5 at 9, +7 at 10) - creation_cost += P.level - 6 + n_ceil((P.level - 5) / 2) + creation_cost += P.level - 6 + Ceiling((P.level - 5) / 2) creation_cost += ((new_od_level - 10) / 5) * 3 //3 cost for every 5 units above 10 for(var/rarity in creation_complexity) switch(rarity) diff --git a/code/modules/reagents/chemistry_properties/prop_neutral.dm b/code/modules/reagents/chemistry_properties/prop_neutral.dm index 3048b12ee296..e1e59b8b886c 100644 --- a/code/modules/reagents/chemistry_properties/prop_neutral.dm +++ b/code/modules/reagents/chemistry_properties/prop_neutral.dm @@ -29,7 +29,7 @@ return list(REAGENT_CANCEL = TRUE) var/effectiveness = 1 if(M.stat != DEAD) - effectiveness = Clamp(max(M.oxyloss / 10, (BLOOD_VOLUME_NORMAL - M.blood_volume) / BLOOD_VOLUME_NORMAL) * 0.1 * level, 0.1, 1) + effectiveness = clamp(max(M.oxyloss / 10, (BLOOD_VOLUME_NORMAL - M.blood_volume) / BLOOD_VOLUME_NORMAL) * 0.1 * level, 0.1, 1) return list(REAGENT_FORCE = TRUE, REAGENT_EFFECT = effectiveness) /datum/chem_property/neutral/excreting diff --git a/code/modules/shuttle/computers/dropship_computer.dm b/code/modules/shuttle/computers/dropship_computer.dm index d357a15b36f8..ba6683321f9c 100644 --- a/code/modules/shuttle/computers/dropship_computer.dm +++ b/code/modules/shuttle/computers/dropship_computer.dm @@ -467,7 +467,7 @@ if("set-automate") var/almayer_lz = params["hangar_id"] var/ground_lz = params["ground_id"] - var/delay = Clamp(params["delay"] SECONDS, DROPSHIP_MIN_AUTO_DELAY, DROPSHIP_MAX_AUTO_DELAY) + var/delay = clamp(params["delay"] SECONDS, DROPSHIP_MIN_AUTO_DELAY, DROPSHIP_MAX_AUTO_DELAY) // TODO verify if(almayer_lz == ground_lz) diff --git a/code/modules/vehicles/hardpoints/primary/minigun.dm b/code/modules/vehicles/hardpoints/primary/minigun.dm index 3acf37eec268..03d1e7be0077 100644 --- a/code/modules/vehicles/hardpoints/primary/minigun.dm +++ b/code/modules/vehicles/hardpoints/primary/minigun.dm @@ -75,7 +75,7 @@ spin_stage -= delta_stage / spindown_time else return - spin_stage = Clamp(spin_stage, 1, stage_rate_len) + spin_stage = clamp(spin_stage, 1, stage_rate_len) var/old_stage_rate = stage_rate[Floor(old_spin_stage)] var/new_stage_rate = stage_rate[Floor(spin_stage)] From aa9dfb7057d35444609aa1aebfb2f16d8eb7f70e Mon Sep 17 00:00:00 2001 From: TheGamerdk <5618080+TheGamerdk@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:15:03 +0100 Subject: [PATCH 21/32] Fixes overwatch consoles on WO (#5443) # About the pull request There is no OB cannon on WO # Explain why it's good for the game # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: Overwatch now works on Whiskey Outpost again, not that you will use it. /:cl: --- code/modules/cm_marines/overwatch.dm | 8 +++++--- .../tgui/interfaces/OverwatchConsole.jsx | 16 +++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/code/modules/cm_marines/overwatch.dm b/code/modules/cm_marines/overwatch.dm index c5b296772c79..9c7c252a32c8 100644 --- a/code/modules/cm_marines/overwatch.dm +++ b/code/modules/cm_marines/overwatch.dm @@ -317,10 +317,12 @@ has_supply_pad = TRUE data["can_launch_crates"] = has_supply_pad data["has_crate_loaded"] = supply_crate - data["supply_cooldown"] = COOLDOWN_TIMELEFT(current_squad, next_supplydrop) - data["ob_cooldown"] = COOLDOWN_TIMELEFT(GLOB.almayer_orbital_cannon, ob_firing_cooldown) - data["ob_loaded"] = GLOB.almayer_orbital_cannon.chambered_tray + data["can_launch_obs"] = GLOB.almayer_orbital_cannon + if(GLOB.almayer_orbital_cannon) + data["ob_cooldown"] = COOLDOWN_TIMELEFT(GLOB.almayer_orbital_cannon, ob_firing_cooldown) + data["ob_loaded"] = GLOB.almayer_orbital_cannon.chambered_tray + data["supply_cooldown"] = COOLDOWN_TIMELEFT(current_squad, next_supplydrop) data["operator"] = operator.name return data diff --git a/tgui/packages/tgui/interfaces/OverwatchConsole.jsx b/tgui/packages/tgui/interfaces/OverwatchConsole.jsx index 1805f231fb16..3d7a30df2c46 100644 --- a/tgui/packages/tgui/interfaces/OverwatchConsole.jsx +++ b/tgui/packages/tgui/interfaces/OverwatchConsole.jsx @@ -87,19 +87,21 @@ const SquadPanel = (props, context) => { Supply Drop )} - setCategory('ob')}> - Orbital Bombardment - + {!!data.can_launch_obs && ( + setCategory('ob')}> + Orbital Bombardment + + )} act('tacmap_unpin')}> Tactical Map {category === 'monitor' && } {category === 'supply' && data.can_launch_crates && } - {category === 'ob' && } + {category === 'ob' && data.can_launch_obs && } ); }; From 9064d4e39252a84b62d0d25f5db68c66fcbebc23 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 09:55:58 +0000 Subject: [PATCH 22/32] Automatic changelog for PR #5443 [ci skip] --- html/changelogs/AutoChangeLog-pr-5443.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5443.yml diff --git a/html/changelogs/AutoChangeLog-pr-5443.yml b/html/changelogs/AutoChangeLog-pr-5443.yml new file mode 100644 index 000000000000..6a66c893b2ae --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5443.yml @@ -0,0 +1,4 @@ +author: "TheGamerdk" +delete-after: True +changes: + - bugfix: "Overwatch now works on Whiskey Outpost again, not that you will use it." \ No newline at end of file From 3fd69e52eaa846b409dfa4e7e879b5cb06edcfbf Mon Sep 17 00:00:00 2001 From: Julian56 <117036822+Huffie56@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:15:34 +0100 Subject: [PATCH 23/32] add the ability to build multi tile assembly from metal sheets. (#5445) # About the pull request just adding what should already be possible... # Explain why it's good for the game give more option for MT # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: add: Add the ability to build multi tile assembly from metal sheets. /:cl: Co-authored-by: Julien --- code/game/objects/items/stacks/sheets/sheet_types.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index a0814290ca40..f394758e5f7d 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -27,6 +27,7 @@ GLOBAL_LIST_INIT_TYPED(metal_recipes, /datum/stack_recipe, list ( \ new/datum/stack_recipe("wall girder", /obj/structure/girder, 2, time = 50, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_ENGI), \ new/datum/stack_recipe("window frame", /obj/structure/window_frame/almayer, 5, time = 50, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_ENGI), \ new/datum/stack_recipe("airlock assembly", /obj/structure/airlock_assembly, 5, time = 50, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_ENGI), \ + new/datum/stack_recipe("large airlock assembly", /obj/structure/airlock_assembly/multi_tile, 5, time = 50, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1, skill_req = SKILL_CONSTRUCTION, skill_lvl = SKILL_CONSTRUCTION_ENGI), \ null, \ new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1), \ new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = ONE_TYPE_PER_TURF, on_floor = 1), \ From 89d9f35d95fdbdb719623b7cabc5405033a4e56b Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:09:07 +0000 Subject: [PATCH 24/32] Automatic changelog for PR #5445 [ci skip] --- html/changelogs/AutoChangeLog-pr-5445.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5445.yml diff --git a/html/changelogs/AutoChangeLog-pr-5445.yml b/html/changelogs/AutoChangeLog-pr-5445.yml new file mode 100644 index 000000000000..6ad42c94ae06 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5445.yml @@ -0,0 +1,4 @@ +author: "Huffie56" +delete-after: True +changes: + - rscadd: "Add the ability to build multi tile assembly from metal sheets." \ No newline at end of file From 2992d4d7a5d70fc3e46c2ac3307ab122b385cbba Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Mon, 15 Jan 2024 09:16:43 +0000 Subject: [PATCH 25/32] Fixes dead marines being able to use the M56D (#5451) # About the pull request Fixes dead marines being able to man and fire the M56D. Also adds a `stat` check to the M2C as well. It doesn't have the same problem as the M56, but when dragging it onto your body a progress indicator will flash up before quickly disappearing, so this just stops it appearing in the first place. # Explain why it's good for the game Dead marines firing machine guns is spooky. # Testing Photographs and Procedure
Screenshots & Videos **Before:** https://github.com/cmss13-devs/cmss13/assets/57483089/e4e6fd55-ed71-493f-9f52-4c517f4eec61 **After:** https://github.com/cmss13-devs/cmss13/assets/57483089/6459571f-02b8-457f-bb14-a6105c11ab19
# Changelog :cl: fix: Fixed dead marines being able to man and fire the M56D. /:cl: --- code/modules/cm_marines/m2c.dm | 6 +++++- code/modules/cm_marines/smartgun_mount.dm | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/modules/cm_marines/m2c.dm b/code/modules/cm_marines/m2c.dm index 742ad954c20b..4001e72b02f3 100644 --- a/code/modules/cm_marines/m2c.dm +++ b/code/modules/cm_marines/m2c.dm @@ -454,8 +454,12 @@ // DISASSEMBLY /obj/structure/machinery/m56d_hmg/auto/MouseDrop(over_object, src_location, over_location) - if(!ishuman(usr)) return + if(!ishuman(usr)) + return var/mob/living/carbon/human/user = usr + // If the user is unconscious or dead. + if(user.stat) + return if(over_object == user && in_range(src, user)) if((rounds > 0) && (user.a_intent & (INTENT_GRAB))) diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index b4c01a8842aa..e307ef8a611b 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -45,7 +45,7 @@ ///How many rounds are in the weapon. This is useful if we break down our guns. var/rounds = 0 ///Indicates whether the M56D will come with its folding mount already attached - var/has_mount = FALSE + var/has_mount = FALSE ///The distance this has to be away from other m56d_hmg and m56d_post to be placed. var/defense_check_range = 5 @@ -827,6 +827,9 @@ // If the user isn't a human. if(!istype(user)) return + // If the user is unconscious or dead. + if(user.stat) + return // If the user isn't actually allowed to use guns. if(!user.allow_gun_usage) From 939e283561d2446d5df4b60faba08097eaea1f79 Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:23:41 +0000 Subject: [PATCH 26/32] Automatic changelog for PR #5451 [ci skip] --- html/changelogs/AutoChangeLog-pr-5451.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5451.yml diff --git a/html/changelogs/AutoChangeLog-pr-5451.yml b/html/changelogs/AutoChangeLog-pr-5451.yml new file mode 100644 index 000000000000..ff607b2d8cb6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5451.yml @@ -0,0 +1,4 @@ +author: "SabreML" +delete-after: True +changes: + - bugfix: "Fixed dead marines being able to man and fire the M56D." \ No newline at end of file From a4c6ab0b55d4ed4db65d47fbba5c57f9a42308f3 Mon Sep 17 00:00:00 2001 From: ItsVyzo <46250991+ItsVyzo@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:27:57 -0800 Subject: [PATCH 27/32] m56d nerf - correct branch this time (#5301) # About the pull request Removes burst fire from the m56d # Explain why it's good for the game You can no longer kill Queen in 3 seconds, now it's around 6 seconds # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: balance: m56d loses burst fire /:cl: --- code/modules/cm_marines/smartgun_mount.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index e307ef8a611b..dbfdf03e0b76 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -476,7 +476,6 @@ /// What firemodes this gun has var/static/list/gun_firemodes = list( GUN_FIREMODE_SEMIAUTO, - GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOMATIC, ) /// A multiplier for how slow this gun should fire in automatic as opposed to burst. 1 is normal, 1.2 is 20% slower, 0.8 is 20% faster, etc. From 273d008750e4f31b56f742ac89e32e520c8802fb Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Mon, 15 Jan 2024 23:36:06 +0000 Subject: [PATCH 28/32] Automatic changelog for PR #5301 [ci skip] --- html/changelogs/AutoChangeLog-pr-5301.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5301.yml diff --git a/html/changelogs/AutoChangeLog-pr-5301.yml b/html/changelogs/AutoChangeLog-pr-5301.yml new file mode 100644 index 000000000000..ac7bcfc2370a --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5301.yml @@ -0,0 +1,4 @@ +author: "ItsVyzo" +delete-after: True +changes: + - balance: "m56d loses burst fire" \ No newline at end of file From 1c2be3747ef61e47f3c981b787e740302a4eb3de Mon Sep 17 00:00:00 2001 From: Changelogs Date: Tue, 16 Jan 2024 01:12:45 +0000 Subject: [PATCH 29/32] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-5301.yml | 4 ---- html/changelogs/AutoChangeLog-pr-5440.yml | 4 ---- html/changelogs/AutoChangeLog-pr-5443.yml | 4 ---- html/changelogs/AutoChangeLog-pr-5445.yml | 4 ---- html/changelogs/AutoChangeLog-pr-5449.yml | 4 ---- html/changelogs/AutoChangeLog-pr-5451.yml | 4 ---- html/changelogs/archive/2024-01.yml | 14 ++++++++++++++ 7 files changed, 14 insertions(+), 24 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-5301.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5440.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5443.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5445.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5449.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-5451.yml diff --git a/html/changelogs/AutoChangeLog-pr-5301.yml b/html/changelogs/AutoChangeLog-pr-5301.yml deleted file mode 100644 index ac7bcfc2370a..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5301.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "ItsVyzo" -delete-after: True -changes: - - balance: "m56d loses burst fire" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5440.yml b/html/changelogs/AutoChangeLog-pr-5440.yml deleted file mode 100644 index f84625d30849..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5440.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Drathek" -delete-after: True -changes: - - bugfix: "Fix all hands on deck message not sending to those in cryopods" \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5443.yml b/html/changelogs/AutoChangeLog-pr-5443.yml deleted file mode 100644 index 6a66c893b2ae..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5443.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "TheGamerdk" -delete-after: True -changes: - - bugfix: "Overwatch now works on Whiskey Outpost again, not that you will use it." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5445.yml b/html/changelogs/AutoChangeLog-pr-5445.yml deleted file mode 100644 index 6ad42c94ae06..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5445.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Huffie56" -delete-after: True -changes: - - rscadd: "Add the ability to build multi tile assembly from metal sheets." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5449.yml b/html/changelogs/AutoChangeLog-pr-5449.yml deleted file mode 100644 index 86fbc5f1b0db..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5449.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Zonespace27" -delete-after: True -changes: - - balance: "3 smartgun drums now spawn in the SG's equipment crate. Smartgun drums cannot be purchased from the SG vendor." \ No newline at end of file diff --git a/html/changelogs/AutoChangeLog-pr-5451.yml b/html/changelogs/AutoChangeLog-pr-5451.yml deleted file mode 100644 index ff607b2d8cb6..000000000000 --- a/html/changelogs/AutoChangeLog-pr-5451.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "SabreML" -delete-after: True -changes: - - bugfix: "Fixed dead marines being able to man and fire the M56D." \ No newline at end of file diff --git a/html/changelogs/archive/2024-01.yml b/html/changelogs/archive/2024-01.yml index b16cf15ac751..41cc7306feaa 100644 --- a/html/changelogs/archive/2024-01.yml +++ b/html/changelogs/archive/2024-01.yml @@ -165,3 +165,17 @@ - bugfix: removed a light fixture being doubled on trijent - maptweak: moved some trijent lights in marshals off windows - maptweak: Alamayer PermaBrig Chairs face the right way +2024-01-16: + Drathek: + - bugfix: Fix all hands on deck message not sending to those in cryopods + Huffie56: + - rscadd: Add the ability to build multi tile assembly from metal sheets. + ItsVyzo: + - balance: m56d loses burst fire + SabreML: + - bugfix: Fixed dead marines being able to man and fire the M56D. + TheGamerdk: + - bugfix: Overwatch now works on Whiskey Outpost again, not that you will use it. + Zonespace27: + - balance: 3 smartgun drums now spawn in the SG's equipment crate. Smartgun drums + cannot be purchased from the SG vendor. From 31b7c8d99dbba99dc6e819c67f8475830a81f7df Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Tue, 16 Jan 2024 06:50:50 +0000 Subject: [PATCH 30/32] Automatic TGS DMAPI Update (#5467) This pull request updates the TGS DMAPI to the latest version. Please note any breaking or unimplemented changes before merging. Co-authored-by: tgstation-server --- code/__DEFINES/tgs.dm | 5 +++- code/modules/tgs/v5/api.dm | 54 ++++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/code/__DEFINES/tgs.dm b/code/__DEFINES/tgs.dm index c561a64ebf58..fdfec5e8ca08 100644 --- a/code/__DEFINES/tgs.dm +++ b/code/__DEFINES/tgs.dm @@ -1,6 +1,6 @@ // tgstation-server DMAPI -#define TGS_DMAPI_VERSION "7.0.1" +#define TGS_DMAPI_VERSION "7.0.2" // All functions and datums outside this document are subject to change with any version and should not be relied on. @@ -426,6 +426,7 @@ /** * Send a message to connected chats. This function may sleep! + * If TGS is offline when called, the message may be placed in a queue to be sent and this function will return immediately. Your message will be sent when TGS reconnects to the game. * * message - The [/datum/tgs_message_content] to send. * admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies. @@ -435,6 +436,7 @@ /** * Send a private message to a specific user. This function may sleep! + * If TGS is offline when called, the message may be placed in a queue to be sent and this function will return immediately. Your message will be sent when TGS reconnects to the game. * * message - The [/datum/tgs_message_content] to send. * user: The [/datum/tgs_chat_user] to PM. @@ -444,6 +446,7 @@ /** * Send a message to connected chats that are flagged as game-related in TGS. This function may sleep! + * If TGS is offline when called, the message may be placed in a queue to be sent and this function will return immediately. Your message will be sent when TGS reconnects to the game. * * message - The [/datum/tgs_message_content] to send. * channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to. diff --git a/code/modules/tgs/v5/api.dm b/code/modules/tgs/v5/api.dm index 25d49b3e3bdb..a5c064a8eaf1 100644 --- a/code/modules/tgs/v5/api.dm +++ b/code/modules/tgs/v5/api.dm @@ -8,8 +8,12 @@ var/reboot_mode = TGS_REBOOT_MODE_NORMAL + /// List of chat messages list()s that attempted to be sent during a topic call. To be bundled in the result of the call var/list/intercepted_message_queue + /// List of chat messages list()s that attempted to be sent during a topic call. To be bundled in the result of the call + var/list/offline_message_queue + var/list/custom_commands var/list/test_merges @@ -194,17 +198,7 @@ var/datum/tgs_chat_channel/channel = I ids += channel.id - message2 = UpgradeDeprecatedChatMessage(message2) - - if (!length(channels)) - return - - var/list/data = message2._interop_serialize() - data[DMAPI5_CHAT_MESSAGE_CHANNEL_IDS] = ids - if(intercepted_message_queue) - intercepted_message_queue += list(data) - else - Bridge(DMAPI5_BRIDGE_COMMAND_CHAT_SEND, list(DMAPI5_BRIDGE_PARAMETER_CHAT_MESSAGE = data)) + SendChatMessageRaw(message2, ids) /datum/tgs_api/v5/ChatTargetedBroadcast(datum/tgs_message_content/message2, admin_only) var/list/channels = list() @@ -213,26 +207,42 @@ if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only))) channels += channel.id + SendChatMessageRaw(message2, channels) + +/datum/tgs_api/v5/ChatPrivateMessage(datum/tgs_message_content/message2, datum/tgs_chat_user/user) + SendChatMessageRaw(message2, list(user.channel.id)) + +/datum/tgs_api/v5/proc/SendChatMessageRaw(datum/tgs_message_content/message2, list/channel_ids) message2 = UpgradeDeprecatedChatMessage(message2) - if (!length(channels)) + if (!length(channel_ids)) return var/list/data = message2._interop_serialize() - data[DMAPI5_CHAT_MESSAGE_CHANNEL_IDS] = channels + data[DMAPI5_CHAT_MESSAGE_CHANNEL_IDS] = channel_ids if(intercepted_message_queue) intercepted_message_queue += list(data) - else - Bridge(DMAPI5_BRIDGE_COMMAND_CHAT_SEND, list(DMAPI5_BRIDGE_PARAMETER_CHAT_MESSAGE = data)) + return -/datum/tgs_api/v5/ChatPrivateMessage(datum/tgs_message_content/message2, datum/tgs_chat_user/user) - message2 = UpgradeDeprecatedChatMessage(message2) - var/list/data = message2._interop_serialize() - data[DMAPI5_CHAT_MESSAGE_CHANNEL_IDS] = list(user.channel.id) - if(intercepted_message_queue) - intercepted_message_queue += list(data) + if(offline_message_queue) + offline_message_queue += list(data) + return + + if(detached) + offline_message_queue = list(data) + + WaitForReattach(FALSE) + + data = offline_message_queue + offline_message_queue = null + + for(var/queued_message in data) + SendChatDataRaw(queued_message) else - Bridge(DMAPI5_BRIDGE_COMMAND_CHAT_SEND, list(DMAPI5_BRIDGE_PARAMETER_CHAT_MESSAGE = data)) + SendChatDataRaw(data) + +/datum/tgs_api/v5/proc/SendChatDataRaw(list/data) + Bridge(DMAPI5_BRIDGE_COMMAND_CHAT_SEND, list(DMAPI5_BRIDGE_PARAMETER_CHAT_MESSAGE = data)) /datum/tgs_api/v5/ChatChannelInfo() RequireInitialBridgeResponse() From b94072e3a7a4c728af64c7f982fa493f4c60a42e Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Tue, 16 Jan 2024 12:14:36 +0000 Subject: [PATCH 31/32] Fixes larvae sometimes spawning in space (#5455) # About the pull request Fixes larvae sometimes spawning in space on Fiorina. (And any other space-based maps) I think this is being caused by the `do_buried_larva_spawn()` proc looking for any `/turf/open` subtypes in range, but not performing any checks on them. # Explain why it's good for the game Occasionally at roundstart on Fiorina a larva will spawn outside of the station's walls in space, and need an admin to teleport them back inside. Although it *is* pretty funny when it happens, it's probably best to fix it. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: fix: Fixed larvae sometimes spawning in space on Fiorina. /:cl: --- code/modules/mob/living/carbon/xenomorph/hive_status.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/hive_status.dm b/code/modules/mob/living/carbon/xenomorph/hive_status.dm index ab812cba5c97..63aea4007482 100644 --- a/code/modules/mob/living/carbon/xenomorph/hive_status.dm +++ b/code/modules/mob/living/carbon/xenomorph/hive_status.dm @@ -779,7 +779,12 @@ spawning_area = pick(totalXenos) // FUCK IT JUST GO ANYWHERE var/list/turf_list for(var/turf/open/open_turf in orange(3, spawning_area)) + if(istype(open_turf, /turf/open/space)) + continue LAZYADD(turf_list, open_turf) + // just on the off-chance + if(!LAZYLEN(turf_list)) + return FALSE var/turf/open/spawning_turf = pick(turf_list) var/mob/living/carbon/xenomorph/larva/new_xeno = spawn_hivenumber_larva(spawning_turf, hivenumber) From 5d0a1f0e366ff9bdcc5ba610d3a751443811a4dd Mon Sep 17 00:00:00 2001 From: cm13-github <128137806+cm13-github@users.noreply.github.com> Date: Tue, 16 Jan 2024 12:25:29 +0000 Subject: [PATCH 32/32] Automatic changelog for PR #5455 [ci skip] --- html/changelogs/AutoChangeLog-pr-5455.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-5455.yml diff --git a/html/changelogs/AutoChangeLog-pr-5455.yml b/html/changelogs/AutoChangeLog-pr-5455.yml new file mode 100644 index 000000000000..4e3b9db735b2 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-5455.yml @@ -0,0 +1,4 @@ +author: "SabreML" +delete-after: True +changes: + - bugfix: "Fixed larvae sometimes spawning in space on Fiorina." \ No newline at end of file