review polish: skull reject classifier checks ritualists before capacitance (was mislabeling ritual-gated rejections), fixed mangled indentation in SERVO_SKULL reject block, enumeration filter predicate now shared (mod:passes_breed_target_filter) between breed-priority init and breed_dump so the post-update diff can't drift; NOT installed yet (user in-session)

This commit is contained in:
2026-10-04 11:47:08 -04:00
parent a18194519b
commit 52cb8e9cbf
3 changed files with 25 additions and 20 deletions
+5 -1
View File
@@ -122,8 +122,12 @@ local DEFAULT_CLASS_SETTINGS = {
toggle_other = true, toggle_other = true,
breed_priorities = {}, breed_priorities = {},
} }
function mod:passes_breed_target_filter(breed_data)
return Breed.is_minion(breed_data) and breed_data.unit_template_name == "minion" and breed_data.smart_tag_target_type == "breed" and breed_data.faction_name ~= "imperium"
end
for breed_name, breed_data in pairs(breeds) do for breed_name, breed_data in pairs(breeds) do
if Breed.is_minion(breed_data) and breed_data.unit_template_name == "minion" and breed_data.smart_tag_target_type == "breed" and breed_data.faction_name ~= "imperium" then if mod:passes_breed_target_filter(breed_data) then
if breed_data.tags.elite then if breed_data.tags.elite then
DEFAULT_CLASS_SETTINGS.breed_priorities[breed_name] = 0 DEFAULT_CLASS_SETTINGS.breed_priorities[breed_name] = 0
elseif breed_data.tags.special then elseif breed_data.tags.special then
@@ -862,6 +862,8 @@ elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then
local sub local sub
if hit_unit_tag and hit_unit_tag._template and hit_unit_tag._template.name == TAG_NAMES.VETERAN_TAG then if hit_unit_tag and hit_unit_tag._template and hit_unit_tag._template.name == TAG_NAMES.VETERAN_TAG then
sub = "vet_conflict" sub = "vet_conflict"
elseif hit_unit_breed_name == "cultist_ritualist" or hit_unit_breed_name == "chaos_mutator_ritualist" then
sub = "ritual"
elseif mod_settings.servo_skull_mark_ignore_unaggroed and hit_unit_attacking_unit_id == -1 then elseif mod_settings.servo_skull_mark_ignore_unaggroed and hit_unit_attacking_unit_id == -1 then
sub = "unaggroed" sub = "unaggroed"
elseif not mod:has_enough_capacitance(hit_unit) then elseif not mod:has_enough_capacitance(hit_unit) then
@@ -62,8 +62,7 @@ function mod:dump_breeds()
table.sort(tags) table.sort(tags)
local pounce_setting = breed_data.companion_pounce_setting local pounce_setting = breed_data.companion_pounce_setting
local pounce_action = pounce_setting and pounce_setting.companion_pounce_action or "" local pounce_action = pounce_setting and pounce_setting.companion_pounce_action or ""
local passes_filter = Breed.is_minion(breed_data) and breed_data.unit_template_name == "minion" and local passes_filter = mod:passes_breed_target_filter(breed_data)
breed_data.smart_tag_target_type == "breed" and breed_data.faction_name ~= "imperium"
lines[#lines + 1] = string.format("%s|tpl=%s|tag_type=%s|faction=%s|boss=%s|filter=%s|her=%s|hef=%s|pounce=%s|tags=%s", lines[#lines + 1] = string.format("%s|tpl=%s|tag_type=%s|faction=%s|boss=%s|filter=%s|her=%s|hef=%s|pounce=%s|tags=%s",
breed_name, breed_name,
tostring(breed_data.unit_template_name), tostring(breed_data.unit_template_name),