mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Fixes a rare potential runtime for using the admin grant_full_access verb on a mob with something other than an ID in the ID slot.
This commit is contained in:
@@ -445,8 +445,33 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
if(istype(H.wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = H.wear_id
|
||||
id = pda.id
|
||||
id.icon_state = "gold"
|
||||
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
if(!id)
|
||||
pda.id = new /obj/item/weapon/card/id(pda)
|
||||
pda.id.icon_state = "gold"
|
||||
pda.id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
pda.id.registered_name = H.real_name
|
||||
pda.id.assignment = "Captain"
|
||||
pda.id.name = "[pda.id.registered_name]'s ID Card ([pda.id.assignment])"
|
||||
else
|
||||
id.icon_state = "gold"
|
||||
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
else if(istype(H.wear_id,/obj/item/weapon/storage/wallet))
|
||||
var/obj/item/weapon/storage/wallet/W = H.wear_id
|
||||
id = W.front_id
|
||||
if(!id)
|
||||
id = new /obj/item/weapon/card/id(W)
|
||||
id.icon_state = "gold"
|
||||
id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
id.registered_name = H.real_name
|
||||
id.assignment = "Captain"
|
||||
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
||||
W.front_id = id
|
||||
else
|
||||
id.icon_state = "gold"
|
||||
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
else
|
||||
id.icon_state = "gold"
|
||||
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
else
|
||||
var/obj/item/weapon/card/id/id = new/obj/item/weapon/card/id(M);
|
||||
id.icon_state = "gold"
|
||||
|
||||
Reference in New Issue
Block a user