mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-06-01 04:53:29 -05:00
don't copy text for splitter segments
these have no data and are purely for modeling
This commit is contained in:
parent
ce27bdcd53
commit
c79652d2fd
|
|
@ -122,10 +122,12 @@ namespace HavenSoft.HexManiac.Core.Models.Runs {
|
|||
text.Append($"{ViewPort.CommentStart}{names[i]}{ViewPort.CommentStart}, ");
|
||||
}
|
||||
|
||||
text.Append(segment.ToText(data, offset, deep).Trim());
|
||||
if (j + 1 < self.ElementContent.Count) text.Append(", ");
|
||||
offset += segment.Length;
|
||||
length -= segment.Length;
|
||||
if (segment.Length > 0) {
|
||||
text.Append(segment.ToText(data, offset, deep).Trim());
|
||||
if (j + 1 < self.ElementContent.Count) text.Append(", ");
|
||||
offset += segment.Length;
|
||||
length -= segment.Length;
|
||||
}
|
||||
}
|
||||
if (i + 1 < self.ElementCount) text.Append(Environment.NewLine);
|
||||
offsets = new ArrayOffset(i + 1, 0, offset, 0);
|
||||
|
|
|
|||
|
|
@ -1115,6 +1115,17 @@ namespace HavenSoft.HexManiac.Tests {
|
|||
Assert.Equal(3, Model[0x20]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TableWithSplitterSegment_Copy_SplitterSegmentNotCopied() {
|
||||
ViewPort.Edit("^table[a:: b:: | c:: d::]3 ");
|
||||
ViewPort.SelectionStart = new(4, 1);
|
||||
ViewPort.SelectionEnd = new(11, 1);
|
||||
|
||||
ViewPort.Copy.Execute(FileSystem);
|
||||
|
||||
Assert.Equal("0, 0,", FileSystem.CopyText.value.Trim());
|
||||
}
|
||||
|
||||
private void ArrangeTrainerPokemonTeamData(byte structType, byte pokemonCount, int trainerCount) {
|
||||
CreateTextTable(HardcodeTablesModel.PokemonNameTable, 0x180, "ABCDEFGHIJKLMNOP".Select(c => c.ToString()).ToArray());
|
||||
CreateTextTable(HardcodeTablesModel.MoveNamesTable, 0x1B0, "qrstuvwxyz".Select(c => c.ToString()).ToArray());
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user