From 2c3a60e3503366619475ef0da0daa50827015a8c Mon Sep 17 00:00:00 2001 From: "petethegoat@gmail.com" Date: Thu, 15 Nov 2012 20:15:49 +0000 Subject: [PATCH] You can carve out books with a pair of wirecutters or a kitchen knife to create a handy hiding place. Dice are no longer the same size as fire extinguishers git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5078 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/objects/items/weapons/dice.dm | 5 ++-- code/modules/library/lib_items.dm | 32 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 6100dfd247..82df54987e 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -1,9 +1,10 @@ /obj/item/weapon/dice name = "d6" desc = "A dice with six sides." - var/sides = 6 icon = 'icons/obj/dice.dmi' icon_state = "d66" + w_class = 1 + var/sides = 6 /obj/item/weapon/dice/New() icon_state = "[name][rand(sides)]" @@ -11,8 +12,8 @@ /obj/item/weapon/dice/d20 name = "d20" desc = "A dice with twenty sides." - sides = 20 icon_state = "d2020" + sides = 20 /obj/item/weapon/dice/attack_self(mob/user as mob) var/result = rand(1, sides) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index ebace13c75..31e129b503 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -129,8 +129,19 @@ var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned var/unique = 0 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified var/title // The real name of the book. + var/carved = 0 // Has the book been hollowed out for use as a secret storage item? + var/obj/item/store //What's in the book? /obj/item/weapon/book/attack_self(var/mob/user as mob) + if(carved) + if(store) + user << "[store] falls out of [title]!" + store.loc = get_turf(src.loc) + store = null + return + else + user << "The pages of [title] have been cut out!" + return if(src.dat) user << browse("Penned by [author].
" + "[dat]", "window=book") user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.") @@ -139,6 +150,20 @@ user << "This book is completely blank!" /obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(carved) + if(!store) + if(W.w_class < 3) + user.drop_item() + W.loc = src + store = W + user << "You put [W] in [title]." + return + else + user << "[W] won't fit in [title]." + return + else + user << "There's already something in [title]!" + return if(istype(W, /obj/item/weapon/pen)) if(unique) user << "These pages don't seem to take the ink well. Looks like you can't modify it." @@ -198,6 +223,13 @@ return scanner.computer.inventory.Add(src) user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" + else if(istype(W, /obj/item/weapon/kitchenknife) || istype(W, /obj/item/weapon/wirecutters)) + if(carved) return + user << "You begin to carve out [title]." + if(do_after(user, 30)) + user << "You carve out the pages from [title]! You didn't want to read it anyway." + carved = 1 + return else ..()