From f5b05aa16c7fdaa47954d32f336df89345995fb0 Mon Sep 17 00:00:00 2001 From: Alan Date: Fri, 17 Jul 2026 02:18:43 -0400 Subject: [PATCH] Migrate candles to the new attack chain. (#32211) * Migrate candles to the new attack chain. * Add fingerprint. --- code/game/objects/items/candle.dm | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 6ae075a2fe8..0f16ce6aca8 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -16,6 +16,7 @@ var/infinite = FALSE var/start_lit = FALSE var/flickering = FALSE + new_attack_chain = TRUE /obj/item/candle/Initialize(mapload) . = ..() @@ -40,11 +41,11 @@ else return TRUE -/obj/item/candle/attackby__legacy__attackchain(obj/item/W, mob/user, params) - if(W.get_heat()) - light(SPAN_NOTICE("[user] lights [src] with [W].")) - return - return ..() +/obj/item/candle/item_interaction(mob/living/user, obj/item/used, list/modifiers) + if(!used.get_heat()) + return ..() + light(SPAN_NOTICE("[user] lights [src] with [used].")) + return ITEM_INTERACT_COMPLETE /obj/item/candle/welder_act(mob/user, obj/item/I) . = TRUE @@ -111,11 +112,13 @@ update_icon(UPDATE_ICON_STATE) set_light(0) - -/obj/item/candle/attack_self__legacy__attackchain(mob/user) - if(lit) - user.visible_message(SPAN_NOTICE("[user] snuffs out [src].")) - unlight() +/obj/item/candle/activate_self(mob/user) + if(!lit) + return ..() + user.visible_message(SPAN_NOTICE("[user] snuffs out [src].")) + unlight() + add_fingerprint(user) + return ITEM_INTERACT_COMPLETE /obj/item/candle/lit start_lit = TRUE @@ -139,8 +142,10 @@ desc = "A candle. It smells like magic, so that would explain why it burns brighter." start_lit = TRUE -/obj/item/candle/eternal/wizard/attack_self__legacy__attackchain(mob/user) - return +/obj/item/candle/eternal/wizard/activate_self(mob/user) + if(!user) + return ..() + return ITEM_INTERACT_COMPLETE /obj/item/candle/eternal/wizard/process() return @@ -150,7 +155,6 @@ if(lit) set_light(CANDLE_LUM * 2) - /obj/item/candle/extinguish_light(force) if(!force) return