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
@@ -165,9 +165,8 @@
return
var/obj/item/queen_bee/qb = I
if(!user.drop_item_to_ground(qb))
if(!user.transfer_item_to(qb, src))
return
qb.queen.forceMove(src)
bees += qb.queen
queen_bee = qb.queen
qb.queen = null
+1 -2
View File
@@ -161,10 +161,9 @@
if(length(stored_plants) >= max_storable_plants)
to_chat(user, "<span class='warning'>[src] can't hold any more plants!</span>")
return ITEM_INTERACT_COMPLETE
if(!user.drop_item_to_ground(used))
if(!user.transfer_item_to(used, src))
return ITEM_INTERACT_COMPLETE
used.forceMove(src)
stored_plants += used
to_chat(user, "<span class='notice'>You put [used] in [src].</span>")
SStgui.update_uis(src)
+1 -2
View File
@@ -107,10 +107,9 @@
if(biomass >= biomass_capacity && potassium >= potassium_capacity)
to_chat(user, "<span class='warning'>[src] can't hold any more biomass, and its contents are saturated with potassium!</span>")
return ITEM_INTERACT_COMPLETE
if(!user.drop_item_to_ground(used))
if(!user.transfer_item_to(used, src))
return ITEM_INTERACT_COMPLETE
used.forceMove(src)
make_biomass(used)
to_chat(user, "<span class='notice'>You put [used] in [src].</span>")
SStgui.update_uis(src)