From 07549d62c3c805c1e882f06dff12c9bc2b239c0c Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Tue, 24 Feb 2026 22:38:32 +0100 Subject: [PATCH] fix a bunch of runtimes (#19226) --- code/game/objects/items/stacks/medical.dm | 4 ++-- code/game/objects/items/stacks/stack.dm | 13 ++++++++----- code/modules/mob/living/carbon/carbon.dm | 4 +++- .../mob/living/carbon/human/human_attackhand.dm | 4 ++-- .../living/silicon/robot/robot_gripper_handling.dm | 4 ++++ .../mob/living/silicon/robot/robot_simple_items.dm | 3 +-- code/modules/reagents/reagents/food_drinks.dm | 2 +- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 0c4125cc623..de3fe04cdfb 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -215,9 +215,9 @@ affecting.update_damages() if(used == amount) if(affecting.is_bandaged()) - balloon_alert(user, "\the [src] is used up.") + user.balloon_alert(user, "\the [src] is used up.") else - balloon_alert(user, "\the [src] is used up, but there are more wounds to treat on \the [affecting.name].") + user.balloon_alert(user, "\the [src] is used up, but there are more wounds to treat on \the [affecting.name].") use(used) /obj/item/stack/medical/ointment diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 4f28da6244b..8a6c7570a19 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -442,16 +442,19 @@ if(istype(W, /obj/item/gripper)) var/obj/item/gripper/G = W G.consolidate_stacks(src) + if(QDELETED(src)) + return else if(istype(W, /obj/item/stack)) var/obj/item/stack/S = W src.transfer_to(S) + if(QDELETED(src)) + return - spawn(0) //give the stacks a chance to delete themselves if necessary - if (S && user.check_current_machine(S)) - S.interact(user) - if (src && user.check_current_machine(src)) - src.interact(user) + if (S && user.check_current_machine(S)) + S.interact(user) + if (src && user.check_current_machine(src)) + src.interact(user) else return ..() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 646aa8661fe..090ea08fb04 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -535,10 +535,12 @@ src.update_inv_wear_mask(0) /mob/living/carbon/proc/food_preference(var/allergen_type) //RS edit + if(!species) // carbon/brains have no species + return FALSE if(allergen_type in species.food_preference) return species.food_preference_bonus - return 0 + return FALSE /mob/living/carbon/handle_diseases() for(var/thing in GetViruses()) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index aa43a8bf6e9..83a30c2ab4c 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -103,14 +103,14 @@ /// This condenses them and makes it less of a cluster. ///Help Intent -/mob/living/carbon/human/proc/attack_hand_help_intent(var/mob/living/carbon/human/H, var/mob/living/M as mob, var/has_hands) +/mob/living/carbon/human/proc/attack_hand_help_intent(var/mob/living/carbon/human/H, var/mob/living/M, var/has_hands) PRIVATE_PROC(TRUE) SHOULD_NOT_OVERRIDE(TRUE) if(M.restrained()) //If we're restrained, we can't help them. If you want to add snowflake stuff that you can do while restrained, add it here. return FALSE if(!has_hands) //This is here so if you WANT to do special code for 'if we don't have hands, do stuff' it can be done here! return FALSE - if(istype(M) && attempt_to_scoop(M) && !on_fire) + if(istype(M) && attempt_to_scoop(M, H) && !on_fire) return FALSE; //todo: make this whole CPR check into it's own individual proc instead of hogging up attack_hand_help_intent diff --git a/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm b/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm index 60a8bcf1c7b..691768c9759 100644 --- a/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm +++ b/code/modules/mob/living/silicon/robot/robot_gripper_handling.dm @@ -416,6 +416,10 @@ if(!stack_to_consolidate || !istype(stack_to_consolidate, /obj/item/stack)) return + var/obj/item/current_item = get_wrapped_item() + if(current_item?.type == stack_to_consolidate.type) + return + for(var/obj/item/storage/internal/gripper/pocket in pockets) if(!LAZYLEN(pocket.contents)) continue diff --git a/code/modules/mob/living/silicon/robot/robot_simple_items.dm b/code/modules/mob/living/silicon/robot/robot_simple_items.dm index 5e96dda22fa..f1bed676337 100644 --- a/code/modules/mob/living/silicon/robot/robot_simple_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_simple_items.dm @@ -169,10 +169,9 @@ . = ..() if(isrobotmultibelt(loc)) var/obj/item/robotic_multibelt/our_belt = loc + our_belt.cut_overlays() if(welding) our_belt.add_overlay("indwelder_cyborg-on") - else - our_belt.cut_overlays() /obj/item/tool/wirecutters/cyborg name = "wirecutters" diff --git a/code/modules/reagents/reagents/food_drinks.dm b/code/modules/reagents/reagents/food_drinks.dm index 352883d7354..bd543aff340 100644 --- a/code/modules/reagents/reagents/food_drinks.dm +++ b/code/modules/reagents/reagents/food_drinks.dm @@ -50,7 +50,7 @@ affect_ingest(M, alien, removed) //VOREStation Edits Start if(M.isSynthetic()) - M.adjust_nutrition((nutriment_factor * removed) * M.species.synthetic_food_coeff) + M.adjust_nutrition((nutriment_factor * removed) * M.species?.synthetic_food_coeff) //VOREStation Edits End ..()