mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge pull request #14872 from SabreML/Detective-badges
Allows Detectives to get a holobadge from the loadout
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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, "<span class='notice'>You remove [attached_badge] from [src].</span>")
|
||||
|
||||
attached_badge = null
|
||||
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/armor/vest/blueshield
|
||||
|
||||
@@ -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("<span class='warning'>[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.</span>","<span class='warning'>You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.</span>")
|
||||
user.visible_message("<span class='warning'>[user] displays [user.p_their()] Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.</span>",
|
||||
"<span class='warning'>You display your Nanotrasen Internal Security Legal Authorization Badge.\nIt reads: [stored_name], NT Security.</span>")
|
||||
|
||||
/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, "<span class='notice'>You imprint your ID details onto the badge.</span>")
|
||||
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, "<span class='warning'>[src] rejects your insufficient access rights.</span>")
|
||||
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, "<span class='warning'>[src] is already cracked.</span>")
|
||||
return
|
||||
else
|
||||
emagged = 1
|
||||
emagged = TRUE
|
||||
to_chat(user, "<span class='warning'>You swipe the card and crack the holobadge security checks.</span>")
|
||||
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("<span class='warning'>[user] invades [M]'s personal space, thrusting [src] into [M.p_their()] face insistently.</span>","<span class='warning'>You invade [M]'s personal space, thrusting [src] into [M.p_their()] face insistently. You are the law.</span>")
|
||||
user.visible_message("<span class='warning'>[user] invades [H]'s personal space, thrusting [src] into [H.p_their()] face insistently.</span>",
|
||||
"<span class='warning'>You invade [H]'s personal space, thrusting [src] into [H.p_their()] face insistently. You are the law.</span>")
|
||||
|
||||
//////////////
|
||||
//OBJECTION!//
|
||||
|
||||
Reference in New Issue
Block a user