diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 641a2e77..05e12878 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -40,6 +40,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
// 8 = view messages
// 9 = authentication before sending
// 10 = send announcement
+ // 11 = form database
var/silent = 0 // set to 1 for it not to beep all the time
// var/hackState = 0
// 0 = not hacked
@@ -54,6 +55,9 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/message = "";
var/dpt = ""; //the department which will be receiving the message
var/priority = -1 ; //Priority of the message being sent
+ var/SQLquery
+ var/paperstock = 10
+ var/lid = 0
luminosity = 0
/obj/machinery/requests_console/power_change()
@@ -187,6 +191,38 @@ var/list/obj/machinery/requests_console/allConsoles = list()
dat += text("Announce
");
dat += text("
Back
")
+ if(11) //form database
+ dat += text("NanoTrasen Corporate Forms
")
+
+ establish_db_connection()
+
+ if(!dbcon.IsConnected())
+ dat += text("ERROR: Unable to contact external database. Please contact your system administrator for assistance.")
+ else
+ dat += {"
+ | NCF ID | Form Name | | |
"}
+
+ //For reference:
+ //Command forms, 01xx series
+ //Security forms, 02xx series
+ //Medical forms, 03xx series
+ //Engineer forms, 04xx series
+ //Science forms, 05xx series
+ //Supply forms, 06xx series
+ //General forms, 10xx series
+
+ var/DBQuery/query = dbcon.NewQuery(SQLquery)
+ query.Execute()
+
+ while(query.NextRow())
+ var/id = query.item[1]
+ var/name = query.item[2]
+ var/department = query.item[3]
+ dat += "| NCF-[id] | [name] | [department] | Print |
"
+ dat += "
"
+ dat += text("
Reset Search")
+ dat += text("
Back
")
+
else //main menu
screen = 0
announceAuth = 0
@@ -198,13 +234,22 @@ var/list/obj/machinery/requests_console/allConsoles = list()
dat += text("Request Assistance
")
dat += text("Request Supplies
")
- dat += text("Relay Anonymous Information
")
+ dat += text("Relay Anonymous Information
")
+ dat += text("NanoTrasen Corporate Form Database
")
if(announcementConsole)
dat += text("Send station-wide announcement
")
if (silent)
dat += text("Speaker OFF")
else
dat += text("Speaker ON")
+ if(paperstock)
+ dat += text("
[paperstock] papers in stock.")
+ else
+ dat += text("
No paper in stock.")
+ if(lid)
+ dat += text("
Paper container lid OPEN.")
+ else
+ dat += text("
Paper container lid CLOSE.")
user << browse("[dat]", "window=request_console")
onclose(user, "req_console")
@@ -314,6 +359,57 @@ var/list/obj/machinery/requests_console/allConsoles = list()
for (var/mob/O in hearers(4, src.loc))
O.show_message(text("\icon[src] *The Requests Console beeps: 'NOTICE: No server detected!'"))
+ if(href_list["sort"])
+ var/sortdep = sanitizeSQL(href_list["sort"])
+ SQLquery += " WHERE department LIKE '%[sortdep]%'"
+ screen = 11
+
+ if(href_list["print"])
+ var/printid = sanitizeSQL(href_list["print"])
+ establish_db_connection()
+
+ if(!dbcon.IsConnected())
+ alert("Connection to the database lost. Aborting.")
+ var/DBQuery/query = dbcon.NewQuery("SELECT id, name, data FROM aurora_forms WHERE id=[printid]")
+ query.Execute()
+
+ while(query.NextRow())
+ var/id = query.item[1]
+ var/name = query.item[2]
+ var/data = query.item[3]
+ var/obj/item/weapon/paper/C = new(src.loc)
+
+ //Let's start the BB >> HTML conversion!
+
+ data = html_encode(data)
+ data = replacetext(data, "\n", "
")
+
+ C.info += data
+ C.info = C.parsepencode(C.info)
+ C.updateinfolinks()
+ C.name = "NFC-[id] - [name]"
+
+/* WIP, finish in a further update.
+
+ if(href_list["info"])
+ var/whatisname = sanitizeSQL(href_list["info"])
+ establish_db_connection()
+
+ if(!dbcon.IsConnected())
+ alert("Connection to the database lost. Aborting.")
+ var/DBQuery/query = dbcon.NewQuery("SELECT id, name, department, info FROM aurora_forms WHERE name=[whatisname]")
+ query.Execute()
+
+ while(query.NextRow())
+ var/id = query.item[1]
+ var/name = query.item[2]
+ var/department = query.item[3]
+ var/info = query.item[1]
+*/
+ switch( href_list["setLid"] )
+ if(null) //skip
+ if("1") lid = 1
+ else lid = 0
//Handle screen switching
switch(text2num(href_list["setScreen"]))
@@ -339,6 +435,9 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(10) //send announcement
if(!announcementConsole) return
screen = 10
+ if(11) //form database
+ SQLquery = "SELECT id, name, department FROM aurora_forms"
+ screen = 11
else //main menu
dpt = ""
msgVerified = ""
@@ -398,8 +497,25 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/obj/item/weapon/stamp/T = O
msgStamped = text("Stamped with the [T.name]")
updateUsrDialog()
+ if (istype(O, /obj/item/weapon/paper_bundle))
+ if(lid) //More of that restocking business
+ var/obj/item/weapon/paper_bundle/C = O
+ paperstock += C.amount
+ user.drop_item(C)
+ del(C)
+ for (var/mob/U in hearers(4, src.loc))
+ U.show_message(text("\icon[src] *The Requests Console beeps: 'Paper added.'"))
+ else
+ user << "\blue I should open the lid to add more paper, or try faxing one paper at a time."
if (istype(O, /obj/item/weapon/paper))
- if(screen == 0)
+ if(lid) //Stocking them papers
+ var/obj/item/weapon/paper/C = O
+ user.drop_item(C)
+ del(C)
+ paperstock++
+ for (var/mob/U in hearers(4, src.loc))
+ U.show_message(text("\icon[src] *The Requests Console beeps: 'Paper added.'"))
+ else if(screen == 0) //Faxing them papers
var/pass = 0
var/sendto = input("Select department.", "Send Fax", null, null) in allConsoles
@@ -411,6 +527,9 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/sent = 0
for (var/obj/machinery/requests_console/Console in world)
if (Console == sendto)
+ if(Console.paperstock == 0)
+ alert("Error! Receiving console out of paper! Aborting!")
+ return
if(!sent)
sent = 1
@@ -446,10 +565,12 @@ var/list/obj/machinery/requests_console/allConsoles = list()
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/player in hearers(4, Console.loc))
player.show_message(text("\icon[Console] *The Requests Console beeps: 'Fax received'"))
+ Console.paperstock--
if(sent == 1)
user.show_message(text("\icon[src] *The Requests Console beeps: 'Message Sent.'"))
else
user.show_message(text("\icon[src] *The Requests Console beeps: 'NOTICE: No server detected!'"))
+
return
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 1d38590b..0efbf6be 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -982,11 +982,11 @@
usr << "\blue The [src.name] is already occupied!"
src.log_append_to_last("Permission denied.")
return
-/*
+
if (usr.abiotic())
- usr << "\blue Subject cannot have abiotic items on."
+ usr << "\blue You need empty hands to enter the mech."
return
-*/
+
var/passed
if(src.dna)
if(usr.dna.unique_enzymes==src.dna)
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index 77a6e26b..2236ef4e 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -44,6 +44,16 @@
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
+ if(istype(M, /mob/living/simple_animal))
+ if (M == user)
+ M.visible_message(\
+ "\blue [M.name] attempts to buckle in, but fails!",\
+ "You attempt to buckle yourself to [src], but find yourself unable to.")
+ else
+ M.visible_message(\
+ "\blue [user.name] tries to buckle [M.name] in to [src], but fails!",\
+ "You are buckled in to [src] by [user.name].")
+ return
buckle_mob(M, user)
return
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index 03f28188..4f53f880 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -70,6 +70,16 @@
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
if(!istype(M)) return
+ if(istype(M, /mob/living/simple_animal))
+ if (M == user)
+ M.visible_message(\
+ "\blue [M.name] attempts to buckle in, but fails!",\
+ "You attempt to buckle yourself to [src], but find yourself unable to.")
+ else
+ M.visible_message(\
+ "\blue [user.name] tries to buckle [M.name] in to [src], but fails!",\
+ "You are buckled in to [src] by [user.name].")
+ return
buckle_mob(M, user)
return
@@ -153,7 +163,7 @@
if(propelled)
var/mob/living/occupant = buckled_mob
unbuckle()
-
+
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm
index b53438e2..a6865e1a 100644
--- a/code/modules/admin/NewBan.dm
+++ b/code/modules/admin/NewBan.dm
@@ -243,3 +243,67 @@ var/savefile/Banlist
for (var/A in Banlist.dir)
RemoveBan(A)
+////////////////////////////
+//TRANSFER TO SQL DATABASE//
+////////////////////////////
+//Used to transfer the old .dbd file contents over to the SQL database. Kept on hand just for the sake of being kept on hand, frankly.
+/*
+/datum/admins/proc/bantosql()
+
+ establish_db_connection()
+
+ if(!dbcon.IsConnected())
+ usr << "\red Failed to establish database connection"
+ return
+ else
+ message_admins("Houston, we have a database!")
+
+
+ var/count = 0
+// var/dat
+
+ //junk vars to keep track of simple shit, like serverip
+ var/serverip = ""
+ var/bantype_str
+ var/rounds = 0
+ var/duration = -1
+ var/job = ""
+ var/banckey = null
+
+ message_admins("Fetching data now.")
+
+ //var/dat = "
Unban Player: \blue(U) = Unban , (E) = Edit Ban\green (Total
"
+ Banlist.cd = "/base"
+ for (var/A in Banlist.dir)
+ count++
+ Banlist.cd = "/base/[A]"
+ var/ref = "\ref[src]"
+ var/key = Banlist["key"]
+ var/id = Banlist["id"]
+ var/ip = Banlist["ip"]
+ var/reason = Banlist["reason"]
+ banckey = Banlist["bannedby"]
+ var/minutes = Banlist["minutes"]
+ var/expiry
+ if(Banlist["temp"])
+ bantype_str = "TEMPBAN"
+ duration = Banlist["minutes"]
+ expiry = GetExp(Banlist["minutes"])
+ if(!expiry)
+ expiry = "Removal Pending"
+ else
+ expiry = "Permaban"
+ bantype_str = "PERMABAN"
+ duration = -1
+
+ message_admins("Query data: [serverip], [bantype_str], [duration], [key], [id], [ip], [reason], [banckey]")
+ message_admins("Executing query")
+
+ var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `erro_ban` (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', '[minutes]', '[rounds]', Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[key]', '[id]', '[ip]', '[banckey]', '', '', '', '', null, null, null, null, null, null);")
+ insert_query.Execute()
+ var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Attempted to transfer the ban of [key].');")
+ log_query.Execute()
+
+ message_admins("Salvo complete, stand by.")
+ message_admins("Rounds complete, RTB.")
+*/
diff --git a/code/modules/admin/permissionverbs/permissionedit.dm b/code/modules/admin/permissionverbs/permissionedit.dm
index d6cc0c95..a52e289d 100644
--- a/code/modules/admin/permissionverbs/permissionedit.dm
+++ b/code/modules/admin/permissionverbs/permissionedit.dm
@@ -76,16 +76,40 @@
var/new_admin = 1
var/admin_id
+
+ var/flags
+ switch(new_rank)
+ if("Head Developer")
+ flags = 32767
+ if("Head Admin")
+ flags = 32767
+ if("Primary Admin")
+ flags = 8191
+ if("Secondary Admin")
+ flags = 7983
+ if("Moderator")
+ flags = 8196
+ if("Trial Moderator")
+ flags = 8192
+ if("Event Host - Moderator")
+ flags = 15885
+ if("Event Host")
+ flags = 5672
+ if("Retired Admin")
+ flags = 8194
+ else
+ flags = 0
+
while(select_query.NextRow())
new_admin = 0
admin_id = text2num(select_query.item[1])
if(new_admin)
- var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `erro_admin` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
+ var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `erro_admin` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, '[flags]')")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
log_query.Execute()
- usr << "\blue New admin added."
+ usr << "\blue New admin added. Don't forget to manually reload the admins for the permissions to load!"
else
if(!isnull(admin_id) && isnum(admin_id))
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]")
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 9cbd1985..f0fbde2b 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -151,7 +151,7 @@
if(admin_ranks.len)
new_rank = input("Please select a rank", "New rank", null, null) as null|anything in (admin_ranks|"*New Rank*")
else
- new_rank = input("Please select a rank", "New rank", null, null) as null|anything in list("Game Master","Game Admin", "Trial Admin", "Admin Observer","*New Rank*")
+ new_rank = input("Please select a rank", "New rank", null, null) as null|anything in list("Head Developer","Head Admin", "Primary Admin", "Secondary Admin", "Moderator", "Trial Moderator", "Event Host - Moderator", "Event Host", "Retired Admin", "*New Rank*")
var/rights = 0
if(D)
diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm
index 03c59d4a..d44e288e 100644
--- a/code/modules/paperwork/paperbin.dm
+++ b/code/modules/paperwork/paperbin.dm
@@ -70,17 +70,21 @@
return
-/obj/item/weapon/paper_bin/attackby(obj/item/weapon/paper/i as obj, mob/user as mob)
- if(!istype(i))
- return
-
- user.drop_item()
- i.loc = src
- user << "You put [i] in [src]."
- papers.Add(i)
- amount++
-
-
+/obj/item/weapon/paper_bin/attackby(obj/item/weapon/O as obj, mob/user as mob)
+ if(istype(O, /obj/item/weapon/paper))
+ var/obj/item/weapon/paper/i = O
+ user.drop_item()
+ i.loc = src
+ user << "You put [i] in [src]."
+ papers.Add(i)
+ amount++
+/* if(istype(O, /obj/item/weapon/paper_pack)) WIP written in.
+ var/obj/item/weapon/paper_bundle/j = O
+ user.drop_item()
+ amount += j.amount
+ user << "You add paper from [j] into [src]."
+ del(j)
+*/
/obj/item/weapon/paper_bin/examine()
set src in oview(1)
diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi
index cd1c65a5..e3f3a0f5 100644
Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ
diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi
index e47b8a70..44c6159f 100644
Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ
diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi
index d2915813..8fd829dd 100644
Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ