diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 1f78250ca90..0033038ad09 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -156,7 +156,7 @@ if (!( data_core.medical.Find(src.active2) )) src.active2 = null - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(user)) + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) usr.set_machine(src) if (href_list["temp"]) @@ -192,7 +192,7 @@ else if (href_list["login"]) - if (istype(usr, /mob/living/silicon/ai) || IsAdminGhost(user)) + if (istype(usr, /mob/living/silicon/ai) || IsAdminGhost(usr)) src.active1 = null src.active2 = null src.authenticated = usr.name @@ -251,7 +251,7 @@ if("fingerprint") if (istype(src.active1, /datum/data/record)) var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(usr)) return src.active1.fields["fingerprint"] = t1 if("sex") @@ -263,61 +263,61 @@ if("age") if (istype(src.active1, /datum/data/record)) var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as num - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(usr)) return src.active1.fields["age"] = t1 if("mi_dis") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["mi_dis"] = t1 if("mi_dis_d") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["mi_dis_d"] = t1 if("ma_dis") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["ma_dis"] = t1 if("ma_dis_d") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["ma_dis_d"] = t1 if("alg") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["alg"] = t1 if("alg_d") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["alg_d"] = t1 if("cdi") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["cdi"] = t1 if("cdi_d") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["cdi_d"] = t1 if("notes") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0, max_length = MAX_RECORD_LENGTH) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["notes"] = t1 if("p_stat") @@ -332,21 +332,21 @@ if("b_dna") if (istype(src.active2, /datum/data/record)) var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return src.active2.fields["b_dna"] = t1 if("vir_name") var/datum/data/record/v = locate(href_list["edit_vir"]) if (v) var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(usr)) return v.fields["name"] = t1 if("vir_desc") var/datum/data/record/v = locate(href_list["edit_vir"]) if (v) var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1) && !IsAdminGhost(usr)) return v.fields["description"] = t1 else @@ -451,7 +451,7 @@ return var/a2 = src.active2 var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message) - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(user)) + if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2) && !IsAdminGhost(usr)) return var/counter = 1 while(src.active2.fields[text("com_[]", counter)]) @@ -464,7 +464,7 @@ if (href_list["search"]) var/t1 = input("Search String: (Name, DNA, or ID)", "Med. records", null, null) as text - if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!in_range(src, usr)) && (!istype(usr, /mob/living/silicon))) && !IsAdminGhost(user))) + if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!in_range(src, usr)) && (!istype(usr, /mob/living/silicon))) && !IsAdminGhost(usr))) return src.active1 = null src.active2 = null diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 2261b3f5a3a..d4c134bb18d 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -286,9 +286,9 @@ return 1 if(stat & (NOPOWER|BROKEN)) return - if(!istype(usr, /mob/living) && !IsAdminGhost(user)) + if(!istype(usr, /mob/living) && !IsAdminGhost(usr)) return - if (((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) || IsAdminGhost(user)) + if (((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) || IsAdminGhost(usr)) //Authenticate if (href_list["auth"]) if(auth) diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 4223ec95ec2..ae8b8787e83 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -66,7 +66,7 @@ /obj/machinery/computer/prisoner/Topic(href, href_list) if(..()) return - if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(user)) + if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) usr.set_machine(src) if(href_list["inject1"]) diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm index 19d8e2bc4cb..666bb14b199 100644 --- a/code/game/machinery/computer/prisonshuttle.dm +++ b/code/game/machinery/computer/prisonshuttle.dm @@ -54,7 +54,7 @@ var/prison_shuttle_timeleft = 0 if(..()) return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(user)) + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) usr.set_machine(src) if (href_list["sendtodock"]) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index f675dd85ec6..23a8687757a 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -216,7 +216,7 @@ What a mess.*/ active1 = null if (!( data_core.security.Find(active2) )) active2 = null - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(user)) + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)) || IsAdminGhost(usr)) usr.set_machine(src) switch(href_list["choice"]) // SORTING! @@ -260,7 +260,7 @@ What a mess.*/ active2 = null if("Log In") - if (istype(usr, /mob/living/silicon/ai) || IsAdminGhost(user)) + if (istype(usr, /mob/living/silicon/ai) || IsAdminGhost(usr)) src.active1 = null src.active2 = null src.authenticated = usr.name @@ -283,7 +283,7 @@ What a mess.*/ //RECORD FUNCTIONS if("Search Records") var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text - if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !in_range(src, usr)) && IsAdminGhost(user)) + if ((!( t1 ) || usr.stat || !( authenticated ) || usr.restrained() || !in_range(src, usr)) && IsAdminGhost(usr)) return Perp = new/list() t1 = lowertext(t1) @@ -387,7 +387,7 @@ What a mess.*/ return var/a2 = active2 var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message) - if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2) && IsAdminGhost(user)) + if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2) && IsAdminGhost(usr)) return var/counter = 1 while(active2.fields[text("com_[]", counter)]) diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 30ccbc15c9c..5cf48af626f 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -6,7 +6,7 @@ layer = MOB_LAYER universal_speak = 1 density = 0 - silicon_privileges = PRIVILEDGES_BOT + silicon_privileges = PRIVILEGES_BOT makes_dirt = FALSE // No more dirt from Beepsky diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index d2242b257fd..6f8693a36cd 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -13,7 +13,7 @@ can_pull_mobs = MOB_PULL_SMALLER idcard_type = /obj/item/card/id - silicon_privileges = PRIVILEDGES_PAI + silicon_privileges = PRIVILEGES_PAI var/idaccessible = 0 var/network = "SS13" diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 542024f9983..8540ccc7179 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -1,7 +1,7 @@ /mob/living/silicon gender = NEUTER voice_name = "synthesized voice" - silicon_privileges = PRIVILEDGES_SILICON + silicon_privileges = PRIVILEGES_SILICON var/syndicate = 0 var/const/MAIN_CHANNEL = "Main Frequency" var/lawchannel = MAIN_CHANNEL // Default channel on which to state laws diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 5bcd63fb2f9..b76aad97b6b 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -95,7 +95,7 @@ proc/getsensorlevel(A) return if(!isobserver(user)) // Are they a ghost? return - if(!check_rights_for(user.client, R_ADMIN)) // Are they allowed? + if(!check_rights(R_ADMIN, 0, user)) // Are they allowed? return if(!user.client.AI_Interact) // Do they have it enabled? return diff --git a/code/modules/nano/interaction/base.dm b/code/modules/nano/interaction/base.dm index 4b35e08e522..296986f3515 100644 --- a/code/modules/nano/interaction/base.dm +++ b/code/modules/nano/interaction/base.dm @@ -7,7 +7,7 @@ /datum/proc/CanUseTopic(var/mob/user, var/datum/topic_state/state) var/src_object = nano_host() if(IsAdminGhost(user)) - return STATUS_INTERACTION + return STATUS_INTERACTIVE return state.can_use_topic(src_object, user) /datum/topic_state/proc/href_list(var/mob/user)