Make target-lock a feature flag

This commit is contained in:
2025-03-03 06:23:47 -06:00
committed by Celtic Minstrel
parent 3e10e2923b
commit 4ebb8e890c
2 changed files with 3 additions and 2 deletions

View File

@@ -98,7 +98,8 @@ std::string help_text_rsrc = "help";
std::map<std::string,std::vector<std::string>> feature_flags = { std::map<std::string,std::vector<std::string>> feature_flags = {
// Legacy behavior of the T debug action (used by some replays) // Legacy behavior of the T debug action (used by some replays)
// does not change the party's outdoors location // does not change the party's outdoors location
{"debug-enter-town", {"move-outdoors"}} {"debug-enter-town", {"move-outdoors"}},
{"target-lock", {"V1"}}
}; };
struct cParseEntrance { struct cParseEntrance {

View File

@@ -1040,7 +1040,7 @@ short scan_for_response(const char *str) {
void handle_target_mode(eGameMode target_mode, int range) { void handle_target_mode(eGameMode target_mode, int range) {
overall_mode = target_mode; overall_mode = target_mode;
// Lock on to enemies in range: // Lock on to enemies in range:
if(get_bool_pref("TargetLock", true)){ if(has_feature_flag("target-lock", "V1") && get_bool_pref("TargetLock", true)){
location loc = univ.current_pc().combat_pos; location loc = univ.current_pc().combat_pos;
std::vector<location> enemy_locs_in_range; std::vector<location> enemy_locs_in_range;