From 30ab3559431f2fa7d6256ec343f7ccd37cd59f82 Mon Sep 17 00:00:00 2001 From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:55:29 +0200 Subject: [PATCH] Resolved some runtimes for mimic turfs on examine (#20097) Resolved some runtimes for mimic turfs on examine. All examine headers respect the proc signature. All examine that do not explicitly need not to, passthrough the arglist to references examine target procs. --- .../game/gamemodes/technomancer/spell_objs.dm | 2 +- code/game/machinery/stasis_cage.dm | 2 +- code/game/objects/items/holomenu.dm | 2 +- code/game/objects/structures/ECD.dm | 9 ++- code/game/objects/structures/therapy.dm | 2 +- code/modules/assembly/bomb.dm | 2 +- .../detectivework/tools/evidencebag.dm | 2 +- .../integrated_electronics/core/device.dm | 2 +- .../core/integrated_circuit.dm | 2 +- .../mob/living/silicon/robot/items/gripper.dm | 4 +- .../mob/living/simple_animal/hostile/morph.dm | 2 +- .../mob/living/simple_animal/illusion.dm | 2 +- code/modules/multiz/zmimic/mimic_movable.dm | 10 ++-- .../overmap/ship_weaponry/_ship_gun.dm | 2 +- .../psionics/abilities/mirror_shade.dm | 2 +- .../fluffyghost-examinetweakfixes.yml | 60 +++++++++++++++++++ 16 files changed, 85 insertions(+), 22 deletions(-) create mode 100644 html/changelogs/fluffyghost-examinetweakfixes.yml diff --git a/code/game/gamemodes/technomancer/spell_objs.dm b/code/game/gamemodes/technomancer/spell_objs.dm index 05c02e9d599..c41b91850dc 100644 --- a/code/game/gamemodes/technomancer/spell_objs.dm +++ b/code/game/gamemodes/technomancer/spell_objs.dm @@ -43,7 +43,7 @@ var/cast_sound = null // Sound file played when this is used. var/psi_cost = 0 // Psi complexus cost to use this spell. -/obj/item/spell/examine(mob/user, distance, is_adjacent, show_extended) // Nothing on examine. +/obj/item/spell/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) // Nothing on examine. SHOULD_CALL_PARENT(FALSE) return TRUE diff --git a/code/game/machinery/stasis_cage.dm b/code/game/machinery/stasis_cage.dm index 2613486a49d..0db1961ab31 100644 --- a/code/game/machinery/stasis_cage.dm +++ b/code/game/machinery/stasis_cage.dm @@ -137,7 +137,7 @@ -/obj/machinery/stasis_cage/examine(mob/user, distance, is_adjacent, infix, suffi, show_extended) +/obj/machinery/stasis_cage/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) . = ..() if (contained) to_chat(user, SPAN_NOTICE("\The [contained] is kept inside.")) diff --git a/code/game/objects/items/holomenu.dm b/code/game/objects/items/holomenu.dm index 9b0243ca88e..936a1243775 100644 --- a/code/game/objects/items/holomenu.dm +++ b/code/game/objects/items/holomenu.dm @@ -73,7 +73,7 @@ return TRUE return ..() -/obj/item/holomenu/examine(mob/user, distance, is_adjacent, show_extended) +/obj/item/holomenu/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) if(anchored && length(menu_text)) interact(user) return TRUE diff --git a/code/game/objects/structures/ECD.dm b/code/game/objects/structures/ECD.dm index 9b0164234a1..1f2368b4926 100644 --- a/code/game/objects/structures/ECD.dm +++ b/code/game/objects/structures/ECD.dm @@ -13,7 +13,7 @@ slowdown = 10 layer = ABOVE_HUMAN_LAYER -/obj/structure/ecd/examine(mob/living/user, distance, is_adjacent, infix, suffix, show_extended) +/obj/structure/ecd/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) . = ..() switch(state) if(ECD_LOOSE) @@ -22,8 +22,11 @@ to_chat(user, SPAN_NOTICE("\The [src] is bolted to the floor.")) if(ECD_WELDED) to_chat(user, SPAN_NOTICE("\The [src] is bolted and welded to the floor.")) - if(user.isSynthetic()) - to_chat(user, SPAN_NOTICE("\The [src] does not seem to be doing anything, but you can feel it. A signal, beyond anything you can consciously understand, weaving and scratching a shield around the back of your mind.")) + + if(istype(user, /mob/living)) + var/mob/living/living_user = user + if(living_user.isSynthetic()) + to_chat(living_user, SPAN_NOTICE("\The [src] does not seem to be doing anything, but you can feel it. A signal, beyond anything you can consciously understand, weaving and scratching a shield around the back of your mind.")) /obj/structure/ecd/attackby(obj/item/attacking_item, mob/user, params) if(attacking_item.iswrench()) diff --git a/code/game/objects/structures/therapy.dm b/code/game/objects/structures/therapy.dm index 60f577e9e31..805582e5352 100644 --- a/code/game/objects/structures/therapy.dm +++ b/code/game/objects/structures/therapy.dm @@ -22,7 +22,7 @@ playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1) closed = !closed -/obj/item/pocketwatch/examine(mob/user, distance, is_adjacent, show_extended) +/obj/item/pocketwatch/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) . = ..() if (distance <= 1) checktime() diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index 26a325ac8d8..b4785ed0f5c 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -12,7 +12,7 @@ var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device var/obj/item/tank/bombtank = null //the second part of the bomb is a phoron tank -/obj/item/device/onetankbomb/examine(mob/user, show_extended) +/obj/item/device/onetankbomb/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) . = ..() examinate(user, bombtank, show_extended) diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm index 21659649db6..78d961b15c1 100644 --- a/code/modules/detectivework/tools/evidencebag.dm +++ b/code/modules/detectivework/tools/evidencebag.dm @@ -95,7 +95,7 @@ icon_state = "evidenceobj" return -/obj/item/evidencebag/examine(mob/user, show_extended) +/obj/item/evidencebag/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) . = ..() if (stored_item) examinate(user, stored_item, show_extended) diff --git a/code/modules/integrated_electronics/core/device.dm b/code/modules/integrated_electronics/core/device.dm index 5087139276a..c697737c9a7 100644 --- a/code/modules/integrated_electronics/core/device.dm +++ b/code/modules/integrated_electronics/core/device.dm @@ -51,7 +51,7 @@ for(var/obj/item/integrated_circuit/built_in/device_input/I in EA.contents) I.do_work() -/obj/item/device/assembly/electronic_assembly/examine(mob/user, show_extended) +/obj/item/device/assembly/electronic_assembly/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) . = ..() if(EA) for(var/obj/item/integrated_circuit/IC in EA.contents) diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index d34f36eb012..93bacf0edae 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -3,7 +3,7 @@ a creative player the means to solve many problems. Circuits are held inside an electronic assembly, and are wired using special tools. */ -/obj/item/integrated_circuit/examine(mob/user, show_extended) +/obj/item/integrated_circuit/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) interact(user) external_examine(user) . = ..() diff --git a/code/modules/mob/living/silicon/robot/items/gripper.dm b/code/modules/mob/living/silicon/robot/items/gripper.dm index 043151a5107..d149251644e 100644 --- a/code/modules/mob/living/silicon/robot/items/gripper.dm +++ b/code/modules/mob/living/silicon/robot/items/gripper.dm @@ -35,10 +35,10 @@ var/force_holder -/obj/item/gripper/examine(mob/user, show_extended) +/obj/item/gripper/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) . = ..() if(wrapped) - wrapped.examine(user, show_extended = show_extended) + wrapped.examine(arglist(args)) /obj/item/gripper/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/morph.dm b/code/modules/mob/living/simple_animal/hostile/morph.dm index bdd13b1aa0f..0366a57317e 100644 --- a/code/modules/mob/living/simple_animal/hostile/morph.dm +++ b/code/modules/mob/living/simple_animal/hostile/morph.dm @@ -102,7 +102,7 @@ /mob/living/simple_animal/hostile/morph/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) if(morphed) - return form.examine(user) + return form.examine(arglist(args)) else return ..() diff --git a/code/modules/mob/living/simple_animal/illusion.dm b/code/modules/mob/living/simple_animal/illusion.dm index 54a8c037e28..a36a0d12391 100644 --- a/code/modules/mob/living/simple_animal/illusion.dm +++ b/code/modules/mob/living/simple_animal/illusion.dm @@ -34,7 +34,7 @@ SHOULD_CALL_PARENT(FALSE) if(copying) - return copying.examine(user, distance, is_adjacent, infix, suffix, show_extended) + return copying.examine(arglist(args)) else return list("???") diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm index 6e3af257280..c68d0e6fdeb 100644 --- a/code/modules/multiz/zmimic/mimic_movable.dm +++ b/code/modules/multiz/zmimic/mimic_movable.dm @@ -152,7 +152,7 @@ /atom/movable/openspace/mimic/attack_hand(mob/user) to_chat(user, SPAN_NOTICE("You cannot reach \the [src] from here.")) -/atom/movable/openspace/mimic/examine(..., show_extended) +/atom/movable/openspace/mimic/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) SHOULD_CALL_PARENT(FALSE) . = associated_atom.examine(arglist(args)) // just pass all the args to the copied atom @@ -187,9 +187,9 @@ /atom/movable/openspace/turf_proxy/attack_generic(mob/user as mob) loc.attack_generic(user) -/atom/movable/openspace/turf_proxy/examine(mob/examiner, show_extended) +/atom/movable/openspace/turf_proxy/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) SHOULD_CALL_PARENT(FALSE) - . = loc.examine(examiner, show_extended = show_extended) + . = loc.examine(arglist(args)) // -- TURF MIMIC -- @@ -214,6 +214,6 @@ /atom/movable/openspace/turf_mimic/attack_generic(mob/user as mob) to_chat(user, SPAN_NOTICE("You cannot reach \the [src] from here.")) -/atom/movable/openspace/turf_mimic/examine(mob/examiner, show_extended) +/atom/movable/openspace/turf_mimic/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) SHOULD_CALL_PARENT(FALSE) - . = delegate.examine(examiner, show_extended = show_extended) + . = delegate.examine(arglist(args)) diff --git a/code/modules/overmap/ship_weaponry/_ship_gun.dm b/code/modules/overmap/ship_weaponry/_ship_gun.dm index 65ec49783bd..12bd1cefa12 100644 --- a/code/modules/overmap/ship_weaponry/_ship_gun.dm +++ b/code/modules/overmap/ship_weaponry/_ship_gun.dm @@ -280,7 +280,7 @@ SHOULD_CALL_PARENT(FALSE) if(connected) - return connected.examine(user, distance, is_adjacent, infix, suffix, show_extended) + return connected.examine(arglist(args)) else return TRUE diff --git a/code/modules/psionics/abilities/mirror_shade.dm b/code/modules/psionics/abilities/mirror_shade.dm index 2887b6c0ebe..3d5ff4b8cf4 100644 --- a/code/modules/psionics/abilities/mirror_shade.dm +++ b/code/modules/psionics/abilities/mirror_shade.dm @@ -76,7 +76,7 @@ /mob/living/simple_animal/hostile/mirror_shade/examine(mob/user, distance, is_adjacent, infix, suffix, show_extended) if(!QDELETED(owner)) /// Technically suspicious, but these have 30 seconds of lifetime so it's probably fine. - return owner.examine(user) + return owner.examine(arglist(args)) return ..() /mob/living/simple_animal/hostile/mirror_shade/Destroy() diff --git a/html/changelogs/fluffyghost-examinetweakfixes.yml b/html/changelogs/fluffyghost-examinetweakfixes.yml new file mode 100644 index 00000000000..5a1ebc3b452 --- /dev/null +++ b/html/changelogs/fluffyghost-examinetweakfixes.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Resolved some runtimes for mimic turfs on examine." + - code_imp: "All examine headers respect the proc signature." + - code_imp: "All examine that do not explicitly need not to, passthrough the arglist to references examine target procs."