mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-23 15:34:52 -04:00
drafting
This commit is contained in:
parent
285f33c261
commit
c09a3f04db
@ -39,6 +39,7 @@ type (
|
||||
Type, Comment string
|
||||
Disabled bool
|
||||
StackNeed, StackBefore, StackAfter int
|
||||
TargetUnit, TargetPort int
|
||||
}
|
||||
|
||||
// Range is used to represent a range [Start,End) of integers
|
||||
@ -325,11 +326,19 @@ func (v *Units) Item(index int) UnitListItem {
|
||||
return UnitListItem{}
|
||||
}
|
||||
unit := v.d.Song.Patch[v.d.InstrIndex].Units[index]
|
||||
targetUnit := 0
|
||||
if unit.Type == "send" {
|
||||
if _, tu, err := v.d.Song.Patch.FindUnit(unit.Parameters["target"]); err == nil {
|
||||
targetUnit = tu + 1
|
||||
}
|
||||
}
|
||||
return UnitListItem{
|
||||
Type: unit.Type,
|
||||
Comment: unit.Comment,
|
||||
Disabled: unit.Disabled,
|
||||
StackNeed: unit.StackNeed(),
|
||||
TargetUnit: targetUnit,
|
||||
TargetPort: unit.Parameters["port"],
|
||||
StackBefore: 0,
|
||||
StackAfter: 0,
|
||||
}
|
||||
|
Reference in New Issue
Block a user