Adds CI for checking if a variable exists (#31855)

* i leave for one month smh

* feature compatibility

* fixed
This commit is contained in:
Contrabang
2026-04-14 03:26:31 +00:00
committed by GitHub
parent aea6c4d794
commit d4595054ce
6 changed files with 31 additions and 33 deletions
+9 -23
View File
@@ -48,32 +48,18 @@
/// Because of jumpsuit palettes, we have to do some extra icon shenanigans.
/obj/item/clothing/under/dye_item(dye_color, dye_key_override)
if(!dyeable || !dye_color)
return
var/dye_key_selector = dye_key_override ? dye_key_override : dyeing_key
var/obj/item/clothing/under/target_type = GLOB.dye_registry[dye_key_selector][dye_color]
. = ..()
// If we're dying it to a colored jumpsuit...
if(target_type in typesof(/obj/item/clothing/under/color))
var/obj/item/clothing/under/color/target_obj = new target_type(null)
set_icon_from_cache(palette_key = target_obj.icon_palette_key, dye_key = target_obj.dyeing_key)
// update the name/description
name = initial(target_obj.name)
desc = target_obj.desc + "\nThe colors look a little dodgy."
qdel(target_obj)
if(ispath(., /obj/item/clothing/under/color))
var/obj/item/clothing/under/color/target_type = .
set_icon_from_cache(palette_key = target_type.icon_palette_key, dye_key = target_type.dyeing_key)
// If it also started as a colored jumpsuit, change the palette key
if("icon_palette_key" in vars)
var/obj/item/clothing/under/color/dyed_item = src
dyed_item.icon_palette_key = dye_color
return
// If we're not, but it started as a colored jumpsuit, unset the palette key so icon updates don't mess it up
else if("icon_palette_key" in vars)
var/obj/item/clothing/under/color/dyed_item = src
dyed_item.icon_palette_key = null
return ..()
/obj/item/clothing/under/color/dye_item(dye_color, dye_key_override)
icon_palette_key = null
. = ..()
if(ispath(., /obj/item/clothing/under/color))
icon_palette_key = dye_color
/// Beanies use the color var for their appearance, we don't normally copy this over but we have to for beanies
/obj/item/clothing/head/beanie/dye_item(dye_color, dye_key_override)
+3 -2
View File
@@ -2123,8 +2123,6 @@
icon_state = "pool_noodle"
attack_verb = list("bopped", "splatted", "smacked", "thwapped", "slapped")
hitsound = 'sound/items/pool_noodle_hit.ogg'
// Having this var at all should play hitsound even if damage is zero
var/zero_damage_hitsound = TRUE
w_class = WEIGHT_CLASS_BULKY
/obj/item/toy/pool_noodle/Initialize(mapload)
@@ -2134,6 +2132,9 @@
desc = "A damp, flexible tube for unrestrained summer fun."
return ..()
/obj/item/toy/pool_noodle/should_play_hitsound(damage)
return TRUE
/obj/item/toy/pool_noodle/pink
color = COLOR_PINK