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

Merge branch 'master' into feat/modern-editor

This commit is contained in:
2026-10-08 17:44:58 +02:00
41 changed files with 479 additions and 319 deletions

View File

@@ -148,6 +148,11 @@ state_manager::update_scripting_interface() {
auto *time{ Memory.find( "__simulation.time" ) };
auto *date{ Memory.find( "__simulation.date" ) };
if( weather == nullptr || time == nullptr || date == nullptr ) {
// scripting interface cells weren't created, nothing to synchronize
return;
}
if( simulation::is_ready ) {
// potentially adjust weather
if( weather->Value1() != m_scriptinginterface.weather->Value1() ) {
@@ -407,7 +412,6 @@ void state_manager::process_commands() {
pantograph.fLenL1 * std::sin( pantograph.fAngleL )
+ pantograph.fLenU1 * std::sin( pantograph.fAngleU )
+ pantograph.fHeight;
vehicle->MoverParameters->EnginePowerSource.CollectorParameters.CollectorsNo;
}
vehicle = vehicle->Prev();

View File

@@ -78,7 +78,6 @@ world_environment::compute_weather() {
Global.Overcast <= 0.70 ? 6 :
Global.Overcast <= 0.80 ? 7 :
Global.Overcast <= 0.90 ? 8 :
Global.Overcast > 0.90 ? 9 :
9;
}