work on well of souls and yolo detection
This commit is contained in:
parent
3456e0d62a
commit
40d30115bf
41 changed files with 3031 additions and 148 deletions
|
|
@ -34,6 +34,16 @@ public class SavedSettings
|
|||
public MapType MapType { get; set; } = MapType.TrialOfChaos;
|
||||
public StashCalibration? StashCalibration { get; set; }
|
||||
public StashCalibration? ShopCalibration { get; set; }
|
||||
public bool ShowHudDebug { get; set; }
|
||||
public KulemakSettings Kulemak { get; set; } = new();
|
||||
}
|
||||
|
||||
public class KulemakSettings
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string InvitationTabPath { get; set; } = "";
|
||||
public string LootTabPath { get; set; } = "";
|
||||
public int InvitationCount { get; set; } = 15;
|
||||
}
|
||||
|
||||
public class ConfigStore
|
||||
|
|
@ -129,6 +139,33 @@ public class ConfigStore
|
|||
try
|
||||
{
|
||||
var raw = File.ReadAllText(_filePath);
|
||||
|
||||
// Migrate: BossRun was removed from BotMode, now it's MapType.Kulemak
|
||||
if (raw.Contains("\"bossRun\"") || raw.Contains("\"BossRun\""))
|
||||
{
|
||||
const System.Text.RegularExpressions.RegexOptions ic =
|
||||
System.Text.RegularExpressions.RegexOptions.IgnoreCase;
|
||||
|
||||
// Mode enum: bossRun → mapping
|
||||
using var doc = JsonDocument.Parse(raw);
|
||||
if (doc.RootElement.TryGetProperty("Mode", out var modeProp) &&
|
||||
modeProp.GetString()?.Equals("bossRun", StringComparison.OrdinalIgnoreCase) == true)
|
||||
{
|
||||
raw = System.Text.RegularExpressions.Regex.Replace(
|
||||
raw, @"""Mode""\s*:\s*""bossRun""", @"""Mode"": ""mapping""", ic);
|
||||
raw = System.Text.RegularExpressions.Regex.Replace(
|
||||
raw, @"""MapType""\s*:\s*""[^""]*""", @"""MapType"": ""kulemak""", ic);
|
||||
Log.Information("Migrated config: Mode bossRun -> mapping + MapType kulemak");
|
||||
}
|
||||
|
||||
// MapType enum value: bossRun → kulemak
|
||||
raw = System.Text.RegularExpressions.Regex.Replace(
|
||||
raw, @"""MapType""\s*:\s*""bossRun""", @"""MapType"": ""kulemak""", ic);
|
||||
|
||||
// Settings property name: BossRun → Kulemak
|
||||
raw = raw.Replace("\"BossRun\":", "\"Kulemak\":");
|
||||
}
|
||||
|
||||
var parsed = JsonSerializer.Deserialize<SavedSettings>(raw, JsonOptions);
|
||||
if (parsed == null) return new SavedSettings();
|
||||
|
||||
|
|
|
|||
|
|
@ -75,11 +75,27 @@ public enum BotMode
|
|||
Mapping
|
||||
}
|
||||
|
||||
public enum BossRunState
|
||||
{
|
||||
Idle,
|
||||
Preparing,
|
||||
TravelingToZone,
|
||||
WalkingToEntrance,
|
||||
UsingInvitation,
|
||||
Fighting,
|
||||
Looting,
|
||||
Returning,
|
||||
StoringLoot,
|
||||
Complete,
|
||||
Failed
|
||||
}
|
||||
|
||||
public enum MapType
|
||||
{
|
||||
TrialOfChaos,
|
||||
Temple,
|
||||
Endgame
|
||||
Endgame,
|
||||
Kulemak
|
||||
}
|
||||
|
||||
public enum GameUiState
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue