[lua] added sensor rail tile name and state access
Dieser Commit ist enthalten in:
Ursprung
b869e798d6
Commit
78ad243821
@ -1,4 +1,6 @@
|
||||
{
|
||||
"name": {},
|
||||
"state": {},
|
||||
"on_state_changed": {
|
||||
"parameters": [
|
||||
{
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
SensorRailTile::SensorRailTile(World& world, std::string_view _id) :
|
||||
StraightRailTile(world, _id, TileId::RailSensor),
|
||||
InputConsumer(static_cast<Object&>(*this), world),
|
||||
name{this, "name", id, PropertyFlags::ReadWrite | PropertyFlags::Store},
|
||||
name{this, "name", id, PropertyFlags::ReadWrite | PropertyFlags::Store | PropertyFlags::ScriptReadOnly},
|
||||
type{this, "type", SensorType::OccupancyDetector, PropertyFlags::ReadWrite | PropertyFlags::Store,
|
||||
[this](SensorType /*value*/)
|
||||
{
|
||||
@ -49,7 +49,7 @@ SensorRailTile::SensorRailTile(World& world, std::string_view _id) :
|
||||
inputValueChanged(input()->value == TriState::True, input());
|
||||
}
|
||||
}},
|
||||
state{this, "state", SensorState::Unknown, PropertyFlags::ReadOnly | PropertyFlags::StoreState}
|
||||
state{this, "state", SensorState::Unknown, PropertyFlags::ReadOnly | PropertyFlags::StoreState | PropertyFlags::ScriptReadOnly}
|
||||
, simulateTrigger{*this, "simulate_trigger",
|
||||
[this]()
|
||||
{
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren