mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 19:52:47 +01:00
Sieć trakcyjna: przęsła wg typów sieci, wysięgniki z katalogu, bramki, kotwienia i edytor sieci
Sam kod exe z gałęzi siec-trakcyjna (bez testów, notatek i danych z tests/catenary). Dane (data/traction_*.txt) leżą poza repozytorium. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Tqn7T8D1Gx3ptKtZgNtX5
This commit is contained in:
@@ -32,6 +32,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "application/application.h"
|
||||
#include "utilities/Logs.h"
|
||||
#include "vehicle/Driver.h"
|
||||
#include "world/catenary_scene.h"
|
||||
|
||||
namespace simulation {
|
||||
|
||||
@@ -357,6 +358,7 @@ void state_manager::process_commands() {
|
||||
Global.AirTemperature = commanddata.param1;
|
||||
Global.Overcast = commanddata.param2;
|
||||
simulation::Environment.compute_weather();
|
||||
catenary_scene_temperature(); // ciężary kotwień idą za temperaturą
|
||||
}
|
||||
|
||||
if (commanddata.command == user_command::insertmodel) {
|
||||
|
||||
@@ -27,6 +27,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "model/AnimModel.h"
|
||||
#include "rendering/lightarray.h"
|
||||
#include "world/TractionPower.h"
|
||||
#include "world/catenary_scene.h"
|
||||
#include "world/Road.h"
|
||||
#include "world/Sweep.h"
|
||||
#include "world/RoadPoint.h"
|
||||
@@ -59,6 +60,9 @@ state_serializer::deserialize_begin( std::string const &Scenariofile ) {
|
||||
EditorTerrain.reset();
|
||||
scene::terrain_file::references().clear();
|
||||
|
||||
// podwieszenia sieci trakcyjnej poprzedniej scenerii
|
||||
catenary_scene_clear();
|
||||
|
||||
// TODO: move initialization to separate routine so we can reuse it
|
||||
SafeDelete( Region );
|
||||
Region = new scene::basic_region();
|
||||
@@ -166,6 +170,10 @@ state_serializer::deserialize_continue(std::shared_ptr<deserializer_state> state
|
||||
if( lookup != state->functionmap.end() ) {
|
||||
lookup->second();
|
||||
}
|
||||
else if( token == "catenary" ) {
|
||||
// sieć trakcyjna: plik z podwieszeniami, "catenary <plik> endcatenary"
|
||||
catenary_scene_load( Input );
|
||||
}
|
||||
else {
|
||||
ErrorLog( "Bad scenario: unexpected token \"" + token + "\" defined in file \"" + Input.Name() + "\" (line " + std::to_string( Input.Line() - 1 ) + ")" );
|
||||
}
|
||||
@@ -447,6 +455,7 @@ state_serializer::deserialize_firstinit( cParser &Input, scene::scratch_data &Sc
|
||||
// crossings and traffic points go by the lanes, which are complete at this point
|
||||
simulation::Roadpoints.InitRoadpoints();
|
||||
simulation::Traction.InitTraction();
|
||||
catenary_scene_resolve();
|
||||
simulation::Events.InitEvents();
|
||||
simulation::Events.InitLaunchers();
|
||||
simulation::Memory.InitCells();
|
||||
|
||||
Reference in New Issue
Block a user