Skip to content

Commit

Permalink
Merge pull request #1312 from myk002/myk_quickfort_notes
Browse files Browse the repository at this point in the history
[quickfort] deduplicate notes blueprints if run on repeat
  • Loading branch information
myk002 authored Sep 28, 2024
2 parents 630b49b + 714df2f commit edd662a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit edd662a

Please sign in to comment.