diff --git a/code/modules/client/preference/loadout/loadout_accessories.dm b/code/modules/client/preference/loadout/loadout_accessories.dm index b9318fd9e8c..98485d1f6c4 100644 --- a/code/modules/client/preference/loadout/loadout_accessories.dm +++ b/code/modules/client/preference/loadout/loadout_accessories.dm @@ -66,12 +66,12 @@ /datum/gear/accessory/holobadge display_name = "holobadge, pin" path = /obj/item/clothing/accessory/holobadge - allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot") + allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot") /datum/gear/accessory/holobadge_n display_name = "holobadge, cord" path = /obj/item/clothing/accessory/holobadge/cord - allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot") + allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot") /datum/gear/accessory/tieblue display_name = "tie, blue" diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index e884c9573f4..36fd6a370a5 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -47,12 +47,12 @@ item_state = "armor" var/obj/item/clothing/accessory/holobadge/attached_badge -/obj/item/clothing/suit/armor/vest/security/attackby(obj/item/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/clothing/accessory/holobadge)) - if(user.unEquip(W)) +/obj/item/clothing/suit/armor/vest/security/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/clothing/accessory/holobadge)) + if(user.unEquip(I)) add_fingerprint(user) - W.forceMove(src) - attached_badge = W + I.forceMove(src) + attached_badge = I var/datum/action/A = new /datum/action/item_action/remove_badge(src) A.Grant(user) icon_state = "armorsec" @@ -62,7 +62,7 @@ return ..() -/obj/item/clothing/suit/armor/vest/security/attack_self(mob/user as mob) +/obj/item/clothing/suit/armor/vest/security/attack_self(mob/user) if(attached_badge) add_fingerprint(user) user.put_in_hands(attached_badge) @@ -75,11 +75,9 @@ user.update_inv_wear_suit() desc = "An armored vest that protects against some damage. This one has a clip for a holobadge." to_chat(user, "You remove [attached_badge] from [src].") - attached_badge = null return - ..() /obj/item/clothing/suit/armor/vest/blueshield diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index bd485a732ce..497277e16e8 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -270,53 +270,53 @@ item_color = "holobadge" slot_flags = SLOT_BELT | SLOT_TIE - var/emagged = 0 //Emagging removes Sec check. + var/emagged = FALSE //Emagging removes Sec check. var/stored_name = null /obj/item/clothing/accessory/holobadge/cord icon_state = "holobadge-cord" item_color = "holobadge-cord" -/obj/item/clothing/accessory/holobadge/attack_self(mob/user as mob) +/obj/item/clothing/accessory/holobadge/attack_self(mob/user) if(!stored_name) to_chat(user, "Waving around a badge before swiping an ID would be pretty pointless.") return if(isliving(user)) - user.visible_message("[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.","You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.") + user.visible_message("[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.", + "You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.") -/obj/item/clothing/accessory/holobadge/attackby(var/obj/item/O as obj, var/mob/user as mob, params) - if(istype(O, /obj/item/card/id) || istype(O, /obj/item/pda)) +/obj/item/clothing/accessory/holobadge/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) var/obj/item/card/id/id_card = null - if(istype(O, /obj/item/card/id)) - id_card = O + if(istype(I, /obj/item/card/id)) + id_card = I else - var/obj/item/pda/pda = O + var/obj/item/pda/pda = I id_card = pda.id - if(ACCESS_SECURITY in id_card.access || emagged) - to_chat(user, "You imprint your ID details onto the badge.") + if(ACCESS_SEC_DOORS in id_card.access || emagged) + to_chat(user, "You imprint your ID details onto the badge.") stored_name = id_card.registered_name name = "holobadge ([stored_name])" desc = "This glowing blue badge marks [stored_name] as THE LAW." else - to_chat(user, "[src] rejects your insufficient access rights.") + to_chat(user, "[src] rejects your insufficient access rights.") return ..() -/obj/item/clothing/accessory/holobadge/emag_act(user as mob) +/obj/item/clothing/accessory/holobadge/emag_act(mob/user) if(emagged) to_chat(user, "[src] is already cracked.") - return else - emagged = 1 + emagged = TRUE to_chat(user, "You swipe the card and crack the holobadge security checks.") - return -/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/M, mob/living/user) +/obj/item/clothing/accessory/holobadge/attack(mob/living/carbon/human/H, mob/living/user) if(isliving(user)) - user.visible_message("[user] invades [M]'s personal space, thrusting [src] into [M.p_their()] face insistently.","You invade [M]'s personal space, thrusting [src] into [M.p_their()] face insistently. You are the law.") + user.visible_message("[user] invades [H]'s personal space, thrusting [src] into [H.p_their()] face insistently.", + "You invade [H]'s personal space, thrusting [src] into [H.p_their()] face insistently. You are the law.") ////////////// //OBJECTION!//