16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 10:29:19 +02:00

Merge remote-tracking branch 'tmj/master' into sim

This commit is contained in:
milek7
2020-10-18 23:35:14 +02:00
244 changed files with 54164 additions and 11636 deletions

View File

@@ -47,4 +47,34 @@ public:
xOn = true;
Update();
};
// if the xOn model is missing, activate plain On instead
inline void TurnxOnWithOnAsFallback()
{
if (ModelxOn != nullptr) {
On = false;
xOn = true;
Update();
}
else {
TurnOn();
}
};
// if the xOn model is missing, activate plain Off instead
inline void TurnxOnWithOffAsFallback()
{
if (ModelxOn != nullptr) {
On = false;
xOn = true;
Update();
}
else {
TurnOff();
}
};
inline bool Active() const
{
return ( ( ModelOn != nullptr ) || ( ModelxOn != nullptr ) );
};
};