diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 0f6002c9725..2ee22338d0e 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -83,6 +83,12 @@ default_unfasten_wrench(user, tool) return ITEM_INTERACT_SUCCESS +/obj/machinery/recycler/can_be_unfasten_wrench(mob/user, silent) + if(!(isfloorturf(loc) || isindestructiblefloor(loc)) && !anchored) + to_chat(user, span_warning("[src] needs to be on the floor to be secured!")) + return FAILED_UNFASTEN + return SUCCESSFUL_UNFASTEN + /obj/machinery/recycler/attackby(obj/item/I, mob/user, params) if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I)) return diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 91f1ca925ab..cb57c5049bb 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -373,6 +373,8 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag) /// If we can unwrench this object; returns SUCCESSFUL_UNFASTEN and FAILED_UNFASTEN, which are both TRUE, or CANT_UNFASTEN, which isn't. /obj/proc/can_be_unfasten_wrench(mob/user, silent) + if(obj_flags & NO_DECONSTRUCTION) + return CANT_UNFASTEN if(!(isfloorturf(loc) || isindestructiblefloor(loc)) && !anchored) to_chat(user, span_warning("[src] needs to be on the floor to be secured!")) return FAILED_UNFASTEN @@ -380,7 +382,7 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag) /// Try to unwrench an object in a WONDERFUL DYNAMIC WAY /obj/proc/default_unfasten_wrench(mob/user, obj/item/wrench, time = 20) - if((obj_flags & NO_DECONSTRUCTION) || wrench.tool_behaviour != TOOL_WRENCH) + if(wrench.tool_behaviour != TOOL_WRENCH) return CANT_UNFASTEN var/turf/ground = get_turf(src)