Merge pull request #113 from skull132/master

Hotfix Roundup
This commit is contained in:
skull132
2016-02-11 21:17:52 +02:00
17 changed files with 103 additions and 55 deletions
+2
View File
@@ -144,6 +144,8 @@
return list(access_cent_general, access_cent_specops, access_cent_medical, access_cent_teleporter, access_cent_storage)
if("BlackOps Commander")
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_living, access_cent_storage, access_cent_creed)
if("CCIA Agent")
return list(access_cent_general, access_cent_captain)
if("Supreme Commander")
return get_all_centcom_access()
+14 -4
View File
@@ -247,7 +247,10 @@
find_control_computer()
/obj/machinery/cryopod/proc/find_control_computer(urgent=0)
control_computer = locate(/obj/machinery/computer/cryopod) in src.loc.loc
//control_computer = locate(/obj/machinery/computer/cryopod) in src.loc.loc
for(var/obj/machinery/computer/cryopod/C in src.loc.loc)
control_computer = C
break
// Don't send messages unless we *need* the computer, and less than five minutes have passed since last time we messaged
if(!control_computer && urgent && last_no_computer_message + 5*60*10 < world.time)
@@ -323,10 +326,17 @@
for(var/obj/item/W in items)
var/preserve = null
for(var/T in preserve_items)
if(istype(W,T))
if (istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/brain = W
if (brain.brainmob && brain.brainmob.client && brain.brainmob.key)
preserve = 1
break
else
continue
else
for(var/T in preserve_items)
if(istype(W,T))
preserve = 1
break
if(!preserve)
qdel(W)
+4 -4
View File
@@ -372,7 +372,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(href_list["sort"])
var/sortdep = sanitizeSQL(href_list["sort"])
SQLquery = " Select id, name, department FROM aurora_forms WHERE department LIKE '%[sortdep]%'"
SQLquery = " Select id, name, department FROM ss13_forms WHERE department LIKE '%[sortdep]%'"
screen = 11
if(href_list["print"])
@@ -383,7 +383,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
alert("Connection to the database lost. Aborting.")
if(!printid)
alert("Invalid query. Try again.")
var/DBQuery/query = dbcon.NewQuery("SELECT id, name, data FROM aurora_forms WHERE id=[printid]")
var/DBQuery/query = dbcon.NewQuery("SELECT id, name, data FROM ss13_forms WHERE id=[printid]")
query.Execute()
while(query.NextRow())
@@ -410,7 +410,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
alert("Connection to the database lost. Aborting.")
if(!whatisid)
alert("Invalid query. Try again.")
var/DBQuery/query = dbcon.NewQuery("SELECT id, name, department, info FROM aurora_forms WHERE id=[whatisid]")
var/DBQuery/query = dbcon.NewQuery("SELECT id, name, department, info FROM ss13_forms WHERE id=[whatisid]")
query.Execute()
var/dat = "<center><b>NanoTrasen Corporate Form</b><br>"
while(query.NextRow())
@@ -456,7 +456,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(!announcementConsole) return
screen = 10
if(11) //form database
SQLquery = "SELECT id, name, department FROM aurora_forms"
SQLquery = "SELECT id, name, department FROM ss13_forms"
screen = 11
else //main menu
dpt = ""
+1 -1
View File
@@ -75,7 +75,7 @@
/obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user)
if(istype(get_area(src),/area/syndicate_mothership))
if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != "Vox" && is_alien_whitelisted(user, "Vox"))
if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != "Vox")
var/choice = input("Do you wish to become a true Vox of the Shoal? This is not reversible.") as null|anything in list("No","Yes")
if(choice && choice == "Yes")
var/mob/living/carbon/human/vox/vox = new(get_turf(src),"Vox")
+5 -2
View File
@@ -118,12 +118,15 @@
for(var/client/target in clients)
if(target.prefs.toggles & CHAT_LOOC)
admin_stuff = ""
if(target in admins)
var/display_remote = 0
if (target.holder && ((R_MOD|R_ADMIN) & target.holder.rights))
display_remote = 1
if(display_remote)
prefix = "(R)"
admin_stuff += "/([source.key])"
if(target != source.client)
admin_stuff += "(<A HREF='?src=\ref[target.holder];adminplayerobservejump=\ref[mob]'>JMP</A>)"
if(target.mob in heard)
prefix = ""
if((target.mob in heard) || (target in admins))
if((target.mob in heard) || display_remote)
target << "<span class='ooc'><span class='looc'>" + create_text_tag("looc", "LOOC:", target) + " <span class='prefix'>[prefix]</span><EM>[display_name][admin_stuff]:</EM> <span class='message'>[msg]</span></span></span>"
+2 -2
View File
@@ -157,7 +157,7 @@
var/lasteditor = query.item[7]
var/editdate = query.item[8]
dat += "<tr><td align='center' colspan='4'><b>Note last edited: [editdate], by: [lasteditor].</b></td></tr>"
dat += "<tr><td align='center' colspan='4'><b>(<a href=\"byond://?src=\ref[src];dbnoteedit=delete;dbnote_id=[id]\">Delete</a>) (<a href=\"byond://?src=\ref[src];dbnoteedit=content;dbnote_id=[id]\">Edit</a>)</b></td></tr>"
dat += "<tr><td align='center' colspan='4'><b>(<a href=\"byond://?src=\ref[src];dbnoteedit=delete;dbnoteid=[id]\">Delete</a>) (<a href=\"byond://?src=\ref[src];dbnoteedit=content;dbnoteid=[id]\">Edit</a>)</b></td></tr>"
dat += "<tr><td colspan='4' bgcolor='white'>&nbsp</td></tr>"
else if (admin_ckey && !player_ckey)
@@ -177,7 +177,7 @@
var/lasteditor = admin_query.item[6]
var/editdate = admin_query.item[7]
dat += "<tr><td align='center' colspan='4'><b>Note last edited: [editdate], by: [lasteditor].</b></td></tr>"
dat += "<tr><td align='center' colspan='4'><b>(<a href=\"byond://?src=\ref[src];dbnoteedit=delete;dbnote_id=[id]\">Delete</a>) (<a href=\"byond://?src=\ref[src];dbnoteedit=content;dbnote_id=[id]\">Edit</a>)</b></td></tr>"
dat += "<tr><td align='center' colspan='4'><b>(<a href=\"byond://?src=\ref[src];dbnoteedit=delete;dbnoteid=[id]\">Delete</a>) (<a href=\"byond://?src=\ref[src];dbnoteedit=content;dbnoteid=[id]\">Edit</a>)</b></td></tr>"
dat += "<tr><td colspan='4' bgcolor='white'>&nbsp</td></tr>"
dat += "</table>"
+33 -8
View File
@@ -85,7 +85,11 @@
banreason = "[banreason] (CUSTOM CID)"
else
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
notes_add(banckey,banreason,usr)
if (config.ban_legacy_system)
notes_add(banckey,banreason,usr)
else
notes_add_sql(banckey, banreason, usr, banip, bancid)
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
@@ -683,7 +687,10 @@
msg = job
else
msg += ", [job]"
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
if (config.ban_legacy_system)
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
else
notes_add_sql(M.ckey, "Banned from [msg] - [reason]", usr, M.lastKnownIP, M.computer_id)
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1)
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
@@ -704,7 +711,10 @@
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
if(!msg) msg = job
else msg += ", [job]"
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
if (config.ban_legacy_system)
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
else
notes_add_sql(M.ckey, "Banned from [msg] - [reason]", usr, M.lastKnownIP, M.computer_id)
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1)
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
@@ -802,7 +812,10 @@
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
if (config.ban_legacy_system)
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
else
notes_add_sql(M.ckey, "[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.", usr, M.lastKnownIP, M.computer_id)
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
feedback_inc("ban_tmp",1)
@@ -835,7 +848,10 @@
else
M << "\red No ban appeals URL has been set."
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr)
if (config.ban_legacy_system)
notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr)
else
notes_add_sql(M.ckey, "[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.", usr, M.lastKnownIP, M.computer_id)
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
feedback_inc("ban_perma",1)
@@ -1397,9 +1413,15 @@
return
else if(href_list["CentcommFaxReply"])
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["CentcommFaxReply"])
create_admin_fax(fax.department)
var/department = null
if (href_list["faxMachine"])
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["faxMachine"])
department = fax.department
else
department = input("Choose the target department.", "Target Department", null) in alldepartments
create_admin_fax(department)
return
@@ -2588,7 +2610,10 @@
var/add = sanitize(input("Add Player Info") as null|text)
if(!add) return
notes_add(key,add,usr)
if (config.ban_legacy_system)
notes_add(key,add,usr)
else
notes_add_sql(key, add, usr)
show_player_info(key)
if(href_list["remove_player_info"])
+2 -2
View File
@@ -115,7 +115,7 @@
//check client/X is an admin and isn't the sender or recipient
if(X == C || X == src)
continue
if(X.key != key && X.key != C.key && (X.holder.rights & R_ADMIN|R_MOD))
if(X.key != key && X.key != C.key && (X.holder.rights & (R_ADMIN|R_MOD)))
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>[key_name(C, X, 0)]</span>: <span class='message'>[msg]</span></span></span>"
/client/proc/cmd_admin_irc_pm(sender)
@@ -144,5 +144,5 @@
for(var/client/X in admins)
if(X == src)
continue
if(X.holder.rights & R_ADMIN|R_MOD)
if(X.holder.rights & (R_ADMIN|R_MOD))
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>IRC-[sender]</span>: <span class='message'>[msg]</span></span></span>"
+2 -1
View File
@@ -33,7 +33,8 @@
if(check_rights(R_ADMIN, 0))
sender_name = "<span class='admin'>[sender_name]</span>"
for(var/client/C in admins)
C << "<span class='mod_channel'>" + create_text_tag("mod", "MOD:", C) + " <span class='name'>[sender_name]</span>(<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
if ((R_ADMIN|R_MOD) & C.holder.rights)
C << "<span class='mod_channel'>" + create_text_tag("mod", "MOD:", C) + " <span class='name'>[sender_name]</span>(<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+1 -1
View File
@@ -20,7 +20,7 @@
if (!warning_reason)
return
var/warning_notes = input("Add additional informatoin. This is visible only to staff.") as null|text
var/warning_notes = input("Add additional information. This is visible only to staff.") as null|text
var/warning_severity
switch (alert("Set warning severity", null, "Standard", "Severe"))
+7 -4
View File
@@ -158,7 +158,7 @@
W.name = "[M.real_name]'s ID Card"
W.icon_state = "centcom"
W.item_state = "id_inv"
W.access = get_all_accesses() + get_centcom_access("Intel Officer")
W.access = get_all_accesses() + get_centcom_access("CCIA Agent")
W.assignment = "Central Command Internal Affairs Agent"
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
@@ -272,10 +272,13 @@
return
var/customname = input(usr, "Pick a title for the report", "Title") as text|null
if (!customname)
usr << "\red Cancelled."
return
// Create the reply message
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us
P.name = "[command_name()]- [customname]"
P.name = "[command_name()] - [customname]"
P.info = input
P.update_icon()
@@ -291,10 +294,10 @@
if(fax.recievefax(P))
usr << "\blue Message transmitted successfully."
log_and_message_admins("sent a fax message to the [department] fax machine. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[fax.x];Y=[fax.y];Z=[fax.z]'>JMP</a>)")
sent_faxes += P
else
usr << "\red Message reply failed."
spawn(100)
qdel(P)
return
+3 -3
View File
@@ -211,13 +211,13 @@
src << "[time][part_a][track][part_b][formatted]</span></span>"
/mob/proc/hear_signlang(var/message, var/verb = "gestures", var/datum/language/language, var/mob/speaker = null)
if(!client)
if(!client || !speaker)
return
if(say_understands(speaker, language))
message = "<B>[src]</B> [verb], \"[message]\""
message = "<B>[speaker]</B> [verb], \"[message]\""
else
message = "<B>[src]</B> [verb]."
message = "<B>[speaker]</B> [verb]."
if(src.status_flags & PASSEMOTES)
for(var/obj/item/weapon/holder/H in src.contents)
+4 -4
View File
@@ -47,7 +47,7 @@
// spawn(0)
path = AStar(loc, target.loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 30, id = botcard)
if(!path)
custom_emote(2, "[src] can't reach the target and is giving up.")
// custom_emote(2, "[src] can't reach the target and is giving up.")
target = null
path = list()
return
@@ -56,7 +56,7 @@
path -= path[1]
return 1
return
/mob/living/bot/cleanbot/Life()
..()
@@ -67,7 +67,7 @@
return
if(cleaning)
return
if(!screwloose && !oddbutton && prob(5))
custom_emote(2, "makes an excited beeping booping sound!")
@@ -96,7 +96,7 @@
ignorelist -= gib
// Find a target
if(pulledby) // Don't wiggle if someone pulls you
patrol_path = list()
return
@@ -392,7 +392,9 @@
src << browse(null, t1)
if(href_list["item"])
handle_strip(href_list["item"],usr)
if (handle_strip(href_list["item"],usr))
if ((machine) && (in_range(src, usr)))
show_inv(machine)
if (href_list["criminal"])
if(hasHUD(usr,"security"))
@@ -1,12 +1,12 @@
/mob/living/carbon/human/proc/handle_strip(var/slot_to_strip,var/mob/living/user)
if(!slot_to_strip || !istype(user))
return
return 0
// TODO : Change to incapacitated() on merge.
if(user.stat || user.lying || user.resting || user.buckled || !user.Adjacent(src) || user.restrained())
user << browse(null, text("window=mob[src.name]"))
return
return 0
var/obj/item/target_slot = get_equipped_item(text2num(slot_to_strip))
@@ -16,36 +16,36 @@
visible_message("<span class='danger'>\The [user] is trying to empty \the [src]'s pockets!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
empty_pockets(user)
return
return 1
if("splints")
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s splints!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
remove_splints(user)
return
return 1
if("sensors")
visible_message("<span class='danger'>\The [user] is trying to set \the [src]'s sensors!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
toggle_sensors(user)
return
return 1
if("internals")
visible_message("<span class='danger'>\The [usr] is trying to set \the [src]'s internals!</span>")
if(do_after(user,HUMAN_STRIP_DELAY))
toggle_internals(user)
return
return 1
if("tie")
var/obj/item/clothing/under/suit = w_uniform
if(!istype(suit) || !suit.accessories.len)
return
return 0
var/obj/item/clothing/accessory/A = suit.accessories[1]
if(!istype(A))
return
return 0
visible_message("<span class='danger'>\The [usr] is trying to remove \the [src]'s [A.name]!</span>")
if(!do_after(user,HUMAN_STRIP_DELAY))
return
return 0
if(!A || suit.loc != src || !(A in suit.accessories))
return
return 0
if(istype(A, /obj/item/clothing/accessory/badge) || istype(A, /obj/item/clothing/accessory/medal))
user.visible_message("<span class='danger'>\The [user] tears off \the [A] from [src]'s [suit.name]!</span>")
@@ -54,17 +54,17 @@
A.on_removed(user)
suit.accessories -= A
update_inv_w_uniform()
return
return 1
// Are we placing or stripping?
var/stripping
var/obj/item/held = user.get_active_hand()
if(!istype(held) || is_robot_module(held))
if(!istype(target_slot)) // They aren't holding anything valid and there's nothing to remove, why are we even here?
return
return 0
if(!target_slot.canremove)
user << "<span class='warning'>You cannot remove \the [src]'s [target_slot.name].</span>"
return
return 0
stripping = 1
if(stripping)
@@ -73,10 +73,10 @@
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
if(!do_after(user,HUMAN_STRIP_DELAY))
return
return 0
if(!stripping && user.get_active_hand() != held)
return
return 0
if(stripping)
admin_attack_log(user, src, "Attempted to remove \a [target_slot]", "Target of an attempt to remove \a [target_slot].", "attempted to remove \a [target_slot] from")
@@ -86,6 +86,8 @@
if(held.loc != src)
user.put_in_hands(held)
return 1
// Empty out everything in the target's pockets.
/mob/living/carbon/human/proc/empty_pockets(var/mob/living/user)
if(!r_store && !l_store)
+1 -1
View File
@@ -540,7 +540,7 @@ proc/is_blind(A)
name = realname
for(var/mob/M in player_list)
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && !check_rights(R_MOD|R_ADMIN, 0, M))) && (M.client.prefs.toggles & CHAT_DEAD))
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && check_rights(R_MOD|R_ADMIN, 0, M))) && (M.client.prefs.toggles & CHAT_DEAD))
var/follow
var/lname
if(subject)
+2 -2
View File
@@ -212,8 +212,8 @@ var/list/sent_faxes = list() //cache for faxes that have been sent by the admins
/obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100")
var/msg = "\blue <b><font color='[font_colour]'>[faxname]: </font>[key_name(sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;[reply_type]=\ref[src]'>REPLY</a>)</b>: Receiving '[sent.name]' via secure connection ... <a href='?_src_=holder;AdminFaxView=\ref[sent]'>view message</a>"
var/msg = "\blue <b><font color='[font_colour]'>[faxname]: </font>[key_name(sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;[reply_type]=\ref[src];faxMachine=\ref[src]'>REPLY</a>)</b>: Receiving '[sent.name]' via secure connection ... <a href='?_src_=holder;AdminFaxView=\ref[sent]'>view message</a>"
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
if((R_ADMIN|R_CCIAA) & C.holder.rights)
C << msg