refactors some item transfers to use transfer_item_to() (#28405)

This commit is contained in:
chuga-git
2025-02-18 10:38:09 +00:00
committed by GitHub
parent e72967152b
commit 570b45a903
10 changed files with 10 additions and 20 deletions
+1 -2
View File
@@ -41,10 +41,9 @@
/obj/machinery/computer/rnd_backup/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(istype(used, /obj/item/disk/rnd_backup_disk) && istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(!H.drop_item_to_ground(used))
if(!H.transfer_item_to(used, src))
return ITEM_INTERACT_COMPLETE
used.forceMove(src)
inserted_disk = used
to_chat(user, "<span class='notice'>You insert [used] into [src].</span>")
SStgui.update_uis(src)
+1 -2
View File
@@ -83,13 +83,12 @@ Note: Must be placed within 3 tiles of the R&D Console
to_chat(user, "<span class='warning'>You cannot deconstruct this item!</span>")
return ITEM_INTERACT_COMPLETE
if(!user.drop_item())
if(!user.transfer_item_to(used, src))
to_chat(user, "<span class='warning'>[used] is stuck to your hand, you cannot put it in [src]!</span>")
return ITEM_INTERACT_COMPLETE
busy = TRUE
loaded_item = used
used.loc = src
to_chat(user, "<span class='notice'>You add [used] to [src]!</span>")
SStgui.update_uis(linked_console)
flick("s_analyzer_la", src)