Merge remote-tracking branch 'tgstation/master' into upstream-6-2-2026

This commit is contained in:
shayoki
2026-06-03 01:23:54 -05:00
1259 changed files with 50763 additions and 28726 deletions
@@ -8,24 +8,33 @@ PROCESSING_SUBSYSTEM_DEF(ai_behaviors)
/datum/controller/subsystem/movement/ai_movement,
)
wait = 1
///List of all ai_behavior singletons, key is the typepath while assigned value is a newly created instance of the typepath. See SetupAIBehaviors()
/// List of all ai_behavior singletons, key is the typepath while assigned value is a newly created instance of the typepath. See setup_ai_behaviors()
var/list/ai_behaviors
///List of all targeting_strategy singletons, key is the typepath while assigned value is a newly created instance of the typepath. See SetupAIBehaviors()
/// List of all targeting_strategy singletons, key is the typepath while assigned value is a newly created instance of the typepath. See setup_targeting_strats()
var/list/targeting_strategies
/// List of all target_priority_strategy singletons, key is the typepath while assigned value is a newly created instance of the typepath. See setup_target_priority_strats()
var/list/target_priority_strategies
/datum/controller/subsystem/processing/ai_behaviors/Initialize()
SetupAIBehaviors()
SetupTargetingStrats()
setup_ai_behaviors()
setup_targeting_strats()
setup_target_priority_strats()
return SS_INIT_SUCCESS
/datum/controller/subsystem/processing/ai_behaviors/proc/SetupAIBehaviors()
/datum/controller/subsystem/processing/ai_behaviors/proc/setup_ai_behaviors()
ai_behaviors = list()
for(var/behavior_type in subtypesof(/datum/ai_behavior))
var/datum/ai_behavior/ai_behavior = new behavior_type
ai_behaviors[behavior_type] = ai_behavior
/datum/controller/subsystem/processing/ai_behaviors/proc/SetupTargetingStrats()
/datum/controller/subsystem/processing/ai_behaviors/proc/setup_targeting_strats()
targeting_strategies = list()
for(var/target_type in subtypesof(/datum/targeting_strategy))
var/datum/targeting_strategy/target_start = new target_type
targeting_strategies[target_type] = target_start
/datum/controller/subsystem/processing/ai_behaviors/proc/setup_target_priority_strats()
target_priority_strategies = list()
for(var/target_type in subtypesof(/datum/target_priority_strategy))
var/datum/target_priority_strategy/target_start = new target_type
target_priority_strategies[target_type] = target_start
@@ -79,8 +79,17 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
var/list/quirk_points = list() //Assoc. list of quirk names and their "point cost"; positive numbers are good traits, and negative ones are bad
///An assoc list of quirks that can be obtained as a hardcore character, and their hardcore value.
var/list/hardcore_quirks = list()
/// Whether or not quirk points are enabled, per server config
var/points_enabled
/// The number of max positive quirks that we allow, per server config
var/max_positive_quirks
// The default number of quirk points that you get to spend, per server config
var/default_quirk_points
/datum/controller/subsystem/processing/quirks/Initialize()
points_enabled = !CONFIG_GET(flag/disable_quirk_points)
max_positive_quirks = CONFIG_GET(number/max_positive_quirks)
default_quirk_points = CONFIG_GET(number/default_quirk_points)
get_quirks()
return SS_INIT_SUCCESS
@@ -145,7 +154,6 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
///Cached list of possible quirks
var/list/possible_quirks = quirks.Copy()
var/max_positive_quirks = CONFIG_GET(number/max_positive_quirks)
if(max_positive_quirks < 0)
max_positive_quirks = 6
@@ -209,9 +217,7 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
/datum/controller/subsystem/processing/quirks/proc/filter_invalid_quirks(list/quirks, list/augments) // SKYRAT EDIT - AUGMENTS+
var/list/new_quirks = list()
var/list/positive_quirks = list()
var/points_enabled = !CONFIG_GET(flag/disable_quirk_points)
var/max_positive_quirks = CONFIG_GET(number/max_positive_quirks)
var/balance = -CONFIG_GET(number/default_quirk_points)
var/balance = -default_quirk_points
var/list/all_quirks = get_quirks()