Skip to content

Commit edd662a

Browse files
authored
Merge pull request #1312 from myk002/myk_quickfort_notes
[quickfort] deduplicate notes blueprints if run on repeat
2 parents 630b49b + 714df2f commit edd662a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Template for new versions:
3131
## New Features
3232

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

3536
## Misc Improvements
3637
- `control-panel`: Add realistic-melting tweak to control-panel registry

internal/quickfort/notes.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ function do_run(_, grid, ctx)
3131
if #line > 0 then
3232
table.insert(lines, table.concat(line, ' '))
3333
end
34-
table.insert(ctx.messages, table.concat(lines, '\n'))
34+
local message = table.concat(lines, '\n')
35+
if not ctx.messages_set[message] then
36+
table.insert(ctx.messages, message)
37+
ctx.messages_set[message] = true
38+
end
3539
end
3640

3741
function do_orders()

0 commit comments

Comments
 (0)