mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Adds an origin and culture system to govern possible faction items, citizenships, accents, religions. (#13400)
This commit is contained in:
@@ -760,27 +760,19 @@
|
||||
for(var/thing in prefs.gear)
|
||||
var/datum/gear/G = gear_datums[thing]
|
||||
if(G)
|
||||
|
||||
if(G.augment) //augments are handled somewhere else
|
||||
continue
|
||||
|
||||
var/permitted
|
||||
if(G.allowed_roles)
|
||||
for(var/job_name in G.allowed_roles)
|
||||
if(job.title == job_name)
|
||||
permitted = TRUE
|
||||
break
|
||||
else
|
||||
permitted = TRUE
|
||||
|
||||
if(!G.check_species_whitelist(H))
|
||||
permitted = FALSE
|
||||
|
||||
if(G.faction && G.faction != H.employer_faction)
|
||||
permitted = FALSE
|
||||
var/permitted = !G.allowed_roles || (job.title in G.allowed_roles)
|
||||
permitted = permitted && G.check_species_whitelist(H)
|
||||
permitted = permitted && (!G.faction || (G.faction == H.employer_faction))
|
||||
var/decl/origin_item/culture/our_culture = decls_repository.get_decl(text2path(prefs.culture))
|
||||
permitted = permitted && (!G.culture_restriction || (our_culture in G.culture_restriction))
|
||||
var/decl/origin_item/origin/our_origin = decls_repository.get_decl(text2path(prefs.origin))
|
||||
permitted = permitted && (!G.origin_restriction || (our_origin in G.origin_restriction))
|
||||
|
||||
if(!permitted)
|
||||
to_chat(H, "<span class='warning'>Your current job or whitelist status does not permit you to spawn with [thing]!</span>")
|
||||
to_chat(H, "<span class='warning'>Your current job, culture, origin or whitelist status does not permit you to spawn with [thing]!</span>")
|
||||
continue
|
||||
|
||||
if(G.slot && !(G.slot in custom_equip_slots))
|
||||
@@ -918,23 +910,16 @@
|
||||
if(!G.augment)
|
||||
continue
|
||||
|
||||
var/permitted = FALSE
|
||||
if(G.allowed_roles)
|
||||
for(var/job_name in G.allowed_roles)
|
||||
if(rank.title == job_name)
|
||||
permitted = TRUE
|
||||
break
|
||||
else
|
||||
permitted = TRUE
|
||||
|
||||
if(G.whitelisted && (!(H.species.name in G.whitelisted)))
|
||||
permitted = FALSE
|
||||
|
||||
if(G.faction && G.faction != H.employer_faction)
|
||||
permitted = FALSE
|
||||
var/permitted = !G.allowed_roles || (rank.title in G.allowed_roles)
|
||||
permitted = permitted && G.check_species_whitelist(H)
|
||||
permitted = permitted && (!G.faction || (G.faction == H.employer_faction))
|
||||
var/decl/origin_item/culture/our_culture = decls_repository.get_decl(text2path(prefs.culture))
|
||||
permitted = permitted && (!G.culture_restriction || (our_culture in G.culture_restriction))
|
||||
var/decl/origin_item/origin/our_origin = decls_repository.get_decl(text2path(prefs.origin))
|
||||
permitted = permitted && (!G.origin_restriction || (our_origin in G.origin_restriction))
|
||||
|
||||
if(!permitted)
|
||||
to_chat(H, SPAN_WARNING("Your current job or whitelist status does not permit you to spawn with [thing]!"))
|
||||
to_chat(H, SPAN_WARNING("Your current job, culture, origin or whitelist status does not permit you to spawn with [thing]!"))
|
||||
continue
|
||||
|
||||
var/metadata
|
||||
|
||||
Reference in New Issue
Block a user