mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Fix for the grant_full_access that doesn't suck
This commit is contained in:
@@ -440,47 +440,30 @@ var/global/list/g_fancy_list_of_safe_types = null
|
||||
return
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (H.wear_id)
|
||||
var/obj/item/weapon/card/id/id = H.wear_id
|
||||
if(istype(H.wear_id, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = H.wear_id
|
||||
id = pda.id
|
||||
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);
|
||||
var/obj/item/worn = H.wear_id
|
||||
var/obj/item/weapon/card/id/id = null
|
||||
if(worn) id = worn.GetID()
|
||||
if(id)
|
||||
id.icon_state = "gold"
|
||||
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
||||
else
|
||||
id = new /obj/item/weapon/card/id/gold(H.loc)
|
||||
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])"
|
||||
H.equip_to_slot_or_del(id, slot_wear_id)
|
||||
H.update_inv_wear_id()
|
||||
|
||||
if(worn)
|
||||
if(istype(worn,/obj/item/device/pda))
|
||||
worn:id = id
|
||||
id.loc = worn
|
||||
else if(istype(worn,/obj/item/weapon/storage/wallet))
|
||||
worn:front_id = id
|
||||
id.loc = worn
|
||||
worn.update_icon()
|
||||
else
|
||||
H.equip_to_slot(id,slot_wear_id)
|
||||
// otherwise leave it on the floor
|
||||
else
|
||||
alert("Invalid mob")
|
||||
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
Reference in New Issue
Block a user