train: name now set to id on creation

Dieser Commit ist enthalten in:
Reinder Feenstra 2025-09-28 23:58:42 +02:00
Ursprung 7360f10c0a
Commit 7790fdbfc6

Datei anzeigen

@ -50,7 +50,7 @@ static inline bool isPowered(const RailVehicle& vehicle)
Train::Train(World& world, std::string_view _id) :
IdObject(world, _id),
m_speedTimer{EventLoop::ioContext},
name{this, "name", "", PropertyFlags::ReadWrite | PropertyFlags::Store | PropertyFlags::ScriptReadOnly},
name{this, "name", id, PropertyFlags::ReadWrite | PropertyFlags::Store | PropertyFlags::ScriptReadOnly},
lob{*this, "lob", 0, LengthUnit::MilliMeter, PropertyFlags::ReadWrite | PropertyFlags::Store},
overrideLength{this, "override_length", false, PropertyFlags::ReadWrite | PropertyFlags::Store,
[this](bool value)