Merge remote-tracking branch 'upstream/master' into lib-sucks-no-homo

Conflicts:
	code/modules/library/lib_machines.dm
This commit is contained in:
MrStonedOne
2015-02-18 18:20:16 -08:00
863 changed files with 45356 additions and 34920 deletions
+1 -1
View File
@@ -281,7 +281,7 @@
throw_speed = 3
throw_range = 5
w_class = 1.0
var/obj/machinery/librarycomp/computer //Associated computer - Modes 1 to 3 use this
var/obj/machinery/computer/libraryconsole/bookmanagement/computer //Associated computer - Modes 1 to 3 use this
var/obj/item/weapon/book/book //Currently scanned book
var/mode = 0 //0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory
+37 -24
View File
@@ -10,23 +10,28 @@
*/
/*
* Library Public Computer
*/
/obj/machinery/librarypubliccomp
/obj/machinery/computer/libraryconsole
name = "library visitor console"
icon = 'icons/obj/library.dmi'
icon_state = "computer"
anchored = 1
density = 1
icon = 'icons/obj/computer.dmi'
icon_state = "library"
circuit = /obj/item/weapon/circuitboard/libraryconsole
var/screenstate = 0
var/title
var/category = "Any"
var/author
var/SQLquery
/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob)
usr.set_machine(src)
/obj/machinery/computer/libraryconsole/attack_hand(var/mob/user as mob)
if(..())
return
interact(user)
/obj/machinery/computer/libraryconsole/interact(mob/user)
user.set_machine(src)
var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
switch(screenstate)
if(0)
@@ -56,14 +61,13 @@
dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td>[id]</td></tr>"
dat += "</table><BR>"
dat += "<A href='?src=\ref[src];back=1'>\[Go Back\]</A><BR>"
//user << browse(dat, "window=publiclibrary")
//onclose(user, "publiclibrary")
var/datum/browser/popup = new(user, "publiclibrary", name, 600, 400)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/librarypubliccomp/Topic(href, href_list)
/obj/machinery/computer/libraryconsole/Topic(href, href_list)
. = ..()
if(..())
usr << browse(null, "window=publiclibrary")
onclose(usr, "publiclibrary")
@@ -158,18 +162,19 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
/*
* Library Computer
* After 860 days, it's finally a buildable computer.
*/
<<<<<<< HEAD
// TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such
// It is August 22nd, 2012... This TODO has already been here for months.. I wonder how long it'll last before someone does something about it.
// It's December 25th, 2014, and this is STILL here, and it's STILL relevant. Kill me
/obj/machinery/librarycomp
=======
/obj/machinery/computer/libraryconsole/bookmanagement
>>>>>>> upstream/master
name = "book inventory management console"
icon = 'icons/obj/library.dmi'
icon_state = "computer"
anchored = 1
density = 1
var/arcanecheckout = 0
var/screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book
screenstate = 0 // 0 - Main Menu, 1 - Inventory, 2 - Checked Out, 3 - Check Out a Book
var/buffer_book
var/buffer_mob
var/upload_category = "Fiction"
@@ -177,11 +182,22 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
var/list/inventory = list()
var/checkoutperiod = 5 // In minutes
var/obj/machinery/libraryscanner/scanner // Book scanner that will be used when uploading books to the Archive
<<<<<<< HEAD
var/libcomp_menu
var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl
=======
/obj/machinery/librarycomp/attack_hand(var/mob/user as mob)
usr.set_machine(src)
var/bibledelay = 0
>>>>>>> upstream/master
/obj/machinery/computer/libraryconsole/bookmanagement/New()
..()
if(circuit)
circuit.name = "circuit board (Book Inventory Management Console)"
circuit.build_path = /obj/machinery/computer/libraryconsole/bookmanagement
/obj/machinery/computer/libraryconsole/bookmanagement/interact(mob/user)
user.set_machine(src)
var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
switch(screenstate)
if(0)
@@ -273,15 +289,12 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
dat += "<A href='?src=\ref[src];arccheckout=1'>Yes.</A><BR>"
dat += "<A href='?src=\ref[src];switchscreen=0'>No.</A><BR>"
//dat += "<A HREF='?src=\ref[user];mach_close=library'>Close</A><br><br>"
//user << browse(dat, "window=library")
//onclose(user, "library")
var/datum/browser/popup = new(user, "library", name, 600, 400)
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
/obj/machinery/librarycomp/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/machinery/computer/libraryconsole/bookmanagement/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
@@ -290,11 +303,11 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
else
..()
/obj/machinery/librarycomp/emag_act(mob/user as mob)
/obj/machinery/computer/libraryconsole/bookmanagement/emag_act(mob/user as mob)
if(density && !emagged)
emagged = 1
/obj/machinery/librarycomp/Topic(href, href_list)
/obj/machinery/computer/libraryconsole/bookmanagement/Topic(href, href_list)
if(..())
usr << browse(null, "window=library")
onclose(usr, "library")
@@ -425,7 +438,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
src.updateUsrDialog()
return
/obj/machinery/librarycomp/say_quote(text)
/obj/machinery/computer/libraryconsole/bookmanagement/say_quote(text)
return "flashes, \"[text]\""