From 06177f7ef13bf400e5d0f357114f4e769164a690 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Sat, 17 May 2025 08:08:30 +0200 Subject: [PATCH] Fixes syrup bottle runtimes (#91179) ## About The Pull Request Didn't nullcheck held_item so it would runtime every time you hovered over it with an empty hand ## Changelog :cl: fix: Fixed syrup bottle runtimes /:cl: --- code/modules/reagents/reagent_containers/cups/bottle.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/reagent_containers/cups/bottle.dm b/code/modules/reagents/reagent_containers/cups/bottle.dm index 3f5b9dc30cf..ef0ba9c53bf 100644 --- a/code/modules/reagents/reagent_containers/cups/bottle.dm +++ b/code/modules/reagents/reagent_containers/cups/bottle.dm @@ -518,7 +518,7 @@ context[SCREENTIP_CONTEXT_ALT_LMB] = (cap_on ? "Remove Pump Cap" : "Add Pump Cap") if(IS_WRITING_UTENSIL(held_item)) context[SCREENTIP_CONTEXT_LMB] = "Write Label" - else if(cap_on && held_item.is_refillable()) + else if(cap_on && held_item?.is_refillable()) context[SCREENTIP_CONTEXT_LMB] = "Use Pump" return CONTEXTUAL_SCREENTIP_SET @@ -571,7 +571,7 @@ icon_state = "syrup_open" spillable = TRUE balloon_alert(user, "removed pump cap") - + update_icon_state() return CLICK_ACTION_SUCCESS