mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 00:51:26 +00:00
Jargon Passport (#11678)
This commit is contained in:
@@ -309,7 +309,7 @@ var/list/gear_datums = list()
|
||||
src.path = path
|
||||
src.location = location
|
||||
|
||||
/datum/gear/proc/spawn_item(var/location, var/metadata)
|
||||
/datum/gear/proc/spawn_item(var/location, var/metadata, var/mob/living/carbon/human/H)
|
||||
var/datum/gear_data/gd = new(path, location)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
if(metadata["[gt]"])
|
||||
@@ -332,3 +332,8 @@ var/list/gear_datums = list()
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
gt.tweak_item(item, gt.get_random())
|
||||
return item
|
||||
|
||||
/datum/gear/proc/check_species_whitelist(mob/living/carbon/human/H)
|
||||
if(whitelisted && (!(H.species.name in whitelisted)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -125,3 +125,26 @@
|
||||
scrunchy["tentacle tie, hoop"] = /obj/item/clothing/ears/skrell/scrunchy/hoop
|
||||
scrunchy["tentacle tie, backwater"] = /obj/item/clothing/ears/skrell/scrunchy/backwater
|
||||
gear_tweaks += new /datum/gear_tweak/path(scrunchy)
|
||||
|
||||
/datum/gear/accessory/skrell_passport
|
||||
display_name = "jargon federation passport"
|
||||
path = /obj/item/clothing/accessory/badge/passport/jargon
|
||||
sort_category = "Xenowear - Skrell"
|
||||
whitelisted = list(SPECIES_SKRELL, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER, SPECIES_DIONA)
|
||||
cost = 0
|
||||
flags = 0
|
||||
|
||||
// the whitelisted list ensures only people with skrell, vaurca, or diona whitelists can reach this check
|
||||
/datum/gear/accessory/skrell_passport/check_species_whitelist(mob/living/carbon/human/H)
|
||||
var/static/list/species_list = list(SPECIES_SKRELL, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_WORKER, SPECIES_VAURCA_BREEDER, SPECIES_DIONA)
|
||||
if(H.species.name in species_list)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/gear/accessory/skrell_passport/spawn_item(location, metadata, mob/living/carbon/human/H)
|
||||
var/obj/item/clothing/accessory/badge/passport/jargon/J = ..()
|
||||
var/static/list/species_name_to_tag = list(SPECIES_SKRELL = "_s", SPECIES_VAURCA_WARRIOR = "_v", SPECIES_VAURCA_WORKER = "_v", SPECIES_VAURCA_BREEDER = "_v", SPECIES_DIONA = "_d")
|
||||
var/tag = species_name_to_tag[H.species.name]
|
||||
if(tag)
|
||||
J.species_tag = tag
|
||||
return J
|
||||
|
||||
Reference in New Issue
Block a user