mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
Comitted on behalf of BubbleWrap
- Boxes can now be collapsed down into cardboard sheets. - Cardboard sheets are stackable (like glass and metal). - Cardboard sheets can be made back into boxes when needed. - Cardboard sheets can also be made into a cardboard cyborg costume. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3028 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
var/obj/screen/storage/boxes = null
|
||||
var/obj/screen/close/closer = null
|
||||
w_class = 3.0
|
||||
var/foldable = null // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard
|
||||
|
||||
/obj/item/weapon/storage/proc/return_inv()
|
||||
|
||||
@@ -244,7 +245,29 @@
|
||||
src.master.attackby(W, user)
|
||||
return
|
||||
|
||||
// BubbleWrap - A box can be folded up to make card
|
||||
/obj/item/weapon/storage/attack_self(mob/user as mob)
|
||||
if ( contents.len )
|
||||
return
|
||||
if ( !ispath(src.foldable) )
|
||||
return
|
||||
var/found = 0
|
||||
// Close any open UI windows first
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
if ( M == user )
|
||||
found = 1
|
||||
if ( !found ) // User is too far away
|
||||
return
|
||||
// Now make the cardboard
|
||||
user << "\blue You fold [src] flat."
|
||||
new src.foldable(get_turf(src))
|
||||
del(src)
|
||||
//BubbleWrap END
|
||||
|
||||
/obj/item/weapon/storage/box/
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/box/survival/New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user