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 change some color by using defines already there #5398

Merged
merged 4 commits into from
Jan 14, 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
32 changes: 19 additions & 13 deletions code/__DEFINES/colours.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,65 @@

// 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"

#define COLOR_HALF_TRANSPARENT_BLACK "#0000007A"

#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"

#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"
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/effects/decals/cleanable/blood/robots.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
desc = "It's a useless heap of junk... <i>or is it?</i>"
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/decals/crayon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/radio/listening_bugs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/paint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/reagent_containers/food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
. = ..()
Expand Down
10 changes: 5 additions & 5 deletions code/game/objects/items/reagent_containers/food/snacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
. = ..()
Expand Down Expand Up @@ -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()
. = ..()
Expand All @@ -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()
. = ..()
Expand Down Expand Up @@ -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()
. = ..()
Expand Down Expand Up @@ -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()
. = ..()
Expand Down
12 changes: 6 additions & 6 deletions code/game/objects/items/reagent_containers/food/snacks/grown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
name = "cherries"
desc = "Great for toppings!"
icon_state = "cherry"
filling_color = "#FF0000"
filling_color = COLOR_RED
gender = PLURAL
plantname = "cherry"

Expand Down Expand Up @@ -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
Expand All @@ -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"

Expand All @@ -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"

Expand All @@ -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)
Expand Down Expand Up @@ -502,7 +502,7 @@
desc = "<I>Amanita Muscaria</I>: 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
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/stacks/cable_coil.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))
Expand Down
14 changes: 7 additions & 7 deletions code/game/objects/items/toys/crayons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/crates_lockers/largecrate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading
Loading