From afb458e2c24b6dd635e32a3d708d33f4cb8e74e9 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 3 Oct 2026 17:34:09 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20don't=20auto-mark=20when=20the=20skull?= =?UTF-8?q?=20can't=20shoot=20=E2=80=94=20mirrors=20game's=20validate=5Fta?= =?UTF-8?q?rget=5Ffunc=5Fshooting=5Fability=20(must=20be=20in=20a=20follow?= =?UTF-8?q?ing=20state=20+=20above=20minimum=20capacitance,=20with=20the?= =?UTF-8?q?=20game's=20training-grounds=20charge=20exemption);=20previousl?= =?UTF-8?q?y=20a=20ping=20issued=20while=20busy/low-charge=20hit=20the=20p?= =?UTF-8?q?revent=5Fshooting=5Factivation=5Fon=5Ffail=20branch=20which=20s?= =?UTF-8?q?ticks=20the=20tag=20for=20its=20full=2025s=20lifetime=20with=20?= =?UTF-8?q?no=20retry,=20blocking=20mark=5Flimit=20=E2=80=94=20the=20real?= =?UTF-8?q?=20'long=20cooldown=20after=20a=20kill'=20the=20game=20itself?= =?UTF-8?q?=20routes=20around=20for=20manual=20double-tags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutoMark/scripts/mods/AutoMark/AutoMark.lua | 6 +++++- .../scripts/mods/AutoMark/mark/servo_skull_mark.lua | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/AutoMark/scripts/mods/AutoMark/AutoMark.lua b/AutoMark/scripts/mods/AutoMark/AutoMark.lua index 6c72d2c..3cc8365 100644 --- a/AutoMark/scripts/mods/AutoMark/AutoMark.lua +++ b/AutoMark/scripts/mods/AutoMark/AutoMark.lua @@ -457,6 +457,10 @@ local function can_noospheric_command_boost() return player_ability_extension:has_enough_ability_charge_percentage("combat_ability", cryptic_talent_settings.servo_skull_shooting_tagging.minimum_capacitance) end +local function is_training_grounds() + return Managers.state.game_mode:game_mode_name() == "training_grounds" +end + local function is_player_in_platform() local locomotion_component = context.locomotion_component local locomotion_parent_unit = locomotion_component and locomotion_component.parent_unit @@ -473,7 +477,7 @@ local function is_tag_valid(tag_name) elseif tag_name == TAG_NAMES.ENEMY_TAG then return context.class_name ~= "veteran" or not context.has_focus_target elseif tag_name == TAG_NAMES.SERVO_SKULL_TAG then - return context.class_name == "cryptic" and context.has_servo_skull and not mod:is_servo_skull_hacking() + return context.class_name == "cryptic" and context.has_servo_skull and mod:is_servo_skull_ready_to_shoot() and (is_training_grounds() or can_noospheric_command_boost()) end return false end diff --git a/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua b/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua index a66c9b6..669d553 100644 --- a/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua +++ b/AutoMark/scripts/mods/AutoMark/mark/servo_skull_mark.lua @@ -210,6 +210,19 @@ function mod:is_servo_skull_hacking() return state == servo_skull_states.hacking end +function mod:is_servo_skull_ready_to_shoot() + local companion_spawner_extension = context.companion_spawner_extension + local companion_unit = companion_spawner_extension and companion_spawner_extension:spawned_unit_lookup(special_rules.cryptic_servo_skull_hack) + if not companion_unit then + return false + end + + local game_session = Managers.state.game_session:game_session() + local game_object_id = Managers.state.unit_spawner:game_object_id(companion_unit) + local state = get_game_object_field(game_session, game_object_id, "state") + return state == servo_skull_states.following or state == servo_skull_states.following_shooting or state == servo_skull_states.following_shooting_ability +end + function mod:is_noospheric_command_boost_breed_valid(target_unit) local unit_data_extension = ScriptUnit_extension(target_unit, "unit_data_system") local breed_data = unit_data_extension and unit_data_extension._breed