Cyborg Packaging Fixes (#11513)

This commit is contained in:
Wildkins
2021-03-25 14:31:16 +01:00
committed by GitHub
parent b4615d1665
commit 978069fd68
6 changed files with 72 additions and 16 deletions
+12
View File
@@ -14,6 +14,18 @@
/obj/item/stack/wrapping_paper/attackby(obj/item/W, mob/user)
..()
if (isrobot(user))
if(istype(W.loc, /obj/item/gripper))
var/obj/item/gripper/G = W.loc
if(!is_type_in_list(G, list(/obj/item/gripper/service, /obj/item/gripper/paperwork)))
to_chat(user, SPAN_WARNING("\The [G] isn't deft enough to wrap up \the [G.wrapped]."))
return
else if(istype(W, /obj/item/gripper))
return
else
to_chat(user, SPAN_WARNING("You can't wrap up a cyborg module!"))
// Prevent robots from accidentally wrapping any of their internal tools, and non-service borgs from wrapping up parcels
return
if (!isturf(loc))
to_chat(user, SPAN_WARNING("The paper must be set down for you to wrap a gift!"))
return
@@ -30,7 +30,7 @@
user.drop_item()
playsound(src.loc, 'sound/items/package_unwrap.ogg', 50,1)
if(src.gift)
user.put_in_active_hand(gift)
user.put_in_hands(gift)
src.gift.add_fingerprint(user)
else
to_chat(user, "<span class='warning'>The gift was empty!</span>")