diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index e8dae65409e..bb0387ab4ee 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -445,3 +445,7 @@ GLOBAL_LIST_INIT(all_volume_channels, list( #define APPEARANCECHANGER_CHANGED_EYES "Eye Color" #define GET_DECL(D) (ispath(D, /decl) ? (decls_repository.fetched_decls[D] || decls_repository.get_decl(D)) : null) + +#define LOADOUT_WHITELIST_OFF 0 +#define LOADOUT_WHITELIST_LAX 1 +#define LOADOUT_WHITELIST_STRICT 2 \ No newline at end of file diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 67d14623cf6..1f82939221a 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -284,7 +284,10 @@ var/list/gamemode_cache = list() var/static/disable_cid_warn_popup = FALSE // whether or not to use the nightshift subsystem to perform lighting changes - var/static/enable_night_shifts = FALSE + var/static/enable_night_shifts = FALSE + + // How strictly the loadout enforces object species whitelists + var/loadout_whitelist = LOADOUT_WHITELIST_LAX var/static/vgs_access_identifier = null // VOREStation Edit - VGS var/static/vgs_server_port = null // VOREStation Edit - VGS diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm index 48a28a97005..e5822353990 100644 --- a/code/modules/client/preference_setup/loadout/loadout.dm +++ b/code/modules/client/preference_setup/loadout/loadout.dm @@ -62,14 +62,15 @@ var/list/gear_datums = list() /datum/category_item/player_setup_item/loadout/proc/valid_gear_choices(var/max_cost) . = list() - var/mob/preference_mob = preference_mob() + var/mob/preference_mob = preference_mob() //VOREStation Add for(var/gear_name in gear_datums) var/datum/gear/G = gear_datums[gear_name] - //VOREStation Removal Start - No need for species-based whitelists for species clothes - //if(G.whitelisted && G.whitelisted != pref.species) - // continue - //VOREStation Removal End + if(G.whitelisted && config.loadout_whitelist != LOADOUT_WHITELIST_OFF) + if(config.loadout_whitelist == LOADOUT_WHITELIST_STRICT && G.whitelisted != pref.species) + continue + if(config.loadout_whitelist == LOADOUT_WHITELIST_LAX && !is_alien_whitelisted(preference_mob(), GLOB.all_species[G.whitelisted])) + continue if(max_cost && G.cost > max_cost) continue //VOREStation Edit Start diff --git a/config/example/config.txt b/config/example/config.txt index dd07f7b73d5..735fe805e9e 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -555,3 +555,7 @@ ALLOW_URL_LINKS # Control which submaps are loaded for the Dynamic Engine system ENGINE_MAP Supermatter Engine,Edison's Bane + +# Controls how strictly the species whitelists on loadout entries are enforced +# Possible values: 0 (Off), 1 (Lax, user must be whitelisted for the species), 2 (Strict, user must be the species) +LOADOUT_WHITELIST 1 \ No newline at end of file