From 9b81a10a41fbbc628c2128d3f5b5162fbf023e77 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Tue, 7 Nov 2023 06:15:48 +0100 Subject: [PATCH] [MIRROR] Renames the icon var in barsign datums to icon_state for sanity [MDB IGNORE] (#24837) * Renames the icon var in barsign datums to icon_state for sanity * Update barsigns.dm --------- Co-authored-by: Thunder12345 Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- code/game/machinery/barsigns.dm | 72 +++++++------- code/modules/unit_tests/barsigns.dm | 2 +- .../modules/barsigns/code/barsigns.dm | 96 +++++++++---------- 3 files changed, 85 insertions(+), 85 deletions(-) diff --git a/code/game/machinery/barsigns.dm b/code/game/machinery/barsigns.dm index 11337f8f790..4cbe68cfc1a 100644 --- a/code/game/machinery/barsigns.dm +++ b/code/game/machinery/barsigns.dm @@ -37,8 +37,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/barsign, 32) update_appearance() /obj/machinery/barsign/update_icon_state() - if(!(machine_stat & (NOPOWER|BROKEN)) && chosen_sign && chosen_sign.icon) - icon_state = chosen_sign.icon + if(!(machine_stat & (NOPOWER|BROKEN)) && chosen_sign && chosen_sign.icon_state) + icon_state = chosen_sign.icon_state else icon_state = "empty" @@ -64,7 +64,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/barsign, 32) return if(chosen_sign && chosen_sign.light_mask) - . += emissive_appearance(icon, "[chosen_sign.icon]-light-mask", src) + . += emissive_appearance(icon, "[chosen_sign.icon_state]-light-mask", src) /obj/machinery/barsign/update_appearance(updates=ALL) . = ..() @@ -202,7 +202,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/barsign, 32) /// User-visible name of the sign. var/name /// Icon state associated with this sign - var/icon + var/icon_state /// Description shown in the sign's examine text. var/desc /// Hidden from list of selectable options. @@ -222,175 +222,175 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/barsign, 32) /datum/barsign/maltesefalcon name = "Maltese Falcon" - icon = "maltesefalcon" + icon_state = "maltesefalcon" desc = "The Maltese Falcon, Space Bar and Grill." neon_color = "#5E8EAC" /datum/barsign/thebark name = "The Bark" - icon = "thebark" + icon_state = "thebark" desc = "Ian's bar of choice." neon_color = "#f7a604" /datum/barsign/harmbaton name = "The Harmbaton" - icon = "theharmbaton" + icon_state = "theharmbaton" desc = "A great dining experience for both security members and assistants." neon_color = "#ff7a4d" /datum/barsign/thesingulo name = "The Singulo" - icon = "thesingulo" + icon_state = "thesingulo" desc = "Where people go that'd rather not be called by their name." neon_color = "#E600DB" /datum/barsign/thedrunkcarp name = "The Drunk Carp" - icon = "thedrunkcarp" + icon_state = "thedrunkcarp" desc = "Don't drink and swim." neon_color = "#a82196" /datum/barsign/scotchservinwill name = "Scotch Servin Willy's" - icon = "scotchservinwill" + icon_state = "scotchservinwill" desc = "Willy sure moved up in the world from clown to bartender." neon_color = "#fee4bf" /datum/barsign/officerbeersky name = "Officer Beersky's" - icon = "officerbeersky" + icon_state = "officerbeersky" desc = "Man eat a dong, these drinks are great." neon_color = "#16C76B" /datum/barsign/thecavern name = "The Cavern" - icon = "thecavern" + icon_state = "thecavern" desc = "Fine drinks while listening to some fine tunes." neon_color = "#0fe500" /datum/barsign/theouterspess name = "The Outer Spess" - icon = "theouterspess" + icon_state = "theouterspess" desc = "This bar isn't actually located in outer space." neon_color = "#30f3cc" /datum/barsign/slipperyshots name = "Slippery Shots" - icon = "slipperyshots" + icon_state = "slipperyshots" desc = "Slippery slope to drunkeness with our shots!" neon_color = "#70DF00" /datum/barsign/thegreytide name = "The Grey Tide" - icon = "thegreytide" + icon_state = "thegreytide" desc = "Abandon your toolboxing ways and enjoy a lazy beer!" neon_color = "#00F4D6" /datum/barsign/honkednloaded name = "Honked 'n' Loaded" - icon = "honkednloaded" + icon_state = "honkednloaded" desc = "Honk." neon_color = "#FF998A" /datum/barsign/thenest name = "The Nest" - icon = "thenest" + icon_state = "thenest" desc = "A good place to retire for a drink after a long night of crime fighting." neon_color = "#4d6796" /datum/barsign/thecoderbus name = "The Coderbus" - icon = "thecoderbus" + icon_state = "thecoderbus" desc = "A very controversial bar known for its wide variety of constantly-changing drinks." neon_color = "#ffffff" /datum/barsign/theadminbus name = "The Adminbus" - icon = "theadminbus" + icon_state = "theadminbus" desc = "An establishment visited mainly by space-judges. It isn't bombed nearly as much as court hearings." neon_color = "#ffffff" /datum/barsign/oldcockinn name = "The Old Cock Inn" - icon = "oldcockinn" + icon_state = "oldcockinn" desc = "Something about this sign fills you with despair." neon_color = "#a4352b" /datum/barsign/thewretchedhive name = "The Wretched Hive" - icon = "thewretchedhive" + icon_state = "thewretchedhive" desc = "Legally obligated to instruct you to check your drinks for acid before consumption." neon_color = "#26b000" /datum/barsign/robustacafe name = "The Robusta Cafe" - icon = "robustacafe" + icon_state = "robustacafe" desc = "Holder of the 'Most Lethal Barfights' record 5 years uncontested." neon_color = "#c45f7a" /datum/barsign/emergencyrumparty name = "The Emergency Rum Party" - icon = "emergencyrumparty" + icon_state = "emergencyrumparty" desc = "Recently relicensed after a long closure." neon_color = "#f90011" /datum/barsign/combocafe name = "The Combo Cafe" - icon = "combocafe" + icon_state = "combocafe" desc = "Renowned system-wide for their utterly uncreative drink combinations." neon_color = "#33ca40" /datum/barsign/vladssaladbar name = "Vlad's Salad Bar" - icon = "vladssaladbar" + icon_state = "vladssaladbar" desc = "Under new management. Vlad was always a bit too trigger happy with that shotgun." neon_color = "#306900" /datum/barsign/theshaken name = "The Shaken" - icon = "theshaken" + icon_state = "theshaken" desc = "This establishment does not serve stirred drinks." neon_color = "#dcd884" /datum/barsign/thealenath name = "The Ale' Nath" - icon = "thealenath" + icon_state = "thealenath" desc = "All right, buddy. I think you've had EI NATH. Time to get a cab." neon_color = "#ed0000" /datum/barsign/thealohasnackbar name = "The Aloha Snackbar" - icon = "alohasnackbar" + icon_state = "alohasnackbar" desc = "A tasteful, inoffensive tiki bar sign." neon_color = "" /datum/barsign/thenet name = "The Net" - icon = "thenet" + icon_state = "thenet" desc = "You just seem to get caught up in it for hours." neon_color = "#0e8a00" /datum/barsign/maidcafe name = "Maid Cafe" - icon = "maidcafe" + icon_state = "maidcafe" desc = "Welcome back, master!" neon_color = "#ff0051" /datum/barsign/the_lightbulb name = "The Lightbulb" - icon = "the_lightbulb" + icon_state = "the_lightbulb" desc = "A cafe popular among moths and moffs. Once shut down for a week after the bartender used mothballs to protect her spare uniforms." neon_color = "#faff82" /datum/barsign/goose name = "The Loose Goose" - icon = "goose" + icon_state = "goose" desc = "Drink till you puke and/or break the laws of reality!" neon_color = "#00cc33" /datum/barsign/maltroach name = "Maltroach" - icon = "maltroach" + icon_state = "maltroach" desc = "Mothroaches politely greet you into the bar, or are they greeting eachother?" neon_color = "#649e8a" @@ -401,19 +401,19 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/barsign, 32) /datum/barsign/hiddensigns/empbarsign name = "EMP'd" - icon = "empbarsign" + icon_state = "empbarsign" desc = "Something has gone very wrong." rename_area = FALSE /datum/barsign/hiddensigns/syndibarsign name = "Syndi Cat" - icon = "syndibarsign" + icon_state = "syndibarsign" desc = "Syndicate or die." neon_color = "#ff0000" /datum/barsign/hiddensigns/signoff name = "Off" - icon = "empty" + icon_state = "empty" desc = "This sign doesn't seem to be on." rename_area = FALSE light_mask = FALSE diff --git a/code/modules/unit_tests/barsigns.dm b/code/modules/unit_tests/barsigns.dm index 7058dd5346d..f5bb27f1064 100644 --- a/code/modules/unit_tests/barsigns.dm +++ b/code/modules/unit_tests/barsigns.dm @@ -12,7 +12,7 @@ for(var/sign_type in (subtypesof(/datum/barsign) - /datum/barsign/hiddensigns)) var/datum/barsign/sign = new sign_type() - if(!(sign.icon in barsign_icon_states)) + if(!(sign.icon_state in barsign_icon_states)) TEST_FAIL("Icon state for [sign_type] does not exist in [barsign_icon].") /** diff --git a/modular_skyrat/modules/barsigns/code/barsigns.dm b/modular_skyrat/modules/barsigns/code/barsigns.dm index 4e10e4fe551..83d4b7db0db 100644 --- a/modular_skyrat/modules/barsigns/code/barsigns.dm +++ b/modular_skyrat/modules/barsigns/code/barsigns.dm @@ -1,227 +1,227 @@ /datum/barsign/topmen name = "Top Men" - icon = "topmen" + icon_state = "topmen" /datum/barsign/spaceballgrille name = "Spaceball Grille" - icon = "spaceballgrille" + icon_state = "spaceballgrille" /datum/barsign/clubee name = "Club Bee" - icon = "clubee" + icon_state = "clubee" /datum/barsign/thesun name = "The Sun" - icon = "thesun" + icon_state = "thesun" /datum/barsign/limbo name = "The Limbo" - icon = "limbo" + icon_state = "limbo" desc = "A popular haunt for lost souls. The mood lighting is killer!" /datum/barsign/meadbay name = "Meadbay" - icon = "meadbay" + icon_state = "meadbay" /datum/barsign/cindikate name = "Cindi Kate's" - icon = "cindikate" + icon_state = "cindikate" /datum/barsign/theclownshead name = "The Clown's Head" - icon = "theclownshead" + icon_state = "theclownshead" desc = "Home of Headdy, the honking clown head!" /datum/barsign/theorchard name = "The Orchard" - icon = "theorchard" + icon_state = "theorchard" /datum/barsign/thesaucyclown name = "The Saucy Clown" - icon = "thesaucyclown" + icon_state = "thesaucyclown" desc = "A known gathering site for the annual clown courtship rituals." /datum/barsign/thedamnwall name = "The Damn Wall" - icon = "thedamnwall" + icon_state = "thedamnwall" desc = "When you're up against a wall, it's best to have stout friends and stout liquor right there beside you." /datum/barsign/whiskeyimplant name = "Whiskey Implant" - icon = "whiskeyimplant" + icon_state = "whiskeyimplant" /datum/barsign/carpecarp name = "Carpe Carp" - icon = "carpecarp" + icon_state = "carpecarp" /datum/barsign/robustroadhouse name = "Robust Roadhouse" - icon = "robustroadhouse" + icon_state = "robustroadhouse" /datum/barsign/theredshirt name = "The Redshirt" - icon = "theredshirt" + icon_state = "theredshirt" /datum/barsign/maltesefalconmk2 name = "Maltese Falcon MK2" - icon = "maltesefalconmk2" + icon_state = "maltesefalconmk2" desc = "The Maltese Falcon mark two, now extra hard boiled." /datum/barsign/thecavernmk2 name = "The Cavern MK2" - icon = "thecavernmk2" + icon_state = "thecavernmk2" desc = "Fine drinks while listening to some fine tunes." /datum/barsign/lv426 name = "LV-426" - icon = "lv426" + icon_state = "lv426" desc = "Drinking with fancy facemasks is clearly more important than going to medbay." /datum/barsign/zocalo name = "Zocalo" - icon = "zocalo" + icon_state = "zocalo" desc = "Anteriormente ubicado en Spessmerica." /datum/barsign/fourtheemprah name = "4 The Emprah" - icon = "4theemprah" + icon_state = "4theemprah" desc = "Enjoyed by fanatics, heretics, and brain-damaged patrons alike." /datum/barsign/ishimura name = "Ishimura" - icon = "ishimura" + icon_state = "ishimura" desc = "Well known for their quality brownstar and delicious crackers." /datum/barsign/tardis name = "Tardis" - icon = "tardis" + icon_state = "tardis" desc = "This establishment has been through at least 5,343 iterations." /datum/barsign/quarks name = "Quark's" - icon = "quarks" + icon_state = "quarks" desc = "Frequenters of this establishment are often seen wearing meson scanners; how quaint." /datum/barsign/tenforward name = "Ten Forward" - icon = "tenforward" + icon_state = "tenforward" /datum/barsign/thepranicngpony name = "The Prancing Pony" - icon = "thepranicngpony" + icon_state = "thepranicngpony" desc = "Ok, we don't take to kindly to you short folk pokin' round looking for some ranger scum." /datum/barsign/vault13 name = "Vault 13" - icon = "vault13" + icon_state = "vault13" desc = "Coincidence is intentional." /datum/barsign/thehive name = "The Hive" - icon = "thehive" + icon_state = "thehive" /datum/barsign/cantina name = "Chalmun's Cantina" - icon = "cantina" + icon_state = "cantina" desc = "The bar was founded on the principles of originality; they have the same music playing 24/7." /datum/barsign/milliways42 name = "Milliways 42" - icon = "milliways42" + icon_state = "milliways42" desc = "It's not really the end; it's the beginning, meaning, and answer for all your beverage needs." /datum/barsign/timeofeve name = "The Time of Eve" - icon = "thetimeofeve" + icon_state = "thetimeofeve" desc = "Vintage drinks from 2453!." /datum/barsign/spaceasshole name = "Space Asshole" - icon = "spaceasshole" + icon_state = "spaceasshole" desc = "Open since 2125, Not much has changed since then; the engineers still release the singulo and the damn miners still are more likely to cave your face in that deliver ores." /datum/barsign/birdcage name = "The Bird Cage" - icon = "birdcage" + icon_state = "birdcage" desc = "Caw." /datum/barsign/narsie name = "Narsie Bistro" - icon = "narsiebistro" + icon_state = "narsiebistro" desc = "The last pub before the World's End." /datum/barsign/fallout name = "The Booze Bunker" - icon = "boozebunker" + icon_state = "boozebunker" desc = "Never duck for cover without a drink!" /datum/barsign/brokendreams name = "The Cafe of Broken Dreams" - icon = "brokendreams" + icon_state = "brokendreams" desc = "Try our new dogmeat sliders!" /datum/barsign/toolboxtavern name = "Toolbox Tavern" - icon = "toolboxtavern" + icon_state = "toolboxtavern" desc = "Free lodging with every Screwdriver purchased!" /datum/barsign/blueoyster name = "The Blue Oyster" - icon = "blueoyster" + icon_state = "blueoyster" desc = "The totally heterosexual bar for totally heterosexual men, just come inside and see." /datum/barsign/foreign name = "Foreign Food Sign" - icon = "foreign" + icon_state = "foreign" desc = "A sign written in some dead language advertising some non-descript foreign food." /datum/barsign/commie name = "Prole's Preferred" - icon = "commie" + icon_state = "commie" desc = "The only bar you will ever need, comrade!" /datum/barsign/brokenheros name = "The Bar of Broken Heros" - icon = "brokenheros" + icon_state = "brokenheros" desc = "Do you enjoy hurting other people?" /datum/barsign/sociallubricator name = "The Social Lubricator" - icon = "sociallubricator" + icon_state = "sociallubricator" desc = "The perfect thing to make you like people you hate." /datum/barsign/chemlab name = "The Chem Lab" - icon = "chemlab" + icon_state = "chemlab" desc = "Try our new plasma martinis!" /datum/barsign/mime name = "Moonshine Mime" - icon = "mime" + icon_state = "mime" desc = "Silent, not stirred." /datum/barsign/clown name = "Honking Clown" - icon = "clown" + icon_state = "clown" desc = "Bananas not included." /datum/barsign/progressive name = "A Modern and Progressive Tavern" - icon = "progressive" + icon_state = "progressive" desc = "Whatever that means." /datum/barsign/va11halla name = "VA-11 HALL-A" - icon = "va11halla" + icon_state = "va11halla" desc = "Not as dangerous as N1-RV Ann-A." /datum/barsign/squatopia name = "Squatopia" - icon = "squatopia" + icon_state = "squatopia" desc = "The crystal belonged to my father. He was murdered." /datum/barsign/bug name = "The Hungry Bug" - icon = "hungrybug" + icon_state = "hungrybug" desc = "Stop by and enjoy some of the Hole's famous gyoza!"