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] 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!