Skip to content

Commit

Permalink
Terror zone open chests option (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunblood authored Feb 5, 2025
1 parent e73047d commit 77d4778
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ type CharacterCfg struct {
SkipOnImmunities []stat.Resist `yaml:"skipOnImmunities"`
SkipOtherRuns bool `yaml:"skipOtherRuns"`
Areas []area.ID `yaml:"areas"`
OpenChests bool `yaml:"openChests"`
} `yaml:"terror_zone"`
Leveling struct {
EnsurePointsAllocation bool `yaml:"ensurePointsAllocation"`
Expand Down
2 changes: 1 addition & 1 deletion internal/run/terror_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (tz TerrorZone) Run() error {
}
}
if slices.Contains(availableTzs, tzArea) {
action.ClearCurrentLevel(false, tz.customTZEnemyFilter())
action.ClearCurrentLevel(tz.ctx.CharacterCfg.Game.TerrorZone.OpenChests, tz.customTZEnemyFilter())
} else {
tz.ctx.Logger.Debug("Skipping area %v", tzArea.Area().Name)
}
Expand Down
1 change: 1 addition & 0 deletions internal/server/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ func (s *HttpServer) characterSettings(w http.ResponseWriter, r *http.Request) {

cfg.Game.TerrorZone.FocusOnElitePacks = r.Form.Has("gameTerrorZoneFocusOnElitePacks")
cfg.Game.TerrorZone.SkipOtherRuns = r.Form.Has("gameTerrorZoneSkipOtherRuns")
cfg.Game.TerrorZone.OpenChests = r.Form.Has("gameTerrorZoneOpenChests")

cfg.Game.TerrorZone.SkipOnImmunities = []stat.Resist{}
for _, i := range r.Form["gameTerrorZoneSkipOnImmunities[]"] {
Expand Down
1 change: 1 addition & 0 deletions internal/server/templates/run_settings_components.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
<fieldset>
<label><input type="checkbox" name="gameTerrorZoneFocusOnElitePacks" {{ if .Config.Game.TerrorZone.FocusOnElitePacks }}checked{{ end }}> Focus on elite packs</label>
<label><input type="checkbox" name="gameTerrorZoneSkipOtherRuns" {{ if .Config.Game.TerrorZone.SkipOtherRuns }}checked{{ end }}> Skip all runs and only do TZ when available</label>
<label><input type="checkbox" name="gameTerrorZoneOpenChests" {{ if .Config.Game.TerrorZone.OpenChests }}checked{{ end }}> Open chests</label>
<label>Skip on immunities</label>
<fieldset class="grid">
<label><input type="checkbox" name="gameTerrorZoneSkipOnImmunities[]" value="cold" {{ if isInSlice .Config.Game.TerrorZone.SkipOnImmunities "cold" }}checked{{ end }}> Cold</label>
Expand Down

0 comments on commit 77d4778

Please sign in to comment.