mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Added support for religious restrictions in the loadout (#18685)
Co-authored-by: Cody Brittain <cbrittain10@live.com>
This commit is contained in:
co-authored by
Cody Brittain
parent
c15f93236e
commit
a2bdb77577
@@ -244,7 +244,8 @@ var/list/gear_datums = list()
|
||||
var/available = (G.check_faction(pref.faction) \
|
||||
&& (job && G.check_role(job.title)) \
|
||||
&& G.check_culture(text2path(pref.culture)) \
|
||||
&& G.check_origin(text2path(pref.origin)))
|
||||
&& G.check_origin(text2path(pref.origin)) \
|
||||
&& G.check_religion(pref.religion))
|
||||
var/ticked = (G.display_name in pref.gear)
|
||||
var/style = ""
|
||||
|
||||
@@ -458,6 +459,13 @@ var/list/gear_datums = list()
|
||||
*/
|
||||
var/faction
|
||||
|
||||
/**
|
||||
* A string of the religion that can use this item
|
||||
*
|
||||
* If left `null`, any religion can spawn with this item
|
||||
*/
|
||||
var/religion
|
||||
|
||||
/**
|
||||
* A `/list` of [/singleton/origin_item/culture] paths that can use this item
|
||||
*/
|
||||
@@ -583,6 +591,12 @@ var/list/gear_datums = list()
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// arg should be a religion name string
|
||||
/datum/gear/proc/check_religion(var/religion_)
|
||||
if((religion && religion_) && (religion != religion_))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// arg should be a role name string
|
||||
/datum/gear/proc/check_role(var/role)
|
||||
if(role && allowed_roles && !(role in allowed_roles))
|
||||
|
||||
Reference in New Issue
Block a user