mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +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:
@@ -15,6 +15,7 @@
|
||||
desc = "This box contains body bags."
|
||||
icon_state = "bodybags"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -917,6 +917,7 @@
|
||||
icon = 'pda.dmi'
|
||||
icon_state = "pdabox"
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
/obj/item/weapon/storage/PDAbox/New()
|
||||
..()
|
||||
|
||||
@@ -133,4 +133,21 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
|
||||
S.ReplaceWithPlating()
|
||||
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
|
||||
// W.make_plating()
|
||||
return
|
||||
return
|
||||
|
||||
// CARDBOARD SHEET - BubbleWrap
|
||||
|
||||
// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0)
|
||||
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
|
||||
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
|
||||
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/lightbox/tubes), \
|
||||
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/lightbox/bulbs), \
|
||||
new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \
|
||||
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
|
||||
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/helmet/cardborg), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/cardboard
|
||||
New(var/loc, var/amount=null)
|
||||
recipes = cardboard_recipes
|
||||
return ..()
|
||||
|
||||
@@ -206,6 +206,11 @@
|
||||
if (istype(O,/obj/item))
|
||||
usr.put_in_hand(O)
|
||||
O.add_fingerprint(usr)
|
||||
//BubbleWrap - so newly formed boxes are empty
|
||||
if ( istype(O, /obj/item/weapon/storage) )
|
||||
for (var/obj/item/I in O)
|
||||
del(I)
|
||||
//BubbleWrap END
|
||||
if (src && usr.machine==src) //do not reopen closed window
|
||||
spawn( 0 )
|
||||
src.interact(usr)
|
||||
|
||||
@@ -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