From bef2f57a9d0e4c377b9a38a098afc669d03d3ca4 Mon Sep 17 00:00:00 2001 From: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Date: Thu, 24 Apr 2025 10:33:16 -0400 Subject: [PATCH] Smith Polish - Item Insertion QOL (#28973) * QOL * Extra QOL --- code/modules/smithing/machinery/casting_basin.dm | 9 +++++---- code/modules/smithing/smith_machinery.dm | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/modules/smithing/machinery/casting_basin.dm b/code/modules/smithing/machinery/casting_basin.dm index 24f8c1b1be5..12e5708ece0 100644 --- a/code/modules/smithing/machinery/casting_basin.dm +++ b/code/modules/smithing/machinery/casting_basin.dm @@ -115,13 +115,14 @@ to_chat(user, "[used] does not fit in [src]'s cast slot.") return - if(cast) - to_chat(user, "[src] already has a cast inserted.") - return - if(used.flags & NODROP || !user.transfer_item_to(used, src)) to_chat(user, "[used] is stuck to your hand!") return ITEM_INTERACT_COMPLETE + if(cast) + user.put_in_active_hand(cast) + to_chat(user, "You swap [used] with [cast] in [src].") + else + to_chat(user, "You insert [used] into [src].") cast = used update_icon(UPDATE_OVERLAYS) return ITEM_INTERACT_COMPLETE diff --git a/code/modules/smithing/smith_machinery.dm b/code/modules/smithing/smith_machinery.dm index 6e5e4dbdee3..d01456bec2c 100644 --- a/code/modules/smithing/smith_machinery.dm +++ b/code/modules/smithing/smith_machinery.dm @@ -52,14 +52,16 @@ return FINISH_ATTACK if(istype(used, /obj/item/smithed_item/component)) - if(working_component) - to_chat(user, "There is already a component in the machine!") - return ITEM_INTERACT_COMPLETE - if(used.flags & NODROP || !user.drop_item() || !used.forceMove(src)) to_chat(user, "[used] is stuck to your hand!") return ITEM_INTERACT_COMPLETE + if(working_component) + user.put_in_active_hand(working_component) + to_chat(user, "You swap [used] with [working_component] in [src].") + else + to_chat(user, "You insert [used] into [src].") + working_component = used return ITEM_INTERACT_COMPLETE return ..()