feat: units can have comments

Closes #114
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-13 23:02:13 +03:00
parent 160eb8eea9
commit 9779beee99
6 changed files with 98 additions and 9 deletions

View File

@ -33,7 +33,7 @@ type (
}
UnitListItem struct {
Type string
Type, Comment string
Disabled bool
StackNeed, StackBefore, StackAfter int
}
@ -332,6 +332,7 @@ func (v *Units) Iterate(yield UnitYieldFunc) {
stackAfter := stackBefore + unit.StackChange()
if !yield(UnitListItem{
Type: unit.Type,
Comment: unit.Comment,
Disabled: unit.Disabled,
StackNeed: unit.StackNeed(),
StackBefore: stackBefore,