Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terror zone open chests option #626

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
@@ -87,8 +87,7 @@ type CharacterCfg struct {
ClassicMode bool `yaml:"classicMode"`
CloseMiniPanel bool `yaml:"closeMiniPanel"`
UseCentralizedPickit bool `yaml:"useCentralizedPickit"`
HidePortraits bool `yaml:"hidePortraits"`

HidePortraits bool `yaml:"hidePortraits"`

Scheduler Scheduler `yaml:"scheduler"`
Health struct {
@@ -206,6 +205,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"`
2 changes: 1 addition & 1 deletion internal/run/terror_zone.go
Original file line number Diff line number Diff line change
@@ -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)
}
1 change: 1 addition & 0 deletions internal/server/http_server.go
Original file line number Diff line number Diff line change
@@ -939,6 +939,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[]"] {
1 change: 1 addition & 0 deletions internal/server/templates/run_settings_components.gohtml
Original file line number Diff line number Diff line change
@@ -158,6 +158,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>