debug: one-shot hook-fire trace (is_server/flag state inside wrapped set_tag) — last run: hook installed OK, tag created-then-gone or branch-skipped, console shows zero SmartTagSystem warnings, ambiguous
This commit is contained in:
@@ -45,6 +45,11 @@ local function ensure_automark_tag_hook()
|
||||
local cls = getmetatable(smart_tag_system)
|
||||
if type(cls) == "table" and cls.set_tag ~= nil then
|
||||
mod:hook(cls, "set_tag", function(previous_hook, 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_hook_fired then
|
||||
mod.omni_hack_hook_fired = true
|
||||
local ext = target_unit and self._unit_extension_data[target_unit]
|
||||
mod:diag("OMNI-HACK-DIAG hook FIRE is_server=", tostring(self._is_server), " flagged=", tostring(ext and ext._automark_hack_order), " has_ext=", tostring(ext ~= nil), " target=", tostring(target_unit), " loc=", tostring(target_location))
|
||||
end
|
||||
if template_name == HACK_TAG_NAME and target_unit and self._is_server then
|
||||
local target_extension = self._unit_extension_data[target_unit]
|
||||
if target_extension and target_extension._automark_hack_order then
|
||||
|
||||
Reference in New Issue
Block a user