mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Adds a priority before species but after the default (#94750)
This commit is contained in:
@@ -2,35 +2,38 @@
|
||||
/// The default priority level
|
||||
#define PREFERENCE_PRIORITY_DEFAULT 1
|
||||
|
||||
/// For things that should be applied after the default prio, but before species to apply properly.
|
||||
#define PREFERENCE_PRIORITY_PRE_SPECIES 2
|
||||
|
||||
/// The priority at which species runs, needed for external organs to apply properly.
|
||||
#define PREFERENCE_PRIORITY_SPECIES 2
|
||||
#define PREFERENCE_PRIORITY_SPECIES 3
|
||||
|
||||
/**
|
||||
* Some preferences get applied directly to bodyparts (anything head_flags related right now).
|
||||
* These must apply after species, as species gaining might replace the bodyparts of the human.
|
||||
*/
|
||||
#define PREFERENCE_PRIORITY_BODYPARTS 3
|
||||
#define PREFERENCE_PRIORITY_BODYPARTS 4
|
||||
|
||||
/// The priority at which gender is determined, needed for proper randomization.
|
||||
#define PREFERENCE_PRIORITY_GENDER 4
|
||||
#define PREFERENCE_PRIORITY_GENDER 5
|
||||
|
||||
/// The priority at which body type is decided, applied after gender so we can
|
||||
/// support the "use gender" option.
|
||||
#define PREFERENCE_PRIORITY_BODY_TYPE 5
|
||||
#define PREFERENCE_PRIORITY_BODY_TYPE 6
|
||||
|
||||
/// Used for preferences that rely on body setup being finalized.
|
||||
#define PREFERENCE_PRORITY_LATE_BODY_TYPE 6
|
||||
#define PREFERENCE_PRORITY_LATE_BODY_TYPE 7
|
||||
|
||||
/// Equpping items based on preferences.
|
||||
/// Should happen after species and body type to make sure it looks right.
|
||||
/// Mostly redundant, but a safety net for saving/loading.
|
||||
#define PREFERENCE_PRIORITY_LOADOUT 7
|
||||
#define PREFERENCE_PRIORITY_LOADOUT 8
|
||||
|
||||
/// The priority at which names are decided, needed for proper randomization.
|
||||
#define PREFERENCE_PRIORITY_NAMES 8
|
||||
#define PREFERENCE_PRIORITY_NAMES 9
|
||||
|
||||
/// Preferences that aren't names, but change the name changes set by PREFERENCE_PRIORITY_NAMES.
|
||||
#define PREFERENCE_PRIORITY_NAME_MODIFICATIONS 9
|
||||
#define PREFERENCE_PRIORITY_NAME_MODIFICATIONS 10
|
||||
|
||||
/// The maximum preference priority, keep this updated, but don't use it for `priority`.
|
||||
#define MAX_PREFERENCE_PRIORITY PREFERENCE_PRIORITY_NAME_MODIFICATIONS
|
||||
@@ -70,7 +73,8 @@ GLOBAL_LIST_INIT(preference_entries_by_key, init_preference_entries_by_key())
|
||||
|
||||
var/list/flattened = list()
|
||||
for (var/index in 1 to MAX_PREFERENCE_PRIORITY)
|
||||
flattened += preferences[index]
|
||||
if(preferences[index])
|
||||
flattened += preferences[index]
|
||||
return flattened
|
||||
|
||||
/// Represents an individual preference.
|
||||
|
||||
Reference in New Issue
Block a user