From ee88d94d264002238b56822c21502064abe8e439 Mon Sep 17 00:00:00 2001 From: Julian56 <117036822+Huffie56@users.noreply.github.com> Date: Thu, 1 Feb 2024 18:02:57 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"refactor=20:=20turn=20some=20"#=20and?= =?UTF-8?q?=20use=20the=20proper=20define=20from=20colour.dm=20for=20?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b27c024e2f69c87992a83469e49af79541e11b07. --- code/__HELPERS/icons.dm | 8 ++++---- code/_onclick/hud/fullscreen.dm | 4 ++-- code/_onclick/hud/human.dm | 2 +- code/datums/_atmos_setup.dm | 10 +++++----- code/datums/custom_hud.dm | 4 ++-- code/datums/entities/clans.dm | 2 +- code/datums/entities/player_times.dm | 8 ++++---- code/datums/langchat/langchat.dm | 2 +- .../objects/effects/decals/cleanable/blood/xeno.dm | 2 +- code/game/objects/items/handcuffs.dm | 2 +- .../items/reagent_containers/food/snacks/meat.dm | 2 +- code/modules/asset_cache/asset_list_items.dm | 2 +- code/modules/asset_cache/assets/vending.dm | 2 +- code/modules/client/preferences.dm | 2 +- code/modules/cm_preds/yaut_bracers.dm | 2 +- .../lighting/lighting_mask/lighting_mask.dm | 2 +- .../lighting/lighting_mask/shadow_calculator.dm | 14 +++++++------- code/modules/maptext_alerts/screen_alerts.dm | 2 +- code/modules/maptext_alerts/text_blurbs.dm | 2 +- .../mob/living/carbon/human/species/synthetic.dm | 6 +++--- code/modules/projectiles/magazines/shotguns.dm | 2 +- 21 files changed, 41 insertions(+), 41 deletions(-) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index 4795d8ed53b3..29755683165c 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -34,7 +34,7 @@ icon/MinColors(icon) icon/MaxColors(icon) The icon is blended with a second icon where the maximum of each RGB pixel is the result. Opacity may increase, as if the icons were blended with ICON_OR. You may supply a color in place of an icon. -icon/Opaque(background = COLOR_BLACK) +icon/Opaque(background = "#000000") All alpha values are set to 255 throughout the icon. Transparent pixels become black, or whatever background color you specify. icon/BecomeAlphaMask() You can convert a simple grayscale icon into an alpha mask to use with other icons very easily with this proc. @@ -246,7 +246,7 @@ world /icon/proc/AddAlphaMask(mask) var/icon/M = new(mask) - M.Blend(COLOR_WHITE, ICON_SUBTRACT) + M.Blend("#ffffff", ICON_SUBTRACT) // apply mask Blend(M, ICON_ADD) @@ -544,7 +544,7 @@ world return flat_icon /proc/adjust_brightness(color, value) - if (!color) return COLOR_WHITE + if (!color) return "#FFFFFF" if (!value) return color var/list/RGB = ReadRGB(color) @@ -581,7 +581,7 @@ world if(A) A.overlays.Remove(src) -/mob/proc/flick_heal_overlay(time, color = COLOR_GREEN) //used for warden and queen healing +/mob/proc/flick_heal_overlay(time, color = "#00FF00") //used for warden and queen healing var/image/I = image('icons/mob/mob.dmi', src, "heal_overlay") switch(icon_size) if(48) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 0cb7bbaf06d3..0bd2206091ba 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -212,13 +212,13 @@ /atom/movable/screen/fullscreen/lighting_backdrop/lit_secondary invisibility = INVISIBILITY_LIGHTING layer = BACKGROUND_LAYER + LIGHTING_PRIMARY_DIMMER_LAYER - color = COLOR_BLACK + color = "#000" alpha = 60 /atom/movable/screen/fullscreen/lighting_backdrop/backplane invisibility = INVISIBILITY_LIGHTING layer = LIGHTING_BACKPLANE_LAYER - color = COLOR_BLACK + color = "#000" blend_mode = BLEND_ADD /atom/movable/screen/fullscreen/see_through_darkness diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 9af300287f25..37a858d76699 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -1,7 +1,7 @@ /datum/hud/human var/list/gear = list() -/datum/hud/human/New(mob/living/carbon/human/owner, datum/custom_hud/hud_type, ui_color = COLOR_WHITE, ui_alpha = 255) +/datum/hud/human/New(mob/living/carbon/human/owner, datum/custom_hud/hud_type, ui_color = "#ffffff", ui_alpha = 255) ..() ui_datum = hud_type if(!istype(ui_datum)) diff --git a/code/datums/_atmos_setup.dm b/code/datums/_atmos_setup.dm index 560a95159506..3075e98ac464 100644 --- a/code/datums/_atmos_setup.dm +++ b/code/datums/_atmos_setup.dm @@ -6,11 +6,11 @@ // atmospherics devices. //-------------------------------------------- -#define PIPE_COLOR_GREY COLOR_WHITE //yes white is grey -#define PIPE_COLOR_RED COLOR_RED -#define PIPE_COLOR_BLUE COLOR_BLUE -#define PIPE_COLOR_CYAN COLOR_CYAN -#define PIPE_COLOR_GREEN COLOR_GREEN +#define PIPE_COLOR_GREY "#ffffff" //yes white is grey +#define PIPE_COLOR_RED "#ff0000" +#define PIPE_COLOR_BLUE "#0000ff" +#define PIPE_COLOR_CYAN "#00ffff" +#define PIPE_COLOR_GREEN "#00ff00" #define PIPE_COLOR_YELLOW "#ffcc00" #define PIPE_COLOR_PURPLE "#5c1ec0" diff --git a/code/datums/custom_hud.dm b/code/datums/custom_hud.dm index 28cdc3b45813..62ae36aa7b89 100644 --- a/code/datums/custom_hud.dm +++ b/code/datums/custom_hud.dm @@ -82,7 +82,7 @@ var/coords_x = splittext(coords[1], ":") return "[coords_x[1]]:[text2num(coords_x[2])+A.hud_offset],[coords[2]]" -/datum/custom_hud/proc/special_behaviour(datum/hud/element, ui_alpha = 255, ui_color = COLOR_WHITE) +/datum/custom_hud/proc/special_behaviour(datum/hud/element, ui_alpha = 255, ui_color = "#ffffff") return /datum/custom_hud/old @@ -131,7 +131,7 @@ var/coord_row_offset = -8 return "EAST[coord_col]:[coord_col_offset],NORTH[coord_row]:[coord_row_offset]" -/datum/custom_hud/dark/special_behaviour(datum/hud/element, ui_alpha = 255, ui_color = COLOR_WHITE) +/datum/custom_hud/dark/special_behaviour(datum/hud/element, ui_alpha = 255, ui_color = "#ffffff") element.frame_hud = new /atom/movable/screen() element.frame_hud.icon = ui_frame_icon element.frame_hud.icon_state = "dark" diff --git a/code/datums/entities/clans.dm b/code/datums/entities/clans.dm index de256ca0db6a..916afd18c178 100644 --- a/code/datums/entities/clans.dm +++ b/code/datums/entities/clans.dm @@ -27,7 +27,7 @@ BSQL_PROTECT_DATUM(/datum/entity/clan) ) /datum/entity_meta/clan/on_insert(datum/entity/clan/player_clan) - player_clan.color = COLOR_WHITE + player_clan.color = "#FFFFFF" player_clan.save() diff --git a/code/datums/entities/player_times.dm b/code/datums/entities/player_times.dm index 502170e4c32f..2bbd4a3bc39e 100644 --- a/code/datums/entities/player_times.dm +++ b/code/datums/entities/player_times.dm @@ -5,7 +5,7 @@ // Untracked vars var/bgcolor = "#4a4a4a" - var/textcolor = COLOR_WHITE + var/textcolor = "#ffffff" BSQL_PROTECT_DATUM(/datum/entity/player_time) @@ -62,7 +62,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player_time) "job" = role_id, "playtime" = round(total_minutes MINUTES_TO_HOURS, 0.1), "bgcolor" = "rgb(0, [Floor(128 * playtime_percentage)], [Floor(255 * playtime_percentage)])", - "textcolor" = COLOR_WHITE, + "textcolor" = "#FFFFFF", "icondisplay" = icon_display ) @@ -103,14 +103,14 @@ BSQL_PROTECT_DATUM(/datum/entity/player_time) "job" = "Xenomorph", "playtime" = round(owning_client.get_total_xeno_playtime() DECISECONDS_TO_HOURS, 0.1), "bgcolor" = "#3a3a3a", - "textcolor" = COLOR_WHITE + "textcolor" = "#FFFFFF" ) var/list/marine_playtime = list( "job" = "Human", "playtime" = round(owning_client.get_total_human_playtime() DECISECONDS_TO_HOURS, 0.1), "bgcolor" = "#3a3a3a", - "textcolor" = COLOR_WHITE + "textcolor" = "#FFFFFF" ) LAZYADD(xeno_playtimes, list(xeno_playtime)) diff --git a/code/datums/langchat/langchat.dm b/code/datums/langchat/langchat.dm index d21ee79a08e9..b82b03b51774 100644 --- a/code/datums/langchat/langchat.dm +++ b/code/datums/langchat/langchat.dm @@ -1,5 +1,5 @@ /atom/var/langchat_height = 32 // abovetile usually -/atom/var/langchat_color = COLOR_WHITE +/atom/var/langchat_color = "#FFFFFF" /atom/var/langchat_styles = "" /mob/living/carbon/xenomorph/langchat_color = "#b491c8" diff --git a/code/game/objects/effects/decals/cleanable/blood/xeno.dm b/code/game/objects/effects/decals/cleanable/blood/xeno.dm index 2d35d4045923..ade4723a1d74 100644 --- a/code/game/objects/effects/decals/cleanable/blood/xeno.dm +++ b/code/game/objects/effects/decals/cleanable/blood/xeno.dm @@ -17,7 +17,7 @@ basecolor = BLOOD_COLOR_XENO /obj/effect/decal/cleanable/blood/gibs/xeno/update_icon() - color = COLOR_WHITE + color = "#FFFFFF" /obj/effect/decal/cleanable/blood/gibs/xeno/up random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1") diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 12bf5260fe92..2137b41d86bf 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -116,7 +116,7 @@ color = "#00DDDD" /obj/item/handcuffs/cable/white - color = COLOR_WHITE + color = "#FFFFFF" /obj/item/handcuffs/cable/attackby(obj/item/I, mob/user as mob) ..() diff --git a/code/game/objects/items/reagent_containers/food/snacks/meat.dm b/code/game/objects/items/reagent_containers/food/snacks/meat.dm index 028737c283fb..f459d1b169ae 100644 --- a/code/game/objects/items/reagent_containers/food/snacks/meat.dm +++ b/code/game/objects/items/reagent_containers/food/snacks/meat.dm @@ -32,7 +32,7 @@ name = "synthetic flesh" desc = "A slab of artificial, inorganic 'flesh' that resembles human meat. Probably came from a synth." icon_state = "synthmeat" - filling_color = COLOR_WHITE + filling_color = "#ffffff" /obj/item/reagent_container/food/snacks/meat/synthmeat/synthetic/Initialize() . = ..() diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm index a3ce847c4270..e9587319a160 100644 --- a/code/modules/asset_cache/asset_list_items.dm +++ b/code/modules/asset_cache/asset_list_items.dm @@ -323,7 +323,7 @@ if(icon_state in icon_states(icon_file)) I = icon(icon_file, icon_state, SOUTH) var/c = initial(item.color) - if (!isnull(c) && c != COLOR_WHITE) + if (!isnull(c) && c != "#FFFFFF") I.Blend(c, ICON_MULTIPLY) else if (ispath(k, /obj/effect/essentials_set)) diff --git a/code/modules/asset_cache/assets/vending.dm b/code/modules/asset_cache/assets/vending.dm index de06ffd59d03..a3099869e334 100644 --- a/code/modules/asset_cache/assets/vending.dm +++ b/code/modules/asset_cache/assets/vending.dm @@ -34,7 +34,7 @@ var/icon/I = icon(icon_file, icon_state, SOUTH) var/c = initial(item.color) - if (!isnull(c) && c != COLOR_WHITE) + if (!isnull(c) && c != "#FFFFFF") I.Blend(c, ICON_MULTIPLY) var/imgid = replacetext(replacetext("[item]", "/obj/item/", ""), "/", "-") diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 7b8274d5e310..221736b5c84f 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(bgstate_options, list( var/chat_display_preferences = CHAT_TYPE_ALL var/item_animation_pref_level = SHOW_ITEM_ANIMATIONS_ALL var/pain_overlay_pref_level = PAIN_OVERLAY_BLURRY - var/UI_style_color = COLOR_WHITE + var/UI_style_color = "#ffffff" var/UI_style_alpha = 255 var/View_MC = FALSE var/window_skin = 0 diff --git a/code/modules/cm_preds/yaut_bracers.dm b/code/modules/cm_preds/yaut_bracers.dm index 02ff0b98e761..95d545fbd72b 100644 --- a/code/modules/cm_preds/yaut_bracers.dm +++ b/code/modules/cm_preds/yaut_bracers.dm @@ -1061,7 +1061,7 @@ var/span_class = "yautja_translator" if(translator_type != "Modern") if(translator_type == "Retro") - overhead_color = COLOR_WHITE + overhead_color = "#FFFFFF" span_class = "retro_translator" msg = replacetext(msg, "a", "@") msg = replacetext(msg, "e", "3") diff --git a/code/modules/lighting/lighting_mask/lighting_mask.dm b/code/modules/lighting/lighting_mask/lighting_mask.dm index 1fcfdd455c93..c1276d19dab0 100644 --- a/code/modules/lighting/lighting_mask/lighting_mask.dm +++ b/code/modules/lighting/lighting_mask/lighting_mask.dm @@ -105,7 +105,7 @@ current_angle = angle ///Setter proc for colors -/atom/movable/lighting_mask/proc/set_color(colour = COLOR_WHITE) +/atom/movable/lighting_mask/proc/set_color(colour = "#ffffff") color = colour ///Setter proc for the intensity of the mask diff --git a/code/modules/lighting/lighting_mask/shadow_calculator.dm b/code/modules/lighting/lighting_mask/shadow_calculator.dm index cf9d69531fbd..cfd4a86f5f3a 100644 --- a/code/modules/lighting/lighting_mask/shadow_calculator.dm +++ b/code/modules/lighting/lighting_mask/shadow_calculator.dm @@ -26,7 +26,7 @@ } while (FALSE) //For debugging use when we want to know if a turf is being affected multiple times -//#define DEBUG_HIGHLIGHT(x, y, colour) do{var/turf/T=locate(x,y,2);if(T){switch(T.color){if(COLOR_RED){T.color = COLOR_GREEN}if(COLOR_GREEN){T.color=COLOR_BLUE}else{T.color=COLOR_RED}}}}while(0) +//#define DEBUG_HIGHLIGHT(x, y, colour) do{var/turf/T=locate(x,y,2);if(T){switch(T.color){if("#ff0000"){T.color = "#00ff00"}if("#00ff00"){T.color="#0000ff"}else{T.color="#ff0000"}}}}while(0) #define DO_SOMETHING_IF_DEBUGGING_SHADOWS(something) something #else #define DEBUG_HIGHLIGHT(x, y, colour) @@ -148,7 +148,7 @@ //At this point we no longer care about //the atom itself, only the position values COORD_LIST_ADD(opaque_atoms_in_view, thing.x, thing.y) - DEBUG_HIGHLIGHT(thing.x, thing.y, COLOR_BLUE) + DEBUG_HIGHLIGHT(thing.x, thing.y, "#0000FF") //We are too small to consider shadows on, luminsoty has been considered at least. if(radius < 2) @@ -213,7 +213,7 @@ shadow.icon = LIGHTING_ICON_BIG shadow.icon_state = "triangle" - shadow.color = COLOR_BLACK + shadow.color = "#000" shadow.transform = triangle_matrix shadow.render_target = SHADOW_RENDER_TARGET shadow.blend_mode = BLEND_OVERLAY @@ -639,18 +639,18 @@ if(length(group) == 1) //Add the element in group to horizontal COORD_LIST_ADD(horizontal_atoms, pointer, text2num(x_key)) - DEBUG_HIGHLIGHT(text2num(x_key), pointer, COLOR_YELLOW) + DEBUG_HIGHLIGHT(text2num(x_key), pointer, "#FFFF00") else //Add the group to the output . += list(group) group = list() group += list(list(text2num(x_key), next)) - DEBUG_HIGHLIGHT(text2num(x_key), next, COLOR_RED) + DEBUG_HIGHLIGHT(text2num(x_key), next, "#FF0000") pointer = next if(length(group) == 1) //Add the element in group to horizontal COORD_LIST_ADD(horizontal_atoms, pointer, text2num(x_key)) - DEBUG_HIGHLIGHT(text2num(x_key), pointer, COLOR_YELLOW) + DEBUG_HIGHLIGHT(text2num(x_key), pointer, "#FFFF00") else //Add the group to the output . += list(group) @@ -666,7 +666,7 @@ . += list(group) group = list() group += list(list(next, text2num(y_key))) - DEBUG_HIGHLIGHT(next, text2num(y_key), COLOR_GREEN) + DEBUG_HIGHLIGHT(next, text2num(y_key), "#00FF00") pointer = next . += list(group) diff --git a/code/modules/maptext_alerts/screen_alerts.dm b/code/modules/maptext_alerts/screen_alerts.dm index bd21f87d3f94..e0a4d2e4d5b8 100644 --- a/code/modules/maptext_alerts/screen_alerts.dm +++ b/code/modules/maptext_alerts/screen_alerts.dm @@ -10,7 +10,7 @@ * * alert_type: typepath for screen text type we want to play here * * override_color: the color of the text to use */ -/mob/proc/play_screen_text(text, alert_type = /atom/movable/screen/text/screen_text, override_color = COLOR_WHITE) +/mob/proc/play_screen_text(text, alert_type = /atom/movable/screen/text/screen_text, override_color = "#FFFFFF") var/atom/movable/screen/text/screen_text/text_box = new alert_type() text_box.text_to_play = text text_box.player = client diff --git a/code/modules/maptext_alerts/text_blurbs.dm b/code/modules/maptext_alerts/text_blurbs.dm index 255689cd2c38..297b02aff3a3 100644 --- a/code/modules/maptext_alerts/text_blurbs.dm +++ b/code/modules/maptext_alerts/text_blurbs.dm @@ -90,7 +90,7 @@ blurb_key = a key used for specific blurb types so they are not shown repeatedly ignore_key = used to skip key checks. Ex. a USCM ERT member shouldn't see the normal USCM drop message, but should see their own spawn message even if the player already dropped as USCM.**/ /proc/show_blurb(list/mob/targets, duration = 3 SECONDS, message, scroll_down, screen_position = "LEFT+0:16,BOTTOM+1:16",\ - text_alignment = "left", text_color = COLOR_WHITE, blurb_key, ignore_key = FALSE, speed = 1) + text_alignment = "left", text_color = "#FFFFFF", blurb_key, ignore_key = FALSE, speed = 1) set waitfor = 0 if(!islist(targets)) targets = list(targets) diff --git a/code/modules/mob/living/carbon/human/species/synthetic.dm b/code/modules/mob/living/carbon/human/species/synthetic.dm index 79789bbb9fc9..38b7e935268d 100644 --- a/code/modules/mob/living/carbon/human/species/synthetic.dm +++ b/code/modules/mob/living/carbon/human/species/synthetic.dm @@ -64,7 +64,7 @@ uses_ethnicity = FALSE mob_inherent_traits = list(TRAIT_SUPER_STRONG, TRAIT_INTENT_EYES) - hair_color = COLOR_BLACK + hair_color = "#000000" icobase = 'icons/mob/humans/species/r_synthetic.dmi' deform = 'icons/mob/humans/species/r_synthetic.dmi' @@ -99,7 +99,7 @@ uses_ethnicity = FALSE mob_inherent_traits = list(TRAIT_SUPER_STRONG, TRAIT_INTENT_EYES) //sets colonial_gen_one synth's hair to black - hair_color = COLOR_BLACK + hair_color = "#000000" //sets colonial_gen_one synth's icon to WJ sprite icobase = 'icons/mob/humans/species/r_synthetic.dmi' deform = 'icons/mob/humans/species/r_synthetic.dmi' @@ -114,7 +114,7 @@ burn_mod = 0.6 //made for combat total_health = 250 //made for combat - hair_color = COLOR_BLACK + hair_color = "#000000" icobase = 'icons/mob/humans/species/r_synthetic.dmi' deform = 'icons/mob/humans/species/r_synthetic.dmi' diff --git a/code/modules/projectiles/magazines/shotguns.dm b/code/modules/projectiles/magazines/shotguns.dm index 5e7f427c8257..6c103aaa9677 100644 --- a/code/modules/projectiles/magazines/shotguns.dm +++ b/code/modules/projectiles/magazines/shotguns.dm @@ -218,7 +218,7 @@ GLOBAL_LIST_INIT(shotgun_handfuls_12g, list( . = ..() icon_state = "shell_greyscale" + "_[current_rounds]" var/image/I = image(icon, src, "+shell_base_[src.current_rounds]") - I.color = COLOR_WHITE + I.color = "#ffffff" I.appearance_flags = RESET_COLOR|KEEP_APART overlays += I