mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 23:17:28 +01:00
* Begin clickcode attack_self fix Begins the work to make everything call back to parent for attack_self so that signals are sacred. * Makes MORE things call the attack_self() parent Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'. * Finishes making the rest of attack_self call parent. As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items. * begone foul demon * some more cleanup * These * GOD this was annoying * yeh * Fix this * fLARES * Thesee too * toys! * Even more! * More fixes * Even more * rest of em * these too * Update syndie.dm * hardref clear * Update code/game/gamemodes/nuclear/pinpointer.dm * Update code/game/objects/effects/mines.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/blueprints_vr.dm * Update code/game/objects/items/contraband_vr.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/gunbox_vr.dm * Update code/game/objects/items/weapons/gift_wrappaper.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/crayons.dm * Update code/game/objects/items/gunbox.dm * these too * Update maintpanel_stack.dm * angry warning * Fixes packaged snacks. Fixes improper var default. * Special handling for these * proper poly types * Fixes magclaws Makes the 'features' it had just part of base magboots that can be adjusted via varswap. * Fixes jackets Fixes https://github.com/VOREStation/VOREStation/issues/18941 * Small bugfix Makes p_Theyre properly capitialize Makes examine show proper wording * Update gift_wrappaper.dm
280 lines
10 KiB
Plaintext
280 lines
10 KiB
Plaintext
/*
|
|
Badges are worn on the belt or neck, and can be used to show that the holder is an authorized
|
|
Security agent - the user details can be imprinted on holobadges with a Security-access ID card,
|
|
or they can be emagged to accept any ID for use in disguises.
|
|
*/
|
|
|
|
/obj/item/clothing/accessory/badge
|
|
name = "detective's badge"
|
|
desc = "A corporate security badge, made from gold and set on false leather."
|
|
icon_state = "marshalbadge"
|
|
slot_flags = SLOT_BELT | SLOT_TIE
|
|
slot = ACCESSORY_SLOT_MEDAL
|
|
|
|
var/stored_name
|
|
var/badge_string = "Corporate Security"
|
|
special_handling = TRUE
|
|
///var for attack_self chain
|
|
var/sheriff_badge = FALSE
|
|
///Another var for attack_self chain
|
|
var/fluff_badge = FALSE
|
|
var/holo = FALSE
|
|
|
|
/obj/item/clothing/accessory/badge/proc/set_name(var/new_name)
|
|
stored_name = new_name
|
|
name = "[initial(name)] ([stored_name])"
|
|
|
|
/obj/item/clothing/accessory/badge/proc/set_desc(var/mob/living/carbon/human/H)
|
|
|
|
/obj/item/clothing/accessory/badge/attack_self(mob/user)
|
|
. = ..(user)
|
|
if(.)
|
|
return TRUE
|
|
if(sheriff_badge)
|
|
return FALSE
|
|
if(fluff_badge)
|
|
return FALSE
|
|
if(!stored_name)
|
|
if(holo)
|
|
to_chat(user, "Waving around a holobadge before swiping an ID would be pretty pointless.")
|
|
return
|
|
else
|
|
to_chat(user, "You polish your old badge fondly, shining up the surface.")
|
|
set_name(user.real_name)
|
|
return
|
|
|
|
if(isliving(user))
|
|
if(stored_name)
|
|
user.visible_message(span_notice("[user] displays their [src.name].\nIt reads: [stored_name], [badge_string]."),span_notice("You display your [src.name].\nIt reads: [stored_name], [badge_string]."))
|
|
else
|
|
user.visible_message(span_notice("[user] displays their [src.name].\nIt reads: [badge_string]."),span_notice("You display your [src.name]. It reads: [badge_string]."))
|
|
|
|
/obj/item/clothing/accessory/badge/attack(mob/living/carbon/human/M, mob/living/user)
|
|
if(isliving(user))
|
|
user.visible_message(span_danger("[user] invades [M]'s personal space, thrusting [src] into their face insistently."),span_danger("You invade [M]'s personal space, thrusting [src] into their face insistently."))
|
|
user.do_attack_animation(M)
|
|
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //NO SPAM
|
|
|
|
// General Badges
|
|
/obj/item/clothing/accessory/badge/old
|
|
name = "faded badge"
|
|
desc = "A faded badge, backed with leather."
|
|
icon_state = "badge_round"
|
|
|
|
/obj/item/clothing/accessory/badge/idbadge/nt
|
|
name = "\improper NT ID badge"
|
|
desc = "A descriptive identification badge with the holder's credentials. This one has red marks with the NanoTrasen logo on it."
|
|
icon_state = "ntbadge"
|
|
badge_string = null
|
|
|
|
/obj/item/clothing/accessory/badge/press
|
|
name = "corporate press pass"
|
|
desc = "A corporate reporter's pass, emblazoned with the NanoTrasen logo."
|
|
icon_state = "pressbadge"
|
|
item_state = "pbadge"
|
|
badge_string = "Corporate Reporter"
|
|
w_class = ITEMSIZE_TINY
|
|
|
|
drop_sound = 'sound/items/drop/rubber.ogg'
|
|
pickup_sound = 'sound/items/pickup/rubber.ogg'
|
|
|
|
/obj/item/clothing/accessory/badge/press/independent
|
|
name = "press pass"
|
|
desc = "A freelance journalist's pass."
|
|
icon_state = "pressbadge-i"
|
|
badge_string = "Freelance Journalist"
|
|
|
|
/obj/item/clothing/accessory/badge/press/plastic
|
|
name = "plastic press pass"
|
|
desc = "A journalist's 'pass' shaped, for whatever reason, like a security badge. It is made of plastic."
|
|
icon_state = "pbadge"
|
|
badge_string = "Sicurity Journelist"
|
|
w_class = ITEMSIZE_SMALL
|
|
|
|
// Holobadges
|
|
/obj/item/clothing/accessory/badge/holo
|
|
name = "holobadge"
|
|
desc = "This glowing blue badge marks the holder as THE LAW."
|
|
icon_state = "holobadge"
|
|
var/emagged //Emagging removes Sec check.
|
|
var/valid_access = list(ACCESS_SECURITY) //Default access is security, to be overriden or expanded as desired
|
|
holo = TRUE
|
|
|
|
/obj/item/clothing/accessory/badge/holo/cord
|
|
icon_state = "holobadge-cord"
|
|
slot_flags = SLOT_MASK | SLOT_TIE | SLOT_BELT
|
|
|
|
/obj/item/clothing/accessory/badge/holo/emag_act(var/remaining_charges, var/mob/user)
|
|
if (emagged)
|
|
to_chat(user, span_danger("\The [src] is already cracked."))
|
|
return
|
|
else
|
|
emagged = 1
|
|
to_chat(user, span_danger("You crack the holobadge security checks."))
|
|
return 1
|
|
|
|
/obj/item/clothing/accessory/badge/holo/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
|
if(istype(O, /obj/item/card/id) || istype(O, /obj/item/pda))
|
|
|
|
var/obj/item/card/id/id_card = null
|
|
|
|
if(istype(O, /obj/item/card/id))
|
|
id_card = O
|
|
else
|
|
var/obj/item/pda/pda = O
|
|
id_card = pda.id
|
|
|
|
var/found = FALSE
|
|
for(var/access in valid_access)
|
|
if((access in id_card.GetAccess()) || emagged)
|
|
to_chat(user, "You imprint your ID details onto the badge.")
|
|
set_name(user.real_name)
|
|
found = TRUE
|
|
break
|
|
if(!found)
|
|
to_chat(user, "[src] rejects your insufficient access rights.")
|
|
return
|
|
..()
|
|
|
|
/obj/item/storage/box/holobadge
|
|
name = "holobadge box"
|
|
desc = "A box claiming to contain holobadges."
|
|
starts_with = list(
|
|
/obj/item/clothing/accessory/badge/holo/officer = 2,
|
|
/obj/item/clothing/accessory/badge/holo = 2,
|
|
/obj/item/clothing/accessory/badge/holo/cord = 2
|
|
)
|
|
|
|
/obj/item/clothing/accessory/badge/holo/officer
|
|
name = "officer's badge"
|
|
desc = "A bronze corporate security badge. Stamped with the words '" + JOB_SECURITY_OFFICER + ".'"
|
|
icon_state = "bronzebadge"
|
|
slot_flags = SLOT_TIE | SLOT_BELT
|
|
|
|
/obj/item/clothing/accessory/badge/holo/warden
|
|
name = "warden's holobadge"
|
|
desc = "A silver corporate security badge. Stamped with the words '" + JOB_WARDEN + ".'"
|
|
icon_state = "silverbadge"
|
|
slot_flags = SLOT_TIE | SLOT_BELT
|
|
|
|
/obj/item/clothing/accessory/badge/holo/hos
|
|
name = "head of security's holobadge"
|
|
desc = "An immaculately polished gold security badge. Stamped with the words '" + JOB_HEAD_OF_SECURITY + ".'"
|
|
icon_state = "goldbadge"
|
|
slot_flags = SLOT_TIE | SLOT_BELT
|
|
|
|
/obj/item/clothing/accessory/badge/holo/detective
|
|
name = "detective's holobadge"
|
|
desc = "An immaculately polished gold security badge on leather. Labeled '" + JOB_DETECTIVE + ".'"
|
|
icon_state = "marshalbadge"
|
|
slot_flags = SLOT_TIE | SLOT_BELT
|
|
|
|
/obj/item/clothing/accessory/badge/holo/investigator
|
|
name = "\improper investigator holobadge"
|
|
desc = "This badge marks the holder as an investigative agent."
|
|
icon_state = "invbadge"
|
|
badge_string = "Corporate Investigator"
|
|
valid_access = list(ACCESS_SECURITY, ACCESS_LAWYER) //Permitting both sec and IAA!
|
|
slot_flags = SLOT_TIE | SLOT_BELT
|
|
|
|
/obj/item/clothing/accessory/badge/holo/sheriff
|
|
name = "sheriff badge"
|
|
desc = "A star-shaped brass badge denoting who the law is around these parts."
|
|
icon_state = "sheriff"
|
|
slot_flags = SLOT_TIE | SLOT_BELT
|
|
|
|
/obj/item/storage/box/holobadge/hos
|
|
name = "holobadge box"
|
|
desc = "A box claiming to contain holobadges."
|
|
starts_with = list(
|
|
/obj/item/clothing/accessory/badge/holo/officer = 2,
|
|
/obj/item/clothing/accessory/badge/holo/warden = 1,
|
|
/obj/item/clothing/accessory/badge/holo/detective = 2,
|
|
/obj/item/clothing/accessory/badge/holo/hos = 1,
|
|
/obj/item/clothing/accessory/badge/holo/cord = 1
|
|
)
|
|
|
|
// Sheriff Badge (toy)
|
|
/obj/item/clothing/accessory/badge/sheriff
|
|
name = "sheriff badge"
|
|
desc = "This town ain't big enough for the two of us, pardner."
|
|
icon_state = "sheriff_toy"
|
|
item_state = "sheriff_toy"
|
|
special_handling = TRUE
|
|
sheriff_badge = TRUE
|
|
|
|
/obj/item/clothing/accessory/badge/sheriff/attack_self(mob/user)
|
|
. = ..(user)
|
|
if(.)
|
|
return TRUE
|
|
user.visible_message("[user] shows their sheriff badge. There's a new sheriff in town!",\
|
|
"You flash the sheriff badge to everyone around you!")
|
|
|
|
/obj/item/clothing/accessory/badge/sheriff/attack(mob/living/carbon/human/M, mob/living/user)
|
|
if(isliving(user))
|
|
user.visible_message(span_danger("[user] invades [M]'s personal space, the sheriff badge into their face!."),span_danger("You invade [M]'s personal space, thrusting the sheriff badge into their face insistently."))
|
|
user.do_attack_animation(M)
|
|
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //NO SPAM
|
|
|
|
// Synthmorph bag / Corporation badges. Primarily used on the robobag, but can be worn. Default is NT.
|
|
/obj/item/clothing/accessory/badge/corporate_tag
|
|
name = "NanoTrasen Badge"
|
|
desc = "A plain metallic plate that might denote the wearer as a member of NanoTrasen."
|
|
icon_state = "tag_nt"
|
|
item_state = "badge"
|
|
badge_string = "NanoTrasen"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/morpheus
|
|
name = "Morpheus Badge"
|
|
desc = "A plain metallic plate that might denote the wearer as a member of Morpheus Cyberkinetics."
|
|
icon_state = "tag_blank"
|
|
badge_string = "Morpheus"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/wardtaka
|
|
name = "Ward-Takahashi Badge"
|
|
desc = "A plain metallic plate that might denote the wearer as a member of Ward-Takahashi."
|
|
icon_state = "tag_ward"
|
|
badge_string = "Ward-Takahashi"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/zenghu
|
|
name = "Zeng-Hu Badge"
|
|
desc = "A plain metallic plate that might denote the wearer as a member of Zeng-Hu."
|
|
icon_state = "tag_zeng"
|
|
badge_string = "Zeng-Hu"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/gilthari
|
|
name = "Gilthari Badge"
|
|
desc = "An opulent metallic plate that might denote the wearer as a member of Gilthari."
|
|
icon_state = "tag_gil"
|
|
badge_string = "Gilthari"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/veymed
|
|
name = "Vey-Medical Badge"
|
|
desc = "A plain metallic plate that might denote the wearer as a member of Vey-Medical."
|
|
icon_state = "tag_vey"
|
|
badge_string = "Vey-Medical"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/hephaestus
|
|
name = "Hephaestus Badge"
|
|
desc = "A rugged metallic plate that might denote the wearer as a member of Hephaestus."
|
|
icon_state = "tag_heph"
|
|
badge_string = "Hephaestus"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/grayson
|
|
name = "Grayson Badge"
|
|
desc = "A rugged metallic plate that might denote the wearer as a member of Grayson."
|
|
icon_state = "tag_grayson"
|
|
badge_string = "Grayson"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/xion
|
|
name = "Xion Badge"
|
|
desc = "A rugged metallic plate that might denote the wearer as a member of Xion."
|
|
icon_state = "tag_xion"
|
|
badge_string = "Xion"
|
|
|
|
/obj/item/clothing/accessory/badge/corporate_tag/bishop
|
|
name = "Bishop Badge"
|
|
desc = "A sleek metallic plate that might denote the wearer as a member of Bishop."
|
|
icon_state = "tag_bishop"
|
|
badge_string = "Bishop"
|