17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 02:49:19 +02:00

feat(editor): infrastructure bound to the paths follows their changes

This commit is contained in:
maj00r
2026-10-04 00:14:03 +02:00
parent 7371b18910
commit 8778353b22
15 changed files with 2083 additions and 1 deletions

View File

@@ -227,6 +227,13 @@ class editor_track
static void velocity(TTrack &Track, double const Velocity);
static void damage(TTrack &Track, int const Damage);
// let the objects which belong to the paths follow their changes
static std::function<void(TTrack const &)> on_capture;
static std::function<void(std::vector<TTrack *> const &)> on_commit;
static std::function<void(TTrack &)> on_retire;
// called before the commit; the first argument keeps the beginning of the path, given in the last one
static std::function<void(TTrack &, TTrack &, segment_data const &)> on_split;
private:
static void disconnect(TTrack &Track);
static void join(TTrack &Track);