[MIRROR] borg package wrapper (#12510)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-03-11 16:50:38 +01:00
committed by GitHub
co-authored by Will
parent e79ee28f09
commit ca1c616e34
4 changed files with 130 additions and 88 deletions
@@ -139,39 +139,37 @@
..()
if (!( locate(/obj/structure/table, src.loc) ))
to_chat(user, span_warning("You MUST put the paper on a table!"))
if (W.w_class < ITEMSIZE_LARGE)
var/obj/item/I = user.get_inactive_hand()
if(I && I.has_tool_quality(TOOL_WIRECUTTER))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
to_chat(user, span_warning("You need more paper!"))
return
else
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/gift)) //No gift wrapping gifts!
to_chat(user, span_warning("You can't wrap something that's already wrapped!"))
return
src.amount -= a_used
user.drop_item()
var/obj/item/gift/G = new /obj/item/gift( src.loc )
G.size = W.w_class
G.w_class = G.size + 1
G.icon_state = text("gift[]", G.size)
G.gift = W
W.loc = G
G.add_fingerprint(user)
W.add_fingerprint(user)
src.add_fingerprint(user)
if (src.amount <= 0)
new /obj/item/c_tube( src.loc )
qdel(src)
return
else
to_chat(user, span_warning("You need scissors!"))
else
if (W.w_class >= ITEMSIZE_LARGE)
to_chat(user, span_warning("The object is FAR too large!"))
return
return
var/obj/item/I = user.get_inactive_hand()
if(!I?.has_tool_quality(TOOL_WIRECUTTER))
to_chat(user, span_warning("You need scissors!"))
return
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
to_chat(user, span_warning("You need more paper!"))
return
if(istype(W, /obj/item/smallDelivery) || istype(W, /obj/item/gift)) //No gift wrapping gifts!
to_chat(user, span_warning("You can't wrap something that's already wrapped!"))
return
src.amount -= a_used
user.drop_item()
var/obj/item/gift/G = new /obj/item/gift( src.loc )
G.size = W.w_class
G.w_class = G.size + 1
G.icon_state = text("gift[]", G.size)
G.gift = W
W.loc = G
G.add_fingerprint(user)
W.add_fingerprint(user)
src.add_fingerprint(user)
if(src.amount <= 0)
new /obj/item/c_tube(get_turf(src))
qdel(src)
/obj/item/wrapping_paper/examine(mob/user)
. = ..()
@@ -183,7 +181,7 @@
var/mob/living/carbon/human/H = target
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || istype(H.wear_suit, /obj/item/clothing/suit/shibari) || H.stat)
if (src.amount > 2)
if (src.amount >= 2)
var/obj/effect/spresent/present = new /obj/effect/spresent (H.loc)
src.amount -= 2