mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
Adds the ability to construct, destroy, and take apart bookcases.
Bookcases can be built using 5 wood planks. Bookcases can be destroyed using weapons(50HP). Bookcases can be taken apart using a wrench.
This commit is contained in:
@@ -129,6 +129,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
|
||||
new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0), \
|
||||
@@ -181,4 +182,4 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
|
||||
|
||||
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
|
||||
recipes = cardboard_recipes
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
anchored = 1
|
||||
density = 1
|
||||
opacity = 1
|
||||
var/health = 50
|
||||
|
||||
/obj/structure/bookcase/initialize()
|
||||
for(var/obj/item/I in loc)
|
||||
@@ -30,6 +31,18 @@
|
||||
user.drop_item()
|
||||
O.loc = src
|
||||
update_icon()
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
user << "\blue Now disassembling bookcase"
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
density = 0
|
||||
qdel(src)
|
||||
return
|
||||
else if(istype(O, /obj/item/weapon/pen))
|
||||
var/newname = stripped_input(usr, "What would you like to title this bookshelf?")
|
||||
if(!newname)
|
||||
@@ -37,6 +50,18 @@
|
||||
else
|
||||
name = ("bookcase ([sanitize(newname)])")
|
||||
else
|
||||
switch(O.damtype)
|
||||
if("fire")
|
||||
src.health -= O.force * 1
|
||||
if("brute")
|
||||
src.health -= O.force * 0.75
|
||||
else
|
||||
if (src.health <= 0)
|
||||
visible_message("<span class=warning>The bookcase is smashed apart!</span>")
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
new /obj/item/stack/sheet/wood(get_turf(src))
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/structure/bookcase/attack_hand(var/mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user