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
This commit is contained in:
petethegoat@gmail.com
2012-11-15 20:15:49 +00:00
parent 78887723ca
commit 2c3a60e350
2 changed files with 35 additions and 2 deletions

View File

@@ -1,9 +1,10 @@
/obj/item/weapon/dice /obj/item/weapon/dice
name = "d6" name = "d6"
desc = "A dice with six sides." desc = "A dice with six sides."
var/sides = 6
icon = 'icons/obj/dice.dmi' icon = 'icons/obj/dice.dmi'
icon_state = "d66" icon_state = "d66"
w_class = 1
var/sides = 6
/obj/item/weapon/dice/New() /obj/item/weapon/dice/New()
icon_state = "[name][rand(sides)]" icon_state = "[name][rand(sides)]"
@@ -11,8 +12,8 @@
/obj/item/weapon/dice/d20 /obj/item/weapon/dice/d20
name = "d20" name = "d20"
desc = "A dice with twenty sides." desc = "A dice with twenty sides."
sides = 20
icon_state = "d2020" icon_state = "d2020"
sides = 20
/obj/item/weapon/dice/attack_self(mob/user as mob) /obj/item/weapon/dice/attack_self(mob/user as mob)
var/result = rand(1, sides) var/result = rand(1, sides)

View File

@@ -129,8 +129,19 @@
var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned 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/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/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) /obj/item/weapon/book/attack_self(var/mob/user as mob)
if(carved)
if(store)
user << "<span class='notice'>[store] falls out of [title]!</span>"
store.loc = get_turf(src.loc)
store = null
return
else
user << "<span class='notice'>The pages of [title] have been cut out!</span>"
return
if(src.dat) if(src.dat)
user << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book") user << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.") user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
@@ -139,6 +150,20 @@
user << "This book is completely blank!" user << "This book is completely blank!"
/obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) /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 << "<span class='notice'>You put [W] in [title].</span>"
return
else
user << "<span class='notice'>[W] won't fit in [title].</span>"
return
else
user << "<span class='notice'>There's already something in [title]!</span>"
return
if(istype(W, /obj/item/weapon/pen)) if(istype(W, /obj/item/weapon/pen))
if(unique) if(unique)
user << "These pages don't seem to take the ink well. Looks like you can't modify it." user << "These pages don't seem to take the ink well. Looks like you can't modify it."
@@ -198,6 +223,13 @@
return return
scanner.computer.inventory.Add(src) scanner.computer.inventory.Add(src)
user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'" 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 << "<span class='notice'>You begin to carve out [title].</span>"
if(do_after(user, 30))
user << "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>"
carved = 1
return
else else
..() ..()