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

[quickfort] deduplicate notes blueprints if run on repeat #1312

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Template for new versions:
## New Features

## Fixes
- `gui/quickfort`: only print a help blueprint's text once even if the repeat setting is enabled

## Misc Improvements
- `control-panel`: Add realistic-melting tweak to control-panel registry
Expand Down
6 changes: 5 additions & 1 deletion internal/quickfort/notes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ function do_run(_, grid, ctx)
if #line > 0 then
table.insert(lines, table.concat(line, ' '))
end
table.insert(ctx.messages, table.concat(lines, '\n'))
local message = table.concat(lines, '\n')
if not ctx.messages_set[message] then
table.insert(ctx.messages, message)
ctx.messages_set[message] = true
end
end

function do_orders()
Expand Down