From 87f6ca194483e09a4a675d09fb9a85a3d9e80460 Mon Sep 17 00:00:00 2001 From: Kylerace Date: Sun, 5 Sep 2021 03:54:40 -0700 Subject: [PATCH] kills 4 object definitions that are inside of proc arguments (#61152) thanks to putnam for reporting this in coderbus /obj/machinery/smartfridge/drying_rack/load(/obj/item/dried_object) looks pretty harmless right? youd think that this would make a proc argument called dried_object of type /obj/item but no, this defines a new /obj/item class definition called dried_object with zero changes from /obj/item you can use this to do weird things, like /obj/machinery/smartfridge/drying_rack/load(/obj/item/var/dried_object = 3) creates a new var on /obj/item called dried_object and is very cursed gets rid of 4 of these abominations, they dont seem to have caused any bugs except for maybe behavior that relies on typesof(/some/path) --- code/datums/materials/_material.dm | 2 +- code/datums/quirks/negative.dm | 2 +- code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm | 2 +- code/modules/projectiles/guns/ballistic.dm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/datums/materials/_material.dm b/code/datums/materials/_material.dm index 8d8605202f1..7a59ddcbf4c 100644 --- a/code/datums/materials/_material.dm +++ b/code/datums/materials/_material.dm @@ -95,7 +95,7 @@ Simple datum which is instanced once per type and is used for every object of sa source.mat_update_desc(src) ///This proc is called when a material updates an object's description -/atom/proc/mat_update_desc(/datum/material/mat) +/atom/proc/mat_update_desc(datum/material/mat) return ///This proc is called when the material is added to an object specifically. diff --git a/code/datums/quirks/negative.dm b/code/datums/quirks/negative.dm index 972e16dcd53..9552062283c 100644 --- a/code/datums/quirks/negative.dm +++ b/code/datums/quirks/negative.dm @@ -300,7 +300,7 @@ SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "nyctophobia") /// Called when the quirk holder moves. Updates the quirk holder's mood. -/datum/quirk/nyctophobia/proc/on_holder_moved(/mob/living/source, atom/old_loc, dir, forced) +/datum/quirk/nyctophobia/proc/on_holder_moved(mob/living/source, atom/old_loc, dir, forced) SIGNAL_HANDLER if(quirk_holder.stat == DEAD) diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 135ea279e28..9be8cf21947 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -308,7 +308,7 @@ if(!powered()) toggle_drying(TRUE) -/obj/machinery/smartfridge/drying_rack/load(/obj/item/dried_object) //For updating the filled overlay +/obj/machinery/smartfridge/drying_rack/load(obj/item/dried_object) //For updating the filled overlay . = ..() update_appearance() diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 8cd4ab36dad..a6fa9700178 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -591,7 +591,7 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list( update_appearance() return TRUE -/obj/item/gun/ballistic/proc/guncleaning(mob/user, /obj/item/A) +/obj/item/gun/ballistic/proc/guncleaning(mob/user, obj/item/A) if(misfire_probability == 0) to_chat(user, span_notice("[src] seems to be already clean of fouling.")) return