From 7cdc25880a350f0204bdf293c9b756c09c6f3184 Mon Sep 17 00:00:00 2001 From: Cameron Lennox Date: Sun, 3 May 2026 22:08:23 -0400 Subject: [PATCH] Some bugfixes (#19444) * Fixes accessory removal * Fixes partslathe * Fixes a bug where field gen would be annihilated by windows * Small runtime fix * Fixes a robot runtime * easter egg * no coggers * Update mop.dm * Update antagonist.dm * Update antagonist.dm * Update partslathe_vr.dm * Update mop.dm --- code/game/machinery/partslathe_vr.dm | 4 ++-- code/game/objects/items/weapons/mop.dm | 2 +- code/modules/clothing/clothing.dm | 2 +- code/modules/clothing/clothing_accessories.dm | 7 ++++--- code/modules/clothing/gloves/antagonist.dm | 4 ++-- code/modules/mob/living/carbon/human/say.dm | 4 +++- code/modules/mob/living/silicon/robot/robot.dm | 2 ++ code/modules/power/singularity/containment_field.dm | 3 ++- code/modules/power/singularity/emitter.dm | 1 + code/modules/power/singularity/field_generator.dm | 1 + code/modules/recycling/disposal_machines.dm | 2 +- code/modules/spells/spellbook.dm | 2 ++ code/modules/spells/targeted/equip/horsemask.dm | 2 ++ 13 files changed, 24 insertions(+), 12 deletions(-) diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index af12d7c6bb5..6354397a99a 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -344,10 +344,10 @@ /obj/machinery/partslathe/proc/update_recipe_list() if(!partslathe_recipies) partslathe_recipies = list() - var/list/paths = subtypesof(/obj/item/stock_parts) + var/list/paths = subtypesof(/obj/item/stock_parts) - typesof(/obj/item/stock_parts/subspace) for(var/type in paths) var/obj/item/stock_parts/I = new type() - if(!I.matter) + if(!I.matter || I.rating > 1) qdel(I) continue // Ignore parts we can't build diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 78faf9ba8ea..dcb0b6b9d11 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -31,7 +31,7 @@ GLOBAL_LIST_BOILERPLATE(all_mops, /obj/item/mop) user.visible_message(span_warning("[user] begins to clean \the [get_turf(A)].")) - if(do_after(user, mop_time, target = src, max_interact_count = 9)) + if(do_after(user, mop_time, target = get_turf(A))) var/turf/T = get_turf(A) if(T) T.wash(CLEAN_SCRUB) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 26bbdaca87c..773b12a9ef7 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -71,7 +71,7 @@ /obj/item/clothing/click_alt(mob/user) if(Adjacent(user) || user == src.loc) - removetie_verb(user) + removetie_proc(user) //BS12: Species-restricted clothing check. /obj/item/clothing/mob_can_equip(mob/M, slot, disable_warning = FALSE, ignore_obstruction, go_over_slot) diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index a1d0926628b..9206892b1e2 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -115,13 +115,14 @@ for(var/obj/item/clothing/accessory/A in accessories) slowdown += A.slowdown -/obj/item/clothing/proc/removetie_verb(mob/user) +/obj/item/clothing/proc/removetie_verb() set name = "Remove Accessory" set category = "Object" set src in usr - if(!user) - user = usr + removetie_proc(usr) + +/obj/item/clothing/proc/removetie_proc(mob/living/user) if(!isliving(user)) return diff --git a/code/modules/clothing/gloves/antagonist.dm b/code/modules/clothing/gloves/antagonist.dm index 5c20ab67076..8978bf33ad5 100644 --- a/code/modules/clothing/gloves/antagonist.dm +++ b/code/modules/clothing/gloves/antagonist.dm @@ -28,7 +28,7 @@ to_chat(target, span_warning("[user] rifles in your pockets!")) if(user.a_intent == I_HELP) - if(istype(target.back,/obj/item/storage) && do_after(user, 3 SECONDS, target)) + if(istype(target.back,/obj/item/storage) && do_after(user, 3 SECONDS, target, progress = FALSE)) var/obj/item/storage/Backpack = target.back Backpack.open(user) else if(istype(target.belt, /obj/item/storage) && do_after(user, 5 SECONDS, target)) @@ -85,6 +85,6 @@ return 1 /obj/item/clothing/gloves/sterile/thieves/Touch(var/atom/A, var/proximity) - if(proximity && ishuman(usr) && do_after(usr, 1 SECOND, target = A)) + if(proximity && ishuman(usr) && ishuman(A) && do_after(usr, 1 SECOND, target = A)) return pickpocket(usr, A, proximity) return 0 diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index cd1708a3191..e3b0c7dfb73 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -154,9 +154,11 @@ else if(istype(wear_mask, /obj/item/clothing/mask)) var/obj/item/clothing/mask/M = wear_mask - if(M.voicechange) + if(M.voicechange) //only horsemasks do this. message_data[1] = pick(M.say_messages) message_data[2] = pick(M.say_verbs) + if(istype(M, /obj/item/clothing/mask/horsehead) && prob(0.5)) + message_data[2] = "HIIII EVERYPONY" . = 1 else if((CE_SPEEDBOOST in chem_effects) || (get_jittery() >= 100 && !stuttering)) // motor mouth, check for stuttering so anxiety doesn't do hyperzine text diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index afff38b8b2c..97500d00ba5 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1553,6 +1553,8 @@ // We check for the module only here /mob/living/silicon/robot/proc/has_upgrade_module(var/given_type) + if(!module) //If we don't have a module, don't even bother. + return null var/obj/T = locate(given_type) in module if(!T) T = locate(given_type) in module.contents diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 39b255a9fb0..938c2091f96 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -58,7 +58,8 @@ if(istype(A,/obj/machinery/containment_field) || istype(A,/obj/effect) || istype(A,/obj/singularity)) return else - Destroy() + qdel(A) + //Destroy() /obj/machinery/containment_field/HasProximity(turf/T, datum/weakref/WF, old_loc) if(isnull(WF)) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 75ea114d317..6d6a5471cd0 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -38,6 +38,7 @@ connect_to_network() AddElement(/datum/element/climbable) AddElement(/datum/element/rotatable) + AddElement(/datum/element/empprotection, EMP_PROTECT_SELF) /obj/machinery/power/emitter/Destroy() message_admins("Emitter deleted at ([x],[y],[z] - JMP)") diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 4f009cbd051..af46ba3547a 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -73,6 +73,7 @@ fields = list() connected_gens = list() AddElement(/datum/element/climbable) + AddElement(/datum/element/empprotection, EMP_PROTECT_SELF) /obj/machinery/field_generator/process() if(Varedit_start == 1) diff --git a/code/modules/recycling/disposal_machines.dm b/code/modules/recycling/disposal_machines.dm index 15eb2004ea2..ef58059ec14 100644 --- a/code/modules/recycling/disposal_machines.dm +++ b/code/modules/recycling/disposal_machines.dm @@ -72,7 +72,7 @@ // attack by item places it in to disposal /obj/machinery/disposal/attackby(obj/item/I, mob/user, attack_modifier, click_parameters, drag_dropped = FALSE) - if(stat & BROKEN || !I || !user) + if(stat & BROKEN || !I || !user || !istype(I)) return add_fingerprint(user) diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 0bba9b19c1c..b5e4824f5fe 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -420,6 +420,8 @@ if(ishuman(user)) to_chat(user, span_narsie(span_bolddanger("HOR-SIE HAS RISEN"))) var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead + magichead.say_verbs = list("neighs", "whinnys", "snorts") + magichead.say_messages = list("NEEEEIGH", "KEECHOOOW", "WHIIIINNNY", "NEEEEEEIGHHHH", "KEECHOOOWWW") magichead.canremove = FALSE //curses! magichead.flags_inv = null //so you can still see their face magichead.voicechange = 1 //NEEEEIIGHH diff --git a/code/modules/spells/targeted/equip/horsemask.dm b/code/modules/spells/targeted/equip/horsemask.dm index f7e68af2afd..c9a14f1e1f7 100644 --- a/code/modules/spells/targeted/equip/horsemask.dm +++ b/code/modules/spells/targeted/equip/horsemask.dm @@ -36,4 +36,6 @@ var/obj/item/clothing/mask/horsehead/magichead = new_item magichead.flags_inv = null //so you can still see their face magichead.voicechange = 1 //NEEEEIIGHH + magichead.say_verbs = list("neighs", "whinnys", "snorts") + magichead.say_messages = list("NEEEEIGH", "KEECHOOOW", "WHIIIINNNY", "NEEEEEEIGHHHH", "KEECHOOOWWW") return new_item