Changed library consoles into actual computers.

This commit is contained in:
phil235
2014-12-30 17:11:20 +01:00
parent db192b0a5d
commit 9c5c01fb6f
7 changed files with 46 additions and 31 deletions

View File

@@ -573,7 +573,7 @@
"la" = (/obj/structure/table/wood,/obj/item/weapon/paper_bin{pixel_x = 1; pixel_y = 9},/obj/item/device/paicard,/obj/item/weapon/coin/silver,/obj/item/weapon/pen,/obj/machinery/light,/obj/item/weapon/storage/toolbox/mechanical,/turf/simulated/floor/plasteel{icon_state = "neutral"},/area/hallway/primary/central) "la" = (/obj/structure/table/wood,/obj/item/weapon/paper_bin{pixel_x = 1; pixel_y = 9},/obj/item/device/paicard,/obj/item/weapon/coin/silver,/obj/item/weapon/pen,/obj/machinery/light,/obj/item/weapon/storage/toolbox/mechanical,/turf/simulated/floor/plasteel{icon_state = "neutral"},/area/hallway/primary/central)
"lb" = (/obj/machinery/bookbinder,/turf/simulated/floor/plasteel{icon_state = "neutral"},/area/hallway/primary/central) "lb" = (/obj/machinery/bookbinder,/turf/simulated/floor/plasteel{icon_state = "neutral"},/area/hallway/primary/central)
"lc" = (/obj/machinery/libraryscanner,/turf/simulated/floor/plasteel{icon_state = "neutral"},/area/hallway/primary/central) "lc" = (/obj/machinery/libraryscanner,/turf/simulated/floor/plasteel{icon_state = "neutral"},/area/hallway/primary/central)
"ld" = (/obj/structure/table/wood,/obj/machinery/librarycomp{pixel_y = 0},/turf/simulated/floor/plasteel{icon_state = "neutral"; dir = 6},/area/hallway/primary/central) "ld" = (/obj/structure/table/wood,/obj/machinery/computer/libraryconsole{pixel_y = 0},/turf/simulated/floor/plasteel{icon_state = "neutral"; dir = 6},/area/hallway/primary/central)
"le" = (/obj/machinery/door/airlock/research{name = "Toxins Lab"; req_access_txt = "7"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/research{name = "Research Division"}) "le" = (/obj/machinery/door/airlock/research{name = "Toxins Lab"; req_access_txt = "7"},/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/research{name = "Research Division"})
"lf" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/machinery/vending/coffee,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/research{name = "Research Division"}) "lf" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/machinery/vending/coffee,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/research{name = "Research Division"})
"lg" = (/obj/machinery/vending/cigarette,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/research{name = "Research Division"}) "lg" = (/obj/machinery/vending/cigarette,/turf/simulated/floor/plasteel{icon_state = "white"},/area/medical/research{name = "Research Division"})

View File

@@ -39,7 +39,7 @@
"aaM" = (/obj/structure/closet/secure_closet/injection,/turf/simulated/floor/plasteel,/area/security/transfer) "aaM" = (/obj/structure/closet/secure_closet/injection,/turf/simulated/floor/plasteel,/area/security/transfer)
"aaN" = (/obj/structure/table,/obj/item/device/electropack,/turf/simulated/floor/plasteel,/area/security/transfer) "aaN" = (/obj/structure/table,/obj/item/device/electropack,/turf/simulated/floor/plasteel,/area/security/transfer)
"aaO" = (/obj/structure/table,/obj/item/weapon/screwdriver,/obj/item/weapon/wrench,/obj/item/clothing/head/helmet,/obj/item/device/assembly/signaler,/turf/simulated/floor/plasteel,/area/security/transfer) "aaO" = (/obj/structure/table,/obj/item/weapon/screwdriver,/obj/item/weapon/wrench,/obj/item/clothing/head/helmet,/obj/item/device/assembly/signaler,/turf/simulated/floor/plasteel,/area/security/transfer)
"aaP" = (/obj/machinery/librarycomp{pixel_y = 0},/obj/structure/table,/obj/machinery/newscaster{pixel_x = -32; pixel_y = 0},/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/security/prison) "aaP" = (/obj/machinery/computer/libraryconsole/bookmanagement{pixel_y = 0},/obj/structure/table,/obj/machinery/newscaster{pixel_x = -32; pixel_y = 0},/turf/simulated/floor/plasteel{icon_state = "floorgrime"},/area/security/prison)
"aaQ" = (/obj/structure/table,/obj/item/weapon/storage/pill_bottle/dice,/turf/simulated/floor/plasteel,/area/security/prison) "aaQ" = (/obj/structure/table,/obj/item/weapon/storage/pill_bottle/dice,/turf/simulated/floor/plasteel,/area/security/prison)
"aaR" = (/obj/structure/table,/obj/item/weapon/pen,/turf/simulated/floor/plasteel,/area/security/prison) "aaR" = (/obj/structure/table,/obj/item/weapon/pen,/turf/simulated/floor/plasteel,/area/security/prison)
"aaS" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel{icon_state = "barber"},/area/security/prison) "aaS" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plasteel{icon_state = "barber"},/area/security/prison)
@@ -2079,7 +2079,7 @@
"aNY" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor/fancy/carpet,/area/library) "aNY" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor/fancy/carpet,/area/library)
"aNZ" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/fancy/carpet,/area/library) "aNZ" = (/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor/fancy/carpet,/area/library)
"aOa" = (/obj/structure/bookcase{name = "bookcase (Reference)"},/turf/simulated/floor/wood,/area/library) "aOa" = (/obj/structure/bookcase{name = "bookcase (Reference)"},/turf/simulated/floor/wood,/area/library)
"aOb" = (/obj/machinery/librarypubliccomp,/obj/structure/table/wood,/turf/simulated/floor/wood,/area/library) "aOb" = (/obj/machinery/computer/libraryconsole,/obj/structure/table/wood,/turf/simulated/floor/wood,/area/library)
"aOc" = (/obj/structure/bookcase{name = "Forbidden Knowledge"},/turf/simulated/floor/plasteel{icon_state = "cult"; dir = 2},/area/library) "aOc" = (/obj/structure/bookcase{name = "Forbidden Knowledge"},/turf/simulated/floor/plasteel{icon_state = "cult"; dir = 2},/area/library)
"aOd" = (/obj/structure/table/wood,/obj/item/device/taperecorder{pixel_y = 0},/obj/item/device/camera,/obj/item/device/radio/intercom{pixel_y = 25},/turf/simulated/floor/plasteel{icon_state = "cult"; dir = 2},/area/library) "aOd" = (/obj/structure/table/wood,/obj/item/device/taperecorder{pixel_y = 0},/obj/item/device/camera,/obj/item/device/radio/intercom{pixel_y = 25},/turf/simulated/floor/plasteel{icon_state = "cult"; dir = 2},/area/library)
"aOe" = (/obj/structure/table/wood,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/pen/invisible,/turf/simulated/floor/plasteel{icon_state = "cult"; dir = 2},/area/library) "aOe" = (/obj/structure/table/wood,/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/pen/invisible,/turf/simulated/floor/plasteel{icon_state = "cult"; dir = 2},/area/library)
@@ -2289,7 +2289,7 @@
"aSa" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 9},/turf/simulated/floor/plasteel,/area/hydroponics) "aSa" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 9},/turf/simulated/floor/plasteel,/area/hydroponics)
"aSb" = (/obj/machinery/door/window/northright{base_state = "right"; dir = 8; icon_state = "right"; name = "Library Desk Door"; req_access_txt = "37"},/obj/machinery/status_display{density = 0; layer = 3; pixel_x = 0; pixel_y = 32},/turf/simulated/floor/wood,/area/library) "aSb" = (/obj/machinery/door/window/northright{base_state = "right"; dir = 8; icon_state = "right"; name = "Library Desk Door"; req_access_txt = "37"},/obj/machinery/status_display{density = 0; layer = 3; pixel_x = 0; pixel_y = 32},/turf/simulated/floor/wood,/area/library)
"aSc" = (/obj/machinery/newscaster{pixel_y = 32},/turf/simulated/floor/wood,/area/library) "aSc" = (/obj/machinery/newscaster{pixel_y = 32},/turf/simulated/floor/wood,/area/library)
"aSd" = (/obj/structure/table/wood,/obj/machinery/librarycomp{pixel_y = 0},/obj/machinery/light_switch{pixel_y = 28},/turf/simulated/floor/wood,/area/library) "aSd" = (/obj/structure/table/wood,/obj/machinery/computer/libraryconsole/bookmanagement{pixel_y = 0},/obj/machinery/light_switch{pixel_y = 28},/turf/simulated/floor/wood,/area/library)
"aSe" = (/obj/machinery/light{dir = 8},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/chapel/main) "aSe" = (/obj/machinery/light{dir = 8},/turf/simulated/floor/plasteel{icon_state = "dark"},/area/chapel/main)
"aSf" = (/obj/structure/stool,/obj/effect/landmark/start{name = "Assistant"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "chapel"},/area/chapel/main) "aSf" = (/obj/structure/stool,/obj/effect/landmark/start{name = "Assistant"},/turf/simulated/floor/plasteel{dir = 8; icon_state = "chapel"},/area/chapel/main)
"aSg" = (/obj/structure/stool,/turf/simulated/floor/plasteel{icon_state = "chapel"},/area/chapel/main) "aSg" = (/obj/structure/stool,/turf/simulated/floor/plasteel{icon_state = "chapel"},/area/chapel/main)

View File

@@ -238,6 +238,10 @@
name = "circuit board (Slot Machine)" name = "circuit board (Slot Machine)"
build_path = /obj/machinery/computer/slot_machine build_path = /obj/machinery/computer/slot_machine
origin_tech = "programming=1" origin_tech = "programming=1"
/obj/item/weapon/circuitboard/libraryconsole
name = "circuit board (Book Inventory Management Console)"
build_path = /obj/machinery/computer/libraryconsole/bookmanagement
origin_tech = "programming=1"
/obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob) /obj/item/weapon/circuitboard/supplycomp/attackby(obj/item/I as obj, mob/user as mob)
@@ -274,6 +278,18 @@
user << "<span class='notice'>Defaulting access protocols.</span>" user << "<span class='notice'>Defaulting access protocols.</span>"
return return
/obj/item/weapon/circuitboard/libraryconsole/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/screwdriver))
if(build_path == /obj/machinery/computer/libraryconsole/bookmanagement)
name = "circuit board (Library Visitor Console)"
build_path = /obj/machinery/computer/libraryconsole
user << "<span class='notice'>Defaulting access protocols.</span>"
else
name = "circuit board (Book Inventory Management Console)"
build_path = /obj/machinery/computer/libraryconsole/bookmanagement
user << "<span class='notice'>Access protocols successfully updated.</span>"
return
/obj/item/weapon/circuitboard/shuttle/attackby(obj/item/I as obj, mob/user as mob) /obj/item/weapon/circuitboard/shuttle/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/multitool)) if(istype(I, /obj/item/device/multitool))
var/chosen_id = round(input(usr, "Choose an ID number:", "Input an Integer", null) as num|null) var/chosen_id = round(input(usr, "Choose an ID number:", "Input an Integer", null) as num|null)

View File

@@ -280,7 +280,7 @@
throw_speed = 3 throw_speed = 3
throw_range = 5 throw_range = 5
w_class = 1.0 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/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 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

View File

@@ -17,23 +17,27 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/getdate var/getdate
var/duedate var/duedate
/* /*
* Library Public Computer * Library Public Computer
*/ */
/obj/machinery/librarypubliccomp /obj/machinery/computer/libraryconsole
name = "library visitor console" name = "library visitor console"
icon = 'icons/obj/library.dmi' icon = 'icons/obj/computer.dmi'
icon_state = "computer" icon_state = "library"
anchored = 1 circuit = /obj/item/weapon/circuitboard/libraryconsole
density = 1
var/screenstate = 0 var/screenstate = 0
var/title var/title
var/category = "Any" var/category = "Any"
var/author var/author
var/SQLquery var/SQLquery
/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob) /obj/machinery/computer/libraryconsole/attack_hand(var/mob/user as mob)
usr.set_machine(src) if(..())
return
interact(user)
/obj/machinery/computer/libraryconsole/interact(mob/user)
var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'> var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
switch(screenstate) switch(screenstate)
if(0) if(0)
@@ -63,14 +67,13 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td>[id]</td></tr>" dat += "<tr><td>[author]</td><td>[title]</td><td>[category]</td><td>[id]</td></tr>"
dat += "</table><BR>" dat += "</table><BR>"
dat += "<A href='?src=\ref[src];back=1'>\[Go Back\]</A><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) var/datum/browser/popup = new(user, "publiclibrary", name, 600, 400)
popup.set_content(dat) popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open() popup.open()
/obj/machinery/librarypubliccomp/Topic(href, href_list) /obj/machinery/computer/libraryconsole/Topic(href, href_list)
. = ..()
if(..()) if(..())
usr << browse(null, "window=publiclibrary") usr << browse(null, "window=publiclibrary")
onclose(usr, "publiclibrary") onclose(usr, "publiclibrary")
@@ -85,11 +88,14 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
title = sanitizeSQL(title) title = sanitizeSQL(title)
if(href_list["setcategory"]) if(href_list["setcategory"])
var/newcategory = input("Choose a category to search for:") in list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion") var/newcategory = input("Choose a category to search for:") in list("Any", "Fiction", "Non-Fiction", "Adult", "Reference", "Religion")
world <<"DEBUG: [category], [newcategory]"
if(newcategory) if(newcategory)
category = sanitize(newcategory) category = sanitize(newcategory)
else else
category = "Any" category = "Any"
world <<"DEBUG: [category], [newcategory]"
category = sanitizeSQL(category) category = sanitizeSQL(category)
world <<"DEBUG: [category], [newcategory]"
if(href_list["setauthor"]) if(href_list["setauthor"])
var/newauthor = input("Enter an author to search for:") as text|null var/newauthor = input("Enter an author to search for:") as text|null
if(newauthor) if(newauthor)
@@ -118,14 +124,10 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
*/ */
// TODO: Make this an actual /obj/machinery/computer that can be crafted from circuit boards and such // 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 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.
/obj/machinery/librarycomp /obj/machinery/computer/libraryconsole/bookmanagement
name = "book inventory management console" name = "book inventory management console"
icon = 'icons/obj/library.dmi'
icon_state = "computer"
anchored = 1
density = 1
var/arcanecheckout = 0 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_book
var/buffer_mob var/buffer_mob
var/upload_category = "Fiction" var/upload_category = "Fiction"
@@ -136,8 +138,8 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl var/bibledelay = 0 // LOL NO SPAM (1 minute delay) -- Doohl
/obj/machinery/librarycomp/attack_hand(var/mob/user as mob)
usr.set_machine(src) /obj/machinery/computer/libraryconsole/bookmanagement/interact(mob/user)
var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'> var/dat = "" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
switch(screenstate) switch(screenstate)
if(0) if(0)
@@ -237,15 +239,12 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
dat += "<A href='?src=\ref[src];arccheckout=1'>Yes.</A><BR>" 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[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) var/datum/browser/popup = new(user, "library", name, 600, 400)
popup.set_content(dat) popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.open() 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)) if(istype(W, /obj/item/weapon/barcodescanner))
var/obj/item/weapon/barcodescanner/scanner = W var/obj/item/weapon/barcodescanner/scanner = W
scanner.computer = src scanner.computer = src
@@ -254,11 +253,11 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
else else
..() ..()
/obj/machinery/librarycomp/emag_act(mob/user as mob) /obj/machinery/computer/libraryconsole/bookmanagement/emag_act(mob/user as mob)
if(density && !emagged) if(density && !emagged)
emagged = 1 emagged = 1
/obj/machinery/librarycomp/Topic(href, href_list) /obj/machinery/computer/libraryconsole/bookmanagement/Topic(href, href_list)
if(..()) if(..())
usr << browse(null, "window=library") usr << browse(null, "window=library")
onclose(usr, "library") onclose(usr, "library")
@@ -394,7 +393,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
src.updateUsrDialog() src.updateUsrDialog()
return return
/obj/machinery/librarycomp/say_quote(text) /obj/machinery/computer/libraryconsole/bookmanagement/say_quote(text)
return "flashes, \"[text]\"" return "flashes, \"[text]\""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 22 KiB