debug: skull_invalid sub-gate breakdown (vet_conflict/unaggroed/capacitance/range) + one-shot wrapper-hack state trace (is_server/self/flag) — sniper candidate reaches pass loop fine (1870 lines w/ snipers in candidates), hack shadow confirmed on call path but flagged-branch never fires, need internals
This commit is contained in:
@@ -54,6 +54,11 @@ local function ensure_automark_tag_hook()
|
|||||||
-- runs inside this window.
|
-- runs inside this window.
|
||||||
local patched = {}
|
local patched = {}
|
||||||
patched.set_tag = function(self, template_name, tagger_unit, target_unit, target_location)
|
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
|
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]
|
local target_extension = self._unit_extension_data[target_unit]
|
||||||
if target_extension and target_extension._automark_hack_order then
|
if target_extension and target_extension._automark_hack_order then
|
||||||
|
|||||||
@@ -807,7 +807,21 @@ function mod:find_auto_mark_target_unit(min_range, max_range, tag_name, tag_cont
|
|||||||
end
|
end
|
||||||
elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then
|
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 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")
|
omni_reject("skull_invalid")
|
||||||
|
end
|
||||||
goto continue
|
goto continue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user