mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +01:00
Merge remote-tracking branch 'bay12-upstream/master' into development
This commit is contained in:
@@ -36,6 +36,20 @@
|
||||
return
|
||||
else
|
||||
name = ("bookcase ([newname])")
|
||||
else if(istype(O,/obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << (anchored ? "<span class='notice'>You unfasten \the [src] from the floor.</span>" : "<span class='notice'>You secure \the [src] to the floor.</span>")
|
||||
anchored = !anchored
|
||||
else if(istype(O,/obj/item/weapon/screwdriver))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user << "<span class='notice'>You begin dismantling \the [src].</span>"
|
||||
if(do_after(user,25))
|
||||
user << "<span class='notice'>You dismantle \the [src].</span>"
|
||||
new /obj/item/stack/material/wood(get_turf(src), amount = 3)
|
||||
for(var/obj/item/weapon/book/b in contents)
|
||||
b.loc = (get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -81,6 +95,7 @@
|
||||
icon_state = "book-5"
|
||||
|
||||
|
||||
|
||||
/obj/structure/bookcase/manuals/medical
|
||||
name = "Medical Manuals bookcase"
|
||||
|
||||
@@ -241,6 +256,7 @@
|
||||
user.visible_message("<span class='notice'>You open up the book and show it to [M]. </span>", \
|
||||
"<span class='notice'> [user] opens up a book and shows it to [M]. </span>")
|
||||
M << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //to prevent spam
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -122,6 +122,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
density = 1
|
||||
var/arcanecheckout = 0
|
||||
var/screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book
|
||||
var/sortby = "author"
|
||||
var/buffer_book
|
||||
var/buffer_mob
|
||||
var/upload_category = "Fiction"
|
||||
@@ -195,9 +196,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
else
|
||||
dat += {"<A href='?src=\ref[src];orderbyid=1'>(Order book by SS<sup>13</sup>BN)</A><BR><BR>
|
||||
<table>
|
||||
<tr><td>AUTHOR</td><td>TITLE</td><td>CATEGORY</td><td></td></tr>"}
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, author, title, category FROM ss13_library")
|
||||
<tr><td><A href='?src=\ref[src];sort=author>AUTHOR</A></td><td><A href='?src=\ref[src];sort=title>TITLE</A></td><td><A href='?src=\ref[src];sort=category>CATEGORY</A></td><td></td></tr>"}
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, author, title, category FROM library ORDER BY [sortby]")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -237,9 +237,12 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
user << browse(dat, "window=library")
|
||||
onclose(user, "library")
|
||||
|
||||
/obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (src.density && istype(W, /obj/item/weapon/card/emag))
|
||||
/obj/machinery/librarycomp/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (src.density && !src.emagged)
|
||||
src.emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/barcodescanner))
|
||||
var/obj/item/weapon/barcodescanner/scanner = W
|
||||
scanner.computer = src
|
||||
@@ -351,6 +354,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
if(!query.Execute())
|
||||
usr << query.ErrorMsg()
|
||||
else
|
||||
log_and_message_admins("has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
|
||||
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
|
||||
alert("Upload Complete.")
|
||||
|
||||
@@ -387,6 +391,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
if(isnum(orderid))
|
||||
var/nhref = "src=\ref[src];targetid=[orderid]"
|
||||
spawn() src.Topic(nhref, params2list(nhref), src)
|
||||
if(href_list["sort"] in list("author", "title", "category"))
|
||||
sortby = href_list["sort"]
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user