diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 4474dcd2fb4..558595930fa 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -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() diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index b5600196d84..97e3a41f5aa 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -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) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 4e9bd9ced35..7f24da000a9 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -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 = "
NanoTrasen Corporate Form
" 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 = "" diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 7e146faf36f..ed5a972430f 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -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") diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 3a0c4563e6f..4cd6dbabe71 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -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 += "(JMP)" if(target.mob in heard) prefix = "" - if((target.mob in heard) || (target in admins)) + if((target.mob in heard) || display_remote) target << "" + create_text_tag("looc", "LOOC:", target) + " [prefix][display_name][admin_stuff]: [msg]" diff --git a/code/modules/admin/player_notes_sql.dm b/code/modules/admin/player_notes_sql.dm index 0a1abe7b84e..588abca9e6c 100644 --- a/code/modules/admin/player_notes_sql.dm +++ b/code/modules/admin/player_notes_sql.dm @@ -157,7 +157,7 @@ var/lasteditor = query.item[7] var/editdate = query.item[8] dat += "Note last edited: [editdate], by: [lasteditor]." - dat += "(Delete) (Edit)" + dat += "(Delete) (Edit)" dat += " " else if (admin_ckey && !player_ckey) @@ -177,7 +177,7 @@ var/lasteditor = admin_query.item[6] var/editdate = admin_query.item[7] dat += "Note last edited: [editdate], by: [lasteditor]." - dat += "(Delete) (Edit)" + dat += "(Delete) (Edit)" dat += " " dat += "" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 7076b892c69..59276e283db 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -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 << "\redYou have been jobbanned by [usr.client.ckey] from: [msg]." M << "\red The reason is: [reason]" @@ -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 << "\redYou have been jobbanned by [usr.client.ckey] from: [msg]." M << "\red The reason is: [reason]" @@ -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 << "\redYou have been banned by [usr.client.ckey].\nReason: [reason]." 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"]) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 263ad345191..ea90252bfe9 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -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 << "" + create_text_tag("pm_other", "PM:", X) + " [key_name(src, X, 0)] to [key_name(C, X, 0)]: [msg]" /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 << "" + create_text_tag("pm_other", "PM:", X) + " [key_name(src, X, 0)] to IRC-[sender]: [msg]" diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 5976b877559..c23da53f453 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -33,7 +33,8 @@ if(check_rights(R_ADMIN, 0)) sender_name = "[sender_name]" for(var/client/C in admins) - C << "" + create_text_tag("mod", "MOD:", C) + " [sender_name](JMP): [msg]" + if ((R_ADMIN|R_MOD) & C.holder.rights) + C << "" + create_text_tag("mod", "MOD:", C) + " [sender_name](JMP): [msg]" feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/warning.dm b/code/modules/admin/verbs/warning.dm index 67950d05b28..e7476221079 100644 --- a/code/modules/admin/verbs/warning.dm +++ b/code/modules/admin/verbs/warning.dm @@ -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")) diff --git a/code/modules/cciaa/cciaa.dm b/code/modules/cciaa/cciaa.dm index f630d30d1af..732b2d69131 100644 --- a/code/modules/cciaa/cciaa.dm +++ b/code/modules/cciaa/cciaa.dm @@ -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. (JMP)") + + sent_faxes += P else usr << "\red Message reply failed." - - spawn(100) qdel(P) return diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index e5e91c4bdc7..11e1cfef886 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -211,13 +211,13 @@ src << "[time][part_a][track][part_b][formatted]" /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 = "[src] [verb], \"[message]\"" + message = "[speaker] [verb], \"[message]\"" else - message = "[src] [verb]." + message = "[speaker] [verb]." if(src.status_flags & PASSEMOTES) for(var/obj/item/weapon/holder/H in src.contents) diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index 57f907ec25d..05f1969fd58 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5f756dea128..f8744b59a11 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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")) diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index b8f1c8c9214..0d88f749667 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -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("\The [user] is trying to empty \the [src]'s pockets!") if(do_after(user,HUMAN_STRIP_DELAY)) empty_pockets(user) - return + return 1 if("splints") visible_message("\The [user] is trying to remove \the [src]'s splints!") if(do_after(user,HUMAN_STRIP_DELAY)) remove_splints(user) - return + return 1 if("sensors") visible_message("\The [user] is trying to set \the [src]'s sensors!") if(do_after(user,HUMAN_STRIP_DELAY)) toggle_sensors(user) - return + return 1 if("internals") visible_message("\The [usr] is trying to set \the [src]'s internals!") 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("\The [usr] is trying to remove \the [src]'s [A.name]!") 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("\The [user] tears off \the [A] from [src]'s [suit.name]!") @@ -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 << "You cannot remove \the [src]'s [target_slot.name]." - return + return 0 stripping = 1 if(stripping) @@ -73,10 +73,10 @@ visible_message("\The [user] is trying to put \a [held] on \the [src]!") 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) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 86228ec9f38..e4e4c1738ad 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -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) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 3790123b462..17872c4c871 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -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 [faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (CA) (REPLY): Receiving '[sent.name]' via secure connection ... view message" + var/msg = "\blue [faxname]: [key_name(sender, 1)] (PP) (VV) (SM) (JMP) (CA) (REPLY): Receiving '[sent.name]' via secure connection ... view message" for(var/client/C in admins) - if(R_ADMIN & C.holder.rights) + if((R_ADMIN|R_CCIAA) & C.holder.rights) C << msg