mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 17:59:18 +02:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
13
station.cpp
13
station.cpp
@@ -49,20 +49,19 @@ basic_station::update_load( TDynamicObject *First, Mtable::TTrainParameters &Sch
|
||||
|
||||
auto ¶meters { *vehicle->MoverParameters };
|
||||
|
||||
if( ( true == parameters.LoadType.empty() )
|
||||
&& ( parameters.LoadAccepted.find( "passengers" ) != std::string::npos ) ) {
|
||||
// set the type for empty cars
|
||||
parameters.LoadType = "passengers";
|
||||
if( parameters.LoadType.name.empty() ) {
|
||||
// (try to) set the cargo type for empty cars
|
||||
parameters.AssignLoad( "passengers" );
|
||||
}
|
||||
|
||||
if( parameters.LoadType == "passengers" ) {
|
||||
if( parameters.LoadType.name == "passengers" ) {
|
||||
// NOTE: for the time being we're doing simple, random load change calculation
|
||||
// TODO: exchange driven by station parameters and time of the day
|
||||
auto unloadcount = static_cast<int>(
|
||||
laststop ? parameters.Load :
|
||||
laststop ? parameters.LoadAmount :
|
||||
firststop ? 0 :
|
||||
std::min<float>(
|
||||
parameters.Load,
|
||||
parameters.LoadAmount,
|
||||
Random( parameters.MaxLoad * 0.10 * stationsizemodifier ) ) );
|
||||
auto loadcount = static_cast<int>(
|
||||
laststop ?
|
||||
|
||||
Reference in New Issue
Block a user