here we go again (#2456)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#define MULTIPLE_SYLLABLE 4
|
||||
#define SUFFIX 5
|
||||
|
||||
/obj/item/weapon/book/codex_gigas
|
||||
/obj/item/book/codex_gigas
|
||||
name = "\improper Codex Gigas"
|
||||
desc = "A book documenting the nature of devils."
|
||||
icon_state ="demonomicon"
|
||||
@@ -18,7 +18,7 @@
|
||||
var/currentName = ""
|
||||
var/currentSection = PRE_TITLE
|
||||
|
||||
/obj/item/weapon/book/codex_gigas/attack_self(mob/user)
|
||||
/obj/item/book/codex_gigas/attack_self(mob/user)
|
||||
if(is_blind(user))
|
||||
to_chat(user, "<span class='warning'>As you are trying to read, you suddenly feel very stupid.</span>")
|
||||
return
|
||||
@@ -36,7 +36,7 @@
|
||||
ask_name(user)
|
||||
|
||||
|
||||
/obj/item/weapon/book/codex_gigas/proc/perform_research(mob/user, devilName)
|
||||
/obj/item/book/codex_gigas/proc/perform_research(mob/user, devilName)
|
||||
if(!devilName)
|
||||
user.visible_message("[user] closes [title] without looking anything up.")
|
||||
return
|
||||
@@ -60,13 +60,13 @@
|
||||
onclose(user, "book")
|
||||
inUse = FALSE
|
||||
|
||||
/obj/item/weapon/book/codex_gigas/proc/display_devil(datum/antagonist/devil/devil, mob/reader, devilName)
|
||||
/obj/item/book/codex_gigas/proc/display_devil(datum/antagonist/devil/devil, mob/reader, devilName)
|
||||
reader << browse("Information on [devilName]<br><br><br>[GLOB.lawlorify[LORE][devil.ban]]<br>[GLOB.lawlorify[LORE][devil.bane]]<br>[GLOB.lawlorify[LORE][devil.obligation]]<br>[GLOB.lawlorify[LORE][devil.banish]]<br>[devil.ascendable?"This devil may ascend given enough souls.":""]", "window=book[window_size != null ? ";size=[window_size]" : ""]")
|
||||
|
||||
/obj/item/weapon/book/codex_gigas/proc/ask_name(mob/reader)
|
||||
/obj/item/book/codex_gigas/proc/ask_name(mob/reader)
|
||||
ui_interact(reader)
|
||||
|
||||
/obj/item/weapon/book/codex_gigas/ui_act(action, params)
|
||||
/obj/item/book/codex_gigas/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(!action)
|
||||
@@ -93,14 +93,14 @@
|
||||
currentSection = SUFFIX
|
||||
return currentSection != oldSection
|
||||
|
||||
/obj/item/weapon/book/codex_gigas/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
/obj/item/book/codex_gigas/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "codex_gigas", name, 450, 450, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/weapon/book/codex_gigas/ui_data(mob/user)
|
||||
/obj/item/book/codex_gigas/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["name"]=currentName
|
||||
data["currentSection"]=currentSection
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
max_integrity = 200
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0)
|
||||
var/state = 0
|
||||
var/list/allowed_books = list(/obj/item/weapon/book, /obj/item/weapon/spellbook, /obj/item/weapon/storage/book) //Things allowed in the bookcase
|
||||
var/list/allowed_books = list(/obj/item/book, /obj/item/spellbook, /obj/item/storage/book) //Things allowed in the bookcase
|
||||
|
||||
|
||||
/obj/structure/bookcase/Initialize(mapload)
|
||||
@@ -32,7 +32,7 @@
|
||||
icon_state = "book-0"
|
||||
anchored = TRUE
|
||||
for(var/obj/item/I in loc)
|
||||
if(istype(I, /obj/item/weapon/book))
|
||||
if(istype(I, /obj/item/book))
|
||||
I.loc = src
|
||||
update_icon()
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
/obj/structure/bookcase/attackby(obj/item/I, mob/user, params)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
if(istype(I, /obj/item/weapon/crowbar))
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You pry the frame apart.</span>")
|
||||
@@ -60,7 +60,7 @@
|
||||
to_chat(user, "<span class='notice'>You add a shelf.</span>")
|
||||
state = 2
|
||||
icon_state = "book-0"
|
||||
if(istype(I, /obj/item/weapon/wrench))
|
||||
if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You unwrench the frame.</span>")
|
||||
anchored = FALSE
|
||||
@@ -72,20 +72,20 @@
|
||||
return
|
||||
I.loc = src
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/weapon/storage/bag/books))
|
||||
var/obj/item/weapon/storage/bag/books/B = I
|
||||
else if(istype(I, /obj/item/storage/bag/books))
|
||||
var/obj/item/storage/bag/books/B = I
|
||||
for(var/obj/item/T in B.contents)
|
||||
if(istype(T, /obj/item/weapon/book) || istype(T, /obj/item/weapon/spellbook))
|
||||
if(istype(T, /obj/item/book) || istype(T, /obj/item/spellbook))
|
||||
B.remove_from_storage(T, src)
|
||||
to_chat(user, "<span class='notice'>You empty \the [I] into \the [src].</span>")
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/weapon/pen))
|
||||
else if(istype(I, /obj/item/pen))
|
||||
var/newname = stripped_input(user, "What would you like to title this bookshelf?")
|
||||
if(!newname)
|
||||
return
|
||||
else
|
||||
name = ("bookcase ([sanitize(newname)])")
|
||||
else if(istype(I, /obj/item/weapon/crowbar))
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
if(contents.len)
|
||||
to_chat(user, "<span class='warning'>You need to remove the books first!</span>")
|
||||
else
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
/obj/structure/bookcase/attack_hand(mob/user)
|
||||
if(contents.len)
|
||||
var/obj/item/weapon/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
|
||||
var/obj/item/book/choice = input("Which book would you like to remove from the shelf?") as null|obj in contents
|
||||
if(choice)
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
return
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
/obj/structure/bookcase/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/mineral/wood(loc, 4)
|
||||
for(var/obj/item/weapon/book/B in contents)
|
||||
for(var/obj/item/book/B in contents)
|
||||
B.forceMove(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
/obj/structure/bookcase/manuals/medical/New()
|
||||
..()
|
||||
new /obj/item/weapon/book/manual/medical_cloning(src)
|
||||
new /obj/item/book/manual/medical_cloning(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -140,12 +140,12 @@
|
||||
|
||||
/obj/structure/bookcase/manuals/engineering/New()
|
||||
..()
|
||||
new /obj/item/weapon/book/manual/wiki/engineering_construction(src)
|
||||
new /obj/item/weapon/book/manual/engineering_particle_accelerator(src)
|
||||
new /obj/item/weapon/book/manual/wiki/engineering_hacking(src)
|
||||
new /obj/item/weapon/book/manual/wiki/engineering_guide(src)
|
||||
new /obj/item/weapon/book/manual/engineering_singularity_safety(src)
|
||||
new /obj/item/weapon/book/manual/robotics_cyborgs(src)
|
||||
new /obj/item/book/manual/wiki/engineering_construction(src)
|
||||
new /obj/item/book/manual/engineering_particle_accelerator(src)
|
||||
new /obj/item/book/manual/wiki/engineering_hacking(src)
|
||||
new /obj/item/book/manual/wiki/engineering_guide(src)
|
||||
new /obj/item/book/manual/engineering_singularity_safety(src)
|
||||
new /obj/item/book/manual/robotics_cyborgs(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -154,14 +154,14 @@
|
||||
|
||||
/obj/structure/bookcase/manuals/research_and_development/New()
|
||||
..()
|
||||
new /obj/item/weapon/book/manual/research_and_development(src)
|
||||
new /obj/item/book/manual/research_and_development(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/*
|
||||
* Book
|
||||
*/
|
||||
/obj/item/weapon/book
|
||||
/obj/item/book
|
||||
name = "book"
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state ="book"
|
||||
@@ -177,7 +177,7 @@
|
||||
var/title //The real name of the book.
|
||||
var/window_size = null // Specific window size for the book, i.e: "1920x1080", Size x Width
|
||||
|
||||
/obj/item/weapon/book/attack_self(mob/user)
|
||||
/obj/item/book/attack_self(mob/user)
|
||||
if(is_blind(user))
|
||||
to_chat(user, "<span class='warning'>As you are trying to read, you suddenly feel very stupid!</span>")
|
||||
return
|
||||
@@ -192,8 +192,8 @@
|
||||
to_chat(user, "<span class='notice'>This book is completely blank!</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/book/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/pen))
|
||||
/obj/item/book/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/pen))
|
||||
if(is_blind(user))
|
||||
to_chat(user, "<span class='warning'> As you are trying to write on the book, you suddenly feel very stupid!</span>")
|
||||
return
|
||||
@@ -230,8 +230,8 @@
|
||||
else
|
||||
return
|
||||
|
||||
else if(istype(I, /obj/item/weapon/barcodescanner))
|
||||
var/obj/item/weapon/barcodescanner/scanner = I
|
||||
else if(istype(I, /obj/item/barcodescanner))
|
||||
var/obj/item/barcodescanner/scanner = I
|
||||
if(!scanner.computer)
|
||||
to_chat(user, "[I]'s screen flashes: 'No associated computer found!'")
|
||||
else
|
||||
@@ -253,18 +253,18 @@
|
||||
to_chat(user, "[I]'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)
|
||||
for(var/obj/item/book in scanner.computer.inventory)
|
||||
if(book == src)
|
||||
to_chat(user, "[I]'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, "[I]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'")
|
||||
|
||||
else if(istype(I, /obj/item/weapon/kitchen/knife) || istype(I, /obj/item/weapon/wirecutters))
|
||||
else if(istype(I, /obj/item/kitchen/knife) || istype(I, /obj/item/wirecutters))
|
||||
to_chat(user, "<span class='notice'>You begin to carve out [title]...</span>")
|
||||
if(do_after(user, 30, target = src))
|
||||
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
|
||||
var/obj/item/weapon/storage/book/B = new
|
||||
var/obj/item/storage/book/B = new
|
||||
B.name = src.name
|
||||
B.title = src.title
|
||||
B.icon_state = src.icon_state
|
||||
@@ -284,7 +284,7 @@
|
||||
/*
|
||||
* Barcode Scanner
|
||||
*/
|
||||
/obj/item/weapon/barcodescanner
|
||||
/obj/item/barcodescanner
|
||||
name = "barcode scanner"
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state ="scanner"
|
||||
@@ -292,10 +292,10 @@
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
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/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
|
||||
|
||||
/obj/item/weapon/barcodescanner/attack_self(mob/user)
|
||||
/obj/item/barcodescanner/attack_self(mob/user)
|
||||
mode += 1
|
||||
if(mode > 3)
|
||||
mode = 0
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
icon_state = "oldcomp"
|
||||
icon_screen = "library"
|
||||
icon_keyboard = null
|
||||
circuit = /obj/item/weapon/circuitboard/computer/libraryconsole
|
||||
circuit = /obj/item/circuitboard/computer/libraryconsole
|
||||
var/screenstate = 0
|
||||
var/title
|
||||
var/category = "Any"
|
||||
@@ -220,7 +220,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
if(1)
|
||||
// Inventory
|
||||
dat += "<H3>Inventory</H3><BR>"
|
||||
for(var/obj/item/weapon/book/b in inventory)
|
||||
for(var/obj/item/book/b in inventory)
|
||||
dat += "[b.name] <A href='?src=\ref[src];delbook=\ref[b]'>(Delete)</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];switchscreen=0'>(Return to main menu)</A><BR>"
|
||||
if(2)
|
||||
@@ -322,16 +322,16 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
var/spook = pick("blood", "brass")
|
||||
var/turf/T = get_turf(src)
|
||||
if(spook == "blood")
|
||||
new /obj/item/weapon/tome(T)
|
||||
new /obj/item/tome(T)
|
||||
else
|
||||
new /obj/item/clockwork/slab(T)
|
||||
|
||||
to_chat(user, "<span class='warning'>Your sanity barely endures the seconds spent in the vault's browsing window. The only thing to remind you of this when you stop browsing is a [spook == "blood" ? "dusty old tome" : "strange metal tablet"] sitting on the desk. You don't really remember printing it.[spook == "brass" ? " And how did it print something made of metal?" : ""]</span>")
|
||||
user.visible_message("[user] stares at the blank screen for a few moments, [user.p_their()] expression frozen in fear. When [user.p_they()] finally awaken[user.p_s()] from it, [user.p_they()] look[user.p_s()] a lot older.", 2)
|
||||
|
||||
/obj/machinery/computer/libraryconsole/bookmanagement/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/barcodescanner))
|
||||
var/obj/item/weapon/barcodescanner/scanner = W
|
||||
/obj/machinery/computer/libraryconsole/bookmanagement/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/barcodescanner))
|
||||
var/obj/item/barcodescanner/scanner = W
|
||||
scanner.computer = src
|
||||
to_chat(user, "[scanner]'s associated machine has been set to [src].")
|
||||
audible_message("[src] lets out a low, short blip.")
|
||||
@@ -395,7 +395,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
if(b && istype(b))
|
||||
checkouts.Remove(b)
|
||||
if(href_list["delbook"])
|
||||
var/obj/item/weapon/book/b = locate(href_list["delbook"]) in inventory
|
||||
var/obj/item/book/b = locate(href_list["delbook"]) in inventory
|
||||
if(b && istype(b))
|
||||
inventory.Remove(b)
|
||||
if(href_list["setauthor"])
|
||||
@@ -463,7 +463,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
var/author = query_library_print.item[2]
|
||||
var/title = query_library_print.item[3]
|
||||
var/content = query_library_print.item[4]
|
||||
var/obj/item/weapon/book/B = new(get_turf(src))
|
||||
var/obj/item/book/B = new(get_turf(src))
|
||||
B.name = "Book: [title]"
|
||||
B.title = title
|
||||
B.author = author
|
||||
@@ -473,7 +473,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
break
|
||||
if(href_list["printbible"])
|
||||
if(cooldown < world.time)
|
||||
var/obj/item/weapon/storage/book/bible/B = new /obj/item/weapon/storage/book/bible(src.loc)
|
||||
var/obj/item/storage/book/bible/B = new /obj/item/storage/book/bible(src.loc)
|
||||
if(SSreligion.bible_icon_state && SSreligion.bible_item_state)
|
||||
B.icon_state = SSreligion.bible_icon_state
|
||||
B.item_state = SSreligion.bible_item_state
|
||||
@@ -484,7 +484,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
say("Printer currently unavailable, please wait a moment.")
|
||||
if(href_list["printposter"])
|
||||
if(cooldown < world.time)
|
||||
new /obj/item/weapon/poster/random_official(src.loc)
|
||||
new /obj/item/poster/random_official(src.loc)
|
||||
cooldown = world.time + PRINTER_COOLDOWN
|
||||
else
|
||||
say("Printer currently unavailable, please wait a moment.")
|
||||
@@ -500,10 +500,10 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
icon_state = "bigscanner"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
var/obj/item/weapon/book/cache // Last scanned book
|
||||
var/obj/item/book/cache // Last scanned book
|
||||
|
||||
/obj/machinery/libraryscanner/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/book))
|
||||
if(istype(O, /obj/item/book))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
O.loc = src
|
||||
@@ -534,13 +534,13 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
return
|
||||
|
||||
if(href_list["scan"])
|
||||
for(var/obj/item/weapon/book/B in contents)
|
||||
for(var/obj/item/book/B in contents)
|
||||
cache = B
|
||||
break
|
||||
if(href_list["clear"])
|
||||
cache = null
|
||||
if(href_list["eject"])
|
||||
for(var/obj/item/weapon/book/B in contents)
|
||||
for(var/obj/item/book/B in contents)
|
||||
B.loc = src.loc
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
@@ -559,14 +559,14 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
var/busy = FALSE
|
||||
|
||||
/obj/machinery/bookbinder/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(istype(O, /obj/item/paper))
|
||||
bind_book(user, O)
|
||||
else if(default_unfasten_wrench(user, O))
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/bookbinder/proc/bind_book(mob/user, obj/item/weapon/paper/P)
|
||||
/obj/machinery/bookbinder/proc/bind_book(mob/user, obj/item/paper/P)
|
||||
if(stat)
|
||||
return
|
||||
if(busy)
|
||||
@@ -583,7 +583,7 @@ GLOBAL_LIST(cachedbooks) // List of our cached book datums
|
||||
if(P)
|
||||
if(!stat)
|
||||
visible_message("[src] whirs as it prints and binds a new book.")
|
||||
var/obj/item/weapon/book/B = new(src.loc)
|
||||
var/obj/item/book/B = new(src.loc)
|
||||
B.dat = P.info
|
||||
B.name = "Print Job #" + "[rand(100, 999)]"
|
||||
B.icon_state = "book[rand(1,7)]"
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/obj/item/weapon/book/manual/random/Initialize()
|
||||
/obj/item/book/manual/random/Initialize()
|
||||
. = ..()
|
||||
var/static/banned_books = list(/obj/item/weapon/book/manual/random, /obj/item/weapon/book/manual/nuclear, /obj/item/weapon/book/manual/wiki)
|
||||
var/newtype = pick(subtypesof(/obj/item/weapon/book/manual) - banned_books)
|
||||
var/static/banned_books = list(/obj/item/book/manual/random, /obj/item/book/manual/nuclear, /obj/item/book/manual/wiki)
|
||||
var/newtype = pick(subtypesof(/obj/item/book/manual) - banned_books)
|
||||
new newtype(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/book/random
|
||||
/obj/item/book/random
|
||||
var/amount = 1
|
||||
var/category = null
|
||||
|
||||
/obj/item/weapon/book/random/Initialize()
|
||||
/obj/item/book/random/Initialize()
|
||||
. = ..()
|
||||
create_random_books(amount, src.loc, TRUE, category)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/book/random/triple
|
||||
/obj/item/book/random/triple
|
||||
amount = 3
|
||||
|
||||
/obj/structure/bookcase/random
|
||||
@@ -38,7 +38,7 @@
|
||||
return
|
||||
if (!SSdbcore.Connect())
|
||||
if(fail_loud || prob(5))
|
||||
var/obj/item/weapon/paper/P = new(location)
|
||||
var/obj/item/paper/P = new(location)
|
||||
P.info = "There once was a book from Nantucket<br>But the database failed us, so f*$! it.<br>I tried to be good to you<br>Now this is an I.O.U<br>If you're feeling entitled, well, stuff it!<br><br><font color='gray'>~</font>"
|
||||
P.update_icon()
|
||||
return
|
||||
@@ -48,7 +48,7 @@
|
||||
var/datum/DBQuery/query_get_random_books = SSdbcore.NewQuery("SELECT * FROM [format_table_name("library")] WHERE isnull(deleted)[c] GROUP BY title ORDER BY rand() LIMIT [amount];") // isdeleted copyright (c) not me
|
||||
if(query_get_random_books.Execute())
|
||||
while(query_get_random_books.NextRow())
|
||||
var/obj/item/weapon/book/B = new(location)
|
||||
var/obj/item/book/B = new(location)
|
||||
. += B
|
||||
B.author = query_get_random_books.item[2]
|
||||
B.title = query_get_random_books.item[3]
|
||||
@@ -80,4 +80,4 @@
|
||||
. = ..()
|
||||
while(book_count > 0 && prob(ref_book_prob))
|
||||
book_count--
|
||||
new /obj/item/weapon/book/manual/random(src)
|
||||
new /obj/item/book/manual/random(src)
|
||||
|
||||
Reference in New Issue
Block a user