mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Fixes robocontrol on the 'puter [MDB IGNORE] (#12565)
* Fixes robocontrol on the 'puter (#65957) As you don't have your ID on you, it is never scanned for Robo-control access, so you could just never use it unless you were using a tablet. * Fixes robocontrol on the 'puter Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
This commit is contained in:
co-authored by
John Willard
parent
a1fe3b092a
commit
bf1e58966a
@@ -203,7 +203,7 @@
|
||||
QDEL_NULL(access_card)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/proc/check_access(mob/living/user)
|
||||
/mob/living/simple_animal/bot/proc/check_access(mob/living/user, obj/item/card/id)
|
||||
if(user.has_unlimited_silicon_privilege || isAdminGhostAI(user)) // Silicon and Admins always have access.
|
||||
return TRUE
|
||||
if(!maints_access_required) // No requirements to access it.
|
||||
@@ -211,13 +211,13 @@
|
||||
if(!(bot_cover_flags & BOT_COVER_LOCKED)) // Unlocked.
|
||||
return TRUE
|
||||
|
||||
var/obj/item/card/id/id_card = user.get_idcard(TRUE)
|
||||
if(!id_card || !id_card.access)
|
||||
var/obj/item/card/id/used_id = id || user.get_idcard(TRUE)
|
||||
|
||||
if(!used_id || !used_id.access)
|
||||
return FALSE
|
||||
id_card = id_card.GetID()
|
||||
|
||||
for(var/requested_access in maints_access_required)
|
||||
if(requested_access in id_card.access)
|
||||
if(requested_access in used_id.access)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
var/list/mulelist = list()
|
||||
|
||||
var/obj/item/computer_hardware/card_slot/card_slot = computer ? computer.all_components[MC_CARD] : null
|
||||
var/obj/item/card/id/id_card = card_slot?.stored_card
|
||||
data["have_id_slot"] = !!card_slot
|
||||
if(computer)
|
||||
var/obj/item/card/id/id_card = card_slot ? card_slot.stored_card : null
|
||||
data["has_id"] = !!id_card
|
||||
data["id_owner"] = id_card ? id_card.registered_name : "No Card Inserted."
|
||||
data["access_on_card"] = id_card ? id_card.access : null
|
||||
@@ -34,7 +34,7 @@
|
||||
for(var/mob/living/simple_animal/bot/simple_bot as anything in GLOB.bots_list)
|
||||
if(simple_bot.z != zlevel || !(simple_bot.bot_mode_flags & BOT_MODE_REMOTE_ENABLED)) //Only non-emagged bots on the same Z-level are detected!
|
||||
continue
|
||||
if(computer && !simple_bot.check_access(user)) // Only check Bots we can access)
|
||||
if(computer && !simple_bot.check_access(user, id_card)) // Only check Bots we can access
|
||||
continue
|
||||
var/list/newbot = list(
|
||||
"name" = simple_bot.name,
|
||||
|
||||
Reference in New Issue
Block a user