Fix conflicts

This commit is contained in:
Lzimann
2017-04-07 09:12:36 -03:00
825 changed files with 5432 additions and 6063 deletions
+1 -1
View File
@@ -48,7 +48,7 @@
if(!prob(correctness))
usedName += "x"
var/datum/devilinfo/devil = devilInfo(usedName, 0)
user << browse("Information on [devilName]<br><br><br>[lawlorify[LORE][devil.ban]]<br>[lawlorify[LORE][devil.bane]]<br>[lawlorify[LORE][devil.obligation]]<br>[lawlorify[LORE][devil.banish]]", "window=book[window_size != null ? ";size=[window_size]" : ""]")
user << 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]]", "window=book[window_size != null ? ";size=[window_size]" : ""]")
inUse = 0
sleep(10)
if(!prob(willpower))
+20 -20
View File
@@ -43,7 +43,7 @@
dat += "<A href='?src=\ref[src];setauthor=1'>Filter by Author: [author]</A><BR>"
dat += "<A href='?src=\ref[src];search=1'>\[Start Search\]</A><BR>"
if(1)
if (!dbcon.Connect())
if (!GLOB.dbcon.Connect())
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font><BR>"
else if(!SQLquery)
dat += "<font color=red><b>ERROR</b>: Malformed search request. Please contact your system administrator for assistance.</font><BR>"
@@ -51,7 +51,7 @@
dat += "<table>"
dat += "<tr><td>AUTHOR</td><td>TITLE</td><td>CATEGORY</td><td>SS<sup>13</sup>BN</td></tr>"
var/DBQuery/query_library_list_books = dbcon.NewQuery(SQLquery)
var/DBQuery/query_library_list_books = GLOB.dbcon.NewQuery(SQLquery)
if(!query_library_list_books.Execute())
dat += "<font color=red><b>ERROR</b>: Unable to retrieve book listings. Please contact your system administrator for assistance.</font><BR>"
while(query_library_list_books.NextRow())
@@ -128,16 +128,16 @@
var/author
var/category
var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
GLOBAL_LIST(cachedbooks) // List of our cached book datums
/proc/load_library_db_to_cache()
if(cachedbooks)
if(GLOB.cachedbooks)
return
if(!dbcon.Connect())
if(!GLOB.dbcon.Connect())
return
cachedbooks = list()
var/DBQuery/query_library_cache = dbcon.NewQuery("SELECT id, author, title, category FROM [format_table_name("library")] WHERE isnull(deleted)")
GLOB.cachedbooks = list()
var/DBQuery/query_library_cache = GLOB.dbcon.NewQuery("SELECT id, author, title, category FROM [format_table_name("library")] WHERE isnull(deleted)")
if(!query_library_cache.Execute())
return
while(query_library_cache.NextRow())
@@ -146,7 +146,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
newbook.author = query_library_cache.item[2]
newbook.title = query_library_cache.item[3]
newbook.category = query_library_cache.item[4]
cachedbooks += newbook
GLOB.cachedbooks += newbook
@@ -181,12 +181,12 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
if(libcomp_menu)
return
load_library_db_to_cache()
if(!cachedbooks)
if(!GLOB.cachedbooks)
return
libcomp_menu = list("")
for(var/i in 1 to cachedbooks.len)
var/datum/cachedbook/C = cachedbooks[i]
for(var/i in 1 to GLOB.cachedbooks.len)
var/datum/cachedbook/C = GLOB.cachedbooks[i]
var/page = round(i/250)+1
if (libcomp_menu.len < page)
libcomp_menu.len = page
@@ -257,7 +257,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
dat += "<h3>External Archive</h3>"
build_library_menu()
if(!cachedbooks)
if(!GLOB.cachedbooks)
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font>"
else
dat += "<A href='?src=\ref[src];orderbyid=1'>(Order book by SS<sup>13</sup>BN)</A><BR><BR>"
@@ -411,7 +411,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
if(scanner.cache)
var/choice = input("Are you certain you wish to upload this title to the Archive?") in list("Confirm", "Abort")
if(choice == "Confirm")
if (!dbcon.Connect())
if (!GLOB.dbcon.Connect())
alert("Connection to Archive has been severed. Aborting.")
else
@@ -419,7 +419,7 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
var/sqlauthor = sanitizeSQL(scanner.cache.author)
var/sqlcontent = sanitizeSQL(scanner.cache.dat)
var/sqlcategory = sanitizeSQL(upload_category)
var/DBQuery/query_library_upload = dbcon.NewQuery("INSERT INTO [format_table_name("library")] (author, title, content, category, ckey, datetime) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]', '[usr.ckey]', Now())")
var/DBQuery/query_library_upload = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("library")] (author, title, content, category, ckey, datetime) VALUES ('[sqlauthor]', '[sqltitle]', '[sqlcontent]', '[sqlcategory]', '[usr.ckey]', Now())")
if(!query_library_upload.Execute())
alert("Database error encountered uploading to Archive")
return
@@ -427,16 +427,16 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs")
alert("Upload Complete. Uploaded title will be unavailable for printing for a short period")
if(href_list["newspost"])
if(!news_network)
if(!GLOB.news_network)
alert("No news network found on station. Aborting.")
var/channelexists = 0
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
if(FC.channel_name == "Nanotrasen Book Club")
channelexists = 1
break
if(!channelexists)
news_network.CreateFeedChannel("Nanotrasen Book Club", "Library", null)
news_network.SubmitArticle(scanner.cache.dat, "[scanner.cache.name]", "Nanotrasen Book Club", null)
GLOB.news_network.CreateFeedChannel("Nanotrasen Book Club", "Library", null)
GLOB.news_network.SubmitArticle(scanner.cache.dat, "[scanner.cache.name]", "Nanotrasen Book Club", null)
alert("Upload complete. Your uploaded title is now available on station newscasters.")
if(href_list["orderbyid"])
if(cooldown > world.time)
@@ -449,13 +449,13 @@ var/global/list/datum/cachedbook/cachedbooks // List of our cached book datums
if(href_list["targetid"])
var/sqlid = sanitizeSQL(href_list["targetid"])
if (!dbcon.Connect())
if (!GLOB.dbcon.Connect())
alert("Connection to Archive has been severed. Aborting.")
if(cooldown > world.time)
say("Printer unavailable. Please allow a short time before attempting to print.")
else
cooldown = world.time + PRINTER_COOLDOWN
var/DBQuery/query_library_print = dbcon.NewQuery("SELECT * FROM [format_table_name("library")] WHERE id=[sqlid] AND isnull(deleted)")
var/DBQuery/query_library_print = GLOB.dbcon.NewQuery("SELECT * FROM [format_table_name("library")] WHERE id=[sqlid] AND isnull(deleted)")
if(!query_library_print.Execute())
say("PRINTER ERROR! Failed to print document (0x0000000F)")
return
+2 -2
View File
@@ -36,7 +36,7 @@
. = list()
if(!isnum(amount) || amount<1)
return
if (!dbcon.Connect())
if (!GLOB.dbcon.Connect())
if(fail_loud || prob(5))
var/obj/item/weapon/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>"
@@ -45,7 +45,7 @@
if(prob(25))
category = null
var/c = category? " AND category='[sanitizeSQL(category)]'" :""
var/DBQuery/query_get_random_books = dbcon.NewQuery("SELECT * FROM [format_table_name("library")] WHERE isnull(deleted)[c] GROUP BY title ORDER BY rand() LIMIT [amount];") // isdeleted copyright (c) not me
var/DBQuery/query_get_random_books = GLOB.dbcon.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)
+1 -1
View File
@@ -229,7 +229,7 @@
SSpersistence.chisel_messages -= src
. = ..()
/obj/structure/chisel_message/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = always_state)
/obj/structure/chisel_message/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.always_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)