mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
@@ -107,6 +107,17 @@ Path adjustment
|
||||
return
|
||||
gear_data.path = valid_paths[metadata]
|
||||
|
||||
/*
|
||||
Faction-based Path adjustment
|
||||
Same as the adjustment above, but the associated value is a list with the first value containing the path and the second the faction requirement
|
||||
*/
|
||||
|
||||
/datum/gear_tweak/path/faction/tweak_gear_data(var/metadata, var/datum/gear_data/gear_data)
|
||||
if(!(metadata in valid_paths))
|
||||
return
|
||||
gear_data.path = valid_paths[metadata][1]
|
||||
gear_data.faction_requirement = valid_paths[metadata][2]
|
||||
|
||||
/*
|
||||
Content adjustment
|
||||
*/
|
||||
|
||||
@@ -400,13 +400,38 @@ var/list/gear_datums = list()
|
||||
/datum/gear_data
|
||||
var/path
|
||||
var/location
|
||||
var/faction_requirement
|
||||
|
||||
/datum/gear_data/New(var/path, var/location)
|
||||
/datum/gear_data/New(var/path, var/location, var/faction)
|
||||
src.path = path
|
||||
src.location = location
|
||||
src.faction_requirement = faction
|
||||
|
||||
/datum/gear/proc/cant_spawn_item_reason(var/location, var/metadata, var/mob/living/carbon/human/human, var/datum/job/job, var/datum/preferences/prefs)
|
||||
var/datum/gear_data/gd = new(path, location, faction)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
if(metadata["[gt]"])
|
||||
gt.tweak_gear_data(metadata["[gt]"], gd, human)
|
||||
else
|
||||
gt.tweak_gear_data(gt.get_default(), gd, human)
|
||||
|
||||
var/obj/spawning_item = gd.path
|
||||
if(length(allowed_roles) && !(job.title in allowed_roles))
|
||||
return "You cannot spawn with the [initial(spawning_item.name)] with your current job!"
|
||||
if(!check_species_whitelist(human))
|
||||
return "You cannot spawn with the [initial(spawning_item.name)] with your current species!"
|
||||
if(gd.faction_requirement && (human.employer_faction != "Stellar Corporate Conglomerate" && gd.faction_requirement != human.employer_faction))
|
||||
return "You cannot spawn with the [initial(spawning_item.name)] with your current faction!"
|
||||
var/our_culture = text2path(prefs.culture)
|
||||
if(culture_restriction && !(our_culture in culture_restriction))
|
||||
return "You cannot spawn with the [initial(spawning_item.name)] with your current culture!"
|
||||
var/our_origin = text2path(prefs.origin)
|
||||
if(origin_restriction && !(our_origin in origin_restriction))
|
||||
return "You cannot spawn with the [initial(spawning_item.name)] with your current origin!"
|
||||
return null
|
||||
|
||||
/datum/gear/proc/spawn_item(var/location, var/metadata, var/mob/living/carbon/human/H)
|
||||
var/datum/gear_data/gd = new(path, location)
|
||||
var/datum/gear_data/gd = new(path, location, faction)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
if(metadata["[gt]"])
|
||||
gt.tweak_gear_data(metadata["[gt]"], gd, H)
|
||||
|
||||
@@ -132,3 +132,18 @@
|
||||
blindfold["blindfold"] = /obj/item/clothing/glasses/sunglasses/blindfold/white
|
||||
blindfold["blindfold, transparent"] = /obj/item/clothing/glasses/sunglasses/blindfold/white/seethrough
|
||||
gear_tweaks += new /datum/gear_tweak/path(blindfold)
|
||||
|
||||
/datum/gear/eyes/goon_goggles
|
||||
display_name = "tactical goggles selection"
|
||||
description = "A selection of tactical eyewear. Note that factional ones can only be taken by members of that faction."
|
||||
path = /obj/item/clothing/glasses/safety/goggles/goon
|
||||
|
||||
/datum/gear/eyes/goon_goggles/New()
|
||||
allowed_roles = security_positions
|
||||
..()
|
||||
var/list/goggles = list()
|
||||
goggles["goggles, tactical"] = list(/obj/item/clothing/glasses/safety/goggles/goon, null)
|
||||
goggles["goggles, tactical (PMCG)"] = list(/obj/item/clothing/glasses/safety/goggles/goon/pmc, "Private Military Contracting Group")
|
||||
goggles["goggles, tactical (Zavodskoi)"] = list(/obj/item/clothing/glasses/safety/goggles/goon/zavod, "Zavodskoi Interstellar")
|
||||
goggles["goggles, tactical (Idris)"] = list(/obj/item/clothing/glasses/safety/goggles/goon/idris, "Idris Incorporated")
|
||||
gear_tweaks += new /datum/gear_tweak/path/faction(goggles)
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
/datum/gear/mask/cloth
|
||||
display_name = "cloth mask"
|
||||
path = /obj/item/clothing/mask/cloth
|
||||
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
|
||||
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
|
||||
|
||||
Reference in New Issue
Block a user