From 625c30e26440a763e6f697b688660f2eeb5f16fc Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 3 Oct 2026 16:53:34 -0400 Subject: [PATCH] =?UTF-8?q?debug:=20skull=5Finvalid=20sub-gate=20breakdown?= =?UTF-8?q?=20(vet=5Fconflict/unaggroed/capacitance/range)=20+=20one-shot?= =?UTF-8?q?=20wrapper-hack=20state=20trace=20(is=5Fserver/self/flag)=20?= =?UTF-8?q?=E2=80=94=20sniper=20candidate=20reaches=20pass=20loop=20fine?= =?UTF-8?q?=20(1870=20lines=20w/=20snipers=20in=20candidates),=20hack=20sh?= =?UTF-8?q?adow=20confirmed=20on=20call=20path=20but=20flagged-branch=20ne?= =?UTF-8?q?ver=20fires,=20need=20internals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mods/AutoMark/mark/servo_skull_mark.lua | 5 ++++ .../AutoMark/targeting/custom_targeting.lua | 24 +++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua b/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua index 9321672..a66c9b6 100644 --- a/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua +++ b/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua @@ -54,6 +54,11 @@ local function ensure_automark_tag_hook() -- runs inside this window. local patched = {} patched.set_tag = function(self, template_name, tagger_unit, target_unit, target_location) + if template_name == HACK_TAG_NAME and mod_settings.debug_mode and not mod.omni_hack_wrapper_seen then + mod.omni_hack_wrapper_seen = true + local ext = target_unit and self._unit_extension_data[target_unit] + mod:diag("OMNI-HACK-DIAG wrapper-hack is_server=", tostring(self._is_server), " self_is_sys=", tostring(self == smart_tag_system), " flagged=", tostring(ext and ext._automark_hack_order), " has_ext=", tostring(ext ~= nil)) + end if self == smart_tag_system and target_unit and self._is_server and not patched.in_branch and template_name == HACK_TAG_NAME then local target_extension = self._unit_extension_data[target_unit] if target_extension and target_extension._automark_hack_order then diff --git a/AutoMark/scripts/mods/AutoMark/targeting/custom_targeting.lua b/AutoMark/scripts/mods/AutoMark/targeting/custom_targeting.lua index b46f93b..ba7139d 100644 --- a/AutoMark/scripts/mods/AutoMark/targeting/custom_targeting.lua +++ b/AutoMark/scripts/mods/AutoMark/targeting/custom_targeting.lua @@ -805,11 +805,25 @@ function mod:find_auto_mark_target_unit(min_range, max_range, tag_name, tag_cont omni_reject("companion_invalid") goto continue end - elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then - if not is_servo_skull_tag_target_valid(hit_unit, hit_unit_tag, hit_unit_breed_name, hit_unit_breed_data, hit_unit_attacking_unit_id, game_session, removed_units, companion_position, hit_unit_center_pos, max_ability_charges, remaining_capacitance) then - omni_reject("skull_invalid") - goto continue - end +elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then + if not is_servo_skull_tag_target_valid(hit_unit, hit_unit_tag, hit_unit_breed_name, hit_unit_breed_data, hit_unit_attacking_unit_id, game_session, removed_units, companion_position, hit_unit_center_pos, max_ability_charges, remaining_capacitance) then + if omni_rejects then + local sub + if hit_unit_tag and hit_unit_tag._template and hit_unit_tag._template.name == TAG_NAMES.VETERAN_TAG then + sub = "vet_conflict" + elseif mod_settings.servo_skull_mark_ignore_unaggroed and hit_unit_attacking_unit_id == -1 then + sub = "unaggroed" + elseif not mod:has_enough_capacitance(hit_unit) then + sub = "capacitance" + else + sub = "range" + end + omni_reject("skull:" .. sub) + else + omni_reject("skull_invalid") + end + goto continue + end end local visible