diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 2b5eef23a12..6ad0d3f3ecf 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -59,7 +59,7 @@ if(stat & (NOPOWER|BROKEN)) return - if(get_dist(src, user) > 1 && (!issilicon(user) || !user.can_admin_interact())) + if(get_dist(src, user) > 1 && (!issilicon(user) && !user.can_admin_interact())) to_chat(user, "Too far away.") user.unset_machine() user << browse(null, "window=ai_slipper") @@ -69,7 +69,7 @@ var/area/myarea = get_area(src) var/t = "AI Liquid Dispenser ([myarea.name])
" - if(locked && (!issilicon(user) || !user.can_admin_interact())) + if(locked && (!issilicon(user) && !user.can_admin_interact())) t += "(Swipe ID card to unlock control panel.)
" else t += text("Dispenser [] - []?
\n", disabled ? "deactivated" : "activated", disabled ? "Enable" : "Disable") @@ -81,10 +81,11 @@ /obj/machinery/ai_slipper/Topic(href, href_list) if(..()) return 1 - if(locked) - if(!istype(usr, /mob/living/silicon)) - to_chat(usr, "Control panel is locked!") - return + + if(locked && (!issilicon(usr) && !usr.can_admin_interact())) + to_chat(usr, "Control panel is locked!") + return 1 + if(href_list["toggleOn"]) disabled = !disabled icon_state = disabled? "motion0":"motion3" diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 79a9d02e9ea..f738cdb4d7f 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -174,7 +174,8 @@ nextstate = CLOSED /obj/machinery/door/firedoor/attack_ghost(mob/user as mob) - return attack_ai(user) + if(user.can_advanced_admin_interact()) + return attack_ai(user) /obj/machinery/door/firedoor/attack_ai(mob/user) if(operating || stat & NOPOWER) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 5bafceffcfc..50a7afc64b5 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -821,7 +821,7 @@ Pass a positive integer as an argument to override a bot's default speed. return 1 add_fingerprint(usr) - if((href_list["power"]) && (bot_core.allowed(usr) || !locked)) + if((href_list["power"]) && (bot_core.allowed(usr) || !locked || usr.can_admin_interact())) if(on) turn_off() else diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 3f60793de02..2aebeb5d04a 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -204,7 +204,7 @@ Status: []
Behaviour controls are [locked ? "locked" : "unlocked"]
Maintenance panel panel is [open ? "opened" : "closed"]"}, text("[on ? "On" : "Off"]")) - if(!locked || issilicon(user) || check_rights(R_ADMIN, 0, user)) + if(!locked || issilicon(user) || user.can_admin_interact()) dat += text({"
Cleans Blood: []
"}, text("[blood ? "Yes" : "No"]")) dat += text({"
Patrol station: []
"}, text("[auto_patrol ? "Yes" : "No"]")) return dat diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 65ee91d6897..8a160d25c4f 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -106,7 +106,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]
"}, "[on ? "On" : "Off"]" ) - if(!locked || issilicon(user) || check_rights(R_ADMIN, 0, user)) + if(!locked || issilicon(user) || user.can_admin_interact()) if(!lasercolor) dat += text({"
Arrest Unidentifiable Persons: []
diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 62d5c5f5823..a02447cd4ea 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -69,7 +69,7 @@ dat += "Maintenance panel panel is [open ? "opened" : "closed"]
" dat += "Tiles left: [amount]
" dat += "Behvaiour controls are [locked ? "locked" : "unlocked"]
" - if(!locked || issilicon(user) || check_rights(R_ADMIN, 0, user)) + if(!locked || issilicon(user) || user.can_admin_interact()) dat += "Add tiles to new hull plating: [autotile ? "Yes" : "No"]
" dat += "Replace floor tiles: [replacetiles ? "Yes" : "No"]
" dat += "Finds tiles: [eattiles ? "Yes" : "No"]
" diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 4eafbf50065..50475fe45db 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -149,7 +149,7 @@ else dat += "None Loaded" dat += "
Behaviour controls are [locked ? "locked" : "unlocked"]
" - if(!locked || issilicon(user) || check_rights(R_ADMIN, 0, user)) + if(!locked || issilicon(user) || user.can_admin_interact()) dat += "Healing Threshold: " dat += "-- " dat += "- " diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 17adfa19c54..14f7030243e 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -284,7 +284,7 @@ dat += "Destination: [!destination ? "none" : destination]
" dat += "Power level: [cell ? cell.percent() : 0]%" - if(locked && !ai && !check_rights(R_ADMIN, 0, user)) + if(locked && !ai && !user.can_admin_interact()) dat += " 
Controls are locked
Unlock Controls" else dat += " 
Controls are unlocked
Lock Controls

" diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 9d9e86125b2..a439d793eb3 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -119,7 +119,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, "[on ? "On" : "Off"]" ) - if(!locked || issilicon(user) || check_rights(R_ADMIN, 0, user)) + if(!locked || issilicon(user) || user.can_admin_interact()) dat += text({"
Arrest Unidentifiable Persons: []
Arrest for Unauthorized Weapons: []
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index a3a40d7d3f6..fd10ebbbaf0 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -67,13 +67,14 @@ var/list/alldepartments = list() /obj/machinery/photocopier/faxmachine/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state) var/data[0] + var/is_authenticated = is_authenticated(user) if(scan) data["scan_name"] = scan.name else data["scan_name"] = "-----" - data["authenticated"] = authenticated - if(!authenticated) + data["authenticated"] = is_authenticated + if(!is_authenticated) data["network"] = "Disconnected" else if(!emagged) data["network"] = fax_network @@ -94,12 +95,20 @@ var/list/alldepartments = list() return data +/obj/machinery/photocopier/faxmachine/proc/is_authenticated(mob/user) + if(authenticated) + return TRUE + else if(user.can_admin_interact()) + return TRUE + return FALSE + /obj/machinery/photocopier/faxmachine/Topic(href, href_list) if(..()) return 1 - + + var/is_authenticated = is_authenticated(usr) if(href_list["send"]) - if(copyitem && authenticated) + if(copyitem && is_authenticated) if((destination in admin_departments) || (destination in hidden_admin_departments)) send_admin_fax(usr, destination) else @@ -131,7 +140,7 @@ var/list/alldepartments = list() scan() if(href_list["dept"]) - if(authenticated) + if(is_authenticated) var/lastdestination = destination var/list/combineddepartments = alldepartments if(long_range_enabled) @@ -148,7 +157,7 @@ var/list/alldepartments = list() if((!authenticated) && scan) if(check_access(scan)) authenticated = 1 - else if(authenticated) + else if(!authenticated) authenticated = 0 if(href_list["rename"])