fix(tapes): a followed tape cut shorter meanwhile is read as it is, let go when the window closes

- what is read up to the file's end counts, not the length taken before it; the end kept is
  made of the bytes read, with no second read
- the window of the tapes forgets the followed one when closed
- the door sides change only with the end of the cab, not when it is left (0)
This commit is contained in:
maj00r
2026-11-15 23:56:25 +01:00
parent 192f9fa499
commit f1d77addae
3 changed files with 32 additions and 8 deletions

View File

@@ -302,8 +302,8 @@ public sealed class EventList : ListBox
movingOpen = false;
continue;
}
// another cab swaps the sides, and tells nothing of the doors
bool sameCab = b.CabEnd == s.CabEnd;
// the other end swaps the sides, and tells nothing of the doors; no cab (0) sees them as the front one does
bool sameCab = (b.CabEnd < 0) == (s.CabEnd < 0);
bool Came(CabDevices device) => !b.Has(device) && s.Has(device) && (sameCab || (device & DoorSides) == 0);
bool Went(CabDevices device) => b.Has(device) && !s.Has(device) && (sameCab || (device & DoorSides) == 0);
foreach (var (device, key) in Switched)