mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Fixes issues with packagewrap, trashbag, handlabeler, and other potential items that must have an effect when clicking a storage item. Clicking a storage item with those items does not try to insert them in the container but instead calls their afterattack effect directly. The var used for those items is var/no_direct_insertion.
Fixes trashbag not being able to pick up pillbottles, evidence bags. Fixes packagewrap not being able to wrap backpacks, pillbottles, all sorts of bags. Fixes packagewrapping a locked lockbox showing "it's locked!" Backpack only make rustling noise if insertion is successful.
This commit is contained in:
@@ -33,18 +33,7 @@
|
||||
amount = 25
|
||||
max_amount = 25
|
||||
burn_state = FLAMMABLE
|
||||
|
||||
/obj/item/proc/can_be_package_wrapped() //can the item be wrapped with package wrapper into a delivery package
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/storage/can_be_package_wrapped()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/storage/box/can_be_package_wrapped()
|
||||
return 1
|
||||
|
||||
/obj/item/smallDelivery/can_be_package_wrapped()
|
||||
return 0
|
||||
no_direct_insertion = 1
|
||||
|
||||
/obj/item/stack/packageWrap/afterattack(obj/target, mob/user, proximity)
|
||||
if(!proximity)
|
||||
@@ -56,7 +45,7 @@
|
||||
|
||||
if(istype(target, /obj/item))
|
||||
var/obj/item/I = target
|
||||
if(!I.can_be_package_wrapped())
|
||||
if(istype(I, /obj/item/smallDelivery))
|
||||
return
|
||||
if(user.r_hand == I || user.l_hand == I)
|
||||
if(!user.unEquip(I))
|
||||
|
||||
Reference in New Issue
Block a user