mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
adds clown glue
This commit is contained in:
@@ -207,44 +207,44 @@
|
||||
/obj/item/weapon/book/attack_self(var/mob/user as mob)
|
||||
if(carved)
|
||||
if(store)
|
||||
to_chat(user, "<span class='notice'>[store] falls out of [title]!</span>")
|
||||
to_chat(user, "<span class='notice'>[store] falls out of [title]!</span>")
|
||||
store.loc = get_turf(src.loc)
|
||||
store = null
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The pages of [title] have been cut out!</span>")
|
||||
to_chat(user, "<span class='notice'>The pages of [title] have been cut out!</span>")
|
||||
return
|
||||
if(src.dat)
|
||||
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.")
|
||||
onclose(user, "book")
|
||||
else
|
||||
to_chat(user, "This book is completely blank!")
|
||||
to_chat(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, src)
|
||||
store = W
|
||||
to_chat(user, "<span class='notice'>You put [W] in [title].</span>")
|
||||
return
|
||||
if(user.drop_item(W, src))
|
||||
store = W
|
||||
to_chat(user, "<span class='notice'>You put [W] in [title].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[W] won't fit in [title].</span>")
|
||||
to_chat(user, "<span class='notice'>[W] won't fit in [title].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's already something in [title]!</span>")
|
||||
to_chat(user, "<span class='notice'>There's already something in [title]!</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/pen))
|
||||
if(unique)
|
||||
to_chat(user, "These pages don't seem to take the ink well. Looks like you can't modify it.")
|
||||
to_chat(user, "These pages don't seem to take the ink well. Looks like you can't modify it.")
|
||||
return
|
||||
var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
|
||||
switch(choice)
|
||||
if("Title")
|
||||
var/newtitle = reject_bad_text(stripped_input(usr, "Write a new title:"))
|
||||
if(!newtitle)
|
||||
to_chat(usr, "The title is invalid.")
|
||||
to_chat(usr, "The title is invalid.")
|
||||
return
|
||||
else
|
||||
src.name = newtitle
|
||||
@@ -252,14 +252,14 @@
|
||||
if("Contents")
|
||||
var/content = sanitize(input(usr, "Write your book's contents (HTML NOT allowed):") as message|null)
|
||||
if(!content)
|
||||
to_chat(usr, "The content is invalid.")
|
||||
to_chat(usr, "The content is invalid.")
|
||||
return
|
||||
else
|
||||
src.dat += content
|
||||
if("Author")
|
||||
var/newauthor = stripped_input(usr, "Write the author's name:")
|
||||
if(!newauthor)
|
||||
to_chat(usr, "The name is invalid.")
|
||||
to_chat(usr, "The name is invalid.")
|
||||
return
|
||||
else
|
||||
src.author = newauthor
|
||||
@@ -268,37 +268,37 @@
|
||||
else if(istype(W, /obj/item/weapon/barcodescanner))
|
||||
var/obj/item/weapon/barcodescanner/scanner = W
|
||||
if(!scanner.computer)
|
||||
to_chat(user, "[W]'s screen flashes: 'No associated computer found!'")
|
||||
to_chat(user, "[W]'s screen flashes: 'No associated computer found!'")
|
||||
else
|
||||
switch(scanner.mode)
|
||||
if(0)
|
||||
scanner.book = src
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer.'")
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer.'")
|
||||
if(1)
|
||||
scanner.book = src
|
||||
scanner.computer.buffer_book = src.name
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'")
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book title stored in associated computer buffer.'")
|
||||
if(2)
|
||||
scanner.book = src
|
||||
for(var/datum/borrowbook/b in scanner.computer.checkouts)
|
||||
if(b.bookname == src.name)
|
||||
scanner.computer.checkouts.Remove(b)
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'")
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Book has been checked in.'")
|
||||
return
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'")
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. No active check-out record found for current title.'")
|
||||
if(3)
|
||||
scanner.book = src
|
||||
for(var/obj/item/weapon/book in scanner.computer.inventory)
|
||||
if(book == src)
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'")
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title already present in inventory, aborting to avoid duplicate entry.'")
|
||||
return
|
||||
scanner.computer.inventory.Add(src)
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
|
||||
to_chat(user, "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
|
||||
else if(istype(W, /obj/item/weapon/kitchen/utensil/knife/large) || istype(W, /obj/item/weapon/wirecutters))
|
||||
if(carved) return
|
||||
to_chat(user, "<span class='notice'>You begin to carve out [title].</span>")
|
||||
to_chat(user, "<span class='notice'>You begin to carve out [title].</span>")
|
||||
if(do_after(user, src, 30))
|
||||
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
|
||||
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
|
||||
carved = 1
|
||||
return
|
||||
else
|
||||
@@ -324,7 +324,7 @@
|
||||
mode += 1
|
||||
if(mode > 3)
|
||||
mode = 0
|
||||
to_chat(user, "[src] Status Display:")
|
||||
to_chat(user, "[src] Status Display:")
|
||||
var/modedesc
|
||||
switch(mode)
|
||||
if(0)
|
||||
@@ -337,9 +337,9 @@
|
||||
modedesc = "Scan book to local buffer, attempt to add book to general inventory."
|
||||
else
|
||||
modedesc = "ERROR"
|
||||
to_chat(user, " - Mode [mode] : [modedesc]")
|
||||
to_chat(user, " - Mode [mode] : [modedesc]")
|
||||
if(src.computer)
|
||||
to_chat(user, "<font color=green>Computer has been associated with this unit.</font>")
|
||||
to_chat(user, "<font color=green>Computer has been associated with this unit.</font>")
|
||||
else
|
||||
to_chat(user, "<font color=red>No associated computer found. Only local scans will function properly.</font>")
|
||||
to_chat(user, "\n")
|
||||
to_chat(user, "<font color=red>No associated computer found. Only local scans will function properly.</font>")
|
||||
to_chat(user, "\n")
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if("[id]" in cached_books)
|
||||
var/datum/cachedbook/CB = cached_books["[id]"]
|
||||
if(CB.programmatic)
|
||||
to_chat(user, "<span class='danger'>That book cannot be removed from the system, as it does not actually exist in the database.</span>")
|
||||
to_chat(user, "<span class='danger'>That book cannot be removed from the system, as it does not actually exist in the database.</span>")
|
||||
return
|
||||
|
||||
var/sqlid = text2num(id)
|
||||
@@ -142,7 +142,7 @@ var/global/list/library_section_names = list("Any", "Fiction", "Non-Fiction", "A
|
||||
|
||||
/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob)
|
||||
if(istype(user,/mob/dead))
|
||||
to_chat(user, "<span class='danger'>Nope.</span>")
|
||||
to_chat(user, "<span class='danger'>Nope.</span>")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Scanner Control Interface</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
@@ -191,16 +191,16 @@ var/global/list/library_section_names = list("Any", "Fiction", "Non-Fiction", "A
|
||||
|
||||
/obj/machinery/bookbinder/attackby(var/obj/O as obj, var/mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/paper/nano))
|
||||
user.drop_item(O, src)
|
||||
user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
|
||||
src.visible_message("[src] begins to hum as it warms up its printing drums.")
|
||||
sleep(rand(200,400))
|
||||
src.visible_message("[src] whirs as it prints and binds a new book.")
|
||||
var/obj/item/weapon/book/b = new(src.loc)
|
||||
b.dat = O:info
|
||||
b.name = "Print Job #[rand(100, 999)]"
|
||||
b.icon_state = "book[rand(1,9)]"
|
||||
qdel(O)
|
||||
O = null
|
||||
if(user.drop_item(O, src))
|
||||
user.visible_message("[user] loads some paper into [src].", "You load some paper into [src].")
|
||||
src.visible_message("[src] begins to hum as it warms up its printing drums.")
|
||||
sleep(rand(200,400))
|
||||
src.visible_message("[src] whirs as it prints and binds a new book.")
|
||||
var/obj/item/weapon/book/b = new(src.loc)
|
||||
b.dat = O:info
|
||||
b.name = "Print Job #[rand(100, 999)]"
|
||||
b.icon_state = "book[rand(1,9)]"
|
||||
qdel(O)
|
||||
O = null
|
||||
else
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user