Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor files to change variable name using colour to color. #5396

Merged
merged 1 commit into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions code/game/objects/items/tools/misc_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
. = ..()
Expand Down Expand Up @@ -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."
Expand All @@ -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."
Expand All @@ -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."
Expand All @@ -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."
Expand All @@ -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)
Expand All @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/living/silicon/robot/robot_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
t = replacetext(t, "\[upp\]", "<img src = [asset.get_url_mappings()["upplogo.png"]]>")
t = replacetext(t, "\[cmb\]", "<img src = [asset.get_url_mappings()["cmblogo.png"]]>")

t = "<font face=\"[deffont]\" color=[P ? P.pen_colour : "black"]>[t]</font>"
t = "<font face=\"[deffont]\" color=[P ? P.pen_color : "black"]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!
t = replacetext(t, "\[*\]", "")
t = replacetext(t, "\[hr\]", "")
Expand All @@ -272,7 +272,7 @@
t = replacetext(t, "\[cell\]", "")
t = replacetext(t, "\[logo\]", "")

t = "<font face=\"[crayonfont]\" color=[P ? P.pen_colour : "black"]><b>[t]</b></font>"
t = "<font face=\"[crayonfont]\" color=[P ? P.pen_color : "black"]><b>[t]</b></font>"

// t = replacetext(t, "#", "") // Junk converted to nothing!

Expand Down
Loading